Skip to content

fix(jetbrains): improve slash command matching - #12909

Merged
kirillk merged 1 commit into
mainfrom
dent-balloon
Aug 6, 2026
Merged

fix(jetbrains): improve slash command matching#12909
kirillk merged 1 commit into
mainfrom
dent-balloon

Conversation

@kirillk

@kirillk kirillk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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/MinusculeMatcher scoring 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

GIF Recording 2026-08-05 at 1 32 36 PM

How to Test

Manual/local verification

  • Agent ran ./gradlew :frontend:test --tests ai.kilocode.client.session.ui.prompt.KiloPromptCompletionProviderTest from packages/kilo-jetbrains/ and it passed.
  • Pre-push hook ran bun turbo typecheck --filter=!@kilocode/kilo-jetbrains and bun turbo typecheck --filter=@kilocode/kilo-jetbrains; both passed.

Reviewer test steps

  1. Open the JetBrains plugin prompt.
  2. Type /jet with commands or skills such as jetbrains-one, jetbrains-two, and three-jetbrains; confirm the jetbrains-* prefix matches appear above three-jetbrains.
  3. Type /j-; confirm hyphenated names such as jetbrains-one and jetbrains-two are suggested.
  4. Type an all-caps camel-hump abbreviation such as /JBS; confirm camelCase names such as jetBrainsSkill are suggested.

Blocked checks and substitute verification

  • None.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

N/A

@kilo-code-bot

kilo-code-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 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)
  • .changeset/jetbrains-slash-completion.md
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/KiloPromptCompletionProvider.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/prompt/KiloPromptCompletionProviderTest.kt

Reviewed by kimi-k3 · Input: 76.6K · Output: 12.3K · Cached: 329.7K

Review guidance: REVIEW.md from base branch main

@kirillk
kirillk enabled auto-merge August 5, 2026 23:14
@kirillk
kirillk merged commit b5b022f into main Aug 6, 2026
24 checks passed
@kirillk
kirillk deleted the dent-balloon branch August 6, 2026 01:01
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(jetbrains): improve slash command matching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants