fix(tui): handle /model status and /model list as reserved keywords
Fixes #3469 The TUI `/model` command was treating all arguments as model names, causing `/model status` to fail with "model not allowed: anthropic/status". Changes: - `/model status` now displays current model info - `/model list` now opens model selector (same as `/model`) This aligns TUI behavior with the message channel's handling of reserved keywords in directive-handling.model.ts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a109b7f1a9
commit
dd5021b191
@ -276,8 +276,12 @@ export function createCommandHandlers(context: CommandHandlerContext) {
|
||||
await openSessionSelector();
|
||||
break;
|
||||
case "model":
|
||||
if (!args) {
|
||||
if (!args || args === "list") {
|
||||
await openModelSelector();
|
||||
} else if (args === "status") {
|
||||
const provider = state.sessionInfo?.modelProvider || "unknown";
|
||||
const model = state.sessionInfo?.model || "unknown";
|
||||
chatLog.addSystem(`Current model: ${provider}/${model}`);
|
||||
} else {
|
||||
try {
|
||||
await client.patchSession({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user