defs.rs: async conversion, remove block_in_place
Convert resolve(), resolve_placeholders(), run_agent() to async. Use memory_render/memory_query directly with .await instead of block_in_place wrappers. Propagate async to callers: - config.rs: resolve(), load_session(), reload_for_model() - identity.rs: load_memory_files(), assemble_context_message() - oneshot.rs: run_one_agent() - prompts.rs: agent_prompt() Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
9bb07bc26a
commit
359955f838
10 changed files with 44 additions and 64 deletions
|
|
@ -46,7 +46,7 @@ pub async fn cmd_run_agent(agent: &str, count: usize, target: &[String], query:
|
|||
let mut store = store::Store::load()?;
|
||||
if let Err(e) = crate::agent::oneshot::run_one_agent(
|
||||
&mut store, agent, count, Some(&[key.clone()]),
|
||||
) {
|
||||
).await {
|
||||
println!("[{}] ERROR on {}: {}", agent, key, e);
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ pub async fn cmd_run_agent(agent: &str, count: usize, target: &[String], query:
|
|||
let mut store = store::Store::load()?;
|
||||
crate::agent::oneshot::run_one_agent(
|
||||
&mut store, agent, count, None,
|
||||
)?;
|
||||
).await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue