fix: harden resume and SSE replay

This commit is contained in:
User
2026-07-15 00:06:00 +02:00
parent e5366d14a6
commit 2b4797f133
18 changed files with 871 additions and 102 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { apiFetch } from "./client";
import type { SessionSummary, SessionDocument, UiResponse } from "./types";
import type { ResumeSessionResult, SessionSummary, SessionDocument, UiResponse } from "./types";
export const createSession = (i: { question: string; name?: string }) =>
apiFetch<{ id: string }>("/sessions", { method: "POST", body: JSON.stringify(i) });
@@ -29,7 +29,7 @@ export const closeSession = (id: string) =>
apiFetch<void>(`/sessions/${id}/close`, { method: "POST" });
export const resumeSession = (id: string) =>
apiFetch<void>(`/sessions/${id}/resume`, { method: "POST" });
apiFetch<ResumeSessionResult>(`/sessions/${id}/resume`, { method: "POST" });
export const renameSession = (id: string, name: string) =>
apiFetch<void>(`/sessions/${id}/rename`, { method: "POST", body: JSON.stringify({ name }) });