fix(tui): slash command fallback must not block extension commands#3422
Open
tosoyn wants to merge 1 commit intogsd-build:mainfrom
Open
fix(tui): slash command fallback must not block extension commands#3422tosoyn wants to merge 1 commit intogsd-build:mainfrom
tosoyn wants to merge 1 commit intogsd-build:mainfrom
Conversation
The unknown-command fallback added in 91f0286 returns true for any unrecognised "/" input before the extension system gets a chance to handle it. This breaks every extension-registered command (/gsd, /kill, /worktree, /exit, etc.). Check extensionRunner.getCommand() before showing the error so that extension commands fall through to session.prompt() as intended. Affects: main branch at 394cb18 (HEAD), not yet in any npm release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
🟠 PR Risk Report — HIGH
Affected Systems
File Breakdown
|
1 task
Contributor
|
Related follow-up in #3432: this keeps the extension-command fix but also covers prompt-template and enabled |
Collaborator
|
@deseltrus can you fix merge conflicts ? |
Collaborator
|
This PR has merge conflicts with the base branch. Please rebase or merge 🤖 Automated PR audit — 2026-04-04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3421
The unknown-command fallback added in
91f0286(PR #2312, merged intomainat394cb18) returnstruefor any unrecognised/input before the extension system gets a chance to handle it. This breaks every extension-registered command (/gsd,/kill,/worktree,/exit, etc.).Affected version:
mainat394cb18(HEAD as of 2026-04-02). Not present in npm v2.58.0.Changes
slash-command-handlers.ts: before showing "Unknown command", checkextensionRunner.getCommand(commandName). If the extension owns the command, returnfalsesoinput-controllerfalls through tosession.prompt()which routes it correctly.Test plan
gsdfrom patchedmain/gsdexecutes normally/kill,/worktree,/exitwork/asdf) still show the error/help,/model,/settings) still work🤖 Generated with Claude Code