MCPcopy Create free account
hub / github.com/Noumena-Network/code / start

Function start

src/services/api/openAICompatWsV2Native.ts:211–221  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

209
210 const stream = new ReadableStream<Uint8Array>({
211 start(controller) {
212 abortHandler = () => {
213 void cancelAndClose()
214 }
215 if (signal?.aborted) {
216 abortHandler()
217 safeCloseController(controller)
218 return
219 }
220 signal?.addEventListener('abort', abortHandler, { once: true })
221 },
222 async pull(controller) {
223 if (streamClosed) return
224 try {

Callers

nothing calls this directly

Calls 2

cancelAndCloseFunction · 0.85
safeCloseControllerFunction · 0.85

Tested by

no test coverage detected