MoonshotAI / MoonshotAI/kimi-code
TUI: Copied multi-line text includes leading whitespace and plan | prefix
Open
@Grapedge is already working on this.
Since Sep 18, 2026.
enhancement
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
When using the TUI, text copied from the interface does not come out "clean":
- Multi-line text selection: When selecting text that spans multiple lines, the copied content includes the leading whitespace (spaces) at the beginning of each line.
- Plan view: When copying text from a plan, the copied content includes the | character at the beginning of each plan line.
Current behavior:
- Copying a multi-line selection pastes with unwanted leading spaces.
- Copying text from a plan includes the | prefix on each line
Example:
copy result:
Try Kimi Code Web UI - clearer task progress, visual sessions & settings management
Run /web to continue your session in the browser
copy result:
根因:TUI 基于 packages/pi-tui 的预换行架构,组件在 render(width) 里就把换行和缩进物化成空格写进终端输出,终端原 │
│ 生选区只能拷贝屏幕上的字符。缩进注入点遍布各处(banner.ts:50-85、assistant-message.ts:118-127、 │
│ packages/pi-tui/src/components/markdown.ts:866、全局 gutter),逐个改渲染不现实且会破坏排版。 │
│ │
│ 用户已确
Expected behaviour: copied message is clean text without blackspace and |
Additional information
No response
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.
Assessment
This issue has not been assessed yet.