fix: rename /model slash command to /models#5273
Conversation
Make /models the canonical slash command name and remove the /model alias. Update references in source, docs, tests, and fixtures.
roboomp
left a comment
There was a problem hiding this comment.
P3: useful rename direction, but the diff currently breaks the existing /model contract without maintainer sign-off and leaves public docs pointing at the removed command.
Blocking findings: /model now falls through, and README.md:279-281 still advertises /model. Should-fix: released changelog history is rewritten; only [Unreleased] should change.
Verification note: I tried bun test packages/coding-agent/test/slash-commands/switch.test.ts packages/coding-agent/test/acp-builtins.test.ts; it failed before executing tests because packages/coding-agent/src/export/html/index.ts could not import ./tool-views.generated.js in this worktree.
Thanks for the cleanup push; keeping the old spelling as an alias would make this much easier to merge.
| { | ||
| name: "model", | ||
| aliases: ["models"], | ||
| name: "models", |
There was a problem hiding this comment.
blocking: This drops the only /model registration (BUILTIN_SLASH_COMMAND_LOOKUP is populated only from name plus aliases at lines 2296-2300), so existing TUI and ACP invocations of /model now fall through. The repo bar says default-behavior changes need explicit maintainer sign-off; absent that, make /models canonical but keep aliases: ["model"] so existing user scripts/docs keep working.
| ### Added | ||
|
|
||
| - Introduced a fullscreen, mouse-supported Model Hub (via /model) featuring a sidebar of scopes, metadata-aligned model tables, inline role/thinking assignment strips, custom role creation, quick-switch cycle editing, and manual provider refreshing. | ||
| - Introduced a fullscreen, mouse-supported Model Hub (via /models) featuring a sidebar of scopes, metadata-aligned model tables, inline role/thinking assignment strips, custom role creation, quick-switch cycle editing, and manual provider refreshing. |
There was a problem hiding this comment.
should-fix: This rewrites a released changelog entry under ## [16.4.5]. AGENTS.md says released sections are immutable; this PR changes dozens of historical entries from /model to /models. Please leave released history unchanged and keep only the new ## [Unreleased] note for this change.
| const harness = createRuntime(); | ||
|
|
||
| const handled = await executeBuiltinSlashCommand("/model", harness.runtime); | ||
| const handled = await executeBuiltinSlashCommand("/models", harness.runtime); |
There was a problem hiding this comment.
should-fix: This only proves the new /models spelling works. If removing /model is intentional, add a contract test for executeBuiltinSlashCommand("/model", ...) returning false (and the ACP equivalent) so the break is explicit; if the alias is kept, assert /model still opens the same picker.
|
|
||
| ### Fixed | ||
|
|
||
| - Renamed the `/model` slash command to `/models` for consistency; `/model` is no longer recognized |
There was a problem hiding this comment.
blocking: The PR says all user-facing references moved, but README.md:279-281 still advertises “one /model away” and tells users to switch with the /model slash command. With /model no longer recognized, the published README points users at a failing command; either update that doc in this PR or keep /model as an alias.
Summary
The coding-agent had a single slash command registered as
/modelwith/modelsas an alias. This is confusing —/modelsis the more natural name and is what users expect. This PR makes/modelsthe canonical command name and removes/model.Changes
name: "model"→name: "models"inbuiltin-registry.tsaliases: ["models"]line (no longer needed)/modelto/models(error strings, status messages, help text)Verification
bun test packages/coding-agent/test/slash-commands/→ 101 pass, 0 failbun test packages/coding-agent/test/acp-builtins.test.ts→ 69 pass, 0 failbun test packages/coding-agent/test/acp-agent.test.ts→ 53 pass, 0 fail