mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Hide Fast mode status for unsupported models (#39999)
## Why The `fast-mode` status item showed `Fast off` even when the selected model did not support Fast mode. ## What changed - Hide the Fast mode status value when the current model is known not to support Fast mode. - Continue showing the value for supported and uncatalogued models. ## Testing - Cover visibility updates when switching among supported, unsupported, and uncatalogued models. - Update the footer snapshot to verify that an unsupported model omits the Fast mode value. GitOrigin-RevId: c297655189efc719b2097c2aa415029b01d6873e
This commit is contained in:
1 parent
df6a54ee85
commit
9cdc66904f
3 files changed
+48
-12
No files matched your search
@@ -760,13 +760,23 @@ impl ChatWidget {
|
||||
.and_then(|usage| usage.estimated_usage_usd_micros)
|
||||
.and_then(format_estimated_usd_micros),
|
||||
StatusLineItem::SessionId => self.thread_id.map(|id| id.to_string()),
|
||||
StatusLineItem::FastMode => Some(
|
||||
if self.current_service_tier() == Some(ServiceTier::Fast.request_value()) {
|
||||
"Fast on".to_string()
|
||||
} else {
|
||||
"Fast off".to_string()
|
||||
},
|
||||
),
|
||||
StatusLineItem::FastMode => self
|
||||
.model_catalog
|
||||
.try_list_models()
|
||||
.ok()
|
||||
.and_then(|models| {
|
||||
models
|
||||
.into_iter()
|
||||
.find(|preset| preset.model == self.current_model())
|
||||
})
|
||||
.is_none_or(|preset| preset.supports_fast_mode())
|
||||
.then(|| {
|
||||
if self.current_service_tier() == Some(ServiceTier::Fast.request_value()) {
|
||||
"Fast on".to_string()
|
||||
} else {
|
||||
"Fast off".to_string()
|
||||
}
|
||||
}),
|
||||
StatusLineItem::RawOutput => self.raw_output_mode().then(|| "raw output".to_string()),
|
||||
StatusLineItem::ThreadTitle => self.thread_name.as_ref().map_or_else(
|
||||
|| self.thread_id.map(|id| id.to_string()),
|
||||
|
||||
Reference in new issue
Block a user