use newt_core::agentic::print_newt;
use crate::{run_crew_edit_with_ask, SlashAsk};
pub(crate) fn dispatch(
arg1: &str,
arg2: &str,
color: bool,
verbose: bool,
ask: SlashAsk<'_>,
) -> anyhow::Result<bool> {
match arg1 {
"edit" => {
let name = (!arg2.is_empty()).then_some(arg2);
if let Err(e) = run_crew_edit_with_ask(name, color, ask) {
print_newt(&format!("crew edit failed: {e}"), color, verbose);
}
}
"" => print_newt(
"usage: /crew edit [name] — edit a crew's settings \
(planner/navigator/triage loadouts, control loop, test, budgets)",
color,
verbose,
),
other => print_newt(
&format!("unknown /crew subcommand '{other}' — try /crew edit [name]"),
color,
verbose,
),
}
Ok(true)
}