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

Function sessionPreview

demo/chat/session-api.ts:50–56  ·  view source on GitHub ↗
(session: ChatSession)

Source from the content-addressed store, hash-verified

48}
49
50export function sessionPreview(session: ChatSession): string {
51 const firstUser = session.messages.find((m) => m.role === "user");
52 if (firstUser?.content.trim()) {
53 return firstUser.content.trim().slice(0, 72);
54 }
55 return "(empty)";
56}
57
58export function formatSessionWhen(iso: string): string {
59 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected