Skip to content

Commit cbc6f76

Browse files
factorydroidechobt
authored andcommitted
fix(cli): show valid approval policy values in --ask-for-approval help
Fixes bounty issue #1424 The --ask-for-approval flag now displays valid options (untrusted, on-failure, on-request, never) in the help text using clap's value_parser attribute. Invalid values are also rejected with a clear error message. Also fixes formatting issues in the file.
1 parent ed5982f commit cbc6f76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cortex-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct InteractiveArgs {
104104
sandbox_mode: Option<CliSandboxMode>,
105105

106106
/// Configure when the model requires human approval
107-
#[arg(long = "ask-for-approval", short = 'a')]
107+
#[arg(long = "ask-for-approval", short = 'a', value_parser = ["untrusted", "on-failure", "on-request", "never"])]
108108
approval_policy: Option<String>,
109109

110110
/// Enable automatic execution without approval prompts.

0 commit comments

Comments
 (0)