From c0539230154356f948a858bc1ccf75af2b70b6e5 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Fri, 8 Aug 2025 19:50:59 -0400 Subject: [PATCH] thread_view: Trim only trailing whitespace from last chunk of user message (#35902) This fixes internal whitespace after the last @mention going missing from the user message as displayed in history. Release Notes: - N/A --- crates/agent_ui/src/acp/thread_view.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 6411abb84f..c811878c21 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -410,7 +410,7 @@ impl AcpThreadView { } if ix < text.len() { - let last_chunk = text[ix..].trim(); + let last_chunk = text[ix..].trim_end(); if !last_chunk.is_empty() { chunks.push(last_chunk.into()); }