From 83dfdb0cfea900d84328fa2b1429bc8f17608bc3 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:31:26 -0300 Subject: [PATCH] assistant2: Add "running" status feedback in the disclosure (#26786) Just a tiny bit of polish here, so that if the user expands the disclosure, an equivalent loading state is at the response container. Release Notes: - N/A --- crates/assistant2/src/active_thread.rs | 30 +++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/crates/assistant2/src/active_thread.rs b/crates/assistant2/src/active_thread.rs index 98cd8ac019..f7668da10f 100644 --- a/crates/assistant2/src/active_thread.rs +++ b/crates/assistant2/src/active_thread.rs @@ -811,6 +811,34 @@ impl ActiveThread { .buffer_font(cx), ), ), + ToolUseStatus::Running => container.child( + content_container().child( + h_flex() + .gap_1() + .pb_1() + .child( + Icon::new(IconName::ArrowCircle) + .size(IconSize::Small) + .color(Color::Accent) + .with_animation( + "arrow-circle", + Animation::new(Duration::from_secs(2)) + .repeat(), + |icon, delta| { + icon.transform(Transformation::rotate( + percentage(delta), + )) + }, + ), + ) + .child( + Label::new("Running…") + .size(LabelSize::XSmall) + .color(Color::Muted) + .buffer_font(cx), + ), + ), + ), ToolUseStatus::Error(err) => container.child( content_container() .child( @@ -823,7 +851,7 @@ impl ActiveThread { Label::new(err).size(LabelSize::Small).buffer_font(cx), ), ), - ToolUseStatus::Pending | ToolUseStatus::Running => container, + ToolUseStatus::Pending => container, }), ) }),