cloud_api_types: Add ZedVip variant to Plan (#59443)
This PR adds a new `ZedVip` variant to the `Plan` enum. Closes CLO-881. Release Notes: - N/A
This commit is contained in:
1 parent
7e882399f9
commit
57f456c68e
9 files changed
+46
No files matched your search
@@ -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.Line truncated
|
||||
|
After Width: | Height: | Size: 9.9 KiB |
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -10,6 +10,7 @@ pub enum Plan {
|
||||
ZedPro,
|
||||
ZedProTrial,
|
||||
ZedBusiness,
|
||||
ZedVip,
|
||||
ZedStudent,
|
||||
}
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use crate::traits::transformable::Transformable;
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum VectorName {
|
||||
BusinessStamp,
|
||||
VipStamp,
|
||||
Grid,
|
||||
ProTrialStamp,
|
||||
ProUserStamp,
|
||||
|
||||
Reference in new issue
Block a user