gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

pasting multi-line content bug

Open peihexian opened this issue 1 year ago • 10 comments

What happened?

When pasting multi-line content into Gemini-CLI's input box, the text is inserted character by character. This becomes extremely slow with large volumes of text. Additionally, line breaks are interpreted as separate commands, making the tool practically unusable when pasting outputs like compilation logs.

What did you expect to happen?

Pasting large, multiline text should: Insert content instantly as a single block Treat all pasted text as one atomic input Preserve all special characters/newlines without corruption

Client information

$ gemini /about

╭───────────────────────────────────────────────────────────────╮
│                                                               │
│ About Gemini CLI                                              │
│                                                               │
│ CLI Version          0.1.7                                    │
│ Git Commit           55cc809                                  │
│ Model                gemini-2.5-pro                           │
│ Sandbox              no sandbox                               │
│ OS                   win32                                    │
│ Auth Method          OAuth                                    │
│ GCP Project          gen-lang-client-0523470046               │
│                                                               │
╰───────────────────────────────────────────────────────────────╯

Login information

No response

Anything else we need to know?

No response

peihexian avatar Jul 01 '25 02:07 peihexian

Me too - was working fine yesterday - I could paste in lots of multi-line info, and it'd do in as a block (with or without ```s. Today I'm watching a teletype from the 1970s, and there's no ctrl-c to stop the buffer from completing it's typing. I'm on a ChromebookPlus with the Terminal that ships with it (itself having right-click to paste. I feel like I've pressed some keystroke to setup teletype mode, and can't get out of it. I can record a video if anyone wants it

For me ctrl-c ctrl-c gets me out of Gemini, and when I go back in the text area is back to normal. New problem: Gemini does not know what we were doing last

paul-hammant avatar Jul 01 '25 05:07 paul-hammant

I was so annoyed that I stopped using it because it can't show me the errors I'm encountering. If copy-pasting isn't working at all, why would I spend 1-2 minutes typing five lines of gibberish? Please tell me how I can fix this!

Update: use WSL, this issue is not there for now. It's there for powershell, bash

sujal-thakkar avatar Jul 01 '25 06:07 sujal-thakkar

It seems that the input component used some module to achieve a typewriter effect, causing pasted multi-line text to be output character by character instead of instantly. Additionally, there's a line break issue where multi-line text is split into multiple inputs. This leads to failed gemini-cli tool invocations until you have to press Ctrl+C to restart gemini-cli.

peihexian avatar Jul 01 '25 06:07 peihexian

It seems that the input component used some module to achieve a typewriter effect, causing pasted multi-line text to be output character by character instead of instantly. Additionally, there's a line break issue where multi-line text is split into multiple inputs. This leads to failed gemini-cli tool invocations until you have to press Ctrl+C to restart gemini-cli.

I just ran into this exact same issue.

dstampher avatar Jul 01 '25 09:07 dstampher

Why is this closed? Is it fixed?

benbaptist avatar Jul 03 '25 18:07 benbaptist

I think the workaround is to exit gemini-cli and go back in, even if that's interruptive to Gem's context

paul-hammant avatar Jul 03 '25 18:07 paul-hammant

How is this still an issue, isn't this the fundemental use case for Gemini CLI, pasting code into it to have it then output that code in your files? And it will not accept code blocks via paste. . .. uh

NeonBeacon avatar Sep 11 '25 13:09 NeonBeacon

Doing right click pastes what is there on your clipboard.

physicshaurya avatar Sep 28 '25 07:09 physicshaurya

This behavior is still present in mac 15.4.1 on gemini-cli 0.38.2 (latest available today over brew). Can we reopen this? Happy to give any feedback or potentially submit a fix if needed

goshlanguage avatar Apr 24 '26 00:04 goshlanguage

same problem

mataide avatar Apr 27 '26 14:04 mataide