Rename show_nux_new to show_nux in tui

This commit is contained in:
Ahmed Ibrahim
2026-02-26 17:45:17 -08:00
parent d204d68c91
commit d538a6bb41
2 changed files with 11 additions and 10 deletions
+4 -4
View File
@@ -1845,7 +1845,7 @@ async fn session_configured_first_session_shows_model_nux_and_increments_display
let mut model_info = construct_model_info_offline("gpt-5.1", &chat.config);
model_info.display_name = "GPT Test".to_string();
model_info.description = Some("Fast, high-reliability coding model.".to_string());
model_info.show_nux_new = true;
model_info.show_nux = true;
chat.models_manager = Arc::new(ModelsManager::new(
chat.config.codex_home.clone(),
chat.auth_manager.clone(),
@@ -1893,7 +1893,7 @@ async fn session_configured_first_session_shows_model_nux_and_increments_display
async fn session_configured_ineligible_model_does_not_increment_display_count() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.1")).await;
let mut model_info = construct_model_info_offline("gpt-5.1", &chat.config);
model_info.show_nux_new = false;
model_info.show_nux = false;
chat.models_manager = Arc::new(ModelsManager::new(
chat.config.codex_home.clone(),
chat.auth_manager.clone(),
@@ -6116,7 +6116,7 @@ async fn model_picker_hides_show_in_picker_false_models_from_cache() {
is_default: false,
upgrade: None,
show_in_picker,
show_nux_new: false,
show_nux: false,
supported_in_api: true,
input_modalities: default_input_modalities(),
};
@@ -6385,7 +6385,7 @@ async fn single_reasoning_option_skips_selection() {
is_default: false,
upgrade: None,
show_in_picker: true,
show_nux_new: false,
show_nux: false,
supported_in_api: true,
input_modalities: default_input_modalities(),
};
+7 -6
View File
@@ -92,7 +92,7 @@ fn get_startup_tip_with_rng<R: Rng + ?Sized>(
.get(&preset.model)
.copied()
.unwrap_or(0);
(preset.show_nux_new && display_count < 4).then(|| StartupTip::ModelNew {
(preset.show_nux && display_count < 4).then(|| StartupTip::ModelNew {
model: preset.model.clone(),
message: model_new_tooltip(preset),
})
@@ -138,9 +138,10 @@ fn get_generic_tooltip_with_rng<R: Rng + ?Sized>(
// Leave small chance for a random tooltip to be shown.
if rng.random_ratio(8, 10)
&& let Some(tooltip) = plan_tooltip(plan) {
return Some(tooltip.to_string());
}
&& let Some(tooltip) = plan_tooltip(plan)
{
return Some(tooltip.to_string());
}
pick_tooltip(rng).map(str::to_string)
}
@@ -342,7 +343,7 @@ mod tests {
use rand::SeedableRng;
use rand::rngs::StdRng;
fn model_preset(show_nux_new: bool, description: &str) -> ModelPreset {
fn model_preset(show_nux: bool, description: &str) -> ModelPreset {
ModelPreset {
id: "gpt-test".to_string(),
model: "gpt-test".to_string(),
@@ -354,7 +355,7 @@ mod tests {
is_default: false,
upgrade: None,
show_in_picker: true,
show_nux_new,
show_nux,
supported_in_api: true,
input_modalities: codex_protocol::openai_models::default_input_modalities(),
}