Description
When UTF8 characters are included in the input content, if the paste action triggers a paste summary, the actual text passed to the model will be completely scrambled, and the pasted text will be inserted in the wrong position.
Plugins
none
OpenCode version
dev and any release version
Steps to reproduce
- Enter some UTF8 text
- Paste a long text to trigger paste summary, confirm that you see "[Pasted ~x lines]" displayed.
- Send it. then you can see the disordered text
Screenshot and/or share link
what I actually entered is:
我能吞下玻璃而不伤身体我能吞下玻璃而不伤身体我能吞下玻璃而不伤身体[Pasted ~1 lines]我能吞下玻璃而不伤身体。
which the pasted line is:
A sufficiently long test content1 A sufficiently long test content2 A sufficiently long test content3 A sufficiently long test content1 A sufficiently long test content2 A sufficiently long test content4 A sufficiently long test content1 A sufficiently long test content2 A sufficiently long test content5
Operating System
OS-independent
Terminal
terminal-independent
Description
When UTF8 characters are included in the input content, if the paste action triggers a paste summary, the actual text passed to the model will be completely scrambled, and the pasted text will be inserted in the wrong position.
Plugins
none
OpenCode version
dev and any release version
Steps to reproduce
Screenshot and/or share link
what I actually entered is:
which the pasted line is:
Operating System
OS-independent
Terminal
terminal-independent