fix(jetbrains): improve slash command matching - #12909
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge lgtm — the matcher swap is well-scoped: prefix matches are scored strictly above contained matches, separator-containing prefixes correctly restrict to start matching, and the client-name dedup plus mention reuse of the same ranker behave as described. Tests exercise the real implementation with no mocks. No resource or memory-leak concerns introduced (the Ranker is transient per completion invocation). Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 76.6K · Output: 12.3K · Cached: 329.7K Review guidance: REVIEW.md from base branch |
kirillk
enabled auto-merge
August 5, 2026 23:14
lambertjosh
approved these changes
Aug 6, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
fix(jetbrains): improve slash command matching
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.
Issue
No linked issue; user-requested JetBrains slash completion fix.
Context
JetBrains slash command completion only used case-insensitive prefix matching, so command and skill names were hard to discover when users typed separator-aware prefixes, camel-case abbreviations, or substrings.
Implementation
This updates prompt completion matching to use IntelliJ's
NameUtil/MinusculeMatcherscoring while keeping the existing custom completion provider flow. Prefix and camel/separator matches are scored above middle matches, so direct command-name matches appear before contained matches. The same matcher is reused for special mention names, while backend file-search results remain unchanged because they are already filtered by the backend.Screenshots / Video
How to Test
Manual/local verification
./gradlew :frontend:test --tests ai.kilocode.client.session.ui.prompt.KiloPromptCompletionProviderTestfrompackages/kilo-jetbrains/and it passed.bun turbo typecheck --filter=!@kilocode/kilo-jetbrainsandbun turbo typecheck --filter=@kilocode/kilo-jetbrains; both passed.Reviewer test steps
/jetwith commands or skills such asjetbrains-one,jetbrains-two, andthree-jetbrains; confirm thejetbrains-*prefix matches appear abovethree-jetbrains./j-; confirm hyphenated names such asjetbrains-oneandjetbrains-twoare suggested./JBS; confirm camelCase names such asjetBrainsSkillare suggested.Blocked checks and substitute verification
Checklist
Get in Touch
N/A