pub async fn execute_tool_batch(
state: &AppState,
calls: &[PendingToolCall],
ctx: &mut ToolBatchContext,
metrics: &mut ToolMetrics,
event_tx: Option<&UnboundedSender<AgentEvent>>,
chat_id: i64,
iteration: usize,
caller_channel: &str,
explicit_user_approval: bool,
trace_id: &[u8],
parent_span_id: &[u8],
) -> Vec<ContentBlock>Expand description
Execute a batch of tool calls, optionally in parallel.
When parallel_enabled is false, all tools execute sequentially (existing behavior).
When true, tools are partitioned into waves and ReadOnly tools within a wave run concurrently.