MoonshotAI / MoonshotAI/kimi-code
Web 端页内搜索完全搜不到代码块里的文本(正文搜索正常)
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 版本是?
kimi version 0.39.1
你使用的是哪个开放平台/订阅?
kimi官方
你的电脑平台是?
Darwin 24.6.0 arm64 arm
你遇到了什么问题?
在 Kimi Web 会话页面使用页内搜索(右上角「搜索对话…」)时,当前屏幕上清晰可见的代码块里的匹配不会被计入搜索结果。
例 1:搜索 Thomas 显示「1/1 条结果」,但可见的 Plain Text 代码块里明明写着 /Users/Thomas/...,没有被算进结果。
例 2:搜索 worktree ,但可见的 Shell 代码块里没有搜索到
复现步骤?
kimi web打开任意包含代码块(Shell/Plain Text 等)的会话;- 打开页内搜索,输入一个只出现在代码块里、正文中没有的关键词;
- 该匹配不被计入结果——即使代码块当前就在屏幕上可见,删除重输搜索词也一样搜不到;而正文中的关键词可以正常命中和高亮。
期望的行为是什么?
页面里能看到的内容都应该能被搜到;至少滚动让内容显示出来之后,搜索结果应该随之更新。
补充信息
说明:Web 前端源码不在本仓库,本仓库构建产物(apps/kimi-code/dist-web),无法直接定位到源码层面,开发同学可以基于前端源码排查。
目前只确认现象层面:代码块组件渲染的文本完全不在页内搜索的统计范围内,普通正文文本搜索正常。
相关 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
Start by reproducing the issue in a Kimi Web session containing Shell or Plain Text code blocks, then inspect the available web build under apps/kimi-code/dist-web and trace how page search gathers visible text. Confirm that ordinary message text still matches while code-block text does not; done means visible code-block content is included in search results and highlighting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100