Repository navigation
[VS Code extension] Chat markdown renderer intermittently drops plain-text characters (digits / CJK / Latin fragments) around inline formatting and tables #4158
Description
Summary
In the VS Code extension chat webview, rendered assistant messages intermittently lose small plain-text fragments (1–4 characters: digits, CJK characters, Latin letters). The lost characters are part of the message body, not markdown syntax. Additionally, GFM tables sometimes fail to render and are shown as raw pipe-delimited source, while another table in the same reply renders (partially) fine. The corruption persists after streaming completes; it is not a transient streaming artifact. The user has observed this across versions for months.
Environment
- OS: Windows x64
- VS Code: 1.141.0 (commit 2a59476c9bfcb90b3ddc372c36762471b7dfad1c)
- Extension: moonshot-ai.kimi-code 0.8.1 (latest on the marketplace at report time)
- Kimi CLI: 0.34.0
- Session locale/content: Chinese (CJK) assistant replies with GFM tables, bold spans, and inline code
Evidence: raw markdown source vs. rendered output
The raw assistant text (intact in the exported session wire log) was corrupted on screen as follows. "Raw" = exact substring of the assistant message; "Rendered" = what the webview displayed.
| # | Raw markdown/text | Rendered as | Lost/garbled |
|---|---|---|---|
| 1 | ginger_all.gff (inline code inside a bold span) |
er_all.gff |
ging |
| 2 | 各来源 GFF 打上分数 |
各来源 G 打上分数 |
FF |
| 3 | 比 EVM 高 16 分 |
比 EVM 高 分 |
16 |
| 4 | 斑马鱼中基因融合错误 |
鱼中基因融合错误 |
斑马 |
| 5 | mappingbase/homology/AUGUSTUS 等 |
mappingbase/homologyUGUSTUS 等 |
/A |
| 6 | 各软件 ab initio |
各软件 initio |
ab |
| 7 | 需要你给我的东西 (heading) |
需要你给我的 |
东西 |
| 8 | Table cell 20.1 |
.1 |
20 |
| 9 | Table header cell EVM |
E |
VM |
| 10 | EVM 1,232 例 |
FVM 1.232 例 |
E→F, ,→. |
| 11 | A complete 3-row GFM table | raw pipe source shown as plain text | table not parsed at all |
| 12 | Plain autolink URL https://github.com/MoonshotAI/kimi-code/issues/new |
https://github.com/MoonAI/kimi-code/issues/new |
shot |
| 13 | Inline code `/feedback` |
feedback followed by a stray displaced backtick |
/ |
Item 12 is the most severe case: the user copy-pasted the rendered (corrupted) URL and reached a 404 page. The corruption therefore propagates through copy-paste and breaks actions the user takes based on rendered output — it is a functional bug, not a cosmetic one. It also actively misleads troubleshooting: the assistant initially blamed a user typo for the broken link, because the raw text (correct) differs from what the user sees and copies (corrupted).
Notes:
- The lost fragments are plain content characters, not markdown markers, so this is not a markdown-escaping problem in the model output.
- VS Code core does not render extension webview content; this points to the Kimi Code extension's own (streaming) markdown renderer.
- Separate minor observation (possibly spec-compliant, listed only for completeness): a bold span immediately followed by a full-width parenthesis, e.g.
**text**(note), leaves a literal**visible. GitHub/CommonMark behaves the same way per the flanking rules, so this specific item may be intended behavior.
Reproduction
- Use the Kimi Code VS Code extension on Windows.
- Ask for a long, structured Chinese answer containing GFM tables, bold spans and inline code (e.g. a technical tool evaluation with a comparison table).
- Observe intermittent character loss and occasional table render failure in the rendered reply. The corruption remains after streaming finishes.
Attachments
kimi_session_debug.zip— session export produced bykimi export session_7d57b4f5-8120-489d-9fe3-fc6f894cf31b(contains the wire log with the intact raw assistant text for comparison).- Two annotated screenshots showing the corrupted rendering (to be attached by the reporter).
Expected vs. actual
Expected: the rendered message is character-identical in content to the raw assistant text; tables render as tables.
Actual: fragments of plain text are missing in the rendered output; tables intermittently degrade to raw source.
Activity