feat(shell): add slash command alias resolution and display#2261
feat(shell): add slash command alias resolution and display#2261jackfish212 wants to merge 1 commit into
Conversation
- add SlashCommand.display_name() for canonical and alias labels\n- index available slash commands by both primary name and aliases\n- track canonical command names in telemetry when invoked via alias\n- show alias matches as "/name (alias)" in completer and help output\n- fix /usage alias from "/status" to "status"
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3caf16e53
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| git tag <tag> | ||
| git push origin <tag> | ||
| ``` | ||
| ``` |
There was a problem hiding this comment.
Fix unmatched Markdown fence in release skill instructions
The new PR template example opens a fenced block at ```markdown and then introduces ```sh inside it, which causes the outer fence to terminate early and leaves the trailing ``` unmatched. In rendered Markdown, this can swallow the rest of the document into a code block, making step 11 and stop conditions hard to read and easy to miss during release execution.
Useful? React with 👍 / 👎.
Summary
This PR improves the shell slash command system so that aliases are fully resolved to their canonical commands. Users can now invoke slash commands via aliases, and the UI clearly shows when an alias match is being used. Telemetry also tracks canonical names rather than raw alias inputs.
1. Slash command alias resolution
Problem: Slash command aliases were partially supported but not consistently resolved. Invoking a command via its alias could bypass telemetry tracking or fail to match the correct handler.
What was done:
Shell._find_available_slash_command()to resolve aliases to canonicalSlashCommandinstances.command.nameeven when invoked via alias.2. Alias display in completer and help output
Problem: The shell completer and help text did not distinguish between canonical names and aliases, making it unclear when an alias was matched.
What was done:
SlashCommand.display_name(trigger)to render/name (alias)for alias matches.SlashCommandCompleterto show alias matches with the new display format./helpoutput to expand aliases as separate entries./usagealias from"/status"to"status".3. Registry and test infrastructure
Problem: The slash command registry lacked utilities to iterate over both canonical and alias entries.
What was done:
SlashCommandRegistry.iter_command_entries()to yield(trigger, command)pairs.Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.