From 131c384361506c9d5e2976f896a9ed26d10dbcc5 Mon Sep 17 00:00:00 2001 From: Andrew Nikolin Date: Mon, 10 Nov 2025 01:12:28 -0500 Subject: [PATCH] Fix warning message phrasing (#6446) Small fix for sentence phrasing in the warning message Co-authored-by: AndrewNikolin <877163+AndrewNikolin@users.noreply.github.com> --- codex-rs/core/src/codex/compact.rs | 2 +- codex-rs/core/tests/suite/compact.rs | 2 +- codex-rs/exec/tests/event_processor_with_json_output.rs | 4 ++-- codex-rs/tui/src/chatwidget/tests.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codex-rs/core/src/codex/compact.rs b/codex-rs/core/src/codex/compact.rs index c0750366..a3ffe6a3 100644 --- a/codex-rs/core/src/codex/compact.rs +++ b/codex-rs/core/src/codex/compact.rs @@ -164,7 +164,7 @@ async fn run_compact_task_inner( sess.send_event(&turn_context, event).await; let warning = EventMsg::Warning(WarningEvent { - message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start new a new conversation when possible to keep conversations small and targeted.".to_string(), + message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start a new conversation when possible to keep conversations small and targeted.".to_string(), }); sess.send_event(&turn_context, warning).await; } diff --git a/codex-rs/core/tests/suite/compact.rs b/codex-rs/core/tests/suite/compact.rs index 72fe2184..7b2fd6a2 100644 --- a/codex-rs/core/tests/suite/compact.rs +++ b/codex-rs/core/tests/suite/compact.rs @@ -54,7 +54,7 @@ const COMPACT_PROMPT_MARKER: &str = pub(super) const TEST_COMPACT_PROMPT: &str = "You are performing a CONTEXT CHECKPOINT COMPACTION for a tool.\nTest-only compact prompt."; -pub(super) const COMPACT_WARNING_MESSAGE: &str = "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start new a new conversation when possible to keep conversations small and targeted."; +pub(super) const COMPACT_WARNING_MESSAGE: &str = "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start a new conversation when possible to keep conversations small and targeted."; fn auto_summary(summary: &str) -> String { summary.to_string() diff --git a/codex-rs/exec/tests/event_processor_with_json_output.rs b/codex-rs/exec/tests/event_processor_with_json_output.rs index 4c1e0c77..5e2ef17d 100644 --- a/codex-rs/exec/tests/event_processor_with_json_output.rs +++ b/codex-rs/exec/tests/event_processor_with_json_output.rs @@ -548,7 +548,7 @@ fn warning_event_produces_error_item() { let out = ep.collect_thread_events(&event( "e1", EventMsg::Warning(WarningEvent { - message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start new a new conversation when possible to keep conversations small and targeted.".to_string(), + message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start a new conversation when possible to keep conversations small and targeted.".to_string(), }), )); assert_eq!( @@ -557,7 +557,7 @@ fn warning_event_produces_error_item() { item: ThreadItem { id: "item_0".to_string(), details: ThreadItemDetails::Error(ErrorItem { - message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start new a new conversation when possible to keep conversations small and targeted.".to_string(), + message: "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start a new conversation when possible to keep conversations small and targeted.".to_string(), }), }, })] diff --git a/codex-rs/tui/src/chatwidget/tests.rs b/codex-rs/tui/src/chatwidget/tests.rs index e035ce3b..5bb89a32 100644 --- a/codex-rs/tui/src/chatwidget/tests.rs +++ b/codex-rs/tui/src/chatwidget/tests.rs @@ -60,7 +60,7 @@ use tempfile::tempdir; use tokio::sync::mpsc::error::TryRecvError; use tokio::sync::mpsc::unbounded_channel; -const TEST_WARNING_MESSAGE: &str = "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start new a new conversation when possible to keep conversations small and targeted."; +const TEST_WARNING_MESSAGE: &str = "Heads up: Long conversations and multiple compactions can cause the model to be less accurate. Start a new conversation when possible to keep conversations small and targeted."; fn test_config() -> Config { // Use base defaults to avoid depending on host state.