fix(app): agent switch should not reset thinking level (#17470)
This commit is contained in:
@@ -349,3 +349,25 @@ test("session model restore across workspaces", async ({ page, withProject }) =>
|
|||||||
await waitFooter(page, firstState)
|
await waitFooter(page, firstState)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test("variant preserved when switching agent modes", async ({ page, withProject }) => {
|
||||||
|
await page.setViewportSize({ width: 1440, height: 900 })
|
||||||
|
|
||||||
|
await withProject(async ({ directory, gotoSession }) => {
|
||||||
|
await gotoSession()
|
||||||
|
|
||||||
|
await ensureVariant(page, directory)
|
||||||
|
const updated = await chooseDifferentVariant(page)
|
||||||
|
|
||||||
|
const available = await agents(page)
|
||||||
|
const other = available.find((name) => name !== updated.agent)
|
||||||
|
test.skip(!other, "only one agent available")
|
||||||
|
if (!other) return
|
||||||
|
|
||||||
|
await choose(page, promptAgentSelector, other)
|
||||||
|
await waitFooter(page, { agent: other, variant: updated.variant })
|
||||||
|
|
||||||
|
await choose(page, promptAgentSelector, updated.agent)
|
||||||
|
await waitFooter(page, { agent: updated.agent, variant: updated.variant })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|||||||
@@ -192,10 +192,11 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||||||
model: item.model,
|
model: item.model,
|
||||||
variant: item.variant ?? null,
|
variant: item.variant ?? null,
|
||||||
})
|
})
|
||||||
|
const prev = scope()
|
||||||
const next = {
|
const next = {
|
||||||
agent: item.name,
|
agent: item.name,
|
||||||
model: item.model,
|
model: item.model ?? prev?.model,
|
||||||
variant: item.variant,
|
variant: item.variant ?? prev?.variant,
|
||||||
} satisfies State
|
} satisfies State
|
||||||
const session = id()
|
const session = id()
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|||||||
Reference in New Issue
Block a user