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

Function load_run_records

core/src/agent_api/session_persistence.rs:375–391  ·  view source on GitHub ↗
(
    store: &Arc<dyn SessionStore>,
    session_id: &str,
)

Source from the content-addressed store, hash-verified

373}
374
375fn load_run_records(
376 store: &Arc<dyn SessionStore>,
377 session_id: &str,
378) -> Result<Option<Vec<crate::run::RunRecord>>> {
379 match tokio::runtime::Handle::try_current() {
380 Ok(handle) => {
381 tokio::task::block_in_place(|| handle.block_on(store.load_run_records(session_id)))
382 .map_err(|e| {
383 CodeError::Session(format!(
384 "Failed to load run records for session {}: {}",
385 session_id, e
386 ))
387 })
388 }
389 Err(_) => Ok(None),
390 }
391}
392
393fn load_subagent_tasks(
394 store: &Arc<dyn SessionStore>,

Callers 1

Calls 3

block_onMethod · 0.80
SessionClass · 0.50
load_run_recordsMethod · 0.45

Tested by

no test coverage detected