(
parser: &mut ArgParser,
mut shared: SharedArgs,
config: &dyn CliConfig,
)
| 452 | } |
| 453 | |
| 454 | fn parse_codex_command( |
| 455 | parser: &mut ArgParser, |
| 456 | mut shared: SharedArgs, |
| 457 | config: &dyn CliConfig, |
| 458 | ) -> Result<Command, String> { |
| 459 | let kind = parse_agent_report_kind(parser, "codex", STANDARD_AGENT_REPORTS)?; |
| 460 | let mut codex_speed = CodexSpeed::Auto; |
| 461 | config.apply_agent_args(&mut codex_speed, None, None); |
| 462 | while parser.peek().is_some() { |
| 463 | if parse_shared_arg_for_command(parser, &mut shared)? { |
| 464 | continue; |
| 465 | } |
| 466 | match parser.next_flag()?.as_str() { |
| 467 | "--speed" => codex_speed = parse_codex_speed(&parser.value_for("--speed")?)?, |
| 468 | flag => return Err(format!("Unknown codex option '{flag}'")), |
| 469 | } |
| 470 | } |
| 471 | Ok(Command::Codex(AgentCommandArgs { |
| 472 | shared, |
| 473 | kind, |
| 474 | pi_path: None, |
| 475 | open_claw_path: None, |
| 476 | codex_speed, |
| 477 | })) |
| 478 | } |
| 479 | |
| 480 | fn parse_pi_command( |
| 481 | parser: &mut ArgParser, |
no test coverage detected