MCPcopy Create free account
hub / github.com/diillson/chatcli / pruneCompressionStore

Method pruneCompressionStore

cli/config_compression_mutate.go:155–167  ·  view source on GitHub ↗

pruneCompressionStore runs an on-demand curation pass over the CCR store (TTL-expired entries + size-cap eviction) and reports what was freed, so the user has an explicit lever instead of relying on the startup/throttled sweeps.

()

Source from the content-addressed store, hash-verified

153// (TTL-expired entries + size-cap eviction) and reports what was freed, so the
154// user has an explicit lever instead of relying on the startup/throttled sweeps.
155func (cli *ChatCLI) pruneCompressionStore() {
156 if cli.compressionLayer == nil {
157 fmt.Println(colorize(" ❌ "+i18n.T("cfg.compression.unavailable"), ColorRed))
158 return
159 }
160 res := cli.compressionLayer.Prune()
161 if res.Removed == 0 {
162 fmt.Println(colorize(" ✔ "+i18n.T("cfg.compression.prune_none", res.RemainingEntries), ColorGray))
163 return
164 }
165 fmt.Println(colorize(" ✔ "+i18n.T("cfg.compression.prune_ok",
166 res.Removed, formatTokenCount(res.BytesFreed), res.RemainingEntries), ColorGreen))
167}
168
169// ccrStoreSummary renders the CCR footprint with curation visibility: entries,
170// bytes, and (when present) how many entries are already stale plus the oldest

Callers 2

Calls 4

TFunction · 0.92
colorizeFunction · 0.85
formatTokenCountFunction · 0.85
PruneMethod · 0.65

Tested by 1