mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
maybefix
This commit is contained in:
@@ -228,7 +228,6 @@ pub struct ExecCommandApprovalParams {
|
||||
pub reason: Option<String>,
|
||||
pub risk: Option<SandboxCommandAssessment>,
|
||||
pub parsed_cmd: Vec<ParsedCommand>,
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub allow_prefix: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
|
||||
@@ -960,7 +960,6 @@ pub struct CommandExecutionRequestApprovalParams {
|
||||
pub reason: Option<String>,
|
||||
/// Optional model-provided risk assessment describing the blocked command.
|
||||
pub risk: Option<SandboxCommandAssessment>,
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub allow_prefix: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
|
||||
@@ -278,7 +278,11 @@ async fn test_send_user_turn_changes_approval_policy_behavior() -> Result<()> {
|
||||
parsed_cmd: vec![ParsedCommand::Unknown {
|
||||
cmd: "python3 -c 'print(42)'".to_string()
|
||||
}],
|
||||
allow_prefix: None,
|
||||
allow_prefix: Some(vec![
|
||||
"python3".to_string(),
|
||||
"-c".to_string(),
|
||||
"print(42)".to_string(),
|
||||
]),
|
||||
},
|
||||
params
|
||||
);
|
||||
|
||||
@@ -53,7 +53,6 @@ pub struct ExecApprovalRequestEvent {
|
||||
pub parsed_cmd: Vec<ParsedCommand>,
|
||||
/// Optional command prefix that can be allowlisted to avoid future prompts.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(default)]
|
||||
pub allow_prefix: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user