Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Introduce a button to disable copilot integration

Antonio Scandurra8610f3acf30f
diff --git a/crates/copilot/src/sign_in.rs b/crates/copilot/src/sign_in.rs
index a65be325ce6..43b67096363 100644
--- a/crates/copilot/src/sign_in.rs
+++ b/crates/copilot/src/sign_in.rs
@@ -5,7 +5,7 @@ use gpui::{
platform::{WindowBounds, WindowKind, WindowOptions},
AppContext, ClipboardItem, Element, Entity, View, ViewContext, ViewHandle,
};
-use settings::Settings;
+use settings::{settings_file::SettingsFile, Settings};
use theme::ui::modal;
#[derive(PartialEq, Eq, Debug, Clone)]
@@ -199,6 +199,20 @@ 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/styles/src/styleTree/copilot.ts b/styles/src/styleTree/copilot.ts
index 9fa86cd7412..b1dd17b3b33 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: 280,
+ height: 320,
},
},