MoonshotAI / MoonshotAI/kimi-code
feat(tui): enable OSC 9;4 terminal progress in VSCode integrated terminal
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?
kimi --version: 0.27.0
What platform is your computer?
Windows 11 x64, VSCode 1.129.0 integrated terminal (TERM_PROGRAM=vscode).
What issue are you seeing?
The TUI's ConEmu-style OSC 9;4 work-in-progress reporting is never emitted inside the VSCode integrated terminal, because supportsTerminalProgress() (apps/kimi-code/src/tui/utils/terminal-notification.ts) only allow-lists Windows Terminal (WT_SESSION), ConEmu (ConEmuANSI=ON), Ghostty and WezTerm.
VSCode supports OSC 9;4 progress sequences since 1.97 (January 2025 release notes: "Support for ConEmu's progress escape sequences"), rendering them as a spinner/percentage in terminal tabs. So the terminal capability is there — the allow-list just doesn't include it.
Proof it works once enabled
Setting ConEmuANSI=ON in the VSCode terminal environment (i.e. lying to the allow-list) makes Kimi Code's progress reporting work as intended in VSCode terminal tabs. No other change needed.
Expected behavior
Add vscode to the allow-list:
if (termProgram === 'vscode') return true;
Caveats worth knowing
- In VSCode, progress is only visible in tabs if the user adds
${progress}toterminal.integrated.tabs.title/description— worth mentioning in docs. - VSCode editor-area terminal tabs never render
OSC 9;4at all (only panel-area tabs do) — that's a VSCode-side limitation (see microsoft/vscode#240117), out of scope for this request. I filed a separate issue proposing a title-based status channel that covers that case.
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 apps/kimi-code/src/tui/utils/terminal-notification.ts and inspect supportsTerminalProgress(), especially its existing terminal allow-list. Verify the TERM_PROGRAM=vscode path enables OSC 9;4 reporting, and update the relevant documentation to mention the ${progress} tab setting and the editor-area limitation. Done means VSCode integrated terminals are recognized without changing behavior for other terminals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100