diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs index 0e8a0cf93d2f988b84782f07d7e1b89ff37055a7..6544eee4f6d349a3387d4b51eeac71066d16e17d 100644 --- a/crates/agent/src/message_editor.rs +++ b/crates/agent/src/message_editor.rs @@ -428,10 +428,6 @@ impl MessageEditor { } fn handle_review_click(&mut self, window: &mut Window, cx: &mut Context) { - if self.thread.read(cx).has_pending_edit_tool_uses() { - return; - } - self.edits_expanded = true; AgentDiffPane::deploy(self.thread.clone(), self.workspace.clone(), window, cx).log_err(); cx.notify(); @@ -641,42 +637,36 @@ impl MessageEditor { .border_color(cx.theme().colors().border) .child( h_flex() - .items_start() .justify_between() .child(self.context_strip.clone()) - .child( - h_flex() - .gap_1() - .when(focus_handle.is_focused(window), |this| { - this.child( - IconButton::new("toggle-height", expand_icon) - .icon_size(IconSize::XSmall) - .icon_color(Color::Muted) - .tooltip({ - let focus_handle = focus_handle.clone(); - move |window, cx| { - let expand_label = if is_editor_expanded { - "Minimize Message Editor".to_string() - } else { - "Expand Message Editor".to_string() - }; - - Tooltip::for_action_in( - expand_label, - &ExpandMessageEditor, - &focus_handle, - window, - cx, - ) - } - }) - .on_click(cx.listener(|_, _, window, cx| { - window - .dispatch_action(Box::new(ExpandMessageEditor), cx); - })), - ) - }), - ), + .when(focus_handle.is_focused(window), |this| { + this.child( + IconButton::new("toggle-height", expand_icon) + .icon_size(IconSize::XSmall) + .icon_color(Color::Muted) + .tooltip({ + let focus_handle = focus_handle.clone(); + move |window, cx| { + let expand_label = if is_editor_expanded { + "Minimize Message Editor".to_string() + } else { + "Expand Message Editor".to_string() + }; + + Tooltip::for_action_in( + expand_label, + &ExpandMessageEditor, + &focus_handle, + window, + cx, + ) + } + }) + .on_click(cx.listener(|_, _, window, cx| { + window.dispatch_action(Box::new(ExpandMessageEditor), cx); + })), + ) + }), ) .child( v_flex()