MoonshotAI / MoonshotAI/kimi-code
Windows 路径 Markdown 链接触发 WebUI 无限递归,导致整个会话无法打开
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
你运行的 Kimi Code 版本是?
0.43.0
你使用的是哪个开放平台/订阅?
Kimi Code
你使用的是哪个模型?
K3-256k
你的电脑平台是?
Windows x64
你遇到了什么问题?
在 Kimi Code WebUI 中打开一个包含 Windows 路径 Markdown 链接的会话时,整个对话区域显示“出错了 / 重试”。点击重试无法恢复,其他会话正常。
错误信息:
RangeError: Maximum call stack size exceeded
at F (index-7SHxad1A.js:167:19266)
at Fo (index-7SHxad1A.js:167:19250)
at M (index-7SHxad1A.js:167:18148)
at q (index-7SHxad1A.js:171:9594)
at D (index-7SHxad1A.js:171:3571)
at F (index-7SHxad1A.js:167:19298)
at q (index-7SHxad1A.js:171:10629)
at D (index-7SHxad1A.js:171:3571)
触发段落的脱敏示例:
页面源文件:[pages](C:\Users\user\Desktop\项目\pages) 素材图:[media](C:\Users\user\Desktop\项目\media)
排查结果:
- 会话可完整导出。
- 会话数据的 UTF-8 和 JSON 格式检查正常。
- REST 接口及 WebSocket 会话订阅正常。
- 崩溃发生在前端 Markdown 渲染阶段。
- 升级至 0.43.0 后仍然存在。
复现步骤?
- 在 Windows 上运行 Kimi Code 0.43.0,通过
kimi web打开 WebUI。 - 打开包含下述同段多个 Windows 路径链接的历史消息:
页面源文件:[pages](C:\Users\user\Desktop\项目\pages) 素材图:[media](C:\Users\user\Desktop\项目\media)
- 渲染该消息时,对话区域进入“出错了 / 重试”错误页面。
上述现象已在实际历史会话中复现,并通过 Edge 无头浏览器定位到以下内部状态:
- 原始 token 数量为 1。
- 原始文本包含两个 Windows 路径链接。
- 解析第一个链接后,将第二个链接所在的剩余文本交给 F/D 继续处理。
- D 因剩余文本包含反斜杠,错误地再次使用整段原文替换剩余文本。
- 解析因此回到第一个链接,形成 F → D → q → F 无限递归。
诊断时,完整源文本中的链接标签结束位置还带有转义,例如 [pages\](...);解析后的 text token 则是 [pages](...)。建议在回归用例中同时覆盖源文本与 token 的这一差异。
以上示例已脱敏;未附完整会话导出,避免泄露项目内容。
期望的行为是什么?
包含 Windows 路径链接的消息应正常显示,解析剩余文本时不应重新处理整段原文。
如果链接无法识别,应降级为可读文本。
即使单条消息渲染失败,也不应导致整个会话区域不可用,用户仍应能够查看其他消息并继续对话。
补充信息
No response
Contribution
- 我愿意自己提交修复此 bug 的 PR(请先等待维护者在本 issue 中批准)
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
Locate the WebUI frontend Markdown renderer and trace handling of multiple Windows-path links, comparing the original source text with parsed text tokens. Add regression coverage for escaped link labels and backslash-containing paths, then run the relevant frontend tests. Done means the message renders without recursion, unreadable links degrade to text, and one failed message does not hide the session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- frontend, testing-qa, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100