summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/shellCommandProcessor.ts
diff options
context:
space:
mode:
authorBrandon Keiji <[email protected]>2025-05-13 23:55:49 +0000
committerGitHub <[email protected]>2025-05-13 16:55:49 -0700
commitd3303fd3a004ee816c2c498c2f7ffa51753afc07 (patch)
treec8764197104ed1d33c5c0efa5cb1dfc69b6df38f /packages/cli/src/ui/hooks/shellCommandProcessor.ts
parentc4c11f1d65233f31751cee65e29aa6ae3f7f2410 (diff)
refactor: move nested debugmessage and slashcommand hooks outside of useGeminiStream (#341)
Diffstat (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/shellCommandProcessor.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts
index 16106bb0..d0615ce5 100644
--- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts
@@ -19,7 +19,7 @@ import { UseHistoryManagerReturn } from './useHistoryManager.js';
export const useShellCommandProcessor = (
addItemToHistory: UseHistoryManagerReturn['addItem'],
setStreamingState: React.Dispatch<React.SetStateAction<StreamingState>>,
- setDebugMessage: React.Dispatch<React.SetStateAction<string>>,
+ onDebugMessage: (message: string) => void,
config: Config,
) => {
/**
@@ -50,7 +50,7 @@ export const useShellCommandProcessor = (
}
const targetDir = config.getTargetDir();
- setDebugMessage(
+ onDebugMessage(
`Executing shell command in ${targetDir}: ${commandToExecute}`,
);
const execOptions = {
@@ -80,7 +80,7 @@ export const useShellCommandProcessor = (
return true; // Command was initiated
},
- [config, setDebugMessage, addItemToHistory, setStreamingState],
+ [config, onDebugMessage, addItemToHistory, setStreamingState],
);
return { handleShellCommand };