(dot_dir: &Path, run_id: &str)
| 770 | } |
| 771 | |
| 772 | fn 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 | |
| 789 | fn pending_turn_number(session: &AgentSession) -> u32 { |
| 790 | if session.is_turn_active() { |
no test coverage detected