From e1d8c1a6a1af1821a6ab4cbdb87199c38ce1434f Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Sat, 6 Dec 2025 09:06:43 -0300 Subject: [PATCH] Improve visual alignment on the inline assistant (#44265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just making all of the elements in the inline assistant more vertically centered. Screenshot 2025-12-06 at 12  02@2x Release Notes: - N/A --- crates/agent_ui/src/inline_prompt_editor.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/agent_ui/src/inline_prompt_editor.rs b/crates/agent_ui/src/inline_prompt_editor.rs index 0083648651645c456acfa19332d61b9f550ed4ed..b9852ea727c7974e3564fadc652f132076c01f09 100644 --- a/crates/agent_ui/src/inline_prompt_editor.rs +++ b/crates/agent_ui/src/inline_prompt_editor.rs @@ -10,8 +10,8 @@ use editor::{ }; use fs::Fs; use gpui::{ - AnyElement, App, Context, CursorStyle, Entity, EventEmitter, FocusHandle, Focusable, - Subscription, TextStyle, TextStyleRefinement, WeakEntity, Window, + AnyElement, App, Context, Entity, EventEmitter, FocusHandle, Focusable, Subscription, + TextStyle, TextStyleRefinement, WeakEntity, Window, }; use language_model::{LanguageModel, LanguageModelRegistry}; use markdown::{HeadingLevelStyles, Markdown, MarkdownElement, MarkdownStyle}; @@ -100,7 +100,7 @@ impl Render for PromptEditor { let bottom_padding = match &self.mode { PromptEditorMode::Buffer { .. } => rems_from_px(2.0), - PromptEditorMode::Terminal { .. } => rems_from_px(8.0), + PromptEditorMode::Terminal { .. } => rems_from_px(4.0), }; buttons.extend(self.render_buttons(window, cx)); @@ -138,14 +138,13 @@ impl Render for PromptEditor { .pt_0p5() .pb(bottom_padding) .pr(right_padding) - .bg(cx.theme().colors().editor_background) .gap_0p5() + .justify_center() .border_y_1() .border_color(cx.theme().colors().border) + .bg(cx.theme().colors().editor_background) .child( h_flex() - .items_start() - .cursor(CursorStyle::Arrow) .on_action(cx.listener(|this, _: &ToggleModelSelector, window, cx| { this.model_selector .update(cx, |model_selector, cx| model_selector.toggle(window, cx)); @@ -165,7 +164,7 @@ impl Render for PromptEditor { .flex_shrink_0() .items_center() .justify_center() - .gap_2() + .gap_1() .child(self.render_close_button(cx)) .map(|el| { let CodegenStatus::Error(error) = self.codegen_status(cx) else { @@ -206,13 +205,14 @@ impl Render for PromptEditor { this.child( h_flex() .size_full() + .justify_center() .child(div().w(left_gutter_width + px(6.))) .child( div() .size_full() .min_w_0() - .pb_px() - .pl_1() + .pt(rems_from_px(3.)) + .pl_0p5() .flex_1() .border_t_1() .border_color(cx.theme().colors().border_variant)