Repository navigation
Find methods, accept module::method names, and group caller replies - #58
Merged
Merged
Conversation
symbols_named answers find with items and methods alike, carrying the symbol id, kind, visibility, file and line. symbols_matching accepts a method named by any module boundary of its file module plus the bare name. did_you_mean offers up to ten symbols whose bare name equals a missed query's last segment. collect_rows moves to one shared helper.
find answers from the store rows named exactly the query, so methods are found; an item hit keeps its bare name and old keys, and a method hit is named with its module path and type. A lookup that finds nothing carries data.did_you_mean, up to ten symbols whose bare name is the query's last segment; its message is unchanged. callers, callees and impact add a display per hit and, after the old keys, callers_distinct, files and sites over the listed hits; show and impact --diff keep their old shape. Under max_tokens those keys go first, as a whole, and the reply is then cut exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each tool description now leads with the question it answers and the grep it replaces. cochange says it is decay-weighted, lift-filtered and over indexed Rust files only, not a raw commit count, and points to git for raw counts; callers says a caller reached through a re-export or a macro may be missing. The server instructions become the trimmed For agents list, 17 lines. The README documents the new reply keys, did_you_mean, the method name forms, and the budget order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_one hands the ambiguous failure to its own builder, and find reads the walk-kept rows through one helper. The budget no longer asks a reply whether it had extra keys: it tries the whole reply first and sheds the lean copy, which gives the same bytes. Tests pin that the new keys stay exactly when the whole reply fits, at the boundary too; that impact names each hit by its file; and that show lists 20 callers whole and flags the 21st. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A query the bare, type and module-path forms answer keeps exactly its rows, so a free fn and a same-file method sharing a name no longer make the module spelling ambiguous. The method form moves to a second statement that runs only on an empty result, and the fault seam covers both. A regression test pins the shared-name case.
Whole test items move unchanged into tests/find.rs, with the two shared helpers made visible to the sibling: no logic, name or assertion change, and every file stays under the line cap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes Phantom's answers easier for agents to find and act on. No resolution changes: every edge, row and score is identical to the base, and every existing reply key is unchanged.
What changes
findsees methods.findandfind_symbolsread the symbols table, so a bare method name returns its definitions. Before, methods were never found.More name forms resolve.
module::namenow resolves whennameis a method of a type in that module (for exampleapp::watch_dir). It is tried only when the existing forms match nothing, so every name that resolved before resolves exactly as before.did_you_mean. Anot_foundreply now suggests up to ten symbols with the same bare name.Grouped replies.
callers,calleesandimpactadddisplay,callers_distinct,filesandsitesbeside their existing keys. Undermax_tokensthese new keys are dropped first.Descriptions. Each MCP tool description now says what it answers and which text search it replaces, with honest caveats:
The server instructions are the trimmed "For agents" list.
Checks
fmt, clippy (
--workspace --all-targets --all-features --locked -D warnings),cargo deny checkand nextest all pass. No new package, no new crate, no.githubchange. Store schema 3, extractor version 12, envelope 1.🤖 Generated with Claude Code