mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
tui: only show fast status for gpt-5.4 (#14135)
This commit is contained in:
1 parent
244b2d53f4
commit
63597d1b2d
5 files changed
+140
-12
No files matched your search
+31
-2
@@ -918,8 +918,10 @@ impl App {
|
||||
history_cell::SessionHeaderHistoryCell::new(
|
||||
self.chat_widget.current_model().to_string(),
|
||||
self.chat_widget.current_reasoning_effort(),
|
||||
self.chat_widget
|
||||
.should_show_fast_status(self.chat_widget.current_service_tier()),
|
||||
self.chat_widget.should_show_fast_status(
|
||||
self.chat_widget.current_model(),
|
||||
self.chat_widget.current_service_tier(),
|
||||
),
|
||||
self.config.cwd.clone(),
|
||||
version,
|
||||
)
|
||||
@@ -3790,6 +3792,7 @@ mod tests {
|
||||
use crate::app_backtrack::BacktrackState;
|
||||
use crate::app_backtrack::user_count;
|
||||
use crate::chatwidget::tests::make_chatwidget_manual_with_sender;
|
||||
use crate::chatwidget::tests::set_chatgpt_auth;
|
||||
use crate::file_search::FileSearchManager;
|
||||
use crate::history_cell::AgentMessageCell;
|
||||
use crate::history_cell::HistoryCell;
|
||||
@@ -5463,6 +5466,32 @@ mod tests {
|
||||
assert_snapshot!("clear_ui_after_long_transcript_fresh_header_only", rendered);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn clear_ui_header_shows_fast_status_only_for_gpt54() {
|
||||
let mut app = make_test_app().await;
|
||||
app.config.cwd = PathBuf::from("/tmp/project");
|
||||
app.chat_widget.set_model("gpt-5.4");
|
||||
app.chat_widget
|
||||
.set_reasoning_effort(Some(ReasoningEffortConfig::XHigh));
|
||||
app.chat_widget
|
||||
.set_service_tier(Some(codex_protocol::config_types::ServiceTier::Fast));
|
||||
set_chatgpt_auth(&mut app.chat_widget);
|
||||
|
||||
let rendered = app
|
||||
.clear_ui_header_lines_with_version(80, "<VERSION>")
|
||||
.iter()
|
||||
.map(|line| {
|
||||
line.spans
|
||||
.iter()
|
||||
.map(|span| span.content.as_ref())
|
||||
.collect::<String>()
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
|
||||
assert_snapshot!("clear_ui_header_fast_status_gpt54_only", rendered);
|
||||
}
|
||||
|
||||
async fn make_test_app() -> App {
|
||||
let (chat_widget, app_event_tx, _rx, _op_rx) = make_chatwidget_manual_with_sender().await;
|
||||
let config = chat_widget.config_ref().clone();
|
||||
|
||||
Reference in new issue
Block a user