MCPcopy Index your code
hub / github.com/simstudioai/sim / streamTextForEvent

Function streamTextForEvent

apps/sim/executor/handlers/pi/events.ts:70–72  ·  view source on GitHub ↗
(event: PiEvent)

Source from the content-addressed store, hash-verified

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

Callers 2

events.test.tsFile · 0.90
runPiMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected