Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

test: zwei Quellcode-Pins auf die neue pickForMode-Signatur nachgezogen

purple2c637401de1e
diff --git a/src/lib/__tests__/modeGate.test.ts b/src/lib/__tests__/modeGate.test.ts
index 02f3429a..5fa92535 100644
--- a/src/lib/__tests__/modeGate.test.ts
+++ b/src/lib/__tests__/modeGate.test.ts
@@ -66,6 +66,6 @@ describe('wiring: the gate sits at the choke points', () => {
const src = read('../../components/layout/AppShell.tsx')
expect(src).toContain('if (pick.change) setActiveModel(pick.next)')
const cloudOnly = [{ name: 'lu-cloud::glm-5.3', type: 'text', provider: 'lu-cloud' }]
- expect(pickForMode('lu-cloud::glm-5.3', cloudOnly, 'local')).toEqual({ change: true, next: null })
+ expect(pickForMode('lu-cloud::glm-5.3', cloudOnly, 'local')).toMatchObject({ change: true, next: null })
})
})
diff --git a/src/stores/__tests__/modelStore-pick-persistence.test.ts b/src/stores/__tests__/modelStore-pick-persistence.test.ts
index f4dafc3b..480c6347 100644
--- a/src/stores/__tests__/modelStore-pick-persistence.test.ts
+++ b/src/stores/__tests__/modelStore-pick-persistence.test.ts
@@ -83,7 +83,10 @@ describe('the pick is written to disk in the first place', () => {
it('the mode reselect no longer decides anything by hand', () => {
// It asks pickForMode, which holds the empty list harmless. The old
// inline version is what cleared the pick on mount.
- expect(shellSrc).toContain('pickForMode(activeModel, allModels, appMode)')
+ // The fourth argument is the model the user named on the way into cloud
+ // mode by clicking its row in the picker (Nebenbefund 1, R10 re-measure).
+ // The call is still the rule, not a hand-rolled decision.
+ expect(shellSrc).toContain('pickForMode(activeModel, allModels, appMode, pendingCloudModel)')
expect(shellSrc).not.toMatch(/const inMode = \(name: string \| null\)/)
})
})