Release v6.8.1: investigation efficiency guidance, overlapping read detection, and zero-result search guidance - #126
Conversation
…etection, and zero-result search guidance
There was a problem hiding this comment.
🧪 PR Review is completed: PR adds investigation efficiency prompts, overlapping read detection in readFileTool, and zero-result search guidance. The overlap detection logic is sound, but the zero-result string check in searchFilesTool may not match the actual search service output format.
Skipped files
CHANGELOG.md: Skipped file pattern
⬇️ Low Priority Suggestions (1)
src/core/tools/searchFilesTool.ts (1 suggestion)
Location:
src/core/tools/searchFilesTool.ts(Lines 71-71)🟡 Potential Bug
Issue: The zero-result guidance is gated on
results.includes("Matches: 0"), but a grep for"Matches:"acrosssrc/services/**(where thesearchFilesservice lives) returns no matches. This strongly suggests the search service does not output the literal string"Matches: 0", which would mean the guidance is never appended and the entire feature is dead code.Fix: Verify the actual output format of
searchFilesand adjust the check accordingly. A more robust approach would use a case-insensitive regex and also handle common alternative formats.Impact: Ensures the zero-result guidance feature actually activates when searches return no matches.
- if (results.includes("Matches: 0")) { + if (/matches?:\s*0/i.test(results) || results.includes("No matches") || results.trim() === "") {
…sult guidance
Code review found that results.includes('Matches: 0') could false-positive
when matched file content contains that literal text. Changed searchFiles
to return { text, matchCount } so the tool checks page.matches.length
directly via the structured return value.
|
✅ Reviewed the changes: Clean refactor: searchFiles now returns a structured result with matchCount, replacing fragile string-based zero-result detection with a direct numeric check. No issues found in the new code. |
What's in this release
Extension version bump
6.8.0 -> 6.8.1plus the pending feature work that was already merged tomainand sitting unreleased:Agent investigation efficiency
src/core/prompts/system.ts): classify comprehension questions separately from implementation tasks, form a one-line hypothesis before searching, read call sites rather than implementation internals, avoid reading prose when the question is about control flow, and stop exploring once the answer is known.Overlapping read detection in
read_filesrc/core/tools/readFileTool.tsnow detects when a requested file region partially overlaps with a region already read earlier in the same task (same file, same mtime). The exact-match short-circuit is unchanged; the new overlap check prepends a notice telling the model which lines are already in context, so it stops re-reading overlapping portions (e.g. 600-849 then 800-1059).Zero-result guidance in
search_filessrc/core/tools/searchFilesTool.tsappends actionable guidance when a search returns 0 matches: tighten/simplify the regex, widen the path scope, try a different glob, or stop after 2+ failed attempts. This breaks the "search to 0 results, tweak regex, search to 0 results" loop.Native tool description improvements
read_fileandsearch_filesnative tool descriptions (.tsprompt files) now direct the model to scope paths narrowly, not re-read regions already in context, and stop after repeated zero-result searches.Changelog
CHANGELOG.mdwith a new[Unreleased]section summarizing the above.Tests
pnpm lintpasses (14/14 tasks, 0 warnings).Notes
src/package.json(6.8.0 -> 6.8.1), matching the convention of prior release PRs (e.g. Release v6.7.9: Axon Eido 3.2 models, 232k context window, and chat UI fixes #124, Release v6.8.0: /usage slash command, follow-up suggest fixes, and axon image inputs #125)..changeset/entries (axon-auto-default-model.md,pasted-image-paths.md,remove-fireworks-provider.md) describe work already shipped in earlier releases and were left untouched.