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

Function closeCompleted

packages/opencode/src/plugin/openai/ws.ts:159–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 }
158
159 function closeCompleted() {
160 cleanup()
161 controller?.enqueue(encoder.encode("data: [DONE]\n\n"))
162 controller?.close()
163 }
164
165 function invalidate(error: ProviderError.ResponseStreamError) {
166 if (completed) return

Callers 1

onMessageFunction · 0.85

Calls 2

cleanupFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected