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

Function sessions_for_run

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

Source from the content-addressed store, hash-verified

770}
771
772fn sessions_for_run(dot_dir: &Path, run_id: &str) -> Vec<AgentSession> {
773 let Ok(store) = SessionStore::new(dot_dir.join("sessions")) else {
774 return Vec::new();
775 };
776 store
777 .list()
778 .unwrap_or_default()
779 .into_iter()
780 .filter(|session| {
781 session
782 .managed_run
783 .as_ref()
784 .is_some_and(|stamp| stamp.run_id == run_id)
785 })
786 .collect()
787}
788
789fn pending_turn_number(session: &AgentSession) -> u32 {
790 if session.is_turn_active() {

Callers 4

stop_lifecycle_turnsFunction · 0.85
resume_lifecycle_turnsFunction · 0.85
abandon_lifecycle_turnsFunction · 0.85

Calls 3

as_refMethod · 0.80
into_iterMethod · 0.45
listMethod · 0.45

Tested by

no test coverage detected