MoonshotAI / MoonshotAI/kimi-code
[TUI] CJK ambiguous-width characters (① ② ③) overlap the following text on Windows Terminal
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Environment
- kimi-code 0.38.0 native Windows CLI
- Windows Terminal on Windows 11 (zh-CN locale; East Asian ambiguous-width chars render as 2 cells)
Repro
- Have the assistant output text containing circled digits, e.g.
①你的 GitHub 真身是 wubing-wx;②鼠标点击定位那条 - In the TUI, each circled digit overlaps the character that follows it (screenshot available on request).
Analysis
U+2460 CIRCLED DIGIT ONE (and siblings) is East Asian Ambiguous width: Windows Terminal in a CJK locale renders it 2 cells wide, while the TUI's width model appears to count it as 1 cell — every subsequent glyph on the line is drawn one cell too far left, producing the overlap. Suggest honoring the terminal's ambiguous-width behavior (or defaulting ambiguous=2 in CJK locales).
Workaround
Avoid ambiguous-width characters in assistant output (use 1. instead of ①).
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 in the TUI's character-width and rendering path, using the Windows Terminal reproduction with U+2460 circled digits in a zh-CN locale. Determine how ambiguous-width characters are measured and make the rendered text stop overlapping the following glyph while preserving normal-width behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100