mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Rename the history notes extension config option (#39830)
## What changed Rename the token-budget configuration key and its Rust field from `use_history_notes_history` to `use_history_notes_extension`. Update the config schema, extension gating, explicit-setting detection, and tests to use the new name consistently. GitOrigin-RevId: b6a514e23f02095fcd1d35dc42eeb7394b800c77
This commit is contained in:
@@ -16,11 +16,11 @@ pub(super) fn has_explicit_settings(config: &Config) -> bool {
|
||||
.is_some_and(|settings| {
|
||||
settings
|
||||
.keys()
|
||||
.any(|key| !matches!(key.as_str(), "enabled" | "use_history_notes_history"))
|
||||
.any(|key| !matches!(key.as_str(), "enabled" | "use_history_notes_extension"))
|
||||
})
|
||||
|| config.token_budget.as_ref().is_some_and(|token_budget| {
|
||||
let mut settings = token_budget.clone();
|
||||
settings.use_history_notes_history = false;
|
||||
settings.use_history_notes_extension = false;
|
||||
settings != TokenBudgetConfig::default()
|
||||
})
|
||||
}
|
||||
@@ -39,10 +39,10 @@ pub(super) fn apply_model_defaults(config: &mut Config, model_info: &ModelInfo)
|
||||
};
|
||||
|
||||
let token_budget = TokenBudgetConfig {
|
||||
use_history_notes_history: config
|
||||
use_history_notes_extension: config
|
||||
.token_budget
|
||||
.as_ref()
|
||||
.is_some_and(|token_budget| token_budget.use_history_notes_history),
|
||||
.is_some_and(|token_budget| token_budget.use_history_notes_extension),
|
||||
reminder_threshold_tokens: Some(model_defaults.reminder_threshold_tokens),
|
||||
reminder_message_template: model_defaults.reminder_message_template.clone(),
|
||||
guidance_message: Some(model_defaults.guidance_message.clone()),
|
||||
|
||||
Reference in New Issue
Block a user