diff options
| author | Taylor Mullen <[email protected]> | 2025-05-19 16:11:45 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-05-19 16:16:47 -0700 |
| commit | 323b1298f91c7fe86f5108f8dd369b71ad81a146 (patch) | |
| tree | 874f5dc7ea98fd78672f93add3c190dfc582e1ee /packages/cli/src/ui/hooks/shellCommandProcessor.ts | |
| parent | a756489f861ad58cddf67f9bfb84251d82d09169 (diff) | |
fix: Ensure user written `!` is treated opaquely if not in shell mode\n\n- Addresses an issue where commands prefixed with `!` (e.g., `!ls`) were incorrectly handled by the shell command processor if the `!` was added after initially typing the command.\n- Ensures that such commands are correctly forwarded to the Gemini model.\n- Updates `useGeminiStream` to be aware of shell mode to properly manage streaming state.\n\nFixes https://buganizer.corp.google.com/issues/418761305
Diffstat (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/shellCommandProcessor.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index f1d9af32..5e43712b 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -8,7 +8,6 @@ import { exec as _exec } from 'child_process'; import { useCallback } from 'react'; import { Config } from '@gemini-code/server'; import { type PartListUnion } from '@google/genai'; -import { getCommandFromQuery } from '../utils/commandUtils.js'; import { UseHistoryManagerReturn } from './useHistoryManager.js'; import crypto from 'crypto'; import path from 'path'; @@ -34,10 +33,6 @@ export const useShellCommandProcessor = ( return false; } - const [symbol] = getCommandFromQuery(rawQuery); - if (symbol !== '!' && symbol !== '$') { - return false; - } let commandToExecute = rawQuery.trim().slice(1).trimStart(); // wrap command to write pwd to temporary file |
