(
exchange: CopilotRequestExchange,
params: LlmInferenceHttpRequestChunkRequest
)
| 418 | } |
| 419 | |
| 420 | function 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}. */ |
| 437 | interface ResponseInit { |
no test coverage detected
searching dependent graphs…