(session: ChatSession)
| 48 | } |
| 49 | |
| 50 | export 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 | |
| 58 | export function formatSessionWhen(iso: string): string { |
| 59 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected