Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent: Tweak MCP server configuration dialog (#29878)
Bennet Bo Fenner0246ec2dabd2
diff --git a/crates/agent/src/assistant_configuration/configure_context_server_modal.rs b/crates/agent/src/assistant_configuration/configure_context_server_modal.rsindex b24a3a4d668..5f375782b40 100644--- a/crates/agent/src/assistant_configuration/configure_context_server_modal.rs+++ b/crates/agent/src/assistant_configuration/configure_context_server_modal.rs@@ -65,6 +65,8 @@ impl ConfigureContextServerModal {settings_editor: cx.new(|cx| {let mut editor = Editor::auto_height(16, window, cx);editor.set_text(manifest.default_settings.trim(), window, cx);+ editor.set_show_gutter(false, cx);+ editor.set_soft_wrap_mode(language::language_settings::SoftWrap::None, cx);if let Some(buffer) = editor.buffer().read(cx).as_singleton() {buffer.update(cx, |buffer, cx| buffer.set_language(jsonc_language, cx))}@@ -99,6 +101,7 @@ impl ConfigureContextServerModal {};let configuration = &mut self.context_servers_to_setup[0];+ configuration.last_error.take();if configuration.waiting_for_context_server {return;}@@ -264,7 +267,7 @@ impl Render for ConfigureContextServerModal {div().elevation_3(cx)- .w(rems(34.))+ .w(rems(42.)).key_context("ConfigureContextServerModal").on_action(cx.listener(|this, _: &menu::Confirm, _window, cx| this.confirm(cx))).on_action(cx.listener(|this, _: &menu::Cancel, _window, cx| this.dismiss(cx)))diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex 93b58dbd015..9c9365b9827 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -8721,8 +8721,10 @@ fn compute_auto_height_layout(let overscroll = size(em_width, px(0.));let editor_width = text_width - gutter_dimensions.margin - overscroll.width - em_width;- if editor.set_wrap_width(Some(editor_width), cx) {- snapshot = editor.snapshot(window, cx);+ if !matches!(editor.soft_wrap_mode(cx), SoftWrap::None) {+ if editor.set_wrap_width(Some(editor_width), cx) {+ snapshot = editor.snapshot(window, cx);+ }}let scroll_height = (snapshot.max_point().row().next_row().0 as f32) * line_height;