(
&self,
tool_call: ToolCall,
state: &mut ExecutionLoopState,
event_tx: &Option<mpsc::Sender<AgentEvent>>,
session_id: Option<&str>,
effective_prompt: &
| 34 | } |
| 35 | |
| 36 | async fn execute_sequential_tool_call( |
| 37 | &self, |
| 38 | tool_call: ToolCall, |
| 39 | state: &mut ExecutionLoopState, |
| 40 | event_tx: &Option<mpsc::Sender<AgentEvent>>, |
| 41 | session_id: Option<&str>, |
| 42 | effective_prompt: &str, |
| 43 | ) -> anyhow::Result<()> { |
| 44 | state.record_tool_call(); |
| 45 | let tool_start = std::time::Instant::now(); |
| 46 | |
| 47 | tracing::info!( |
| 48 | tool_name = tool_call.name.as_str(), |
| 49 | tool_id = tool_call.id.as_str(), |
| 50 | "Tool execution started" |
| 51 | ); |
| 52 | |
| 53 | if self |
| 54 | .handle_tool_preflight_guard(&tool_call, state, event_tx) |
| 55 | .await? |
| 56 | { |
| 57 | return Ok(()); |
| 58 | } |
| 59 | |
| 60 | let gate_decision = self.decide_tool_gate(&tool_call, state, session_id).await; |
| 61 | |
| 62 | let normalized = self |
| 63 | .resolve_tool_gate_decision(gate_decision, &tool_call, event_tx) |
| 64 | .await; |
| 65 | |
| 66 | self.complete_tool_call( |
| 67 | state, |
| 68 | ToolCompletionInput { |
| 69 | tool_call: &tool_call, |
| 70 | event_tx, |
| 71 | session_id, |
| 72 | effective_prompt, |
| 73 | tool_start, |
| 74 | normalized, |
| 75 | }, |
| 76 | ) |
| 77 | .await; |
| 78 | Ok(()) |
| 79 | } |
| 80 | } |
no test coverage detected