mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-21 11:30:38 -07:00
Increase paste timeout + add warning. (#13099)
This commit is contained in:
committed by
GitHub
parent
ab6b2293e1
commit
d03496b710
@@ -18,10 +18,11 @@ import {
|
||||
import { ESC } from '../utils/input.js';
|
||||
import { parseMouseEvent } from '../utils/mouse.js';
|
||||
import { FOCUS_IN, FOCUS_OUT } from '../hooks/useFocus.js';
|
||||
import { appEvents, AppEvent } from '../../utils/events.js';
|
||||
|
||||
export const BACKSLASH_ENTER_TIMEOUT = 5;
|
||||
export const ESC_TIMEOUT = 50;
|
||||
export const PASTE_TIMEOUT = 50;
|
||||
export const PASTE_TIMEOUT = 30_000;
|
||||
|
||||
// Parse the key itself
|
||||
const KEY_INFO_MAP: Record<
|
||||
@@ -211,7 +212,12 @@ function bufferPaste(
|
||||
key = yield;
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
if (key === null || key.name === 'paste-end') {
|
||||
if (key === null) {
|
||||
appEvents.emit(AppEvent.PasteTimeout);
|
||||
break;
|
||||
}
|
||||
|
||||
if (key.name === 'paste-end') {
|
||||
break;
|
||||
}
|
||||
buffer += key.sequence;
|
||||
|
||||
@@ -125,7 +125,7 @@ export interface UIState {
|
||||
showDebugProfiler: boolean;
|
||||
showFullTodos: boolean;
|
||||
copyModeEnabled: boolean;
|
||||
selectionWarning: boolean;
|
||||
warningMessage: string | null;
|
||||
}
|
||||
|
||||
export const UIStateContext = createContext<UIState | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user