mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-26 00:26:13 +08:00
Compare commits
2 Commits
feat/jobdo
...
feat/jobdo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a533ceba0 | ||
|
|
860f285f70 |
@@ -1015,7 +1015,18 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
||||
|
||||
match rest[0].as_str() {
|
||||
"dump-manifests" => parse_dump_manifests_args(&rest[1..], output_format),
|
||||
"bootstrap-plan" => Ok(CliAction::BootstrapPlan { output_format }),
|
||||
"bootstrap-plan" => {
|
||||
// #152: bootstrap-plan is a no-arg verb. Reject unexpected suffixes
|
||||
// like `claw bootstrap-plan garbage` that silently accept trailing
|
||||
// args instead of rejecting at parse time.
|
||||
if rest.len() > 1 {
|
||||
return Err(format!(
|
||||
"unrecognized argument `{}` for subcommand `bootstrap-plan`",
|
||||
rest[1]
|
||||
));
|
||||
}
|
||||
Ok(CliAction::BootstrapPlan { output_format })
|
||||
}
|
||||
"agents" => Ok(CliAction::Agents {
|
||||
args: join_optional_args(&rest[1..]),
|
||||
output_format,
|
||||
@@ -1188,7 +1199,16 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
||||
"system-prompt" => parse_system_prompt_args(&rest[1..], output_format),
|
||||
"acp" => parse_acp_args(&rest[1..], output_format),
|
||||
"login" | "logout" => Err(removed_auth_surface_error(rest[0].as_str())),
|
||||
"init" => Ok(CliAction::Init { output_format }),
|
||||
"init" => {
|
||||
// #152: init is a no-arg verb. Reject unexpected suffixes like `claw init foo`.
|
||||
if rest.len() > 1 {
|
||||
return Err(format!(
|
||||
"unrecognized argument `{}` for subcommand `init`",
|
||||
rest[1]
|
||||
));
|
||||
}
|
||||
Ok(CliAction::Init { output_format })
|
||||
}
|
||||
"export" => parse_export_args(&rest[1..], output_format),
|
||||
"prompt" => {
|
||||
let prompt = rest[1..].join(" ");
|
||||
|
||||
Reference in New Issue
Block a user