summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
authorSeth Troisi <[email protected]>2025-04-30 22:26:28 +0000
committerSeth Troisi <[email protected]>2025-04-30 22:32:29 +0000
commit2616e965a7caa39d731bda881db5a2feb851aa34 (patch)
tree96c2e6e0eea6a8b976f2c0c43d51d0f1659789af /packages/cli/src/ui/hooks/slashCommandProcessor.ts
parent5f5edb4c9bac24c4875ffc1a5a97ad8cf11f4436 (diff)
Moved theme to slashCommand
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts27
1 files changed, 17 insertions, 10 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index f7f93b9d..89649810 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -30,18 +30,10 @@ export const useSlashCommandProcessor = (
setHistory: React.Dispatch<React.SetStateAction<HistoryItem[]>>,
setDebugMessage: React.Dispatch<React.SetStateAction<string>>,
getNextMessageId: (baseTimestamp: number) => number,
+ openThemeDialog: () => void,
) => {
const slashCommands: SlashCommand[] = [
{
- name: 'clear',
- description: 'clear the screen',
- action: (_value: PartListUnion) => {
- // This just clears the *UI* history, not the model history.
- setDebugMessage('Clearing terminal.');
- setHistory((_) => []);
- },
- },
- {
name: 'help',
description: 'for help on gemini-code',
action: (_value: PartListUnion) => {
@@ -57,6 +49,22 @@ export const useSlashCommandProcessor = (
},
},
{
+ name: 'clear',
+ description: 'clear the screen',
+ action: (_value: PartListUnion) => {
+ // This just clears the *UI* history, not the model history.
+ setDebugMessage('Clearing terminal.');
+ setHistory((_) => []);
+ },
+ },
+ {
+ name: 'theme',
+ description: 'change the theme',
+ action: (_value: PartListUnion) => {
+ openThemeDialog();
+ },
+ },
+ {
name: 'exit',
description: '',
action: (_value: PartListUnion) => {
@@ -85,7 +93,6 @@ export const useSlashCommandProcessor = (
process.exit(0);
},
},
- // Removed /theme command, handled in App.tsx
];
// Checks if the query is a slash command and executes the command if it is.