Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent: Fix text wrapping in the provider set up list items (#33063)
Danilo Leal26249504720b
diff --git a/crates/language_models/src/ui/instruction_list_item.rs b/crates/language_models/src/ui/instruction_list_item.rsindex af744b0ae3b..794a85b400a 100644--- a/crates/language_models/src/ui/instruction_list_item.rs+++ b/crates/language_models/src/ui/instruction_list_item.rs@@ -40,29 +40,30 @@ impl IntoElement for InstructionListItem {let link = button_link.clone();let unique_id = SharedString::from(format!("{}-button", self.label));- h_flex().flex_wrap().child(Label::new(self.label)).child(- Button::new(unique_id, button_label)- .style(ButtonStyle::Subtle)- .icon(IconName::ArrowUpRight)- .icon_size(IconSize::XSmall)- .icon_color(Color::Muted)- .on_click(move |_, _window, cx| cx.open_url(&link)),- )+ h_flex()+ .flex_wrap()+ .child(Label::new(self.label))+ .child(+ Button::new(unique_id, button_label)+ .style(ButtonStyle::Subtle)+ .icon(IconName::ArrowUpRight)+ .icon_size(IconSize::XSmall)+ .icon_color(Color::Muted)+ .on_click(move |_, _window, cx| cx.open_url(&link)),+ )+ .into_any_element()} else {- div().child(Label::new(self.label))+ Label::new(self.label).into_any_element()};- div()- .child(- ListItem::new("list-item")- .selectable(false)- .start_slot(- Icon::new(IconName::Dash)- .size(IconSize::XSmall)- .color(Color::Hidden),- )- .child(item_content),+ ListItem::new("list-item")+ .selectable(false)+ .start_slot(+ Icon::new(IconName::Dash)+ .size(IconSize::XSmall)+ .color(Color::Hidden),)- .into_any()+ .child(div().w_full().child(item_content))+ .into_any_element()}}