feat: pin sessions to workspace revisions

This commit is contained in:
2026-08-04 05:05:20 +02:00
parent 90894176b6
commit 301db4bd85
14 changed files with 288 additions and 54 deletions
+4
View File
@@ -9,6 +9,7 @@ import { App } from "../App";
import { useSessionStore } from "../store/sessionStore";
beforeEach(() => {
localStorage.clear();
FakeEventSource.instances = [];
(globalThis as any).EventSource = FakeEventSource;
useSessionStore.getState().resetSession();
@@ -19,6 +20,9 @@ test("F1: create session -> widget via SSE -> respond -> POST /response", async
server.use(
http.post("http://localhost:8787/sessions", () => HttpResponse.json({ id: "s1" })),
http.get("http://localhost:8787/sessions", () => HttpResponse.json([])),
http.get("http://localhost:8787/settings", () => HttpResponse.json({
workspace: "default", provider: "zai", model: "glm-5.2", thinking: "low",
})),
http.get("http://localhost:8787/workspaces", () =>
HttpResponse.json([{ name: "default", file: "default.db" }]),
),