feat: harden runtime readiness and session workflow
This commit is contained in:
@@ -4,6 +4,10 @@ import type { SessionSummary, SessionDocument, UiResponse } from "./types";
|
||||
export const createSession = (i: { question: string; name?: string }) =>
|
||||
apiFetch<{ id: string }>("/sessions", { method: "POST", body: JSON.stringify(i) });
|
||||
|
||||
/** Best-effort warm-up; callers must not await it before showing the composer. */
|
||||
export const prewarmRuntime = () =>
|
||||
apiFetch<void>("/runtime/prewarm", { method: "POST" });
|
||||
|
||||
export const listSessions = () => apiFetch<SessionSummary[]>("/sessions");
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
Reference in New Issue
Block a user