Skip to content

[Bug] TUI Markdown rendering incomplete: only tables rendered, other elements shown as raw source #209

@wufantj

Description

@wufantj

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?

  1. Open kimi-code TUI: kimi
  2. 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   |
  1. 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

  1. Integrate a full Markdown-to-terminal renderer into the TUI (similar to how rich or glow works)
  2. Pre-render Markdown before sending to TUI display layer
  3. Fallback to plain text stripping Markdown syntax for unsupported elements, rather than showing raw **, #, - markers

Thank you for considering this improvement!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions