Move save_agent_log to oneshot.rs for shared Mind/CLI use

Both Mind-run agents (unconscious/subconscious) and CLI-run agents
(poc-memory agent run) now use the same logging path. AutoAgent::run()
calls save_agent_log automatically at the end.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-11 21:34:41 -04:00
parent 271e09adcc
commit d2dbdedc8f
3 changed files with 67 additions and 56 deletions

View file

@ -617,7 +617,7 @@ impl Subconscious {
self.agents[idx].handle = Some(tokio::spawn(async move {
let result = auto.run_forked_shared(&forked, &keys, &st, &recent).await;
super::unconscious::save_agent_log(&auto.name, &forked).await;
crate::agent::oneshot::save_agent_log(&auto.name, &forked).await;
(auto, result)
}));
}