Lightweight coding agent that runs in your terminal
Rust
[codex] Lowercase TUI service tier commands (#21906)
Ahmed Ibrahimfca81eeb5bab
diff --git a/codex-rs/tui/src/chatwidget/service_tiers.rs b/codex-rs/tui/src/chatwidget/service_tiers.rsindex f23f44dd6e..1cdb52f224 100644--- a/codex-rs/tui/src/chatwidget/service_tiers.rs+++ b/codex-rs/tui/src/chatwidget/service_tiers.rs@@ -88,7 +88,7 @@ impl ChatWidget {.into_iter().map(|tier| ServiceTierCommand {id: tier.id,- name: tier.name,+ name: tier.name.to_lowercase(),description: tier.description,}).collect()diff --git a/codex-rs/tui/src/chatwidget/tests/slash_commands.rs b/codex-rs/tui/src/chatwidget/tests/slash_commands.rsindex dc8f2e7cb2..4c5319a640 100644--- a/codex-rs/tui/src/chatwidget/tests/slash_commands.rs+++ b/codex-rs/tui/src/chatwidget/tests/slash_commands.rs@@ -62,6 +62,24 @@ fn next_add_to_history_event(rx: &mut tokio::sync::mpsc::UnboundedReceiver<AppEv}}+#[tokio::test]+async fn service_tier_commands_lowercase_catalog_names() {+ let (mut chat, _rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.4")).await;+ let mut preset = get_available_model(&chat, "gpt-5.4");+ let expected_description = preset.service_tiers[0].description.clone();+ preset.service_tiers[0].name = "Fast".to_string();+ chat.model_catalog = std::sync::Arc::new(ModelCatalog::new(vec![preset]));++ assert_eq!(+ chat.current_model_service_tier_commands(),+ vec![ServiceTierCommand {+ id: ServiceTier::Fast.request_value().to_string(),+ name: "fast".to_string(),+ description: expected_description,+ }]+ );+}+#[tokio::test]async fn slash_compact_eagerly_queues_follow_up_before_turn_start() {let (mut chat, mut rx, mut op_rx) = make_chatwidget_manual(/*model_override*/ None).await;