diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index e6f126c245..df04b7da06 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -40,9 +40,6 @@ use std::time::Duration; use tokio::select; use tokio::sync::mpsc::unbounded_channel; -#[cfg(not(debug_assertions))] -use crate::history_cell::UpdateAvailableHistoryCell; - #[derive(Debug, Clone)] pub struct AppExitInfo { pub token_usage: TokenUsage, @@ -149,9 +146,6 @@ impl App { }; let file_search = FileSearchManager::new(config.cwd.clone(), app_event_tx.clone()); - #[cfg(not(debug_assertions))] - let upgrade_version = crate::updates::get_upgrade_version(&config); - let mut app = Self { server: conversation_manager, app_event_tx, @@ -175,20 +169,6 @@ impl App { app.handle_event(tui, event).await?; } - // TODO(jif) clean this - #[cfg(not(debug_assertions))] - if let Some(latest_version) = upgrade_version { - app.handle_event( - tui, - AppEvent::InsertHistoryCell(Box::new(UpdateAvailableHistoryCell::new( - crate::version::CODEX_CLI_VERSION, - latest_version, - crate::updates::get_update_action(), - ))), - ) - .await?; - } - let tui_events = tui.event_stream(); tokio::pin!(tui_events); diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 20fa614f88..a0a2683bb4 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -316,25 +316,12 @@ async fn run_ratatui_app( let mut initial_events = Vec::new(); if let Some(status) = cached_update_status - && status.update_available { - let update_action = { - #[cfg(not(debug_assertions))] - { - crate::updates::get_update_action() - } - #[cfg(debug_assertions)] - { - None - } - }; - initial_events.push(AppEvent::InsertHistoryCell(Box::new( - UpdateAvailableHistoryCell::new( - status.current_version, - status.latest_version, - update_action, - ), - ))); - } + && status.update_available + { + initial_events.push(AppEvent::InsertHistoryCell(Box::new( + UpdateAvailableHistoryCell::new(status.current_version, status.latest_version, None), + ))); + } // Forward panic reports through tracing so they appear in the UI status // line, but do not swallow the default/color-eyre panic handler.