fix: harden Pi management readiness

This commit is contained in:
2026-08-05 06:20:25 +02:00
parent 7a8bcacbfe
commit 7df21b5f21
24 changed files with 577 additions and 274 deletions
+6 -6
View File
@@ -18,16 +18,16 @@ beforeEach(() => {
test("F1: create session -> widget via SSE -> respond -> POST /response", async () => {
let responded: any = null;
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({
http.post("/api/sessions", () => HttpResponse.json({ id: "s1" })),
http.get("/api/sessions", () => HttpResponse.json([])),
http.get("/api/settings", () => HttpResponse.json({
workspace: "default", provider: "zai", model: "glm-5.2", thinking: "low",
})),
http.get("http://localhost:8787/workspaces", () =>
http.get("/api/workspaces", () =>
HttpResponse.json([{ name: "default", file: "default.db" }]),
),
http.get("http://localhost:8787/models", () => HttpResponse.json({ models: [] })),
http.post("http://localhost:8787/sessions/s1/response", async ({ request }) => {
http.get("/api/models", () => HttpResponse.json({ models: [] })),
http.post("/api/sessions/s1/response", async ({ request }) => {
responded = await request.json();
return new HttpResponse(null, { status: 204 });
}),