MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / _decodeChunks

Function _decodeChunks

packages/baseai/src/dev/utils/stream/stream.ts:480–488  ·  view source on GitHub ↗
(chunks: string[])

Source from the content-addressed store, hash-verified

478
479/** This is an internal helper function that's just used for testing */
480export function _decodeChunks(chunks: string[]): string[] {
481 const decoder = new LineDecoder();
482 const lines: string[] = [];
483 for (const chunk of chunks) {
484 lines.push(...decoder.decode(chunk));
485 }
486
487 return lines;
488}
489
490function partition(str: string, delimiter: string): [string, string, string] {
491 const index = str.indexOf(delimiter);

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.95

Tested by

no test coverage detected