diff options
| -rw-r--r-- | scripts/live-probe-provider-retry.ts | 4 | ||||
| -rw-r--r-- | scripts/live-probe.ts | 4 | ||||
| -rw-r--r-- | src/app/store.test.ts | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/scripts/live-probe-provider-retry.ts b/scripts/live-probe-provider-retry.ts index 952163c..d7b8c6b 100644 --- a/scripts/live-probe-provider-retry.ts +++ b/scripts/live-probe-provider-retry.ts @@ -19,7 +19,7 @@ * the JSON-parse boundary the unit tests skip (they pass constructed events). * * bun scripts/live-probe-provider-retry.ts - * PROBE_MODEL=opencode/glm-5.2 bun scripts/live-probe-provider-retry.ts + * PROBE_MODEL=opencode-1/glm-5.2 bun scripts/live-probe-provider-retry.ts */ import type { ChatDeltaMessage, ChatErrorMessage } from "@dispatch/transport-contract"; import type { SurfaceServerMessage } from "@dispatch/ui-contract"; @@ -33,7 +33,7 @@ import { } from "../src/core/chunks/index.ts"; const WS_URL = process.env.PROBE_WS ?? "ws://localhost:24205"; -const MODEL = process.env.PROBE_MODEL ?? "opencode/deepseek-v4-flash"; +const MODEL = process.env.PROBE_MODEL ?? "opencode-1/deepseek-v4-flash"; const PROMPT = process.env.PROBE_PROMPT ?? "Reply with exactly: ok"; type ChatMsg = ChatDeltaMessage | ChatErrorMessage; diff --git a/scripts/live-probe.ts b/scripts/live-probe.ts index 6121eac..ad00179 100644 --- a/scripts/live-probe.ts +++ b/scripts/live-probe.ts @@ -4,7 +4,7 @@ * `bun run test`. Run with the backend up: * * bun scripts/live-probe.ts # default model - * PROBE_MODEL=opencode/glm-5 bun scripts/live-probe.ts + * PROBE_MODEL=opencode-1/glm-5 bun scripts/live-probe.ts * PROBE_TOOL_PROMPT="..." bun scripts/live-probe.ts # override the tool turn * * Drives the FE's REAL network-facing modules (the thin live integration test the @@ -55,7 +55,7 @@ import { createConversationCache } from "../src/features/conversation-cache/inde const WS_URL = process.env.PROBE_WS ?? "ws://localhost:24205"; const HTTP_BASE = process.env.PROBE_HTTP ?? "http://localhost:24203"; -const MODEL = process.env.PROBE_MODEL ?? "opencode/deepseek-v4-flash"; +const MODEL = process.env.PROBE_MODEL ?? "opencode-1/deepseek-v4-flash"; const TEXT_PROMPT = process.env.PROBE_PROMPT ?? "Reply with exactly: hello from dispatch"; const TOOL_PROMPT = process.env.PROBE_TOOL_PROMPT ?? diff --git a/src/app/store.test.ts b/src/app/store.test.ts index 16d1760..e172c8f 100644 --- a/src/app/store.test.ts +++ b/src/app/store.test.ts @@ -652,6 +652,14 @@ describe("createAppStore", () => { const restored = store.tabs.find((t) => t.conversationId === "c-legacy"); expect(restored?.model).toBe("opencode-1/deepseek-v4-flash"); expect(store.activeModel).toBe("opencode-1/deepseek-v4-flash"); + // Issue 7: the migrated tab state is ACTUALLY written back to the storage + // adapter immediately (not merely kept in memory) — a re-load is now a no-op. + const persisted = JSON.parse(storage.getItem("dispatch.tabs") ?? "") as { + tabs: Array<{ conversationId: string; model: string }>; + }; + const persistedModel = persisted.tabs.find((t) => t.conversationId === "c-legacy")?.model; + expect(persistedModel).toBe("opencode-1/deepseek-v4-flash"); + expect(persisted.tabs.some((t) => t.model.startsWith("opencode/"))).toBe(false); store.dispose(); }); |
