From 2882e0fa5b7ac604d8f2f0abae27ecbecb04c674 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 19 Apr 2023 16:39:55 -0700 Subject: [PATCH] Remove new CTA in copilot sign in UI Add a trim_end to copilot suggestions --- crates/copilot/src/sign_in.rs | 14 -------------- crates/editor/src/editor.rs | 4 ++-- styles/src/styleTree/copilot.ts | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/crates/copilot/src/sign_in.rs b/crates/copilot/src/sign_in.rs index 43b6709636..4378c90c88 100644 --- a/crates/copilot/src/sign_in.rs +++ b/crates/copilot/src/sign_in.rs @@ -199,20 +199,6 @@ impl CopilotCodeVerification { }, ) .boxed(), - theme::ui::cta_button_with_click( - "Disable Copilot Integration", - style.auth.content_width, - &style.auth.cta_button, - cx, - { - move |_, cx| { - SettingsFile::update(cx, move |settings| { - settings.features.copilot = Some(false); - }); - } - }, - ) - .boxed(), ]) .align_children_center() .boxed() diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 710d1c6958..cba98c73c5 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2995,11 +2995,11 @@ impl Editor { .copilot_state .text_for_active_completion(cursor, &snapshot) { - self.display_map.update(cx, |map, cx| { + self.display_map.update(cx, move |map, cx| { map.replace_suggestion( Some(Suggestion { position: cursor, - text: text.into(), + text: text.trim_end().into(), }), cx, ) diff --git a/styles/src/styleTree/copilot.ts b/styles/src/styleTree/copilot.ts index b1dd17b3b3..9fa86cd741 100644 --- a/styles/src/styleTree/copilot.ts +++ b/styles/src/styleTree/copilot.ts @@ -113,7 +113,7 @@ export default function copilot(colorScheme: ColorScheme) { }, dimensions: { width: 280, - height: 320, + height: 280, }, },