From 23cf50f097f9be0535989e7cedc4a659165d13f9 Mon Sep 17 00:00:00 2001 From: Danilo Leal Date: Thu, 18 Dec 2025 13:53:15 -0300 Subject: [PATCH] Iterate on the UI --- crates/ui/src/components/ai/tool_call.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/crates/ui/src/components/ai/tool_call.rs b/crates/ui/src/components/ai/tool_call.rs index 590072b4970ecac068e6f1f88cd372e3f3f6d027..d597d5c8870e6236dd896790e6172bd5af356d1e 100644 --- a/crates/ui/src/components/ai/tool_call.rs +++ b/crates/ui/src/components/ai/tool_call.rs @@ -62,7 +62,8 @@ impl RenderOnce for ToolCall { }) .child( h_flex() - .hover(|s| s.bg(cx.theme().colors().element_hover.opacity(0.5))) + .w_full() + .hover(|s| s.bg(cx.theme().colors().element_hover)) .gap_1p5() .rounded_xs() .child( @@ -81,11 +82,18 @@ impl RenderOnce for ToolCall { .when_some(self.content, |this, content| { this.child( div() - .when(self.use_card_layout, |this| { - this.p_2() - .border_t_1() - .border_color(cx.theme().colors().border) - .bg(cx.theme().colors().editor_background) + .map(|this| { + if self.use_card_layout { + this.p_2() + .border_t_1() + .border_color(cx.theme().colors().border) + .bg(cx.theme().colors().editor_background) + } else { + this.pl_2() + .ml_2() + .border_l_1() + .border_color(cx.theme().colors().border) + } }) .child(content), )