[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 於 16 天前認領。 未關閉
難度 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
-
enhancement feature/signals self-driving team/self-driving
難度 2/5 1-3 小時 新手友好度 78/100
PostHog/posthog#144208 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug good first issue web
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
triage: not actionable
難度 2/5 1-3 小時 新手友好度 66/100
oxc-project/oxc#30518 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug Claude useability
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
維護者通常 1 天內回覆