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

Method start_run

core/src/agent_api/run_lifecycle.rs:84–94  ·  view source on GitHub ↗
(&self, prompt: &str)

Source from the content-addressed store, hash-verified

82 }
83
84 pub(super) async fn start_run(&self, prompt: &str) -> crate::run::RunHandle {
85 // Honor the session's host-provided IdGenerator so deterministic
86 // replay tooling can pin run ids alongside session_id.
87 let id = format!("run-{}", self.host_env.next_id());
88 let snapshot = self
89 .run_store
90 .create_run_with_id(id, &self.session_id, prompt)
91 .await;
92 *self.current_run_id.lock().await = Some(snapshot.id.clone());
93 self.run_handle(snapshot.id, self.session_id.clone())
94 }
95
96 pub(super) async fn cancel(&self) -> bool {
97 let token = self.cancel_token.lock().await.clone();

Callers 3

startMethod · 0.80

Calls 3

create_run_with_idMethod · 0.80
run_handleMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected