Compare commits

...

1 Commits

Author SHA1 Message Date
Dylan
780d04b4cd Add custom apply patch toggle 2025-09-14 20:05:26 -07:00
4 changed files with 11 additions and 2 deletions

View File

@@ -52,6 +52,10 @@ pub struct Cli {
#[arg(long = "skip-git-repo-check", default_value_t = false)]
pub skip_git_repo_check: bool,
/// Force-enable the experimental apply_patch tool even for models that do not opt into it by default.
#[arg(long = "custom-apply-patch", default_value_t = false)]
pub custom_apply_patch: bool,
#[clap(skip)]
pub config_overrides: CliConfigOverrides,

View File

@@ -46,6 +46,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
dangerously_bypass_approvals_and_sandbox,
cwd,
skip_git_repo_check,
custom_apply_patch,
color,
last_message_file,
json: json_mode,
@@ -158,7 +159,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
codex_linux_sandbox_exe,
base_instructions: None,
include_plan_tool: None,
include_apply_patch_tool: None,
include_apply_patch_tool: custom_apply_patch.then_some(true),
include_view_image_tool: None,
show_raw_agent_reasoning: oss.then_some(true),
tools_web_search_request: None,

View File

@@ -71,6 +71,10 @@ pub struct Cli {
#[arg(long = "search", default_value_t = false)]
pub web_search: bool,
/// Force-enable the experimental apply_patch tool even for models that do not opt into it by default.
#[arg(long = "custom-apply-patch", default_value_t = false)]
pub custom_apply_patch: bool,
#[clap(skip)]
pub config_overrides: CliConfigOverrides,
}

View File

@@ -132,7 +132,7 @@ pub async fn run_main(
codex_linux_sandbox_exe,
base_instructions: None,
include_plan_tool: Some(true),
include_apply_patch_tool: None,
include_apply_patch_tool: cli.custom_apply_patch.then_some(true),
include_view_image_tool: None,
show_raw_agent_reasoning: cli.oss.then_some(true),
tools_web_search_request: cli.web_search.then_some(true),