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

Method record_execution_result

core/src/agent/execution_mode.rs:181–216  ·  view source on GitHub ↗
(
        &self,
        session_id: Option<&str>,
        result: &Result<AgentResult>,
    )

Source from the content-addressed store, hash-verified

179 }
180
181 async fn record_execution_result(
182 &self,
183 session_id: Option<&str>,
184 result: &Result<AgentResult>,
185 ) {
186 match result {
187 Ok(r) => {
188 tracing::info!(
189 a3s.agent.tool_calls_count = r.tool_calls_count,
190 a3s.llm.total_tokens = r.usage.total_tokens,
191 "a3s.agent.execute completed"
192 );
193 self.fire_post_response(
194 session_id.unwrap_or(""),
195 &r.text,
196 r.tool_calls_count,
197 &r.usage,
198 0,
199 )
200 .await;
201 }
202 Err(e) => {
203 tracing::warn!(
204 error = %e,
205 "a3s.agent.execute failed"
206 );
207 self.fire_on_error(
208 session_id.unwrap_or(""),
209 ErrorType::Other,
210 &e.to_string(),
211 serde_json::json!({"phase": "execute"}),
212 )
213 .await;
214 }
215 }
216 }
217}

Callers 1

execute_with_sessionMethod · 0.80

Calls 2

fire_post_responseMethod · 0.80
fire_on_errorMethod · 0.80

Tested by

no test coverage detected