fix(explore): search a feature description that mentions changes when nothing changed
Asking codegraph_explore about a feature whose description happens to contain "working tree changes" (or "my changes", "this branch") no longer returns an empty answer when nothing has changed.
Before this change, any query with a change phrase was answered from the diff, and only the code-like tokens of the rest of the question (camelCase names, paths, calls) were searched. A plain-English feature question on a clean tree, such as "the thread details panel shows the working tree changes with additions and deletions", had no such tokens and an empty diff, so explore printed the "Changes — none" heading and nothing else.
Now, when the diff is empty and at least three words remain beside the change phrase, the rest of the question is searched in full, like any other question. A bare "review my changes" and short questions such as "pricing my changes" still get only the empty-diff answer, and a dirty tree still answers from the diff whatever the question says.
Evidence
__tests__/explore-changes.test.ts: the new feature-description test fails onfork/consolidatedand passes here. Two more cases pin the guards: removing the three-word floor fails one, and removing the empty-diff check fails the other.- Query replay, both saved sets (67 real agent queries), base
2725f1a9vs this branch: 66 answers identical. The one changed answer (t3codeq-7907bc7a05, the question quoted above) grew from 514 to 23,834 characters and now includesapps/web/src/components/chat/ThreadDetailsPanel.tsx, the file the agent was looking for. - Full suite on the fix before the two guard cases were added: 754 files pass.
explore-changes.test.tspasses 9 of 9 on the pushed head.
README rows checked: none apply (no command, tool, language or measured number changes). The unreleased CHANGELOG bullet for change questions gains one sentence.
Not covered: on a dirty tree, a long feature question that contains a change phrase is still answered from the diff only.
Summary by cubic
Fixes codegraph_explore returning an empty answer when a question describes a feature using a change phrase ("working tree changes", "my changes") while nothing has changed.
Previously, any query containing a change phrase was answered from the diff, and only the code-like tokens of the rest of the question were searched. On a clean tree a plain-English description such as "the panel shows the working tree changes with additions and deletions" had no code tokens and an empty diff, so the tool printed the empty-changes heading and nothing else.
Now, when the diff is empty and three or more words remain alongside the change phrase, the rest of the question is searched in full. Bare "review my changes" and shorter questions still get only the empty-diff answer, and a dirty tree still answers from the diff regardless of wording.