MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / sessions_for_run

Function sessions_for_run

atomic-cli/src/commands/agent/lifecycle.rs:970–985  ·  view source on GitHub ↗
(dot_dir: &Path, run_id: &str)

Source from the content-addressed store, hash-verified

968}
969
970fn sessions_for_run(dot_dir: &Path, run_id: &str) -> Vec<AgentSession> {
971 let Ok(store) = SessionStore::new(dot_dir.join("sessions")) else {
972 return Vec::new();
973 };
974 store
975 .list()
976 .unwrap_or_default()
977 .into_iter()
978 .filter(|session| {
979 session
980 .managed_run
981 .as_ref()
982 .is_some_and(|stamp| stamp.run_id == run_id)
983 })
984 .collect()
985}
986
987fn pending_turn_number(session: &AgentSession) -> u32 {
988 if session.is_turn_active() {

Callers 4

stop_lifecycle_turnsFunction · 0.85
resume_lifecycle_turnsFunction · 0.85
abandon_lifecycle_turnsFunction · 0.85

Calls 4

as_refMethod · 0.80
collectMethod · 0.45
into_iterMethod · 0.45
listMethod · 0.45

Tested by

no test coverage detected