fix(app): model selection persist by session (#17348)

This commit is contained in:
Adam 2026-03-13 11:05:08 -05:00 committed by GitHub
commit 4ad8116ce3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 969 additions and 440 deletions

View file

@ -44,6 +44,16 @@ describe("model variant", () => {
expect(value).toBe("high")
})
test("lets an explicit default override the configured variant", () => {
const value = resolveModelVariant({
variants: ["low", "high", "xhigh"],
selected: null,
configured: "xhigh",
})
expect(value).toBeUndefined()
})
test("cycles from configured variant to next", () => {
const value = cycleModelVariant({
variants: ["low", "high", "xhigh"],
@ -63,4 +73,14 @@ describe("model variant", () => {
expect(value).toBe("low")
})
test("cycles from an explicit default to the first variant", () => {
const value = cycleModelVariant({
variants: ["low", "high", "xhigh"],
selected: null,
configured: "xhigh",
})
expect(value).toBe("low")
})
})