fix: route non-builtin slash commands after TUI dispatch#3432
Merged
jeremymcs merged 1 commit intogsd-build:mainfrom Apr 3, 2026
Merged
fix: route non-builtin slash commands after TUI dispatch#3432jeremymcs merged 1 commit intogsd-build:mainfrom
jeremymcs merged 1 commit intogsd-build:mainfrom
Conversation
The TUI slash dispatcher started treating any unrecognized /command as handled before session.prompt() could resolve extension commands, prompt templates, or /skill:* inputs. That blocked valid non-builtin slash commands and also let /export swallow unrelated /export* prefixes. Move unknown-command detection to the interactive entry points, allow only known builtins or session-resolved slash commands through, gate /skill:* on the skill-command setting, and tighten /export matching to exact command tokens.
Contributor
🟠 PR Risk Report — HIGH
Affected Systems
File Breakdown
|
This was referenced Apr 3, 2026
justinwyer
approved these changes
Apr 3, 2026
Contributor
|
@jeremymcs I see the publish pipeline is stuck waiting on a pipeline from yesterday |
Collaborator
|
Sorry guys. I stepped away this morning for a golf tourney. Didn't see stuck pipeline. |
Contributor
|
@jeremymcs thanks so much hope you beat your handicap! |
|
i don't think this release was pushed out for npm installation. Latest is still pushing the broken version. Thanks for your work on this project. |
Collaborator
|
Sorry for the long delay in getting NPM up guys. We've got a gap in permissions and @glittercowboy is waiting on some hardware replacments to get back online. Hopefully he'll be able to jump on tonight and get 2.60 pushed out to NPM. |
This was referenced Apr 4, 2026
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.
TL;DR
What: Restore non-builtin slash-command routing in the interactive TUI so extension commands, prompt templates, and enabled
/skill:*inputs are not rejected as unknown.Why: The unknown-command fallback added in the TUI slash dispatcher consumed any unmatched
/...before session-level slash resolution could run, and/exportalso matched unrelated/export*prefixes.How: Move unknown-command rejection to the interactive entry points that can distinguish builtins from session-resolved slash commands, gate
/skill:*recognition on the skill-command setting, and tighten/exportmatching to exact command tokens.What
This change updates the interactive slash-command routing path in
pi-coding-agent.packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts/exporttokens instead of matching every/export*prefix.packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.tssession.prompt().packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts/skill:*when skill commands are enabled.packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts/exportprefix collisions, and unknown slash commands.Why
dispatchSlashCommand()started treating every unrecognized/...input as handled inside the TUI beforesession.prompt()could run its normal slash resolution. That meant valid non-builtin slash inputs never reached extension command execution, prompt-template expansion, or/skill:*expansion.It also left a narrower routing bug in place because
/exportmatched any/export*prefix, which could still steal unrelated slash names from later resolution.Fixes #3421
See also #3422
How
The fix keeps builtin handling in the TUI, but moves unknown-command rejection to the interactive entry points that know when a slash input should fall through to session-level routing:
dispatchSlashCommand();/skill:*commands continue tosession.prompt();/exportnow matches only/exportand/export ..., not arbitrary/export*prefixes.This stays within the existing command model rather than adding a new routing layer.
Test Evidence
node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.tsnpm run buildfix