MCPcopy Create free account
hub / github.com/github/copilot-sdk / routeChunk

Function routeChunk

nodejs/src/copilotRequestHandler.ts:420–434  ·  view source on GitHub ↗
(
    exchange: CopilotRequestExchange,
    params: LlmInferenceHttpRequestChunkRequest
)

Source from the content-addressed store, hash-verified

418}
419
420function routeChunk(
421 exchange: CopilotRequestExchange,
422 params: LlmInferenceHttpRequestChunkRequest
423): void {
424 if (params.cancel) {
425 exchange.pushCancel(params.cancelReason);
426 return;
427 }
428 if (params.data && params.data.length > 0) {
429 exchange.pushChunk(decodeChunkData(params.data, !!params.binary));
430 }
431 if (params.end) {
432 exchange.pushEnd();
433 }
434}
435
436/** Response head emitted to the runtime via {@link CopilotRequestExchange.startResponse}. */
437interface ResponseInit {

Callers 1

httpRequestChunkFunction · 0.85

Calls 4

decodeChunkDataFunction · 0.70
pushCancelMethod · 0.45
pushChunkMethod · 0.45
pushEndMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…