[FEATURE] /pr_comments ranks higher than /commit when typing /com - improve fuzzy matching, enter selects unexpected command and allow disabling built-in commands
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:
- Fuzzy matching ranks commands that don't match the prefix above commands that do
- Built-in commands you never use constantly appear in suggestions and can be accidentally executed
- There's no way to disable or hide unwanted built-in commands
- This breaks established muscle memory from when the matching worked correctly
Proposed Solution
- Improve fuzzy matching algorithm: Prioritize prefix matches over substring matches (e.g.,
/comshould always rank/commitabove/pr_comments) - Allow disabling built-in commands: Add ability to hide unwanted built-in commands via settings or permissions
- 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):
- Type
/comand press Enter (muscle memory from when this worked) - Autocomplete executes
/pr_comments- a command I have literally never used intentionally - Have accidentally triggered this 5+ times recently
- Breaks workflow and wastes time
What should happen:
- Type
/comand press Enter - Executes
/commit(prefix match + frequently used) - 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
This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗