mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-03 18:24:05 +00:00
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>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user