(
parser: &mut ArgParser,
mut shared: SharedArgs,
config: &dyn CliConfig,
)
| 505 | } |
| 506 | |
| 507 | fn parse_openclaw_command( |
| 508 | parser: &mut ArgParser, |
| 509 | mut shared: SharedArgs, |
| 510 | config: &dyn CliConfig, |
| 511 | ) -> Result<Command, String> { |
| 512 | let kind = parse_agent_report_kind(parser, "openclaw", STANDARD_AGENT_REPORTS)?; |
| 513 | let mut open_claw_path = None; |
| 514 | let mut codex_speed = CodexSpeed::Auto; |
| 515 | config.apply_agent_args(&mut codex_speed, None, Some(&mut open_claw_path)); |
| 516 | while parser.peek().is_some() { |
| 517 | if parse_shared_arg_for_command(parser, &mut shared)? { |
| 518 | continue; |
| 519 | } |
| 520 | match parser.next_flag()?.as_str() { |
| 521 | "--open-claw-path" => open_claw_path = Some(parser.value_for("--open-claw-path")?), |
| 522 | flag => return Err(format!("Unknown openclaw option '{flag}'")), |
| 523 | } |
| 524 | } |
| 525 | Ok(Command::OpenClaw(AgentCommandArgs { |
| 526 | shared, |
| 527 | kind, |
| 528 | pi_path: None, |
| 529 | open_claw_path, |
| 530 | codex_speed, |
| 531 | })) |
| 532 | } |
| 533 | |
| 534 | fn parse_agent_report_kind( |
| 535 | parser: &mut ArgParser, |
no test coverage detected