MCPcopy Create free account
hub / github.com/anomalyco/opencode / onCancel

Function onCancel

packages/opencode/src/plugin/openai/ws.ts:290–296  ·  view source on GitHub ↗
(reason: unknown)

Source from the content-addressed store, hash-verified

288 }
289
290 function onCancel(reason: unknown) {
291 if (completed) return
292 completed = true
293 cleanup()
294 terminateSocket()
295 options.onAbort?.(cancelError(reason))
296 }
297
298 function attach(next: WebSocket) {
299 cleanupSocket()

Callers 1

cancelFunction · 0.85

Calls 3

terminateSocketFunction · 0.85
cancelErrorFunction · 0.85
cleanupFunction · 0.70

Tested by

no test coverage detected