Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add cancel button on GitHub Copilot actions (#7850)
Subash Chandra Sapkota07c7778cffc8
diff --git a/crates/copilot_ui/src/sign_in.rs b/crates/copilot_ui/src/sign_in.rsindex d841ee8ced9..1ac0469f2db 100644--- a/crates/copilot_ui/src/sign_in.rs+++ b/crates/copilot_ui/src/sign_in.rs@@ -116,6 +116,11 @@ impl CopilotCodeVerification {.full_width().style(ButtonStyle::Filled),)+ .child(+ Button::new("copilot-enable-cancel-button", "Cancel")+ .full_width()+ .on_click(cx.listener(|_, _, cx| cx.emit(DismissEvent))),+ )}fn render_enabled_modal(cx: &mut ViewContext<Self>) -> impl Element {v_flex()@@ -131,7 +136,7 @@ impl CopilotCodeVerification {)}- fn render_unauthorized_modal() -> impl Element {+ fn render_unauthorized_modal(cx: &mut ViewContext<Self>) -> impl Element {v_flex().child(Headline::new("You must have an active GitHub Copilot subscription.").size(HeadlineSize::Large))@@ -143,6 +148,11 @@ impl CopilotCodeVerification {.full_width().on_click(|_, cx| cx.open_url(COPILOT_SIGN_UP_URL)),)+ .child(+ Button::new("copilot-subscribe-cancel-button", "Cancel")+ .full_width()+ .on_click(cx.listener(|_, _, cx| cx.emit(DismissEvent))),+ )}fn render_disabled_modal() -> impl Element {@@ -160,7 +170,7 @@ impl Render for CopilotCodeVerification {} => Self::render_prompting_modal(self.connect_clicked, &prompt, cx).into_any_element(),Status::Unauthorized => {self.connect_clicked = false;- Self::render_unauthorized_modal().into_any_element()+ Self::render_unauthorized_modal(cx).into_any_element()}Status::Authorized => {self.connect_clicked = false;