From 63a3676d3cc7eefb54591bb9d9aed2b26e96a18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E5=90=AF=E6=98=8E=EF=BC=88QimingShi=EF=BC=89?= Date: Sun, 31 May 2026 00:50:14 +0800 Subject: [PATCH] fix(tui): distinguish /new and /reset descriptions Fixes #49517. Updates the TUI command catalog so /new describes spawning an isolated session while /reset describes resetting the current session. Adds a focused regression test for the two descriptions. Co-authored-by: KhanCold <119404710+KhanCold@users.noreply.github.com> --- src/tui/commands.test.ts | 8 ++++++++ src/tui/commands.ts | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tui/commands.test.ts b/src/tui/commands.test.ts index 4e4d4f1261d..9832b65ca17 100644 --- a/src/tui/commands.test.ts +++ b/src/tui/commands.test.ts @@ -39,6 +39,14 @@ describe("getSlashCommands", () => { expect(crestodian?.description).toBe("Return to Crestodian"); }); + it("distinguishes new-session and reset command descriptions", () => { + const commands = getSlashCommands(); + const newSession = commands.find((command) => command.name === "new"); + const reset = commands.find((command) => command.name === "reset"); + expect(newSession?.description).toBe("Spawn a new isolated session"); + expect(reset?.description).toBe("Reset the current session"); + }); + it("uses session-provided thinking levels for completions", () => { const commands = getSlashCommands({ provider: "ollama", diff --git a/src/tui/commands.ts b/src/tui/commands.ts index ced0e59e8c8..420efbef21c 100644 --- a/src/tui/commands.ts +++ b/src/tui/commands.ts @@ -150,8 +150,8 @@ export function getSlashCommands(options: SlashCommandOptions = {}): SlashComman getArgumentCompletions: activationCompletions, }, { name: "abort", description: "Abort active run" }, - { name: "new", description: "Reset the session" }, - { name: "reset", description: "Reset the session" }, + { name: "new", description: "Spawn a new isolated session" }, + { name: "reset", description: "Reset the current session" }, { name: "settings", description: "Open settings" }, { name: "exit", description: "Exit the TUI" }, { name: "quit", description: "Exit the TUI" },