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.
()
| 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. |
| 155 | func (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 |