projects : am projects (agregats par depot depuis le journal) + profils de projet dans la config (issue #29) - agent dominant, sessions, durees, cache projects.json rafraichi par doctor --fix

This commit is contained in:
2026-08-17 08:10:42 -04:00
parent 81c69db17b
commit dc7372f277
11 changed files with 418 additions and 1 deletions
+7
View File
@@ -248,6 +248,13 @@ pub fn fix(app: &App) -> Result<Vec<String>> {
repaired.push(format!("created {}", app.paths.install_dir.display()));
repaired.push(format!("created {}", app.paths.log_dir.display()));
// Project cache: always refreshed (it derives from the journal).
let cache = crate::projects::cache_file(app);
if cache.exists() {
std::fs::remove_file(&cache).ok();
repaired.push(format!("project cache {} removed (rebuilt on next 'am projects')", cache.display()));
}
// Corrupt state file: back it up and start fresh.
if app.state.path().exists() && app.state.load().is_err() {
let backup = app