MCPcopy Index your code
hub / github.com/AI45Lab/Code / execute_tool_turn

Method execute_tool_turn

core/src/agent/tool_turn.rs:8–34  ·  view source on GitHub ↗
(
        &self,
        tool_calls: Vec<ToolCall>,
        state: &mut ExecutionLoopState,
        event_tx: &Option<mpsc::Sender<AgentEvent>>,
        session_id: Option<&str>,
        effective_pro

Source from the content-addressed store, hash-verified

6
7impl AgentLoop {
8 pub(super) async fn execute_tool_turn(
9 &self,
10 tool_calls: Vec<ToolCall>,
11 state: &mut ExecutionLoopState,
12 event_tx: &Option<mpsc::Sender<AgentEvent>>,
13 session_id: Option<&str>,
14 effective_prompt: &str,
15 ) -> anyhow::Result<()> {
16 if self.can_run_parallel_write_batch(&tool_calls) {
17 self.execute_parallel_write_batch(&tool_calls, state, event_tx)
18 .await;
19 return Ok(());
20 }
21
22 for tool_call in tool_calls {
23 self.execute_sequential_tool_call(
24 tool_call,
25 state,
26 event_tx,
27 session_id,
28 effective_prompt,
29 )
30 .await?;
31 }
32
33 Ok(())
34 }
35
36 async fn execute_sequential_tool_call(
37 &self,

Callers 1

execute_loop_innerMethod · 0.80

Tested by

no test coverage detected