Repository navigation
fix(definitions): count a match as a definition only when it starts at the declared name - #940
gustav-fff wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
730e883 to
b25dcfa
Compare
b25dcfa to
285366e
Compare
A match is a definition only when it starts at the declared name, so
Valueno longer returnsArgValueCompletionorFromValue. Leading underscores in the name are skipped, and fuzzy matching does not change. MCPdefinitions_onlypages now default to 30 matches, because real declarations are rarer and each page reads more files.pub enum Value {Valuepub enum ValueKind {Valuepub struct ArgValueCompletion<'a> {Valuefunction handle(ctrl: UserController) {UserControllerstruct _xmlDict {xmlDictfunction M.setup(opts)M.setup59 "where is X defined" queries on nushell, ghostty, opencode, ffmpeg and Chromium, MCP
definitions_onlywith default arguments:Note
The classifier is shared, so Neovim live grep, the
definition_onlygrep mode and the SDKclassifyDefinitionsmodes use the same rule. A typed name prefix still marks the declaration. Ordinary grep pages keep the same matches; fewer lines get the definition label.Important
With 100-match pages, this rule made Chromium
definitions_only3–5x slower (median 0.9 s, max 2.5 s), because 100 real declarations take more files to collect. The 30-match default keeps today's latency with the same quality. An explicitmaxResultsstill wins.multi_grepand Pi already default to 20.Stacked on #932. #933 now stacks on this PR.
Stack merge order: #924, #925, #927, #928, #930, #931, #932, #940, #933, #934.
Summary by CodeRabbit