fix: default to 2x team mode when no mode or tasks provided
Instead of erroring when neither mode nor tasks are specified, default to "2x" (2 Explore + 2 Plan + 2 Verification = 6 agents). Co-authored-by: GLM 5.1 FP8 via Crush <crush@charm.land>
This commit is contained in:
parent
560c07703b
commit
4652c65133
|
|
@ -1839,11 +1839,12 @@ fn run_team_create(input: TeamCreateInput) -> Result<String, String> {
|
||||||
let team_dir = output_dir.join("teams");
|
let team_dir = output_dir.join("teams");
|
||||||
std::fs::create_dir_all(&team_dir).map_err(|e| e.to_string())?;
|
std::fs::create_dir_all(&team_dir).map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
// Expand mode preset into tasks, or use manual tasks
|
// Expand mode preset into tasks, or use manual tasks.
|
||||||
|
// Default to "2x" when neither mode nor tasks are provided.
|
||||||
let tasks = if let Some(mode) = &input.mode {
|
let tasks = if let Some(mode) = &input.mode {
|
||||||
expand_team_mode(mode, input.prompt.as_deref().unwrap_or("Explore the codebase and report findings"))?
|
expand_team_mode(mode, input.prompt.as_deref().unwrap_or("Explore the codebase and report findings"))?
|
||||||
} else if input.tasks.is_empty() {
|
} else if input.tasks.is_empty() {
|
||||||
return Err("either 'mode' or 'tasks' must be provided".to_string());
|
expand_team_mode("2x", input.prompt.as_deref().unwrap_or("Explore the codebase and report findings"))?
|
||||||
} else {
|
} else {
|
||||||
input.tasks.clone()
|
input.tasks.clone()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue