(
&self,
event_tx: &Option<mpsc::Sender<AgentEvent>>,
tool_id: &str,
tool_name: &str,
args: &Value,
)
| 8 | |
| 9 | impl AgentLoop { |
| 10 | pub(super) async fn execute_approved_tool_call( |
| 11 | &self, |
| 12 | event_tx: &Option<mpsc::Sender<AgentEvent>>, |
| 13 | tool_id: &str, |
| 14 | tool_name: &str, |
| 15 | args: &Value, |
| 16 | ) -> NormalizedToolResult { |
| 17 | let stream_ctx = self.streaming_tool_context(event_tx, tool_id, tool_name); |
| 18 | let normalized = NormalizedToolResult::from_execution( |
| 19 | self.execute_tool_queued_or_direct(tool_name, args, &stream_ctx) |
| 20 | .await, |
| 21 | ); |
| 22 | self.track_tool_result(tool_name, args, normalized.exit_code); |
| 23 | normalized |
| 24 | } |
| 25 | |
| 26 | fn tool_context_for_plan(&self, session_id: Option<&str>) -> ToolContext { |
| 27 | let mut ctx = self.tool_context.clone(); |
no test coverage detected