Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): subagent bar stops guessing the subagent's effort #15710

Mergedfixfon(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/15710/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 54 additions and 13 deletions.

x
0 of 3 viewed, 3 left
32 additions and 9 deletionspackages/client-runtime/src/state/threadExecution.test.tsModified
View file
@@ -464,20 +464,43 @@
​
- it("shows the model's default effort when the user never picked one", () => {
- expect(formatModelSelectionEffort(selection(), catalog({}))).toBe("High");
- });
-​
- it("names a stored effort the way the catalog does", () => {
+ it("names stored and matching reported effort, preferring the stored choice", () => {
expect(
formatModelSelectionEffort(selection([{ id: "effort", value: "xhigh" }]), catalog({})),
).toBe("Extra High");
+ const reported = selection([{ id: "effort", value: "xhigh" }]);
+ expect(formatModelSelectionEffort(selection(), catalog({}), reported)).toBe("Extra High");
+ expect(
+ formatModelSelectionEffort(
+ selection([{ id: "effort", value: "medium" }]),
+ catalog({}),
+ reported,
+ ),
+ ).toBe("Medium");
+ expect(
+ formatModelSelectionEffort(
+ selection([{ id: "effort", value: "retired-effort" }]),
+ catalog({ currentValue: "medium" }),
+ reported,
+ ),
+ ).toBeNull();
});