MoonshotAI / MoonshotAI/kimi-code

feat(tui): render task output with Markdown and latest-at-top

Open
#668 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.