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