mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-09 02:43:29 +08:00
feat: add ecc2 delegated team board
This commit is contained in:
@@ -57,6 +57,14 @@ enum Commands {
|
||||
/// Session ID or alias
|
||||
session_id: Option<String>,
|
||||
},
|
||||
/// Show delegated team board for a session
|
||||
Team {
|
||||
/// Lead session ID or alias
|
||||
session_id: Option<String>,
|
||||
/// Delegation depth to traverse
|
||||
#[arg(long, default_value_t = 2)]
|
||||
depth: usize,
|
||||
},
|
||||
/// Stop a running session
|
||||
Stop {
|
||||
/// Session ID or alias
|
||||
@@ -188,6 +196,11 @@ async fn main() -> Result<()> {
|
||||
let status = session::manager::get_status(&db, &id)?;
|
||||
println!("{status}");
|
||||
}
|
||||
Some(Commands::Team { session_id, depth }) => {
|
||||
let id = session_id.unwrap_or_else(|| "latest".to_string());
|
||||
let team = session::manager::get_team_status(&db, &id, depth)?;
|
||||
println!("{team}");
|
||||
}
|
||||
Some(Commands::Stop { session_id }) => {
|
||||
session::manager::stop_session(&db, &session_id).await?;
|
||||
println!("Session stopped: {session_id}");
|
||||
@@ -446,4 +459,18 @@ mod tests {
|
||||
_ => panic!("expected delegate subcommand"),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cli_parses_team_command() {
|
||||
let cli = Cli::try_parse_from(["ecc", "team", "planner", "--depth", "3"])
|
||||
.expect("team should parse");
|
||||
|
||||
match cli.command {
|
||||
Some(Commands::Team { session_id, depth }) => {
|
||||
assert_eq!(session_id.as_deref(), Some("planner"));
|
||||
assert_eq!(depth, 3);
|
||||
}
|
||||
_ => panic!("expected team subcommand"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user