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

Method execute_with_prompt

core/src/agent_api/runtime.rs:84–107  ·  view source on GitHub ↗
(
        self,
        messages: &[Message],
        prompt: &str,
        session_id: &str,
    )

Source from the content-addressed store, hash-verified

82 }
83
84 pub(super) async fn execute_with_prompt(
85 self,
86 messages: &[Message],
87 prompt: &str,
88 session_id: &str,
89 ) -> Result<AgentResult> {
90 let Self {
91 agent_loop,
92 runtime_tx,
93 cancel_token,
94 runtime_collector,
95 lifecycle,
96 } = self;
97 let result = agent_loop
98 .execute_with_session(
99 messages,
100 prompt,
101 Some(session_id),
102 Some(runtime_tx),
103 Some(&cancel_token),
104 )
105 .await;
106 lifecycle.complete(runtime_collector, result).await
107 }
108
109 pub(super) async fn execute_from_messages(
110 self,

Callers 1

sendFunction · 0.80

Calls 2

execute_with_sessionMethod · 0.80
completeMethod · 0.45

Tested by

no test coverage detected