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

Function compactDiffSummary

packages/cli/src/pi-transcript-tools.ts:323–329  ·  view source on GitHub ↗
(
  content: Extract<ToolResultContent, { kind: 'file_diff' }>,
)

Source from the content-addressed store, hash-verified

321}
322
323function compactDiffSummary(
324 content: Extract<ToolResultContent, { kind: 'file_diff' }>,
325): CompactToolSummary {
326 const { additions, deletions } = countDiffLineStats(content.diff);
327 // The path is already the card's input summary; the tally is the outcome.
328 return { text: `${ansi.green(`+${additions}`)} ${ansi.red(`-${deletions}`)}`, protect: true };
329}
330
331/**
332 * Row count for list-shaped json results (Grep `matches`, Glob `files`).

Callers 1

compactToolSummaryFunction · 0.85

Calls 1

countDiffLineStatsFunction · 0.90

Tested by

no test coverage detected