fix: add safeguard compaction tool summaries

This commit is contained in:
Peter Steinberger
2026-01-19 01:44:08 +00:00
parent af1004ebbd
commit dd1b08b3e8
6 changed files with 271 additions and 5 deletions
+21
View File
@@ -139,6 +139,27 @@ export function applyContextPruningDefaults(cfg: ClawdbotConfig): ClawdbotConfig
};
}
export function applyCompactionDefaults(cfg: ClawdbotConfig): ClawdbotConfig {
const defaults = cfg.agents?.defaults;
if (!defaults) return cfg;
const compaction = defaults?.compaction;
if (compaction?.mode) return cfg;
return {
...cfg,
agents: {
...cfg.agents,
defaults: {
...defaults,
compaction: {
...compaction,
mode: "safeguard",
},
},
},
};
}
export function resetSessionDefaultsWarningForTests() {
defaultWarnState = { warned: false };
}