mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Allow disabling the update_plan tool (#35054)
## What changed - Add a default-on `tools.update_plan.enabled` configuration option. - Omit `update_plan` from the visible and registered tool sets when the option is disabled. ## Testing - Cover configuration resolution and tool registration for the disabled setting. GitOrigin-RevId: c13aa463a6911956fca9f0ef5b74841b543798c4
This commit is contained in:
1 parent
bb24b67d33
commit
fb4e6ba2f4
7 files changed
+80
-1
No files matched your search
@@ -1030,6 +1030,9 @@ pub struct Config {
|
||||
/// Whether to register the experimental request_user_input tool.
|
||||
pub experimental_request_user_input_enabled: bool,
|
||||
|
||||
/// Whether to register the update_plan tool.
|
||||
pub update_plan_enabled: bool,
|
||||
|
||||
/// Configuration for the experimental code-mode tool surface.
|
||||
pub code_mode: CodeModeConfig,
|
||||
|
||||
@@ -2537,6 +2540,14 @@ fn resolve_experimental_request_user_input_enabled(config_toml: &ConfigToml) ->
|
||||
.is_none_or(|config| config.enabled)
|
||||
}
|
||||
|
||||
fn resolve_update_plan_enabled(config_toml: &ConfigToml) -> bool {
|
||||
config_toml
|
||||
.tools
|
||||
.as_ref()
|
||||
.and_then(|tools| tools.update_plan.as_ref())
|
||||
.is_none_or(|config| config.enabled)
|
||||
}
|
||||
|
||||
fn resolve_orchestrator_feature_enabled(
|
||||
feature: Option<&codex_config::config_toml::OrchestratorFeatureToml>,
|
||||
) -> bool {
|
||||
@@ -3577,6 +3588,7 @@ impl Config {
|
||||
let web_search_config = resolve_web_search_config(&cfg);
|
||||
let experimental_request_user_input_enabled =
|
||||
resolve_experimental_request_user_input_enabled(&cfg);
|
||||
let update_plan_enabled = resolve_update_plan_enabled(&cfg);
|
||||
let code_mode = resolve_code_mode_config(&cfg);
|
||||
let multi_agent_v2 = resolve_multi_agent_v2_config(&cfg);
|
||||
let token_budget = resolve_token_budget_config(&cfg, &features)?;
|
||||
@@ -4108,6 +4120,7 @@ impl Config {
|
||||
web_search_mode: constrained_web_search_mode.value,
|
||||
web_search_config,
|
||||
experimental_request_user_input_enabled,
|
||||
update_plan_enabled,
|
||||
code_mode,
|
||||
use_experimental_unified_exec_tool,
|
||||
background_terminal_max_timeout,
|
||||
|
||||
Reference in new issue
Block a user