MoonshotAI / MoonshotAI/kimi-code
[Bug] TUI Markdown rendering incomplete: only tables rendered, other elements shown as raw source
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?
0.5.0
Which open platform/subscription were you using?
Kimi Code
Which model were you using?
Kimi-k2.6
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
The TUI in kimi-code has incomplete Markdown rendering support. While tables are correctly rendered with borders and alignment, other standard Markdown elements are displayed as raw source code instead of being properly formatted.
This is a regression compared to the previous Python-based kimi-cli, which used the rich library to fully render all Markdown elements in the terminal.
What steps can reproduce the bug?
- Open
kimi-codeTUI:kimi - Send a message containing various Markdown elements, for example:
# Heading 1
**Bold text**
- List item 1
- List item 2
```python
print("code block")
```
| Column A | Column B |
|----------|----------|
| Cell 1 | Cell 2 |
- Observe the output in TUI.
What is the expected behavior?
All Markdown elements should be rendered appropriately in the terminal:
# Heading→ Large/bold styled text**bold**→ Bold text- list→ Bulleted list with proper indentation```code```→ Syntax highlighted code block| table |→ Rendered table (✅ already works)
Actual Behavior
| Element | Rendered? | Screenshot |
|---|---|---|
| Table | ✅ Yes | Correctly displayed with borders |
| Heading | ❌ No | Shows raw # Heading |
| Bold | ❌ No | Shows raw **Bold text** |
| List | ❌ No | Shows raw - List item |
| Code block | ❌ No | Shows raw ```python markers |
Additional information
The previous Python-based kimi-cli used the rich library to fully render Markdown in the terminal, including:
- Styled headings
- Bold/italic text
- Bulleted and numbered lists
- Syntax highlighted code blocks
- Tables
It would be great if kimi-code's TUI (based on pi-tui) could implement similar full Markdown rendering support, or at least not display raw Markdown syntax for unsupported elements.
Possible Solutions
- Integrate a full Markdown-to-terminal renderer into the TUI (similar to how
richorglowworks) - Pre-render Markdown before sending to TUI display layer
- Fallback to plain text stripping Markdown syntax for unsupported elements, rather than showing raw
**,#,-markers
Thank you for considering this improvement!
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 at the kimi-code TUI display layer built on pi-tui and compare its Markdown handling with the previous Python-based kimi-cli implementation using rich. Reproduce the supplied heading, bold, list, code-block, and table example; done means non-table elements no longer appear as raw Markdown while existing table rendering remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100