You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Support slash commands mid-prompt, not only at the start #16262
I searched existing issues and this is not a duplicate
Description
Currently, slash commands (/undo, /new, /compact, custom commands) only trigger when typed at the very beginning of an empty prompt. The regex rawText.match(/^\/(\S*)$/) requires the entire input to be just the slash command.
This means users cannot type context first and then invoke a slash command, e.g.:
explain the auth flow /compact — does nothing
fix the bug in auth.ts /undo — does nothing
Expected: Typing / after a space anywhere in the prompt should open the slash command popover, just like @ mentions work mid-prompt today.
After selecting:
Custom commands: replace the /trigger fragment with the expanded command, keep surrounding text
Builtin commands: remove the /trigger fragment, keep surrounding text, execute the command
Related: the @ mention popover already works mid-prompt via textBeforeCursor.match(/@(\S*)$/). Slash commands should behave the same way.
I am experiencing this on v1.15.4 in both Desktop and TUI. I have performed a clean reset of my cache and the issue persists. The slash menu only triggers at the very start of the prompt. This seems to be a regression or a feature that was not fully implemented/deployed in the latest release.
Activity
devdeyaa commentedon May 18, 2026
I am experiencing this on v1.15.4 in both Desktop and TUI. I have performed a clean reset of my cache and the issue persists. The slash menu only triggers at the very start of the prompt. This seems to be a regression or a feature that was not fully implemented/deployed in the latest release.
github-actions commentedon Jul 17, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.