mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
Fix Esc cancel during streaming (#18039)
This commit is contained in:
@@ -482,6 +482,14 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
key.name === 'escape' &&
|
||||||
|
(streamingState === StreamingState.Responding ||
|
||||||
|
streamingState === StreamingState.WaitingForConfirmation)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (key.name === 'paste') {
|
if (key.name === 'paste') {
|
||||||
// Record paste time to prevent accidental auto-submission
|
// Record paste time to prevent accidental auto-submission
|
||||||
if (!isTerminalPasteTrusted(kittyProtocol.enabled)) {
|
if (!isTerminalPasteTrusted(kittyProtocol.enabled)) {
|
||||||
@@ -977,6 +985,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||||||
backgroundShells.size,
|
backgroundShells.size,
|
||||||
backgroundShellHeight,
|
backgroundShellHeight,
|
||||||
history,
|
history,
|
||||||
|
streamingState,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user