What happened?
When typing /context (with a trailing space) in the input field, the command autocomplete dropdown does not show the detail subcommand. Other commands like /stats correctly display their subcommands (model, tools) as suggestions when a trailing space is entered, but /context shows no suggestions.
What did you expect to happen?
Typing /context should display a dropdown with detail as a suggestion, along with its description (e.g., "Show per-item context usage breakdown."), similar to how /stats shows model and tools.
Client information
Client Information
Run qwen to enter the interactive CLI, then run the /about command.
$ qwen /about
│ Status
│ Qwen Code 0.14.1 (c7cfd4c1d)
│ Runtime Node.js v22.18.0 / npm 11.8.0
│ OS darwin arm64 (25.3.0)
│
│ Auth Qwen OAuth
│ Model coder-model
│ Fast Model coder-model
│ Session ID f8ecc13e-c697-4645-a790-b0f38f6f262e
│ Sandbox no sandbox
│ Proxy no proxy
│ Memory Usage 259.4 MB
Login information
Qwen OAuth
Anything else we need to know?
Steps to reproduce
- Start Qwen Code interactive mode (
qwen)
- Type
/context (note the trailing space)
- Observe: No dropdown suggestion appears
- Compare with
/stats — which correctly shows model and tools as suggestions
Root cause
The contextCommand in packages/cli/src/ui/commands/contextCommand.ts is missing the subCommands property. While the command description mentions Use "/context detail" for per-item breakdown., the detail subcommand is not registered as an actual SlashCommand with its own name, description, and action. This means:
- The autocomplete system has no
subCommands to display when the user types /context
/context detail only works because the main action manually parses the args string, which is inconsistent with how other commands (like /stats) handle subcommands
Proposed fix
Add a subCommands array to contextCommand with a detail entry, matching the pattern used by statsCommand. This enables the autocomplete system toproperly suggest detail as a subcommand.
What happened?
When typing
/context(with a trailing space) in the input field, the command autocomplete dropdown does not show thedetailsubcommand. Other commands like/statscorrectly display their subcommands (model,tools) as suggestions when a trailing space is entered, but/contextshows no suggestions.What did you expect to happen?
Typing
/contextshould display a dropdown withdetailas a suggestion, along with its description (e.g., "Show per-item context usage breakdown."), similar to how/statsshowsmodelandtools.Client information
Client Information
Run
qwento enter the interactive CLI, then run the/aboutcommand.Login information
Qwen OAuth
Anything else we need to know?
Steps to reproduce
qwen)/context(note the trailing space)/stats— which correctly showsmodelandtoolsas suggestionsRoot cause
The
contextCommandinpackages/cli/src/ui/commands/contextCommand.tsis missing thesubCommandsproperty. While the command description mentionsUse "/context detail" for per-item breakdown., thedetailsubcommand is not registered as an actualSlashCommandwith its ownname,description, andaction. This means:subCommandsto display when the user types/context/context detailonly works because the main action manually parses theargsstring, which is inconsistent with how other commands (like/stats) handle subcommandsProposed fix
Add a
subCommandsarray tocontextCommandwith adetailentry, matching the pattern used bystatsCommand. This enables the autocomplete system toproperly suggestdetailas a subcommand.