From c68283c896615d1b261765e429281a726faae8af Mon Sep 17 00:00:00 2001 From: zerone0x Date: Thu, 29 Jan 2026 01:40:39 +0800 Subject: [PATCH] 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 --- src/tui/tui-command-handlers.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tui/tui-command-handlers.ts b/src/tui/tui-command-handlers.ts index a14172809..3c77cfab3 100644 --- a/src/tui/tui-command-handlers.ts +++ b/src/tui/tui-command-handlers.ts @@ -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 ", "Browse: /models"].join( + "\n", + ), + ); + } else if (args === "list") { + // /model list is an alias for /models + await openModelSelector(); } else { try { await client.patchSession({