Repository navigation
fix(commands): match built-in slash command names in any case - #2116
Merged
Merged
Conversation
/resume, /sessions, /history and /retry already matched any case because their handlers lowercased the name; every other built-in reported "Unknown command" for /Status. The dispatcher now lowercases the name once, after custom commands and MCP prompts (which keep exact matching), so every built-in, alias and retired name behaves the same. /sessions and /history move into the alias table instead of being special-cased by the resume handler and the /help overrides. This is groundwork for moving /resume and /retry onto StatefulCommand without losing their case-insensitive names. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
nc-review could not produce a verdict this run (agent exit |
This was referenced Nov 11, 2026
jay23606
added a commit
to jay23606/nanocoder
that referenced
this pull request
Nov 12, 2026
…ollective#2116) /resume, /sessions, /history and /retry already matched any case because their handlers lowercased the name; every other built-in reported "Unknown command" for /Status. The dispatcher now lowercases the name once, after custom commands and MCP prompts (which keep exact matching), so every built-in, alias and retired name behaves the same. /sessions and /history move into the alias table instead of being special-cased by the resume handler and the /help overrides. This is groundwork for moving /resume and /retry onto StatefulCommand without losing their case-insensitive names. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
A small user-visible fix that comes before PR 3 of the command-dispatcher sequence (#2098, #2114). It is kept separate from the refactor, as the phase 2 rules ask.
What was wrong
Case handling was inconsistent.
/Resume,/SESSIONS,/Historyand/Retryworked, because the resume and retry handlers lowercased the name themselves. Every other built-in, such as/Status,/Compactor/Setup-MCP, reportedUnknown command.Moving
/resumeand/retryontoStatefulCommand(PR 3) would have quietly dropped the case-insensitivity they had, because the registry looks names up exactly.Separately,
/sessionsand/historywere special-cased in two places: the resume handler's own name list, and a/helpoverride that listed them as aliases. They were not in the alias table, so a fully typed/sessionsdid not complete to itself in the slash menu the way other old names do.Fix
Statusstill wins for/Status, and/STATUSruns the built-in./sessionsand/historyare now entries inCOMMAND_ALIASES(targetresume). The/helpoverride duplicate and its lookup branch are removed./help sessionsstill opens/resume, and the/resumehelp page still lists both names.Tests
command-dispatcher.spec.ts:/STATUS,/Setup-MCP(retired name) and/Model-Database(alias) run their built-ins/sessionsand/History --allopen the session picker through the alias table, and--allis still passed throughStatusstill wins for its own spelling onlyaliases.spec.ts:sessions/historyare aliases, and/helpresolves them.tsc --noEmit,biome check .andknip. AVA passes over source/commands and the app-util and dispatcher specs.🤖 Generated with Claude Code