mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
auto review snapshot
This commit is contained in:
@@ -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
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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: &[
|
||||
|
||||
Reference in New Issue
Block a user