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

Function start

apps/sim/hooks/use-execution-stream.test.ts:11–17  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

9 const encoder = new TextEncoder()
10 return new ReadableStream<Uint8Array>({
11 start(controller) {
12 for (const event of events) {
13 controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`))
14 }
15 controller.enqueue(encoder.encode('data: [DONE]\n\n'))
16 controller.close()
17 },
18 })
19}
20

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected