summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useGeminiStream.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks/useGeminiStream.ts')
-rw-r--r--packages/cli/src/ui/hooks/useGeminiStream.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts
index 29ce313d..19cb244d 100644
--- a/packages/cli/src/ui/hooks/useGeminiStream.ts
+++ b/packages/cli/src/ui/hooks/useGeminiStream.ts
@@ -60,6 +60,7 @@ export const useGeminiStream = (
config: Config,
onDebugMessage: (message: string) => void,
handleSlashCommand: (cmd: PartListUnion) => boolean,
+ shellModeActive: boolean,
) => {
const toolRegistry = config.getToolRegistry();
const [initError, setInitError] = useState<string | null>(null);
@@ -120,7 +121,7 @@ export const useGeminiStream = (
if (handleSlashCommand(trimmedQuery)) {
return { queryToSend: null, shouldProceed: false };
}
- if (handleShellCommand(trimmedQuery)) {
+ if (shellModeActive && handleShellCommand(trimmedQuery)) {
return { queryToSend: null, shouldProceed: false };
}
@@ -608,6 +609,7 @@ export const useGeminiStream = (
isResponding,
setShowHelp,
handleSlashCommand,
+ shellModeActive,
handleShellCommand,
config,
addItem,