From 4693137b821a285948988932ef39ce5c39d65288 Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Sun, 7 Sep 2025 16:17:20 -0400 Subject: [PATCH] fix(ui): disable input prompt during tool confirmation (#7935) Co-authored-by: Jacob Richman --- packages/cli/src/ui/AppContainer.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/AppContainer.tsx b/packages/cli/src/ui/AppContainer.tsx index 0444a3d771..32d085ec5e 100644 --- a/packages/cli/src/ui/AppContainer.tsx +++ b/packages/cli/src/ui/AppContainer.tsx @@ -20,7 +20,7 @@ import { type HistoryItemWithoutId, AuthState, } from './types.js'; -import { MessageType } from './types.js'; +import { MessageType, StreamingState } from './types.js'; import { type EditorType, type Config, @@ -699,7 +699,20 @@ Logging in with Google... Please restart Gemini CLI to continue. const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit); - const isInputActive = !initError && !isProcessing; + /** + * Determines if the input prompt should be active and accept user input. + * Input is disabled during: + * - Initialization errors + * - Slash command processing + * - Tool confirmations (WaitingForConfirmation state) + * - Any future streaming states not explicitly allowed + */ + const isInputActive = + !initError && + !isProcessing && + (streamingState === StreamingState.Idle || + streamingState === StreamingState.Responding) && + !isProQuotaDialogOpen; // Compute available terminal height based on controls measurement const availableTerminalHeight = useMemo(() => {