WIP: Agent/AgentState — 36 errors remaining, all .lock() → .state.lock() or .context.lock()
Bulk replaced Arc<Mutex<Agent>> with Arc<Agent> across all files. Fixed control.rs, memory.rs tool handlers. Fixed oneshot Backend. Remaining errors are all agent.lock() → agent.state.lock() or agent.context.lock() in mind/, user/, and a few in mod.rs. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
e73135a8d0
commit
1d61b091b0
9 changed files with 30 additions and 30 deletions
|
|
@ -63,11 +63,11 @@ pub struct AutoAgent {
|
|||
}
|
||||
|
||||
/// Per-run conversation backend — wraps a forked agent.
|
||||
struct Backend(std::sync::Arc<tokio::sync::Mutex<Agent>>);
|
||||
struct Backend(std::sync::Arc<Agent>);
|
||||
|
||||
impl Backend {
|
||||
async fn push_node(&mut self, node: AstNode) {
|
||||
self.0.lock().await.push_node(node);
|
||||
self.0.push_node(node).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ impl AutoAgent {
|
|||
/// Arc to read entries live during the run.
|
||||
pub async fn run_forked_shared(
|
||||
&mut self,
|
||||
agent: &std::sync::Arc<tokio::sync::Mutex<Agent>>,
|
||||
agent: &std::sync::Arc<Agent>,
|
||||
memory_keys: &[String],
|
||||
state: &std::collections::BTreeMap<String, String>,
|
||||
) -> Result<String, String> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue