(
parser: &mut ArgParser,
mut shared: SharedArgs,
config: &dyn CliConfig,
)
| 478 | } |
| 479 | |
| 480 | fn parse_pi_command( |
| 481 | parser: &mut ArgParser, |
| 482 | mut shared: SharedArgs, |
| 483 | config: &dyn CliConfig, |
| 484 | ) -> Result<Command, String> { |
| 485 | let kind = parse_agent_report_kind(parser, "pi", STANDARD_AGENT_REPORTS)?; |
| 486 | let mut pi_path = None; |
| 487 | let mut codex_speed = CodexSpeed::Auto; |
| 488 | config.apply_agent_args(&mut codex_speed, Some(&mut pi_path), None); |
| 489 | while parser.peek().is_some() { |
| 490 | if parse_shared_arg_for_command(parser, &mut shared)? { |
| 491 | continue; |
| 492 | } |
| 493 | match parser.next_flag()?.as_str() { |
| 494 | "--pi-path" => pi_path = Some(parser.value_for("--pi-path")?), |
| 495 | flag => return Err(format!("Unknown pi option '{flag}'")), |
| 496 | } |
| 497 | } |
| 498 | Ok(Command::Pi(AgentCommandArgs { |
| 499 | shared, |
| 500 | kind, |
| 501 | pi_path, |
| 502 | open_claw_path: None, |
| 503 | codex_speed, |
| 504 | })) |
| 505 | } |
| 506 | |
| 507 | fn parse_openclaw_command( |
| 508 | parser: &mut ArgParser, |
no test coverage detected