The slow motion after pasting in the input box is just bloody awful and a massive waste of time. That clever idea needs to be quickly changed back to pasting it directly appearing. Clever idea
What happened?
The slow motion after pasting in the input box is just bloody awful and a massive waste of time. That clever idea needs to be quickly changed back to pasting it directly appearing. Clever idea ****
What did you expect to happen?
The slow motion after pasting in the input box is just bloody awful and a massive waste of time. That clever idea needs to be quickly changed back to pasting it directly appearing. Clever idea ****
Client information
$ gemini /about
# paste output here
Login information
The slow motion after pasting in the input box is just bloody awful and a massive waste of time. That clever idea needs to be quickly changed back to pasting it directly appearing. Clever idea
Anything else we need to know?
The slow motion after pasting in the input box is just bloody awful and a massive waste of time. That clever idea needs to be quickly changed back to pasting it directly appearing. Clever idea
stupid idea
Need to wait 3 to 5 minutes to copy a complex prompt. Please revert.
Sorry you are experiencing this! I will take a look today. We arent intentionally doing this but changes to how we are handling paste could be causing this on some terminals. Fyi @bbiggs who may have clever ideas on how to fix this. If we cant fix on the input layer we may need to make sire text-buffer does a better job of batching changes when restreaming a stream of input so the performance is acceptable even if it doesnt know the change is a paste. Can you let me know which terminal and OS you are running on so that I can be confident I am fixing your issue?
About Gemini CLI
CLI Version: 0.1.7
Git Commit: 55cc809
Model: gemini-2.5-flash
Sandbox: No sandbox
OS: win32
Auth Method: gemini-api-key
I cut and pasted my prompt into InputPrompt. My prompt is 267 lines 5000+ chars.
I am receiving lots of messages like that once the prompt is completed, same message repeated, not sure if it's related:
[API Error: {"error":{"message":"{\n "error": {\n "code": 429,\n "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.",\n "status": "RESOURCE_EXHAUSTED",\n "details": [\n {\n "@type": "type.googleapis.com/google.rpc.QuotaFailure",\n "violations": [\n {\n "quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests",\n "quotaId": "GenerateRequestsPerMinutePerProjectPerModel-FreeTier",\n "quotaDimensions": {\n "location": "global",\n "model": "gemini-2.5-flash"\n },\n "quotaValue": "10"\n }\n ]\n },\n {\n "@type": "type.googleapis.com/google.rpc.Help",\n "links": [\n {\n "description": "Learn more about Gemini API quotas",\n "url": "https://ai.google.dev/gemini-api/docs/rate-limits"\n }\n ]\n },\n {\n "@type": "type.googleapis.com/google.rpc.RetryInfo",\n "retryDelay": "17s"\n }\n ]\n }\n}\n","code":429,"status":"Too Many Requests"}}] Please wait and try again later. To increase your limits, request a quota increase through AI Studio, or switch to another /auth method
If I type "test" in the InputPrompt and press Enter, it works fine.
Likely the escape codes we are relying on to detect paste are not being sent by your terminal. Whcih terminal are you using on windows?
I tried two PowerShell and git bash. However, I mainly use Git Bash, as PowerShell has been erratic in terms of gemini cli behavior. I tried inside Visual Studio 2022 and in the regular command prompt outside, and got the same result.
PowerShell definitely supports bracketed paste mode, so either we are inadvertently disabling it or it is not being detected. In PowerShell it may be possible to force bracketed paste on with Write-Host "$([char]27)[?2004h" just to confirm if we are somehow disabling it.
It's may be a Duplicate of #2389. But at the same time, I see the cut and paste being displayed character by character, one by one, instead of a one-time copy.
What node version are you using?
node -v v23.11.0
The slow motion pasting was introduced in version 0.1.7. Older version was pasting without the slow motion
Wonder if we should put back a fallback to assume that any string of more than 5characters added to stdin not tagged with the expected chars from bracketed paste mode indicates the terminal is not supporting it properly. We could show the user a warning in Gemini CLI and assume all blocks of more than 5 chard are pastes
I think that makes sense to do, but given powershell and node 22, bracketed paste is definitely supported, so we should be able to get to the bottom of this.
Agree on getting to the bottom of powershell. Even with it resolved though I still worry about the possible long tail of terminals that might not support bracketed paste mode well so the fallbsck is probably worth keeping to fail more gracefully.
There are two separate symptoms we have heard from Powershell users:
- The paste happens (the text appears), but it is handled as if it is a non-paste: control sequences are treated as if they are keyboard input, newlines submit the form.
- The paste fails (only a single character appears)
For (1), the terminal is not sending the control sequences for bracketed paste mode, or somehow we are not handling them, and therefore we could have a fallback that detects "large input" as a paste. Since this is a fallback, we can probably look for single inputs that are quite large such that they are unlikely to be due to lag - my intuition would be maybe > 10 characters, but if a 10 character TTY buffer is common this might not be a good call. It's also possible that the user has disabled bracketed paste mode, and wants to paste in a keyboard sequence - this feels less likely, since bracketed paste is generally considered a security feature.
For (2), the terminal IS sending bracketed paste control sequences, but they're being eaten or corrupted in the processing. This behaviour I can reproduce when running on node < 20, where node's readline code can't handle long escape sequences. The following pull request includes a patch that enables a potential workaround when the PASTE_WORKAROUND=1 environment variable set.
https://github.com/google-gemini/gemini-cli/pull/2476
I have installed Gemini CLI and worked on debugging it; this works for me. More tests are necessary for production readiness. I have spent a couple of hours fixing it and added unit tests as well. best
I have created a pull request: https://github.com/google-gemini/gemini-cli/pull/2570
@bbiggs "possible that the user has disabled bracketed paste mode". I was stuck in this mode on my ChromebookPlus. I double ctrl-c'd to come out and then went back into Gemini and it's not on slow input mode anymore (phew). If I pressent a key-combo to go into this mode, I am unaware of what it was. If this was Insert versus overtype of editors in years gone by, I'd expect to see INS somewhere near the text area
I have added to my pull request a fix, an automatic detection of shell support bracketed paste mode.
This should be fixed. Please reopen if you are still experiencing this.