MCPcopy Create free account
hub / github.com/AI45Lab/Code / execute_loop

Method execute_loop

core/src/agent/loop_runtime.rs:17–41  ·  view source on GitHub ↗
(
        &self,
        history: &[Message],
        prompt: &str,
        effective_style: AgentStyle,
        session_id: Option<&str>,
        event_tx: Option<mpsc::Sender<AgentEvent>>,
        c

Source from the content-addressed store, hash-verified

15 /// and by `execute_plan` (for individual steps, bypassing planning).
16 #[allow(clippy::too_many_arguments)]
17 pub(super) async fn execute_loop(
18 &self,
19 history: &[Message],
20 prompt: &str,
21 effective_style: AgentStyle,
22 session_id: Option<&str>,
23 event_tx: Option<mpsc::Sender<AgentEvent>>,
24 cancel_token: &tokio_util::sync::CancellationToken,
25 emit_end: bool,
26 ) -> Result<AgentResult> {
27 // When called via execute_loop, the prompt is used for both
28 // message-adding and hook/memory/event purposes.
29 self.execute_loop_inner(
30 history,
31 prompt,
32 prompt,
33 Some(effective_style),
34 session_id,
35 event_tx,
36 cancel_token,
37 emit_end,
38 None,
39 )
40 .await
41 }
42
43 /// Inner execution loop.
44 ///

Calls 1

execute_loop_innerMethod · 0.80