From ad14dcc57b369b665e78fceb782b69719f790b97 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 14 Mar 2025 11:03:57 -0300 Subject: [PATCH] assistant2: Truncate thread title in context picker (#26775) Similar issue as in https://github.com/zed-industries/zed/pull/26721. Release Notes: - N/A --- .../src/context_picker/thread_context_picker.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/assistant2/src/context_picker/thread_context_picker.rs b/crates/assistant2/src/context_picker/thread_context_picker.rs index 2b42543ba0ec92f75d481e6c9382605834c27ea5..914745e2247c9ce5493182998c6a47970dc60aab 100644 --- a/crates/assistant2/src/context_picker/thread_context_picker.rs +++ b/crates/assistant2/src/context_picker/thread_context_picker.rs @@ -223,13 +223,18 @@ pub fn render_thread_context_entry( h_flex() .gap_1p5() .w_full() + .justify_between() .child( - Icon::new(IconName::MessageCircle) - .size(IconSize::XSmall) - .color(Color::Muted), + h_flex() + .gap_1p5() + .max_w_72() + .child( + Icon::new(IconName::MessageCircle) + .size(IconSize::XSmall) + .color(Color::Muted), + ) + .child(Label::new(thread.summary.clone()).truncate()), ) - .child(Label::new(thread.summary.clone())) - .child(div().w_full()) .when(added, |el| { el.child( h_flex()