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

Struct Summarize

internal/compact/summarize.go:14–19  ·  view source on GitHub ↗

Summarize calls the provider to summarize old turns once the history exceeds Threshold, replacing them with a single synthetic user message.

Source from the content-addressed store, hash-verified

12// Summarize calls the provider to summarize old turns once the history
13// exceeds Threshold, replacing them with a single synthetic user message.
14type Summarize struct {
15 Provider provider.Provider
16 Threshold int // compact once len(messages) >= Threshold
17 KeepRecent int // most-recent N messages left untouched
18 Instructions string // optional override for the summarization prompt
19}
20
21const defaultSummarizeInstructions = `Summarize the following conversation concisely. ` +
22 `Preserve facts, decisions, file paths, code identifiers, and anything else ` +

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected