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
+1 -1
View File
@@ -90,7 +90,7 @@ pub(crate) fn build_status_from_items(
items: &[PipelineItem],
) -> String {
// Build a map from story_id → active AgentInfo for quick lookup.
let active_agents = agents.list_agents().unwrap_or_default();
let active_agents = agents.list_agents_nonblocking();
let active_map: HashMap<String, &crate::agents::AgentInfo> = active_agents
.iter()
.filter(|a| matches!(a.status, AgentStatus::Running | AgentStatus::Pending))
@@ -111,6 +111,7 @@ pub async fn handle_assign(
// Check whether a coder is already running on this story.
let running_coders: Vec<_> = agents
.list_agents()
.await
.unwrap_or_default()
.into_iter()
.filter(|a| {
+1 -1
View File
@@ -191,7 +191,7 @@ pub fn build_htop_message(agents: &AgentPool, tick: u32, total_duration_secs: u6
String::new(),
];
let all_agents = agents.list_agents().unwrap_or_default();
let all_agents = agents.list_agents_nonblocking();
let active: Vec<_> = all_agents
.iter()
.filter(|a| matches!(a.status, AgentStatus::Running | AgentStatus::Pending))
@@ -85,6 +85,7 @@ pub async fn handle_rmtree(
// Stop any running or pending agents for this story.
let running_agents: Vec<(String, String)> = agents
.list_agents()
.await
.unwrap_or_default()
.into_iter()
.filter(|a| {