Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
cloud_api_types: Add `ZedVip` variant to `Plan` (#59443)
Marshall Bowers69b602c797a6
diff --git a/assets/images/vip_stamp.svg b/assets/images/vip_stamp.svgnew file mode 100644index 00000000000..896a6b39cb0--- /dev/null+++ b/assets/images/vip_stamp.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="262" height="102" fill="none"><path fill="#c6cad0" d="M261.43 0v101.174H0V0zM1 100.174h259.43V1H1z" opacity=".2"/><path fill="#c6cad0" fill-opacity=".05" d="M6.5 6.5h248.43v88.173H6.5z"/><path fill="#c6cad0" d="M7 92.669v1.505h1.504v1H6v-2.505zm9.518 1.505v1H12.51v-1zm8.013 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.014 0v1h-4.008v-1zm8.014 0v1H52.58v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.014 0v1H76.62v-1zm8.014 0v1h-4.007v-1zm8.014 0v1H92.65v-1zm8.014 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.015 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.015 0v1h-4.008v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.015 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm8.013 0v1h-4.007v-1zm8.014 0v1h-4.007v-1zm6.511-1.505v2.505h-2.504v-1h1.504v-1.505zM7 84.653v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 76.638v4.007H6v-4.007zm248.43 0v4.007h-1v-4.007zM7 68.622v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 60.606v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 52.591v4.008H6V52.59zm248.43 0v4.008h-1V52.59zM7 44.575v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 36.56v4.007H6V36.56zm248.43-.001v4.008h-1V36.56zM7 28.543v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 20.527v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM7 12.512v4.008H6v-4.008zm248.43 0v4.008h-1v-4.008zM8.504 6v1H7v1.504H6V6zM255.43 6v2.504h-1V7h-1.504V6zM16.518 6v1H12.51V6zm8.013 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1H52.58V6zM64.6 6v1h-4.007V6zm8.013 0v1h-4.007V6zm8.014 0v1H76.62V6zm8.015 0v1h-4.008V6zm8.013 0v1H92.65V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.013 0v1h-4.007V6zm8.015 0v1h-4.008V6zm8.014 0v1h-4.007V6zm8.013 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.013 0v1h-4.007V6zm8.015 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.013 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.008V6zm8.014 0v1h-4.007V6zm8.014 0v1h-4.007V6zm8.013 0v1h-4.007V6zm8.014 0v1h-4.007V6zM98.544 45.5l-3.076-10.37h1.323l1.47 5.185 1.115 3.922h.074l1.114-3.922 1.471-5.185h1.278l-3.076 10.37zm6.1 0v-.995h2.585v-8.38h-2.585v-.995h6.418v.995h-2.585v8.38h2.585v.995zm8.552 0V35.13h3.774q1.44 0 2.199.787.757.787.757 2.2 0 1.41-.757 2.198-.759.787-2.199.787h-2.526V45.5zm1.248-5.482h2.496q.787 0 1.218-.386.446-.401.446-1.13v-.772q0-.728-.446-1.114-.43-.402-1.218-.402h-2.496z"/><path fill="#c6cad0" d="M98.796 65.944q-1.53 0-2.243-.906-.698-.907-.698-2.615 0-.654.074-1.441.09-.787.282-1.59.208-.802.55-1.545.342-.758.847-1.337a3.9 3.9 0 0 1 1.218-.936q.698-.357 1.634-.357 1.53 0 2.229.906.713.907.713 2.615 0 .654-.089 1.441-.075.788-.282 1.59a9 9 0 0 1-.535 1.56q-.342.743-.862 1.337a3.9 3.9 0 0 1-1.218.936q-.699.342-1.62.342m.09-1.07q1.203 0 1.931-.92.728-.922.995-2.527l.283-1.693q.059-.342.074-.654.03-.312.03-.565 0-1.069-.431-1.649-.416-.58-1.397-.58-1.203 0-1.931.922-.728.921-.996 2.526l-.282 1.693a9 9 0 0 0-.09.654q-.014.312-.014.565 0 1.069.416 1.649.431.58 1.411.58m7.422 4.041a1 1 0 0 1-.446-.104 2 2 0 0 1-.46-.297 7 7 0 0 1-.58-.55q-.312-.326-.757-.817l-.907-.995.788-.713 2.288 2.436.267-.06 1.456-8.72h-2.733l.163-.996h2.734l.267-1.59q.118-.756.609-1.247.49-.49 1.352-.49h2.571l-.164.995h-3.09l-.386 2.332h3.105l-.164.996h-3.105l-1.382 8.26a3 3 0 0 1-.148.595 1.6 1.6 0 0 1-.282.49 1.1 1.1 0 0 1-.416.342q-.253.133-.58.133m8.463 0a1 1 0 0 1-.446-.104 2 2 0 0 1-.46-.297 7 7 0 0 1-.58-.55q-.311-.326-.758-.817l-.906-.995.788-.713 2.288 2.436.267-.06 1.456-8.72h-2.734l.164-.996h2.733l.268-1.59q.118-.756.609-1.247.49-.49 1.352-.49h2.57l-.163.995h-3.09l-.387 2.332h3.105l-.163.996h-3.105l-1.382 8.26a3 3 0 0 1-.148.595q-.105.282-.283.49a1.1 1.1 0 0 1-.416.342q-.252.133-.579.133m10.602-12.524q-.475 0-.669-.178a.55.55 0 0 1-.193-.416q0-.09.015-.194t.045-.237a.78.78 0 0 1 .297-.52q.237-.193.683-.193.475 0 .669.178a.55.55 0 0 1 .193.416q0 .09-.015.193-.015.105-.045.238a.84.84 0 0 1-.297.535q-.237.177-.683.178m-1.01 9.553q-.565 0-.862-.282a1.04 1.04 0 0 1-.282-.743q0-.15.015-.297.029-.164.059-.297l1.01-5.23h-2.763l.163-.996h3.952l-1.292 6.686.341.134 2.927-2.526.698.654-1.352 1.248q-.519.49-.906.802-.37.312-.668.505a2.1 2.1 0 0 1-.55.268q-.238.075-.49.074m8.433 0q-.714 0-1.263-.238a2.6 2.6 0 0 1-.906-.654 3.1 3.1 0 0 1-.55-1.025 4.7 4.7 0 0 1-.178-1.322q0-1.1.312-1.976.312-.892.846-1.515a3.6 3.6 0 0 1 1.248-.951 3.6 3.6 0 0 1 1.545-.342q.61 0 1.055.149.46.149.788.4.327.239.52.58.207.342.312.713l-.996.387q-.222-.714-.668-.966-.431-.252-1.144-.253-.981 0-1.605.64-.609.638-.817 1.842l-.148.89q-.045.27-.06.417-.015.149-.015.297 0 .981.505 1.456.52.46 1.367.46.253 0 .505-.059a1.7 1.7 0 0 0 .565-.252q.312-.194.668-.565.357-.372.818-.995l.832.49q-.357.58-.728 1.04a4 4 0 0 1-.803.743 3 3 0 0 1-.921.446 3.4 3.4 0 0 1-1.084.163m9.502-9.553q-.475 0-.668-.178a.55.55 0 0 1-.193-.416q0-.09.014-.194t.045-.237a.8.8 0 0 1 .297-.52q.238-.193.684-.193.475 0 .668.178a.55.55 0 0 1 .193.416q0 .09-.015.193a3 3 0 0 1-.044.238.85.85 0 0 1-.297.535q-.238.177-.684.178m-1.01 9.553q-.565 0-.862-.282a1.04 1.04 0 0 1-.282-.743q0-.15.015-.297.03-.164.059-.297l1.011-5.23h-2.764l.164-.996h3.952l-1.293 6.686.342.134 2.927-2.526.698.654-1.352 1.248q-.52.49-.906.802a7 7 0 0 1-.669.505 2.1 2.1 0 0 1-.55.268q-.238.075-.49.074m7.586 0q-1.13 0-1.738-.743-.594-.743-.594-2.228 0-.772.178-1.65a6.1 6.1 0 0 1 .609-1.649 3.7 3.7 0 0 1 1.099-1.248q.684-.505 1.679-.505.833 0 1.382.386.55.372.802 1.13h.045l.223-1.338h1.159l-1.1 6.627h1.055l-.178 1.04h-.862q-.713 0-.981-.372-.252-.371-.163-.891l.089-.55h-.044q-.447.907-1.055 1.456-.609.535-1.605.535m.401-1.025q.476 0 .921-.193a2.5 2.5 0 0 0 .847-.654q.298-.341.505-.788.224-.445.312-.965l.283-1.694q.133-.802-.372-1.233-.49-.446-1.337-.446-1.07 0-1.694.669-.609.668-.787 1.738l-.178 1.07q-.03.208-.045.371-.015.15-.015.297 0 .863.387 1.352.4.476 1.173.476m8.597 1.025q-.61 0-.862-.297-.252-.296-.253-.758v-.238q.015-.133.045-.237l1.664-8.647h-2.704l.163-.996h3.908L157.901 64.8l.372.119 3.046-2.585.668.653-1.545 1.397q-.536.49-.921.802a7 7 0 0 1-.684.476 2 2 0 0 1-.52.222q-.222.06-.445.06" opacity=".6"/><path fill="#fff" fill-opacity=".2" fill-rule="evenodd" stroke="#c6cad0" stroke-linejoin="round" d="M26.318 25.058c-1.023 0-1.852.829-1.852 1.852v40.747h-3.704V26.91a5.556 5.556 0 0 1 5.556-5.556h49.624c2.476 0 3.715 2.992 1.965 4.742L47.343 56.66h8.61v-3.82h3.704v4.746a2.78 2.78 0 0 1-2.778 2.778h-13.24l-6.367 6.367H66.14V43.579h3.705v23.152a3.704 3.704 0 0 1-3.705 3.704H33.568l-6.483 6.483h47.389c1.023 0 1.852-.83 1.852-1.852V34.319h3.704v40.747a5.556 5.556 0 0 1-5.556 5.556H24.85c-2.476 0-3.715-2.993-1.965-4.743l30.448-30.448H44.84v3.705h-3.705v-4.63a2.78 2.78 0 0 1 2.779-2.779h13.123l6.483-6.482H34.653v23.151h-3.704V35.245a3.704 3.704 0 0 1 3.704-3.705h32.571l6.483-6.482z" clip-rule="evenodd"/><circle cx="238.717" cy="23.5" r="1" fill="#d9d9d9" transform="rotate(90 238.717 23.5)"/><circle cx="238.717" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 238.717 66.5)"/><circle cx="238.717" cy="49" r="1" fill="#d9d9d9" transform="rotate(90 238.717 49)"/><circle cx="217.717" cy="49" r="1" fill="#d9d9d9" transform="rotate(90 217.717 49)"/><circle cx="238.717" cy="70" r="1" fill="#d9d9d9" transform="rotate(90 238.717 70)"/><circle cx="238.717" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 238.717 52.5)"/><circle cx="235.217" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 235.217 52.5)"/><circle cx="235.217" cy="37.5" r="1" fill="#d9d9d9" transform="rotate(90 235.217 37.5)"/><circle cx="235.217" cy="23.5" r="1" fill="#d9d9d9" transform="rotate(90 235.217 23.5)"/><circle cx="235.217" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 235.217 66.5)"/><circle cx="231.717" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 231.717 52.5)"/><circle cx="231.717" cy="37.5" r="1" fill="#d9d9d9" transform="rotate(90 231.717 37.5)"/><circle cx="231.717" cy="23.5" r="1" fill="#d9d9d9" transform="rotate(90 231.717 23.5)"/><circle cx="231.717" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 231.717 66.5)"/><circle cx="228.217" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 228.217 52.5)"/><circle cx="228.217" cy="37.5" r="1" fill="#d9d9d9" transform="rotate(90 228.217 37.5)"/><circle cx="228.217" cy="23.5" r="1" fill="#d9d9d9" transform="rotate(90 228.217 23.5)"/><circle cx="228.217" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 228.217 66.5)"/><circle cx="224.717" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 224.717 52.5)"/><circle cx="224.717" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 224.717 66.5)"/><circle cx="221.217" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 221.217 52.5)"/><circle cx="221.217" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 221.217 66.5)"/><circle cx="217.717" cy="52.5" r="1" fill="#d9d9d9" transform="rotate(90 217.717 52.5)"/><circle cx="217.717" cy="30.5" r="1" fill="#d9d9d9" transform="rotate(90 217.717 30.5)"/><circle cx="217.717" cy="66.5" r="1" fill="#d9d9d9" transform="rotate(90 217.717 66.5)"/><circle cx="238.717" cy="73.5" r="1" fill="#d9d9d9" transform="rotate(90 238.717 73.5)"/><circle cx="228.217" cy="73.5" r="1" fill="#d9d9d9" transform="rotate(90 228.217 73.5)"/><circle cx="228.217" cy="70" r="1" fill="#d9d9d9" transform="rotate(90 228.217 70)"/><circle cx="238.717" cy="56" r="1" fill="#d9d9d9" transform="rotate(90 238.717 56)"/><circle cx="217.717" cy="56" r="1" fill="#d9d9d9" transform="rotate(90 217.717 56)"/><circle cx="221.217" cy="34" r="1" fill="#d9d9d9" transform="rotate(90 221.217 34)"/><circle cx="221.217" cy="26.5" r="1" fill="#d9d9d9" transform="rotate(90 221.217 26.5)"/><circle cx="235.717" cy="77" r="1" fill="#d9d9d9" transform="rotate(90 235.717 77)"/><circle cx="231.717" cy="77" r="1" fill="#d9d9d9" transform="rotate(90 231.717 77)"/><circle cx="238.717" cy="37.5" r="1" fill="#d9d9d9" transform="rotate(90 238.717 37.5)"/><circle cx="224.717" cy="37.5" r="1" fill="#d9d9d9" transform="rotate(90 224.717 37.5)"/><circle cx="224.717" cy="23.5" r="1" fill="#d9d9d9" transform="rotate(90 224.717 23.5)"/></svg>diff --git a/crates/agent_ui/src/agent_configuration.rs b/crates/agent_ui/src/agent_configuration.rsindex 65ddcafff48..6ab59856465 100644--- a/crates/agent_ui/src/agent_configuration.rs+++ b/crates/agent_ui/src/agent_configuration.rs@@ -506,6 +506,7 @@ impl AgentConfiguration {Plan::ZedProTrial => ("Pro Trial", Color::Accent, pro_chip_bg),Plan::ZedPro => ("Pro", Color::Accent, pro_chip_bg),Plan::ZedBusiness => ("Business", Color::Accent, pro_chip_bg),+ Plan::ZedVip => ("VIP", Color::Accent, pro_chip_bg),Plan::ZedStudent => ("Student", Color::Accent, pro_chip_bg),};diff --git a/crates/ai_onboarding/src/ai_onboarding.rs b/crates/ai_onboarding/src/ai_onboarding.rsindex 30b022843c3..0d31c11b26b 100644--- a/crates/ai_onboarding/src/ai_onboarding.rs+++ b/crates/ai_onboarding/src/ai_onboarding.rs@@ -115,6 +115,13 @@ impl ZedAiOnboarding {)}+ fn vip_stamp(cx: &App) -> impl IntoElement {+ div().absolute().bottom_1().right_1().child(+ Vector::new(VectorName::VipStamp, rems_from_px(156.), rems_from_px(60.))+ .color(Color::Custom(cx.theme().colors().text.alpha(0.8))),+ )+ }+fn student_stamp(cx: &App) -> impl IntoElement {div().absolute().bottom_1().right_1().child(Vector::new(@@ -332,6 +339,23 @@ impl ZedAiOnboarding {.into_any_element()}+ fn render_vip_plan_state(&self, cx: &mut App) -> AnyElement {+ v_flex()+ .w_full()+ .relative()+ .gap_1()+ .child(Self::vip_stamp(cx))+ .child(Headline::new("Welcome to Zed VIP"))+ .child(+ Label::new("Here's what you get:")+ .color(Color::Muted)+ .mb_2(),+ )+ .child(PlanDefinitions.vip_plan())+ .children(self.render_dismiss_button())+ .into_any_element()+ }+fn render_student_plan_state(&self, cx: &mut App) -> AnyElement {v_flex().w_full()@@ -359,6 +383,7 @@ impl RenderOnce for ZedAiOnboarding {Some(Plan::ZedProTrial) => self.render_trial_state(cx),Some(Plan::ZedPro) => self.render_pro_plan_state(cx),Some(Plan::ZedBusiness) => self.render_business_plan_state(cx),+ Some(Plan::ZedVip) => self.render_vip_plan_state(cx),Some(Plan::ZedStudent) => self.render_student_plan_state(cx),}} else {@@ -436,6 +461,10 @@ impl Component for ZedAiOnboarding {"Business Plan",onboarding(SignInStatus::SignedIn, Some(Plan::ZedBusiness), false),),+ single_example(+ "VIP Plan",+ onboarding(SignInStatus::SignedIn, Some(Plan::ZedVip), false),+ ),single_example("Student Plan",onboarding(SignInStatus::SignedIn, Some(Plan::ZedStudent), false),diff --git a/crates/ai_onboarding/src/plan_definitions.rs b/crates/ai_onboarding/src/plan_definitions.rsindex 2ac7aeab566..674c74ebb87 100644--- a/crates/ai_onboarding/src/plan_definitions.rs+++ b/crates/ai_onboarding/src/plan_definitions.rs@@ -45,6 +45,12 @@ impl PlanDefinitions {.child(ListBulletItem::new("Usage-based billing"))}+ pub fn vip_plan(&self) -> impl IntoElement {+ List::new()+ .child(ListBulletItem::new("Unlimited edit predictions"))+ .child(ListBulletItem::new("Tokens in the Zed agent"))+ }+pub fn student_plan(&self) -> impl IntoElement {List::new().child(ListBulletItem::new("Unlimited edit predictions"))diff --git a/crates/cloud_api_types/src/plan.rs b/crates/cloud_api_types/src/plan.rsindex 1f40d1ddb5f..964c7d859dd 100644--- a/crates/cloud_api_types/src/plan.rs+++ b/crates/cloud_api_types/src/plan.rs@@ -10,6 +10,7 @@ pub enum Plan {ZedPro,ZedProTrial,ZedBusiness,+ ZedVip,ZedStudent,}diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rsindex 07eb29f7253..52486b30ef1 100644--- a/crates/language_models/src/provider/cloud.rs+++ b/crates/language_models/src/provider/cloud.rs@@ -439,6 +439,11 @@ impl RenderOnce for ZedAiConfiguration {},true,),+ Some(Plan::ZedVip) => (+ "You have access to Zed's hosted models through your VIP subscription.",+ true,+ ),+Some(Plan::ZedFree) | None => (if self.eligible_for_trial {"Subscribe for access to Zed's hosted models. Start with a 14 day free trial."diff --git a/crates/onboarding/src/onboarding.rs b/crates/onboarding/src/onboarding.rsindex a0aa0b9811f..7ff5184f1b0 100644--- a/crates/onboarding/src/onboarding.rs+++ b/crates/onboarding/src/onboarding.rs@@ -237,6 +237,7 @@ impl Onboarding {Some(Plan::ZedPro) => "pro",Some(Plan::ZedProTrial) => "trial",Some(Plan::ZedBusiness) => "business",+ Some(Plan::ZedVip) => "vip",Some(Plan::ZedStudent) => "student",Some(Plan::ZedFree) | None => "free",}diff --git a/crates/title_bar/src/plan_chip.rs b/crates/title_bar/src/plan_chip.rsindex 237e507ed8e..cac4193299f 100644--- a/crates/title_bar/src/plan_chip.rs+++ b/crates/title_bar/src/plan_chip.rs@@ -34,6 +34,7 @@ impl RenderOnce for PlanChip {Plan::ZedProTrial => ("Pro Trial", Color::Accent, pro_chip_bg),Plan::ZedPro => ("Pro", Color::Accent, pro_chip_bg),Plan::ZedBusiness => ("Business", Color::Accent, pro_chip_bg),+ Plan::ZedVip => ("VIP", Color::Accent, pro_chip_bg),Plan::ZedStudent => ("Student", Color::Accent, pro_chip_bg),};diff --git a/crates/ui/src/components/image.rs b/crates/ui/src/components/image.rsindex 25b1a3003f4..e282c93c136 100644--- a/crates/ui/src/components/image.rs+++ b/crates/ui/src/components/image.rs@@ -14,6 +14,7 @@ use crate::traits::transformable::Transformable;#[strum(serialize_all = "snake_case")]pub enum VectorName {BusinessStamp,+ VipStamp,Grid,ProTrialStamp,ProUserStamp,