chore: unify memory drop endpoints (#18134)

Unify all the memories drop behind a single implementation that drops
both the main memories and the extensions
This commit is contained in:
jif-oai
2026-04-16 15:44:23 +01:00
committed by GitHub
parent 18e9ac8c75
commit b33478c236
8 changed files with 30 additions and 61 deletions

View File

@@ -5568,15 +5568,15 @@ mod handlers {
errors.push("state db unavailable; memory rows were not cleared".to_string());
}
let memory_root = crate::memories::memory_root(&config.codex_home);
if let Err(err) = crate::memories::clear_memory_root_contents(&memory_root).await {
if let Err(err) = crate::memories::clear_memory_roots_contents(&config.codex_home).await {
errors.push(format!(
"failed clearing memory directory {}: {err}",
memory_root.display()
"failed clearing memory directories under {}: {err}",
config.codex_home.display()
));
}
if errors.is_empty() {
let memory_root = crate::memories::memory_root(&config.codex_home);
sess.send_event_raw(Event {
id: sub_id,
msg: EventMsg::Warning(WarningEvent {