MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / pull

Function pull

apps/vscode-e2e/src/suite/providers/zai.test.ts:139–146  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

137 let i = 0
138 const stream = new ReadableStream<Uint8Array>({
139 pull(controller) {
140 if (i < chunks.length) {
141 controller.enqueue(enc.encode(`data: ${JSON.stringify(chunks[i++])}\n\n`))
142 } else {
143 controller.enqueue(enc.encode("data: [DONE]\n\n"))
144 controller.close()
145 }
146 },
147 })
148
149 return new Response(stream, {

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected