plan_definitions.rs

 1use gpui::{IntoElement, ParentElement};
 2use ui::{List, ListBulletItem, prelude::*};
 3
 4/// Centralized definitions for Zed AI plans
 5pub struct PlanDefinitions;
 6
 7impl PlanDefinitions {
 8    pub const AI_DESCRIPTION: &'static str = "Zed offers a complete agentic experience, with robust editing and reviewing features to collaborate with AI.";
 9
10    pub fn free_plan(&self, _is_v2: bool) -> impl IntoElement {
11        List::new()
12            .child(ListBulletItem::new("50 prompts with Claude models"))
13            .child(ListBulletItem::new("2,000 accepted edit predictions"))
14    }
15
16    pub fn pro_trial(&self, _is_v2: bool, period: bool) -> impl IntoElement {
17        List::new()
18            .child(ListBulletItem::new("150 prompts with Claude models"))
19            .child(ListBulletItem::new(
20                "Unlimited edit predictions with Zeta, our open-source model",
21            ))
22            .when(period, |this| {
23                this.child(ListBulletItem::new(
24                    "Try it out for 14 days for free, no credit card required",
25                ))
26            })
27    }
28
29    pub fn pro_plan(&self, _is_v2: bool, price: bool) -> impl IntoElement {
30        List::new()
31            .child(ListBulletItem::new("500 prompts with Claude models"))
32            .child(ListBulletItem::new(
33                "Unlimited edit predictions with Zeta, our open-source model",
34            ))
35            .when(price, |this| {
36                this.child(ListBulletItem::new("$20 USD per month"))
37            })
38    }
39}