MoonshotAI / MoonshotAI/kimi-code

Web 端页内搜索完全搜不到代码块里的文本(正文搜索正常)

Open
#3,460 0 comments 0 reactions 0 assignees View on GitHub

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/...,没有被算进结果。

Image

例 2:搜索 worktree ,但可见的 Shell 代码块里没有搜索到

Image

复现步骤?

  1. kimi web 打开任意包含代码块(Shell/Plain Text 等)的会话;
  2. 打开页内搜索,输入一个只出现在代码块里、正文中没有的关键词;
  3. 该匹配不被计入结果——即使代码块当前就在屏幕上可见,删除重输搜索词也一样搜不到;而正文中的关键词可以正常命中和高亮。

期望的行为是什么?

页面里能看到的内容都应该能被搜到;至少滚动让内容显示出来之后,搜索结果应该随之更新。

补充信息

说明:Web 前端源码不在本仓库,本仓库构建产物(apps/kimi-code/dist-web),无法直接定位到源码层面,开发同学可以基于前端源码排查。

目前只确认现象层面:代码块组件渲染的文本完全不在页内搜索的统计范围内,普通正文文本搜索正常。

相关 issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.