Return snapshots of subagent tasks still in `Running` state.
(
&self,
)
| 855 | |
| 856 | /// Return snapshots of subagent tasks still in `Running` state. |
| 857 | pub async fn pending_subagent_tasks( |
| 858 | &self, |
| 859 | ) -> Vec<crate::subagent_task_tracker::SubagentTaskSnapshot> { |
| 860 | use crate::subagent_task_tracker::SubagentStatus; |
| 861 | self.subagent_tasks |
| 862 | .list_for_parent(&self.session_id) |
| 863 | .await |
| 864 | .into_iter() |
| 865 | .filter(|task| task.status == SubagentStatus::Running) |
| 866 | .collect() |
| 867 | } |
| 868 | |
| 869 | /// Cancel an in-flight delegated subagent task by id. Returns `true` |
| 870 | /// when a cancellation token was found and fired, `false` when the |