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

Function createSession

demo/chat/session.ts:48–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48export function createSession(): ChatSession {
49 const now = new Date().toISOString();
50 return {
51 id: `sess_${Date.now().toString(36)}`,
52 createdAt: now,
53 updatedAt: now,
54 messages: [],
55 };
56}
57
58export function loadLocalSession(): ChatSession | null {
59 try {

Callers 1

ChatAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected