Reclaim KV checkpoints the index cannot reach

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Georg Bauer
2026-07-26 09:25:37 +02:00
parent 4fc423314b
commit 1f27270d66
3 changed files with 65 additions and 0 deletions

View File

@@ -228,6 +228,8 @@ impl App {
// Before the counters are taken, so they measure what is
// actually reachable.
sweep_orphan_checkpoints(&kv_cache_path(), &projects);
#[cfg(target_os = "macos")]
crate::engine::sweep_transient_cache(&transient_cache_path());
let context_limit = preferences.context_tokens.max(0) as u32;
// Reopen on the project we left, with a fresh draft chat.
let last_project = preferences