fix(tui): handle /model status and /model list subcommands
Previously `/model status` in the TUI would try to set the model to "status", resulting in "model not allowed: anthropic/status" error. Now the TUI correctly handles: - `/model status` - shows current model information - `/model list` - opens the model selector (same as /models) Fixes #3469 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8d3f594ff6
commit
c68283c896
@ -278,6 +278,19 @@ export function createCommandHandlers(context: CommandHandlerContext) {
|
||||
case "model":
|
||||
if (!args) {
|
||||
await openModelSelector();
|
||||
} else if (args === "status") {
|
||||
// Show current model information
|
||||
const provider = state.sessionInfo.modelProvider ?? "unknown";
|
||||
const model = state.sessionInfo.model ?? "unknown";
|
||||
const current = `${provider}/${model}`;
|
||||
chatLog.addSystem(
|
||||
[`Current: ${current}`, "", "Switch: /model <provider/model>", "Browse: /models"].join(
|
||||
"\n",
|
||||
),
|
||||
);
|
||||
} else if (args === "list") {
|
||||
// /model list is an alias for /models
|
||||
await openModelSelector();
|
||||
} else {
|
||||
try {
|
||||
await client.patchSession({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user