summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
authorDeWitt Clinton <[email protected]>2025-05-17 21:57:27 -0700
committerGitHub <[email protected]>2025-05-17 21:57:27 -0700
commit13a6a9a690900a50287d344592bf02bdfb2586f1 (patch)
tree9c1426336a26e83973e554cfc3e77fba8c629b77 /packages/cli/src/ui/hooks/slashCommandProcessor.ts
parent9749fcb4256b87a47480ea77ff25f07aa0c4ce45 (diff)
Introduce a small easter egg. Woof. (#412)
Also changes auto-completion and /help to skip over slash commands that don't contain a description to avoid spoiling the surprise.
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index f489c648..095f4ad7 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -15,7 +15,7 @@ import { addMemoryEntry } from '../../config/memoryUtils.js';
export interface SlashCommand {
name: string;
altName?: string;
- description: string;
+ description?: string;
action: (mainCommand: string, subCommand?: string, args?: string) => void;
}
@@ -31,6 +31,7 @@ export const useSlashCommandProcessor = (
onDebugMessage: (message: string) => void,
openThemeDialog: () => void,
performMemoryRefresh: () => Promise<void>, // Add performMemoryRefresh prop
+ toggleCorgiMode: () => void,
) => {
const addMessage = useCallback(
(message: Message) => {
@@ -132,6 +133,12 @@ export const useSlashCommandProcessor = (
},
},
{
+ name: 'corgi',
+ action: (_mainCommand, _subCommand, _args) => {
+ toggleCorgiMode();
+ },
+ },
+ {
name: 'quit',
altName: 'exit',
description: 'exit the cli',
@@ -151,6 +158,7 @@ export const useSlashCommandProcessor = (
showMemoryAction,
addMemoryAction,
addMessage,
+ toggleCorgiMode,
],
);