cloud_api_types: Add ZedVip variant to Plan (#59443)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions

This PR adds a new `ZedVip` variant to the `Plan` enum.

Closes CLO-881.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2026-06-18 16:51:36 -04:00 committed by GitHub
parent 080838387a
commit 69b602c797
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 46 additions and 0 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

View file

@ -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),
};

View file

@ -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),

View file

@ -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"))

View file

@ -10,6 +10,7 @@ pub enum Plan {
ZedPro,
ZedProTrial,
ZedBusiness,
ZedVip,
ZedStudent,
}

View file

@ -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."

View file

@ -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",
}

View file

@ -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),
};

View file

@ -14,6 +14,7 @@ use crate::traits::transformable::Transformable;
#[strum(serialize_all = "snake_case")]
pub enum VectorName {
BusinessStamp,
VipStamp,
Grid,
ProTrialStamp,
ProUserStamp,