[FEATURE] Support slash command autocomplete and argument hints in mid-input position
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
Currently, slash command autocomplete suggestions and argument hints only work when / is at the very beginning of the input. When users type other text first and then want to invoke a slash command mid-input, two key features are missing:
- Autocomplete dropdown: While ghost text completion for command names works mid-input (e.g., typing
help /comshowsmit), the suggestion dropdown list does not appear — so users cannot verify whether a skill actually exists. - Argument hints: After completing a mid-input slash command and pressing space (e.g.,
"review this /code-review "), the gray argument hints ([arg1] [arg2]) never appear. This is becauseBaseTextInput.tsxgates display onvalue.startsWith("/"), which fails when any text precedes the command.
This means users who invoke a slash command after typing some context have no way to confirm the skill exists or discover what arguments it accepts — they must either memorize everything or start over with the command at the beginning.
Proposed Solution
Extend the existing argument hint and autocomplete systems to also work for mid-input slash commands, building on the infrastructure that already supports mid-input ghost text completion (findMidInputSlashCommand() in commandSuggestions.ts).
Specifically:
- In
BaseTextInput.tsx, replace thevalue.startsWith("/")gate with a position-aware check that detects slash commands anywhere in the input - In
useTypeahead.tsx, extend theisCommandInput(value)guard to include mid-input slash commands - Show the suggestion dropdown for mid-input
/commands (same as start-of-input behavior) - Render argument hints at the correct position within the input, using
insertPosition-based rendering similar to howInlineGhostTextalready works
Alternative Solutions
- Always type the slash command at the very start of input (current workaround — unnatural and forces users to restructure their intent)
- Memorize all skill names and their accepted arguments (unrealistic for users with many custom skills)
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- User types:
review this file /code-re - Ghost text shows
viewto complete the command name (this already works ✓) - User accepts and presses space:
review this file /code-review - Current behavior: Nothing — no argument hints, no autocomplete confirmation
- Expected behavior: Gray hint text like
[file_path]appears after the command, and the user can confirm the command resolved to a real skill
Another scenario:
- User types:
help me / - Current behavior: Ghost text completion works, but no suggestion dropdown to browse available commands
- Expected behavior: Suggestion dropdown appears listing matching commands, same as when
/is typed at position 0
Additional Context
Related closed issues: #20667 (argument hint disappears while typing), #20234 (argument completions for custom skills).
The mid-input slash command detection infrastructure already exists in findMidInputSlashCommand() — the gap is that argument hints and the suggestion dropdown don't leverage it. The ghost text system (InlineGhostText with insertPosition) also already handles position-aware rendering, so extending it to argument hints should be architecturally consistent.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗