opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Large pasted content renders poorly in chat history—overflows and blends with questions, hindering review

Open LePao1 opened this issue 1 year ago • 11 comments

When I paste a lot of content into the input box, it appears as shown in the image—nice and tidy.

Image

But after pressing Enter and continuing the conversation, this large amount of content renders poorly—it looks visually messy, the text even overflows the chat box, and the copied text blends in with the question, making it hard for me to review the previous dialogue.

Image

LePao1 avatar Oct 07 '25 07:10 LePao1

This issue might be a duplicate of existing issues. Please check:

  • #372: The chat history gets covered up if the chat box is getting too big
  • #642: Text input overlays the chat/messages
  • #1098: Copy pasting a large text makes it impossible to scroll it to the end
  • #1526: Pasting something big causes UI issues
  • #2582: Prompt box overflows on top of LLM response and cannot be shown with scrolling (closed)

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Oct 07 '25 07:10 github-actions[bot]

hm this is specific to your terminal emulator, which one are you using?

rekram1-node avatar Oct 07 '25 13:10 rekram1-node

hm this is specific to your terminal emulator, which one are you using?hm 这与您的终端模拟器有关,您使用的是哪个?

I use OpenCode in the terminal within VS Code.

LePao1 avatar Oct 07 '25 13:10 LePao1

Gotcha, I think we may have this fixed in our opentui version

Generally we recommend:

A modern terminal emulator like: WezTerm, cross-platform Alacritty, cross-platform Ghostty, Linux and macOS Kitty, Linux and macOS

But i hope we can get the tui rendering inside vscode decently too

rekram1-node avatar Oct 07 '25 14:10 rekram1-node

I mainly use it in WSL on Windows; VS Code lets me develop inside the Linux environment effortlessly. The screenshot above was taken there.

By the way, the situation is just as awful in PowerShell.

Image

LePao1 avatar Oct 07 '25 15:10 LePao1

Yuck, yeah sorry about that

@itsrainingmani what do you recommend for windows?

(mani knows state of windows stuff better than me so I am tagging)

rekram1-node avatar Oct 07 '25 15:10 rekram1-node

I also experience the same issue as @LePao1 when using opencode in terminal in VSCode and PowerShell

seerdi avatar Oct 07 '25 18:10 seerdi

Same issue in the stock macOS Terminal.app Version 2.14 (455.1)

agladysh avatar Oct 08 '25 07:10 agladysh

I have another problem with pasting - when I paste something in opencode with "ctrl + shift + v" it's being pasted letter by letter, as if somebody is typing it very fast. If I paste something big it will write for a long time and I can't cancel the pasting or exit terminal with ctrl + c. But when I try pasting to terminal outside of opencode with "ctrl + shift + v", it pastes instantaneously, unlike in opencode.

ikodbapc avatar Oct 14 '25 13:10 ikodbapc

@ikodbapc I think that's a performance issue in the crappy tui code, next major version of tui should have a lot of problems like this fixed sorry for delay :/

rekram1-node avatar Oct 14 '25 15:10 rekram1-node

Have the same issue with Xfce terminal that use VTE (similar to Shift+ENTER).

If you think that SHIFT+ENTER and this is the problem with VTE, feel free to report a bug. You may get (as I did) explanation and help if this is not a bug in VTE, but in OpenCode. But if this is VTE issue it may fix more terminals.

jcubic avatar Oct 16 '25 20:10 jcubic