(event: PiEvent)
| 68 | |
| 69 | /** Returns the text to enqueue onto the content stream for an event, if any. */ |
| 70 | export function streamTextForEvent(event: PiEvent): string | null { |
| 71 | return event.type === 'text' ? event.text : null |
| 72 | } |
| 73 | |
| 74 | function asRecord(value: unknown): Record<string, unknown> | null { |
| 75 | return typeof value === 'object' && value !== null ? (value as Record<string, unknown>) : null |
no outgoing calls
no test coverage detected