diff --git a/apps/web/src/components/chat/EffortGlyph.test.ts b/apps/web/src/components/chat/EffortGlyph.test.ts index 0b73e89e4f833..1c893050e0d41 100644 --- a/apps/web/src/components/chat/EffortGlyph.test.ts +++ b/apps/web/src/components/chat/EffortGlyph.test.ts @@ -25,8 +25,11 @@ describe("resolveEffortGlyph", () => { }); }); - it("names max instead of drawing it", () => { + it("names Max and Default instead of drawing them", () => { expect(resolveEffortGlyph(claude, "max")?.special).toBe("Max"); + const reported = descriptor(["default", "low", "medium", "high", "xhigh", "max"]); + expect(resolveEffortGlyph(reported, "default")?.special).toBe("Default"); + expect(resolveEffortGlyph(reported, "low")).toMatchObject({ count: 4, filled: 1 }); }); it("names Ultracode and Ultrathink instead of drawing a level", () => { diff --git a/apps/web/src/components/chat/EffortGlyph.tsx b/apps/web/src/components/chat/EffortGlyph.tsx index ae90228b8da1b..8220a2b27272c 100644 --- a/apps/web/src/components/chat/EffortGlyph.tsx +++ b/apps/web/src/components/chat/EffortGlyph.tsx @@ -11,15 +11,15 @@ const BASELINE_INSET = 2; type SelectDescriptor = Extract; // Older servers offer Ultracode as a level. It changes the workflow, so it keeps its name. -// Max is named too, so the full scale stops short of it. -const NAMED_LEVELS = new Set(["ultracode", "max"]); +// Max is named too, so the full scale stops short of it. Default leaves the level to the agent. +const NAMED_LEVELS = new Set(["ultracode", "max", "default"]); const OFF_LEVELS = new Set(["off", "none"]); // More bars than this no longer fit the glyph's height in whole pixels. const MAX_BARS = 7; /** * Maps a reasoning select to bars: one per ordinary level, filled up to the current one, with an - * off level as none filled. Max, prompt-injected and workflow levels are named instead of drawn. + * off level as none filled. Max, Default, prompt-injected and workflow levels are named instead. */ export function resolveEffortGlyph(descriptor: SelectDescriptor, current: string | null) { const special = new Set([...(descriptor.promptInjectedValues ?? []), ...NAMED_LEVELS]);