[FEATURE] Support slash command autocomplete and argument hints in mid-input position

Resolved 💬 2 comments Opened Apr 1, 2026 by chanmuzi Closed May 9, 2026

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:

  1. Autocomplete dropdown: While ghost text completion for command names works mid-input (e.g., typing help /com shows mit), the suggestion dropdown list does not appear — so users cannot verify whether a skill actually exists.
  2. 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 because BaseTextInput.tsx gates display on value.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:

  1. In BaseTextInput.tsx, replace the value.startsWith("/") gate with a position-aware check that detects slash commands anywhere in the input
  2. In useTypeahead.tsx, extend the isCommandInput(value) guard to include mid-input slash commands
  3. Show the suggestion dropdown for mid-input / commands (same as start-of-input behavior)
  4. Render argument hints at the correct position within the input, using insertPosition-based rendering similar to how InlineGhostText already 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

  1. User types: review this file /code-re
  2. Ghost text shows view to complete the command name (this already works ✓)
  3. User accepts and presses space: review this file /code-review
  4. Current behavior: Nothing — no argument hints, no autocomplete confirmation
  5. 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:

  1. User types: help me /
  2. Current behavior: Ghost text completion works, but no suggestion dropdown to browse available commands
  3. 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.

View original on GitHub ↗

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