MCPcopy Index your code
hub / github.com/codeaashu/claude-code / combineSignals

Function combineSignals

web/lib/api/messages.ts:13–24  ·  view source on GitHub ↗

Combine any number of AbortSignals into one.

(...signals: (AbortSignal | undefined)[])

Source from the content-addressed store, hash-verified

11
12/** Combine any number of AbortSignals into one. */
13function combineSignals(...signals: (AbortSignal | undefined)[]): AbortSignal {
14 const controller = new AbortController();
15 for (const sig of signals) {
16 if (!sig) continue;
17 if (sig.aborted) {
18 controller.abort(sig.reason);
19 return controller.signal;
20 }
21 sig.addEventListener("abort", () => controller.abort(sig.reason), { once: true });
22 }
23 return controller.signal;
24}
25
26function toApiMessages(
27 messages: Message[]

Callers 1

streamRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected