Make plans backwards compatible (#37941)
This PR fixes the backwards compatibility of the new `Plan` variants. We can't add new variants to the wire representation, as old clients won't be able to understand them. Release Notes: - N/A
This commit is contained in:
@@ -23,7 +23,7 @@ use crate::application_menu::{
|
||||
use auto_update::AutoUpdateStatus;
|
||||
use call::ActiveCall;
|
||||
use client::{Client, UserStore, zed_urls};
|
||||
use cloud_llm_client::Plan;
|
||||
use cloud_llm_client::{Plan, PlanV1, PlanV2};
|
||||
use gpui::{
|
||||
Action, AnyElement, App, Context, Corner, Element, Entity, Focusable, InteractiveElement,
|
||||
IntoElement, MouseButton, ParentElement, Render, StatefulInteractiveElement, Styled,
|
||||
@@ -668,13 +668,13 @@ impl TitleBar {
|
||||
let user_login = user.github_login.clone();
|
||||
|
||||
let (plan_name, label_color, bg_color) = match plan {
|
||||
None | Some(Plan::ZedFree | Plan::ZedFreeV2) => {
|
||||
None | Some(Plan::V1(PlanV1::ZedFree) | Plan::V2(PlanV2::ZedFree)) => {
|
||||
("Free", Color::Default, free_chip_bg)
|
||||
}
|
||||
Some(Plan::ZedProTrial | Plan::ZedProTrialV2) => {
|
||||
Some(Plan::V1(PlanV1::ZedProTrial) | Plan::V2(PlanV2::ZedProTrial)) => {
|
||||
("Pro Trial", Color::Accent, pro_chip_bg)
|
||||
}
|
||||
Some(Plan::ZedPro | Plan::ZedProV2) => {
|
||||
Some(Plan::V1(PlanV1::ZedPro) | Plan::V2(PlanV2::ZedPro)) => {
|
||||
("Pro", Color::Accent, pro_chip_bg)
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user