[BUG] search_files hides matching text on long lines
维护者通常 3 天内回复
@DananjayaNadun 已经在做这个了。
开始于 2026年11月20日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript, vscode
- 领域
- tooling
调研方向
从 search_files 工具处理程序和片段生成代码入手,该代码会将每行截断到 500 个字符的预览上限,并追加 [truncated...]。使用 issue 中的 node -e 命令复现并创建 sample.txt,然后运行相同的 search_files 参数。完成标准是:长行围绕匹配项截取窗口,使 TARGET 显示出来,同时预览保持在通常的大小范围内,并添加一个覆盖匹配位置超过预览上限的测试。
由索引模型根据 Issue 内容生成。
描述
Problem
search_files can report a match and omit the matching text from the preview.
Context
This affects searches in files with long lines, including minified JavaScript. The agent receives a file name and line number but cannot see the code that matched.
Reproduction steps
-
Open an empty workspace in VS Code with Zoo Code installed.
-
Run this command in the workspace terminal to create a one-line file:
node -e "require('node:fs').writeFileSync('sample.txt', 'a'.repeat(600) + 'TARGET')" -
Ask Zoo Code to use
search_fileswith these arguments:{ "path": ".", "regex": "TARGET", "file_pattern": "sample.txt" } -
Inspect line 1 in the tool result.
Expected result
The preview shows TARGET on line 1 and stays within the usual preview size.
Actual result
The tool reports Found 1 result. It shows the first 500 a characters and [truncated...] on line 1. The preview omits TARGET. The chat display and the tool result sent to the provider show the same text.
App version
Zoo Code 3.98.0, VS Code 1.146.0 (x64), Windows. Reproduced with a local OpenAI-compatible test provider.
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 301
- 平均合并
- 3 天 14 小时
- 30 天内合并 PR
- 103
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Zoo-Code-Org/Zoo-Code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
维护者通常 3 天内回复
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows可能已有人在做 @easonLiangWorldedtech 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2493 ·
维护者通常 3 天内回复
查看 Zoo-Code-Org/Zoo-Code 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 model未关闭
难度 2/5 1-3 小时 新手友好度 67/100
tashfeenahmed/freellmapi#2169 ·
维护者通常 1 天内回复
-
via-triage
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on record未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
vercel-labs/ui#1563 ·
维护者通常 1 天内回复