MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / listSessions

Function listSessions

demo/chat/session-api.ts:22–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22export async function listSessions(): Promise<SessionSummary[]> {
23 try {
24 const res = await fetch("/api/sessions");
25 if (!res.ok) {
26 return [];
27 }
28 return (await res.json()) as SessionSummary[];
29 } catch {
30 return [];
31 }
32}
33
34export async function loadSessionById(id: string): Promise<ChatSession | null> {
35 try {

Callers 1

ChatAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected