mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-08 04:10:35 -07:00
Simplify paste handling (#16654)
This commit is contained in:
committed by
GitHub
parent
41369f67eb
commit
94d5ae541e
@@ -396,11 +396,11 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
// We should probably stop supporting paste if the InputPrompt is not
|
||||
// focused.
|
||||
/// We want to handle paste even when not focused to support drag and drop.
|
||||
if (!focus && !key.paste) {
|
||||
if (!focus && key.name !== 'paste') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.paste) {
|
||||
if (key.name === 'paste') {
|
||||
// Record paste time to prevent accidental auto-submission
|
||||
if (!isTerminalPasteTrusted(kittyProtocol.enabled)) {
|
||||
setRecentUnsafePasteTime(Date.now());
|
||||
|
||||
Reference in New Issue
Block a user