agent: Tweak MCP server configuration dialog (#29878)
Tweaks the MCP configuration dialog a bit: - Increase width of popover - Disable soft - Clear errors when hitting confirm Release Notes: - N/A
This commit is contained in:
parent
a72ade8762
commit
0246ec2dab
2 changed files with 8 additions and 3 deletions
|
@ -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)))
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue