Repository navigation
refactor(commands): move the mode-opening commands onto StatefulCommand - #2114
Merged
Merged
Conversation
/model (and /model browse), /settings, /explorer, /ide and /tune now hold their own logic and get what they need from CommandContext instead of being stubs handled by handleSpecialCommand. The retired /setup-providers and /setup-mcp names move to a small table in aliases.ts that the dispatcher forwards with the same notice as before. handleSpecialCommand is gone; only checkpoint load is left in its file, renamed to match. No behaviour change. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
No changeset foundThis PR does not add a changeset, so it will not appear in the changelog or trigger a release. If the change is user-facing, add one: pnpm changesetPick a bump (patch / minor / major) and write the changelog entry in our usual voice ("Added X... Thanks to @you. Closes #123."), then commit the generated If this PR is docs-only or a chore that needs no release note, you can ignore this — or run |
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
…nd (Nano-Collective#2114) /model (and /model browse), /settings, /explorer, /ide and /tune now hold their own logic and get what they need from CommandContext instead of being stubs handled by handleSpecialCommand. The retired /setup-providers and /setup-mcp names move to a small table in aliases.ts that the dispatcher forwards with the same notice as before. handleSpecialCommand is gone; only checkpoint load is left in its file, renamed to match. No behaviour change. 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.
PR 2 of the command-dispatcher sequence (PR 1: #2098).
What changed
/model(including/model browse),/settings,/explorer,/ideand/tuneare nowStatefulCommands. Each module holds its own logic and calls the setter it needs fromCommandContext. They were empty stubs before, with the real work inhandleSpecialCommand.CommandContextgainsenterModelSelectionMode,enterModelDatabaseMode,enterSettingsMode(tab?),enterExplorerMode,enterIdeSelectionModeandenterTune, wired increateCommandContext./setup-providersand/setup-mcpmove to aRETIRED_COMMANDStable inaliases.ts. The dispatcher checks it after custom commands and MCP prompts, as the old handler did. It queues the same "has moved to /settings" notice and runs/settings <tab>. The table is kept apart fromCOMMAND_ALIASESso retired names still don't complete in the slash menu and/helpdoesn't resolve them, as before.handleSpecialCommandis gone. Its file kept onlyhandleCheckpointLoad, so it is renamedcheckpoint-load-handler.ts; that handler moves in the next PR.Behaviour
No change intended:
/settingstab errors and completes after the render delay./model-databasestill expands to/model browse.Tests
command-dispatcher.spec.ts:/model browse, the/model-databasealias and a mixed-case/settings MCP) opens the right mode and then completeside.spec.tsxused to assert that the stub returned a Fragment. It now checks the same behaviour throughrun: the IDE picker opens and the prompt is handed back.app-util.spec.tstests pass unchanged: settings tabs, retired setup commands,/modeland/model browse.tsc --noEmit,biome check .,knipandknip --production --include files. AVA passes over source/app/utils, source/commands,commands.spec.ts, source/hooks, source/app/sections and source/plain.🤖 Generated with Claude Code