MoonshotAI / MoonshotAI/kimi-code
[Bug] TUI 输入框一次性粘贴大量文字时整个界面完全卡死(多平台可复现)
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What version of Kimi Code is running?
0.34.0(更早版本也存在同样问题)
Which open platform/subscription were you using?
订阅(subscription),通过 /login
Which model were you using?
不相关——卡死发生在文本粘贴进输入框的瞬间,尚未调用模型、未发送。
What platform is your computer?
- macOS:
Darwin 25.4.0 arm64 arm - 同时也在 Ubuntu、CentOS 上复现(跨平台)
What issue are you seeing?
在交互式 TUI 中,向输入框一次性粘贴大段中英混合文本时,整个 TUI 立即完全卡死:键盘、鼠标均无响应,没有任何错误信息输出,只能 Ctrl+C 或重启 kimi 才能恢复。
- 手动逐字输入同样长度的文本不会触发,仅在「一次性粘贴」时发生;
- 在 macOS(arm64)/ Ubuntu / CentOS 上均可复现,并非单一终端或单一平台的问题;
- 卡死发生在「文本粘贴进输入框的那一刻」,尚未按回车发送。
What steps can reproduce the bug?
- 在任意支持的平台(macOS / Ubuntu / CentOS)上运行
kimi进入交互式 TUI。 - 准备一大段中英混合文本(数千到上万字符量级,例如一份较长的日志 / 代码片段 / 文档)。
- 用终端粘贴快捷键(macOS
Cmd+V、LinuxCtrl+Shift+V)一次性粘进输入框。 - 整个 TUI 卡死,键鼠无响应,需
Ctrl+C或重启kimi才能恢复。
What is the expected behavior?
粘贴应近实时完成,输入框正常接收文本,TUI 不冻结、不卡顿。
Additional information
- 版本
0.34.0,更早版本也存在。 - 与已关闭的 #2349、#1815(CJK 长文本输入残影——仅渲染层、且为 Windows Terminal 专属)以及 #1188(输入触发整屏重绘)同属 TUI 输入渲染域;但本问题表现为完全冻结(而非渲染错乱),且跨平台 / 跨终端,区别于上述仅残影/重绘的问题。
- 关键特征:粘贴专属 + 瞬时完全卡死 + 跨平台。疑似粘贴路径上对大文本存在同步的 O(n)/O(n²) 处理(如逐字符重排 / 重绘 / 换行重算)阻塞了主线程,具体根因待进一步定位。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running kimi in the interactive TUI and reproducing the freeze with a large mixed Chinese-English paste on one of the listed platforms. Trace the paste-handling and input-rendering path, then verify that large pastes remain responsive and that the existing reproduction no longer freezes before submission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100