Converted all external tool calling to async
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user