(message: string | undefined)
| 30 | } |
| 31 | |
| 32 | function formatMessage(message: string | undefined): string { |
| 33 | if (!message) return "(no messages)"; |
| 34 | // Ensure we're working with a string, handle edge cases from persisted data |
| 35 | const messageStr = typeof message === "string" ? message : String(message); |
| 36 | return messageStr.split("\n")[0]; |
| 37 | } |
| 38 | |
| 39 | export function SessionSelector({ |
| 40 | sessions, |