[FEATURE] /pr_comments ranks higher than /commit when typing /com - improve fuzzy matching, enter selects unexpected command and allow disabling built-in commands

Open 💬 15 comments Opened Nov 11, 2025 by adriangalilea

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

<img width="537" height="107" alt="Image" src="https://github.com/user-attachments/assets/de6ada93-02af-4d4b-9478-7a1cafc2a17f" />

The fuzzy matching algorithm for slash commands has poor ranking that prioritizes non-prefix matches over prefix matches. For example, typing /comm + Enter now executes /pr_comments instead of /commit even though /commit starts with "com", /pr_comments doesn't, and I have never used /pr_comments.

Note how both /commit and /pr-comment is highlighted by the same color and /commit is first, yet if I press enter it will input /pr-comment which is completely unexpected.

This behavior recently changed and breaks muscle memory. It's caused me to accidentally execute /pr_comments over 5 times when I meant to commit code. The problems:

  1. Fuzzy matching ranks commands that don't match the prefix above commands that do
  2. Built-in commands you never use constantly appear in suggestions and can be accidentally executed
  3. There's no way to disable or hide unwanted built-in commands
  4. This breaks established muscle memory from when the matching worked correctly

Proposed Solution

  1. Improve fuzzy matching algorithm: Prioritize prefix matches over substring matches (e.g., /com should always rank /commit above /pr_comments)
  2. Allow disabling built-in commands: Add ability to hide unwanted built-in commands via settings or permissions
  3. Implement frecency ranking: Use frequency + recency to learn from actual usage patterns and rank never-used commands lower

Bonus (not mutually exclusive):

  • Add visual separation between built-in and custom commands (related to #11330)

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

What happens now (broken):

  1. Type /com and press Enter (muscle memory from when this worked)
  2. Autocomplete executes /pr_comments - a command I have literally never used intentionally
  3. Have accidentally triggered this 5+ times recently
  4. Breaks workflow and wastes time

What should happen:

  1. Type /com and press Enter
  2. Executes /commit (prefix match + frequently used)
  3. Or if I had disabled /pr_comments, it wouldn't even appear in suggestions

Additional Context

  • This behavior recently changed - it used to work correctly
  • Related to #11330 which addresses built-in vs user command prioritization
  • This is actively breaking muscle memory and causing accidental command execution

View original on GitHub ↗

This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗