MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / PrintCompaction

Function PrintCompaction

internal/ui/compaction.go:11–17  ·  view source on GitHub ↗

PrintCompaction writes a before/after diff to stdout. Used by verbose mode when a compaction strategy shortens the history.

(before, after []api.Message)

Source from the content-addressed store, hash-verified

9// PrintCompaction writes a before/after diff to stdout. Used by verbose mode
10// when a compaction strategy shortens the history.
11func PrintCompaction(before, after []api.Message) {
12 fmt.Println(Dimmed("─── compaction ───"))
13 fmt.Printf("BEFORE (%d messages):\n%s", len(before), api.RenderTranscript(before))
14 fmt.Println(Dimmed("─── after ───"))
15 fmt.Printf("AFTER (%d messages):\n%s", len(after), api.RenderTranscript(after))
16 fmt.Println(Dimmed("──────────────"))
17}

Callers 1

cmdCompactFunction · 0.92

Calls 2

RenderTranscriptFunction · 0.92
DimmedFunction · 0.85

Tested by

no test coverage detected