auto review snapshot

This commit is contained in:
Code Snapshot
2025-12-12 10:54:15 +10:00
parent 5c125859e7
commit e912734a24
3 changed files with 25 additions and 16 deletions
+1
View File
@@ -741,6 +741,7 @@ pub struct Notice {
pub hide_gpt5_1_migration_prompt: Option<bool>,
#[serde(rename = "hide_gpt-5.1-codex-max_migration_prompt")]
pub hide_gpt_5_1_codex_max_migration_prompt: Option<bool>,
pub hide_gpt5_2_migration_prompt: Option<bool>,
}
#[derive(Serialize, Debug, Clone, Copy, PartialEq, Eq)]
+15 -16
View File
@@ -9,6 +9,7 @@ use code_common::model_presets::{
ModelPreset,
HIDE_GPT5_1_MIGRATION_PROMPT_CONFIG,
HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG,
HIDE_GPT_5_2_MIGRATION_PROMPT_CONFIG,
};
use code_core::config_edit::{self, CONFIG_KEY_EFFORT, CONFIG_KEY_MODEL};
use code_core::config_types::Notice;
@@ -1079,26 +1080,24 @@ async fn persist_notice_hide(
}
fn set_notice_flag(notices: &mut Notice, key: &str) {
match key {
HIDE_GPT5_1_MIGRATION_PROMPT_CONFIG => {
notices.hide_gpt5_1_migration_prompt = Some(true);
}
HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG => {
notices.hide_gpt_5_1_codex_max_migration_prompt = Some(true);
}
_ => {}
if key == HIDE_GPT5_1_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt5_1_migration_prompt = Some(true);
} else if key == HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt_5_1_codex_max_migration_prompt = Some(true);
} else if key == HIDE_GPT_5_2_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt5_2_migration_prompt = Some(true);
}
}
fn notice_hidden(notices: &Notice, key: &str) -> bool {
match key {
HIDE_GPT5_1_MIGRATION_PROMPT_CONFIG => {
notices.hide_gpt5_1_migration_prompt.unwrap_or(false)
}
HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG => {
notices.hide_gpt_5_1_codex_max_migration_prompt.unwrap_or(false)
}
_ => false,
if key == HIDE_GPT5_1_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt5_1_migration_prompt.unwrap_or(false)
} else if key == HIDE_GPT_5_1_CODEX_MAX_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt_5_1_codex_max_migration_prompt.unwrap_or(false)
} else if key == HIDE_GPT_5_2_MIGRATION_PROMPT_CONFIG {
notices.hide_gpt5_2_migration_prompt.unwrap_or(false)
} else {
false
}
}
+9
View File
@@ -29,6 +29,15 @@ pub(crate) fn migration_copy_for_key(key: &str) -> ModelMigrationCopy {
],
can_opt_out: false,
},
code_common::model_presets::HIDE_GPT_5_2_MIGRATION_PROMPT_CONFIG => ModelMigrationCopy {
heading: "Upgrade available: gpt-5.2",
content: &[
"Our latest frontier model improves knowledge, reasoning, and coding.",
"Switch now to get better results; you can keep your current model if you prefer.",
"Learn more: www.openai.com/index/gpt-5-2",
],
can_opt_out: true,
},
_ => ModelMigrationCopy {
heading: "Codex just got an upgrade: meet gpt-5.1-codex-max",
content: &[