Documentation
¶
Overview ¶
Package compaction prepares and summarizes old coding-session context. It is deliberately independent of the coding Session so it can be tested with a fake summarizer and reused by future product adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNothingToCompact = errors.New("coding: not enough history to compact")
Functions ¶
func EstimateEntries ¶
func EstimateEntries(entries []transcript.Entry) int64
func EstimateMessage ¶
func EstimateMessage(message agent.AgentMessage) int64
EstimateMessage uses a conservative character heuristic. Provider usage is more accurate for thresholding later, but this is stable enough for choosing a complete-turn cut point.
func EstimateMessages ¶
func EstimateMessages(messages []agent.AgentMessage) int64
Types ¶
type LLM ¶
type LLM struct {
StreamFn agent.StreamFn
StreamOptions llm.StreamOptions
GetAPIKey func(provider string) string
}
LLM performs a single model request with no tools and thinking disabled.
type Prepared ¶
Click to show internal directories.
Click to hide internal directories.