(dot_dir: &Path, run_id: &str)
| 968 | } |
| 969 | |
| 970 | fn 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 | |
| 987 | fn pending_turn_number(session: &AgentSession) -> u32 { |
| 988 | if session.is_turn_active() { |
no test coverage detected