MoonshotAI / MoonshotAI/kimi-code
feat(tui): render task output with Markdown and latest-at-top
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
The background task output viewer currently renders raw output line-by-line, truncating long lines and ignoring ANSI/markdown formatting. It also shows oldest output first, forcing the user to scroll to the bottom to see the latest progress.
We fixed this in our fork by rendering the body through pi-tui's Markdown component (using the same theme as assistant messages), which gives markdown/ANSI formatting, code blocks, and line wrapping. We also reversed the default line order so the latest output appears at the top and the view stays pinned there as new output arrives.
Commit with the fix: https://github.com/thecannabisapp/kimi-code/commit/0d175936
If the maintainers want to merge this, the key changes are in apps/kimi-code/src/tui/components/dialogs/task-output-viewer.ts and its tests.
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 with apps/kimi-code/src/tui/components/dialogs/task-output-viewer.ts and its tests, then review the referenced fork commit for context. Verify the task output viewer’s rendering, ordering, wrapping, and live-update behavior against the issue description. Done means formatted output is readable and the latest output remains visible at the top as new output arrives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100