Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
inline_completion_button: Fix links to account page (#31558)
Marshall Bowers0145e2c10128
diff --git a/crates/inline_completion_button/src/inline_completion_button.rs b/crates/inline_completion_button/src/inline_completion_button.rsindex b196436feb8..4ff793cbaf4 100644--- a/crates/inline_completion_button/src/inline_completion_button.rs+++ b/crates/inline_completion_button/src/inline_completion_button.rs@@ -33,7 +33,7 @@ use workspace::{StatusItemView, Toast, Workspace, create_and_open_local_file, item::ItemHandle,notifications::NotificationId,};-use zed_actions::{OpenBrowser, OpenZedUrl};+use zed_actions::OpenBrowser;use zed_llm_client::UsageLimit;use zeta::RateCompletions;@@ -735,13 +735,8 @@ impl InlineCompletionButton {move |_, cx| cx.open_url(&zed_urls::account_url(cx)),).when(usage.over_limit(), |menu| -> ContextMenu {- menu.entry("Subscribe to increase your limit", None, |window, cx| {- window.dispatch_action(- Box::new(OpenZedUrl {- url: zed_urls::account_url(cx),- }),- cx,- );+ menu.entry("Subscribe to increase your limit", None, |_window, cx| {+ cx.open_url(&zed_urls::account_url(cx))})}).separator();@@ -763,26 +758,12 @@ impl InlineCompletionButton {).into_any_element()},- |window, cx| {- window.dispatch_action(- Box::new(OpenZedUrl {- url: zed_urls::account_url(cx),- }),- cx,- );- },+ |_window, cx| cx.open_url(&zed_urls::account_url(cx)),).entry("You need to upgrade to Zed Pro or contact us.",None,- |window, cx| {- window.dispatch_action(- Box::new(OpenZedUrl {- url: zed_urls::account_url(cx),- }),- cx,- );- },+ |_window, cx| cx.open_url(&zed_urls::account_url(cx)),).separator();} else if self.user_store.read(cx).has_overdue_invoices() {@@ -803,25 +784,15 @@ impl InlineCompletionButton {).into_any_element()},- |window, cx| {- window.dispatch_action(- Box::new(OpenZedUrl {- url: zed_urls::account_url(cx),- }),- cx,- );+ |_window, cx| {+ cx.open_url(&zed_urls::account_url(cx))},).entry("Check your payment status or contact us at [email protected] to continue using this feature.",None,- |window, cx| {- window.dispatch_action(- Box::new(OpenZedUrl {- url: zed_urls::account_url(cx),- }),- cx,- );+ |_window, cx| {+ cx.open_url(&zed_urls::account_url(cx))},).separator();