assistant: Direct user to account page to subscribe for more LLM usage (cherry-pick #19300) (#19302)

Cherry-picked assistant: Direct user to account page to subscribe for
more LLM usage (#19300)

This PR updates the location where we send the user to subscribe for
more LLM usage to the account page.

Release Notes:

- Updated the URL to the account page when subscribing to LLM usage.

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
gcp-cherry-pick-bot[bot] 2024-10-16 14:43:49 -04:00 committed by GitHub
parent e2e95f2c49
commit 2b902c185e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4340,7 +4340,7 @@ impl ContextEditor {
fn render_payment_required_error(&self, cx: &mut ViewContext<Self>) -> AnyElement { fn render_payment_required_error(&self, cx: &mut ViewContext<Self>) -> AnyElement {
const ERROR_MESSAGE: &str = "Free tier exceeded. Subscribe and add payment to continue using Zed LLMs. You'll be billed at cost for tokens used."; const ERROR_MESSAGE: &str = "Free tier exceeded. Subscribe and add payment to continue using Zed LLMs. You'll be billed at cost for tokens used.";
const SUBSCRIBE_URL: &str = "https://zed.dev/api/billing/initiate_checkout"; const ACCOUNT_URL: &str = "https://zed.dev/account";
v_flex() v_flex()
.gap_0p5() .gap_0p5()
@ -4365,7 +4365,7 @@ impl ContextEditor {
.child(Button::new("subscribe", "Subscribe").on_click(cx.listener( .child(Button::new("subscribe", "Subscribe").on_click(cx.listener(
|this, _, cx| { |this, _, cx| {
this.last_error = None; this.last_error = None;
cx.open_url(SUBSCRIBE_URL); cx.open_url(ACCOUNT_URL);
cx.notify(); cx.notify();
}, },
))) )))