You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @will-lamerton and @aejisdaai - I reviewed the current input path before proposing a code change.
The alternate-screen TUI currently forwards stdin through a filtering stream in source/cli.tsx, decoding each incoming Buffer with toString('utf8') before mouse-sequence handling. If the Windows PowerShell/Korean IME path can split a multibyte character across input chunks, that boundary could be worth hardening with a stateful UTF-8 decoder and a regression test.
Before I implement that, could you confirm whether the failure occurs only with --alt-screen / alternateScreen: true, and whether it reproduces with direct typing in the chat input (rather than paste)? A short reproduction using the current main branch would help avoid changing the input proxy for an issue in the terminal/IME layer itself.
If that matches the observed behavior, I can take a focused follow-up that preserves mouse-sequence filtering, handles split UTF-8 input safely, and adds unit coverage for the chunk-boundary case. I’ll wait for confirmation before opening a speculative PR.
The alternate-screen input proxy was converting each stdin Buffer independently with Buffer#toString('utf8'). If an IME or terminal split a Korean character across two data chunks, the incomplete sequence could be replaced before the remaining bytes arrived. The PR switches that path to a stateful UTF-8 decoder while preserving the existing mouse and wheel handling, and adds a regression test that splits 너 across chunks.
Validation is complete: the focused tests, full AVA suite (6,255 passed, 1 skipped), formatting, linting, type-checking, and production build all pass. The fix is scoped to the alternate-screen proxy path; if the reproduction also occurs in the default inline mode, please mention that in the PR so I can extend the investigation.
Activity
will-lamerton commentedon Jun 9, 2026
Hey @aejisdaai - can you clarify what you need with this issue?
aejisdaai commentedon Jun 9, 2026
Hello.
I am experiencing a "Korean input issue."
Windows 11
PowerShell 7
In the same environment, there are no issues with Korean input for pi and opencode.
If I copy and paste the text I have written, I can input it normally.
" 너는 누구니? 너는 누가 만들었니? "
Thank you.
RealBhupesh commentedon Aug 3, 2026
Hi @will-lamerton and @aejisdaai - I reviewed the current input path before proposing a code change.
The alternate-screen TUI currently forwards
stdinthrough a filtering stream insource/cli.tsx, decoding each incomingBufferwithtoString('utf8')before mouse-sequence handling. If the Windows PowerShell/Korean IME path can split a multibyte character across input chunks, that boundary could be worth hardening with a stateful UTF-8 decoder and a regression test.Before I implement that, could you confirm whether the failure occurs only with
--alt-screen/alternateScreen: true, and whether it reproduces with direct typing in the chat input (rather than paste)? A short reproduction using the current main branch would help avoid changing the input proxy for an issue in the terminal/IME layer itself.If that matches the observed behavior, I can take a focused follow-up that preserves mouse-sequence filtering, handles split UTF-8 input safely, and adds unit coverage for the chunk-boundary case. I’ll wait for confirmation before opening a speculative PR.
RealBhupesh commentedon Aug 3, 2026
I’ve opened PR #744 for this issue.
The alternate-screen input proxy was converting each stdin
Bufferindependently withBuffer#toString('utf8'). If an IME or terminal split a Korean character across two data chunks, the incomplete sequence could be replaced before the remaining bytes arrived. The PR switches that path to a stateful UTF-8 decoder while preserving the existing mouse and wheel handling, and adds a regression test that splits너across chunks.Validation is complete: the focused tests, full AVA suite (6,255 passed, 1 skipped), formatting, linting, type-checking, and production build all pass. The fix is scoped to the alternate-screen proxy path; if the reproduction also occurs in the default inline mode, please mention that in the PR so I can extend the investigation.
aejisdaai commentedon Aug 5, 2026