use super::Action;
mod agent;
mod workspace;
pub(super) use agent::resolve_agent;
impl Action {
pub fn project(&self) -> Option<String> {
match self {
Action::Ball(verb) => Some(verb.project()),
Action::Fan(
crate::fan::Verb::Spread { obligation, .. }
| crate::fan::Verb::Retire { obligation, .. }
| crate::fan::Verb::Deliver { obligation, .. },
) => Some(obligation.project.clone()),
Action::Prepare { payload, .. } => payload.project(),
Action::SetMarks { .. }
| Action::Message { .. }
| Action::Stop { .. }
| Action::Interrupt { .. }
| Action::Scan { .. }
| Action::Nudge { .. }
| Action::Retarget { .. }
| Action::Prompt { .. }
| Action::DeleteWorkspace { .. }
| Action::DeleteAgent { .. }
| Action::Monitor(_)
| Action::Fleet(_)
| Action::AnswerHold { .. }
| Action::Floor { .. }
| Action::Fork { .. }
| Action::Ack
| Action::MarkSeen { .. }
| Action::Pin { .. }
| Action::ClearTrail
| Action::ApplyConfig { .. }
| Action::Advertise { .. }
| Action::Enroll(_)
| Action::Route(_)
| Action::PickModel { .. }
| Action::Login { .. }
| Action::Tune(_) => None,
}
}
}