fix: clean status + help + mid alias
This commit is contained in:
@@ -44,6 +44,7 @@ describe("buildStatusMessage", () => {
|
||||
expect(text).toContain("thinking=medium");
|
||||
expect(text).toContain("verbose=off");
|
||||
expect(text).not.toContain("Shortcuts:");
|
||||
expect(text).not.toContain("set with");
|
||||
});
|
||||
|
||||
it("handles missing agent config gracefully", () => {
|
||||
|
||||
@@ -230,8 +230,8 @@ export function buildStatusMessage(args: StatusArgs): string {
|
||||
)}${entry?.abortedLastRun ? " • last run aborted" : ""}`;
|
||||
|
||||
const optionsLine = runtime.sandboxed
|
||||
? `Options: thinking=${thinkLevel} | verbose=${verboseLevel} | elevated=${elevatedLevel} (set with /think <level>, /verbose on|off, /elevated on|off, /model <id>)`
|
||||
: `Options: thinking=${thinkLevel} | verbose=${verboseLevel} (set with /think <level>, /verbose on|off, /model <id>)`;
|
||||
? `Options: thinking=${thinkLevel} | verbose=${verboseLevel} | elevated=${elevatedLevel}`
|
||||
: `Options: thinking=${thinkLevel} | verbose=${verboseLevel}`;
|
||||
|
||||
const modelLabel = model ? `${provider}/${model}` : "unknown";
|
||||
|
||||
@@ -257,5 +257,9 @@ export function buildStatusMessage(args: StatusArgs): string {
|
||||
}
|
||||
|
||||
export function buildHelpMessage(): string {
|
||||
return ["ℹ️ Help", "Shortcuts: /new reset | /restart relink"].join("\n");
|
||||
return [
|
||||
"ℹ️ Help",
|
||||
"Shortcuts: /new reset | /restart relink",
|
||||
"Options: /think <level> | /verbose on|off | /elevated on|off | /model <id>",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
8
src/auto-reply/thinking.test.ts
Normal file
8
src/auto-reply/thinking.test.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { normalizeThinkLevel } from "./thinking.js";
|
||||
|
||||
describe("normalizeThinkLevel", () => {
|
||||
it("accepts mid as medium", () => {
|
||||
expect(normalizeThinkLevel("mid")).toBe("medium");
|
||||
});
|
||||
});
|
||||
@@ -12,7 +12,11 @@ export function normalizeThinkLevel(
|
||||
if (["min", "minimal"].includes(key)) return "minimal";
|
||||
if (["low", "thinkhard", "think-hard", "think_hard"].includes(key))
|
||||
return "low";
|
||||
if (["med", "medium", "thinkharder", "think-harder", "harder"].includes(key))
|
||||
if (
|
||||
["mid", "med", "medium", "thinkharder", "think-harder", "harder"].includes(
|
||||
key,
|
||||
)
|
||||
)
|
||||
return "medium";
|
||||
if (
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user