Converted all external tool calling to async

This commit is contained in:
Timmy
2026-06-29 16:59:54 +01:00
parent 75f41088b1
commit feb35ddd10
49 changed files with 482 additions and 496 deletions
+3 -2
View File
@@ -95,7 +95,7 @@ pub async fn delete_work_item(
// 1. Stop any running/pending agents (best-effort).
let mut agents_stopped: Vec<String> = Vec::new();
if let Ok(agent_list) = agents.list_agents() {
if let Ok(agent_list) = agents.list_agents().await {
for agent in agent_list.iter().filter(|a| a.story_id == story_id) {
match agents
.stop_agent(project_root, story_id, &agent.agent_name)
@@ -120,7 +120,7 @@ pub async fn delete_work_item(
}
// 2. Remove agent pool entries.
let removed_count = agents.remove_agents_for_story(story_id);
let removed_count = agents.remove_agents_for_story(story_id).await;
slog_warn!("[delete_work_item] Removed {removed_count} agent pool entries for '{story_id}'");
// 3. Remove worktree (best-effort).
@@ -240,6 +240,7 @@ mod tests {
// Agent pool must have no entries for this story.
let pool_entries = agents
.list_agents()
.await
.unwrap_or_default()
.into_iter()
.filter(|a| a.story_id == story_id)