mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
Remove personality feature switch
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -9599,7 +9599,7 @@ async fn feature_requirements_normalize_effective_feature_values() -> std::io::R
|
||||
Ok(Some(codex_config::ConfigRequirementsToml {
|
||||
feature_requirements: Some(codex_config::FeatureRequirementsToml {
|
||||
entries: BTreeMap::from([
|
||||
("personality".to_string(), true),
|
||||
("memories".to_string(), true),
|
||||
("shell_tool".to_string(), false),
|
||||
]),
|
||||
}),
|
||||
@@ -9609,7 +9609,7 @@ async fn feature_requirements_normalize_effective_feature_values() -> std::io::R
|
||||
.build()
|
||||
.await?;
|
||||
|
||||
assert!(config.features.enabled(Feature::Personality));
|
||||
assert!(config.features.enabled(Feature::MemoryTool));
|
||||
assert!(!config.features.enabled(Feature::ShellTool));
|
||||
assert!(
|
||||
!config
|
||||
@@ -9749,7 +9749,7 @@ async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Res
|
||||
codex_home.path().join(CONFIG_TOML_FILE),
|
||||
r#"
|
||||
[features]
|
||||
personality = false
|
||||
memories = false
|
||||
shell_tool = true
|
||||
"#,
|
||||
)?;
|
||||
@@ -9761,7 +9761,7 @@ shell_tool = true
|
||||
Ok(Some(codex_config::ConfigRequirementsToml {
|
||||
feature_requirements: Some(codex_config::FeatureRequirementsToml {
|
||||
entries: BTreeMap::from([
|
||||
("personality".to_string(), true),
|
||||
("memories".to_string(), true),
|
||||
("shell_tool".to_string(), false),
|
||||
]),
|
||||
}),
|
||||
@@ -9771,7 +9771,7 @@ shell_tool = true
|
||||
.build()
|
||||
.await?;
|
||||
|
||||
assert!(config.features.enabled(Feature::Personality));
|
||||
assert!(config.features.enabled(Feature::MemoryTool));
|
||||
assert!(!config.features.enabled(Feature::ShellTool));
|
||||
assert!(
|
||||
!config
|
||||
@@ -10477,7 +10477,7 @@ async fn feature_requirements_normalize_runtime_feature_mutations() -> std::io::
|
||||
Ok(Some(codex_config::ConfigRequirementsToml {
|
||||
feature_requirements: Some(codex_config::FeatureRequirementsToml {
|
||||
entries: BTreeMap::from([
|
||||
("personality".to_string(), true),
|
||||
("memories".to_string(), true),
|
||||
("shell_tool".to_string(), false),
|
||||
]),
|
||||
}),
|
||||
@@ -10489,7 +10489,7 @@ async fn feature_requirements_normalize_runtime_feature_mutations() -> std::io::
|
||||
|
||||
let mut requested = config.features.get().clone();
|
||||
requested
|
||||
.disable(Feature::Personality)
|
||||
.disable(Feature::MemoryTool)
|
||||
.enable(Feature::ShellTool);
|
||||
assert!(config.features.can_set(&requested).is_ok());
|
||||
config
|
||||
@@ -10497,7 +10497,7 @@ async fn feature_requirements_normalize_runtime_feature_mutations() -> std::io::
|
||||
.set(requested)
|
||||
.expect("managed feature mutations should normalize successfully");
|
||||
|
||||
assert!(config.features.enabled(Feature::Personality));
|
||||
assert!(config.features.enabled(Feature::MemoryTool));
|
||||
assert!(!config.features.enabled(Feature::ShellTool));
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -1247,7 +1247,6 @@ impl Config {
|
||||
model_auto_compact_token_limit: self.model_auto_compact_token_limit,
|
||||
tool_output_token_limit: self.tool_output_token_limit,
|
||||
base_instructions: self.base_instructions.clone(),
|
||||
personality_enabled: self.features.enabled(Feature::Personality),
|
||||
model_supports_reasoning_summaries: self.model_supports_reasoning_summaries,
|
||||
model_catalog: self.model_catalog.clone(),
|
||||
}
|
||||
@@ -3127,11 +3126,7 @@ impl Config {
|
||||
let personality = personality
|
||||
.or(config_profile.personality)
|
||||
.or(cfg.personality)
|
||||
.or_else(|| {
|
||||
features
|
||||
.enabled(Feature::Personality)
|
||||
.then_some(Personality::Pragmatic)
|
||||
});
|
||||
.or(Some(Personality::Pragmatic));
|
||||
|
||||
let experimental_compact_prompt_path = config_profile
|
||||
.experimental_compact_prompt_file
|
||||
|
||||
@@ -1572,7 +1572,7 @@ impl Session {
|
||||
current_context,
|
||||
shell.as_ref(),
|
||||
exec_policy.as_ref(),
|
||||
self.features.enabled(Feature::Personality),
|
||||
/*personality_enabled*/ true,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2704,9 +2704,7 @@ impl Session {
|
||||
) {
|
||||
developer_sections.push(realtime_update);
|
||||
}
|
||||
if self.features.enabled(Feature::Personality)
|
||||
&& let Some(personality) = turn_context.personality
|
||||
{
|
||||
if let Some(personality) = turn_context.personality {
|
||||
let model_info = turn_context.model_info.clone();
|
||||
let has_baked_personality = model_info.supports_personality()
|
||||
&& base_instructions == model_info.get_model_instructions(Some(personality));
|
||||
|
||||
@@ -9293,7 +9293,6 @@ async fn sample_rollout(
|
||||
matches!(c, ContentItem::InputText { text } if text.contains("<personality_spec>"))
|
||||
}))
|
||||
}) && let Some(p) = reconstruction_turn.personality
|
||||
&& session.features.enabled(Feature::Personality)
|
||||
&& let Some(personality_message) = reconstruction_turn
|
||||
.model_info
|
||||
.model_messages
|
||||
|
||||
Reference in New Issue
Block a user