diff --git a/assets/images/vip_stamp.svg b/assets/images/vip_stamp.svg new file mode 100644 index 00000000000..896a6b39cb0 --- /dev/null +++ b/assets/images/vip_stamp.svg @@ -0,0 +1 @@ + diff --git a/crates/agent_ui/src/agent_configuration.rs b/crates/agent_ui/src/agent_configuration.rs index 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.rs index 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.rs index 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.rs index 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.rs index 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.rs index 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.rs index 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.rs index 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,