mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(ui): disable input prompt during tool confirmation (#7935)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
|||||||
type HistoryItemWithoutId,
|
type HistoryItemWithoutId,
|
||||||
AuthState,
|
AuthState,
|
||||||
} from './types.js';
|
} from './types.js';
|
||||||
import { MessageType } from './types.js';
|
import { MessageType, StreamingState } from './types.js';
|
||||||
import {
|
import {
|
||||||
type EditorType,
|
type EditorType,
|
||||||
type Config,
|
type Config,
|
||||||
@@ -699,7 +699,20 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
|||||||
|
|
||||||
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
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
|
// Compute available terminal height based on controls measurement
|
||||||
const availableTerminalHeight = useMemo(() => {
|
const availableTerminalHeight = useMemo(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user