diff --git a/crates/agent/src/agent_model_selector.rs b/crates/agent/src/agent_model_selector.rs index 531661da25..708172057a 100644 --- a/crates/agent/src/agent_model_selector.rs +++ b/crates/agent/src/agent_model_selector.rs @@ -91,12 +91,13 @@ impl AgentModelSelector { impl Render for AgentModelSelector { fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement { - let focus_handle = self.focus_handle.clone(); - let model = self.selector.read(cx).delegate.active_model(cx); let model_name = model .map(|model| model.model.name().0) .unwrap_or_else(|| SharedString::from("No model selected")); + + let focus_handle = self.focus_handle.clone(); + PickerPopoverMenu::new( self.selector.clone(), Button::new("active-model", model_name) diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs index a3958d9acb..0e8a0cf93d 100644 --- a/crates/agent/src/message_editor.rs +++ b/crates/agent/src/message_editor.rs @@ -722,6 +722,7 @@ impl MessageEditor { .child( h_flex() .flex_none() + .flex_wrap() .justify_between() .child( h_flex() @@ -731,6 +732,7 @@ impl MessageEditor { .child( h_flex() .gap_1() + .flex_wrap() .when(!incompatible_tools.is_empty(), |this| { this.child( IconButton::new(