From 3f62b5cc6166ee88c3b3994f6a442185c0ab2c8c Mon Sep 17 00:00:00 2001 From: jif-oai Date: Mon, 13 Apr 2026 16:08:53 +0100 Subject: [PATCH] fix: dedup compact (#17643) --- codex-rs/tui/src/chatwidget.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index e7ef6a060..413ea3b8a 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -2197,16 +2197,6 @@ impl ChatWidget { self.finalize_completed_assistant_message(Some(&message)); } - fn on_context_compacted(&mut self) { - self.flush_answer_stream_with_separator(); - self.handle_stream_finished(); - self.add_to_history(history_cell::new_info_event( - "Context compacted".to_owned(), - /*hint*/ None, - )); - self.request_redraw(); - } - fn on_agent_message_delta(&mut self, delta: String) { self.handle_streaming_delta(delta); } @@ -6254,7 +6244,7 @@ impl ChatWidget { | ServerNotification::WindowsWorldWritableWarning(_) | ServerNotification::WindowsSandboxSetupCompleted(_) | ServerNotification::AccountLoginCompleted(_) => {} - ServerNotification::ContextCompacted(_) => self.on_context_compacted(), + ServerNotification::ContextCompacted(_) => {} } } @@ -6739,7 +6729,7 @@ impl ChatWidget { self.on_entered_review_mode(review_request, from_replay) } EventMsg::ExitedReviewMode(review) => self.on_exited_review_mode(review), - EventMsg::ContextCompacted(_) => self.on_context_compacted(), + EventMsg::ContextCompacted(_) => {} EventMsg::CollabAgentSpawnBegin(CollabAgentSpawnBeginEvent { call_id, model,