MCPcopy
hub / github.com/simstudioai/sim / encodeSSE

Function encodeSSE

apps/sim/lib/core/utils/sse.ts:19–21  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

17 * @returns The encoded SSE message as a Uint8Array
18 */
19export function encodeSSE(data: any): Uint8Array {
20 return new TextEncoder().encode(`data: ${JSON.stringify(data)}\n\n`)
21}
22
23/**
24 * The sentinel value servers emit to signal end-of-stream. Lines carrying this

Callers 8

sendChunkFunction · 0.90
onStreamCallbackFunction · 0.90
onBlockCompleteCallbackFunction · 0.90
startFunction · 0.90
sse.test.tsFile · 0.90
onStreamFunction · 0.85
onBlockCompleteFunction · 0.85
startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected