MCPcopy Create free account
hub / github.com/apache/maka / renderDiffResult

Function renderDiffResult

packages/cli/src/pi-transcript-tools.ts:676–680  ·  view source on GitHub ↗
(diff: string, width: number)

Source from the content-addressed store, hash-verified

674}
675
676function renderDiffResult(diff: string, width: number): string[] {
677 // The structural parse drops the `---`/`+++` file headers the card already
678 // names; the copyable ledger keeps them.
679 return renderIndented(colorDiff(limitText(diff, 12_000)), width, 2);
680}
681
682function byteLength(text: string): number {
683 return Buffer.byteLength(text, 'utf8');

Callers 1

renderToolResultFunction · 0.85

Calls 3

renderIndentedFunction · 0.85
colorDiffFunction · 0.85
limitTextFunction · 0.85

Tested by

no test coverage detected