Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

assistant2: Fix tool label overflowing on card header (#27489)

Danilo Leal64b3eea3cddd
diff --git a/crates/assistant2/src/active_thread.rs b/crates/assistant2/src/active_thread.rs
index 72a678d0857..b2e16db1a75 100644
--- a/crates/assistant2/src/active_thread.rs
+++ b/crates/assistant2/src/active_thread.rs
@@ -1325,6 +1325,7 @@ impl ActiveThread {
.child(
h_flex()
.group("disclosure-header")
+ .gap_1p5()
.justify_between()
.py_1()
.px_2()
@@ -1339,22 +1340,19 @@ impl ActiveThread {
.border_color(lighter_border)
.child(
h_flex()
+ .id("tool-label-container")
+ .relative()
.gap_1p5()
+ .max_w_full()
+ .overflow_x_scroll()
.child(
Icon::new(tool_use.icon)
.size(IconSize::XSmall)
.color(Color::Muted),
)
- .child(
- div()
- .text_ui_sm(cx)
- .children(
- self.rendered_tool_use_labels
- .get(&tool_use.id)
- .cloned(),
- )
- .truncate(),
- ),
+ .child(h_flex().text_ui_sm(cx).children(
+ self.rendered_tool_use_labels.get(&tool_use.id).cloned(),
+ )),
)
.child(
h_flex()