Versions in this module Expand all Collapse all v1 v1.3.7 Nov 29, 2026 Changes in this version + const DefaultMaxToolTokens + const KeyEnabled + const KeyMaxToolTokens + const KeyMode + const KeyStripFiller + const ModeCoding + const ModeGeneral + func OptimizeCoding(text string, filler bool) string + func OptimizeGeneral(text string, filler bool) string + func Prunable(name string) bool + func PruneText(s string, maxChars int) string + func PruneToolOutput(result map[string]any, maxChars int) (map[string]any, int) + func ValidMode(m string) bool + type Settings struct + Enabled bool + MaxToolTokens int + Mode string + StripFiller *bool + func (s Settings) Filler() bool + func (s Settings) MaxToolChars() int + func (s Settings) Resolve() Settings + type Stats struct + PromptChars int + ToolChars int + func Apply(contents []*genai.Content, s Settings, prunable func(name string) bool) (out []*genai.Content, st Stats, err error) + func (s Stats) Total() int