Versions in this module Expand all Collapse all v0 v0.1.0 Apr 3, 2026 Changes in this version + const AutoCompactBuffer + const KeepRecentTurns + const MicroCompactHead + const MicroCompactSize + const MicroCompactTail + const SummaryReserve + const WarningBuffer + func CompactMessages(messages []provider.Message) ([]provider.Message, string) + func MicroCompact(content string) string + func NeedsCompact(totalTokens, maxContext int) bool + type CompactResult struct + AfterTokens int + BeforeTokens int + Compacted bool + Message string + type IndexEntry struct + AuthSource string + BaseURL string + CostUSD float64 + CreatedAt time.Time + ID string + Model string + Name string + Provider string + Turns int + UpdatedAt time.Time + WorkDir string + type Session struct + AuthSource string + BaseURL string + CreatedAt time.Time + ID string + Messages []provider.Message + Model string + Name string + Provider string + TotalCostUSD float64 + TotalInputTokens int + TotalOutputTokens int + Turns int + UpdatedAt time.Time + WorkDir string + func NewSession(cfg SessionConfig) *Session + func (s *Session) AddMessage(msg provider.Message) + func (s *Session) ExportMarkdown() string + func (s *Session) UpdateCost(inputTokens, outputTokens int, costUSD float64) + type SessionConfig struct + AuthSource string + BaseURL string + Model string + Provider string + WorkDir string + type Store struct + func NewStore(xincodeDir string) *Store + func (s *Store) Delete(id string) error + func (s *Store) List(workDir string) ([]IndexEntry, error) + func (s *Store) Load(id string) (*Session, error) + func (s *Store) Save(sess *Session) error