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.

agent_ui: Keep queued message text readable in narrow panels (#65638)

froQ8a21d136a784
diff --git a/crates/agent_ui/src/conversation_view/thread_view.rs b/crates/agent_ui/src/conversation_view/thread_view.rs
index 75dd0ef22e1..23804335f20 100644
--- a/crates/agent_ui/src/conversation_view/thread_view.rs
+++ b/crates/agent_ui/src/conversation_view/thread_view.rs
@@ -5164,11 +5164,10 @@ impl ThreadView {
let keybinding_size = rems_from_px(12_f32);
let steer_on = entry.steer;
- let min_width = rems_from_px(160_f32);
-
h_flex()
.group("queue_entry")
.w_full()
+ .flex_wrap()
.p_1p5()
.gap_1()
.bg(cx.theme().colors().editor_background)
@@ -5179,6 +5178,7 @@ impl ThreadView {
.child(
div()
.id("next_in_queue")
+ .flex_none()
.child(
Icon::new(IconName::Circle)
.size(IconSize::Small)
@@ -5186,11 +5186,16 @@ impl ThreadView {
)
.tooltip(Tooltip::text(tooltip_text)),
)
- .child(editor.clone())
+ .child(
+ div()
+ .flex_1()
+ .min_w(rems_from_px(120_f32))
+ .child(editor.clone()),
+ )
.child(if editor_focused {
h_flex()
.gap_1()
- .min_w(min_width)
+ .ml_auto()
.justify_end()
.child(
IconButton::new(("edit", index), IconName::Pencil)
@@ -5234,7 +5239,7 @@ impl ThreadView {
h_flex()
.when(!is_next, |this| this.visible_on_hover("queue_entry"))
.gap_1()
- .min_w(min_width)
+ .ml_auto()
.justify_end()
.child(
IconButton::new(("delete", index), IconName::Trash)