MCPcopy Index your code
hub / github.com/anomalyco/opencode / start

Function start

packages/opencode/src/plugin/openai/ws.ts:320–330  ·  view source on GitHub ↗
(next)

Source from the content-addressed store, hash-verified

318 return new Response(
319 new ReadableStream<Uint8Array>({
320 start(next) {
321 controller = next
322 options.signal?.addEventListener("abort", onAbort, { once: true })
323
324 if (options.signal?.aborted) {
325 onAbort()
326 return
327 }
328
329 attach(socket)
330 },
331 cancel(reason) {
332 onCancel(reason)
333 },

Callers

nothing calls this directly

Calls 3

addEventListenerMethod · 0.80
onAbortFunction · 0.70
attachFunction · 0.70

Tested by

no test coverage detected