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) -> impl IntoElement {
11        List::new()
12            .child(ListBulletItem::new("2,000 accepted edit predictions"))
13            .child(ListBulletItem::new(
14                "Unlimited prompts with your AI API keys",
15            ))
16            .child(ListBulletItem::new(
17                "Unlimited use of external agents like Claude Code",
18            ))
19    }
20
21    pub fn pro_trial(&self, period: bool) -> impl IntoElement {
22        List::new()
23            .child(ListBulletItem::new("Unlimited edit predictions"))
24            .child(ListBulletItem::new("$20 of tokens"))
25            .when(period, |this| {
26                this.child(ListBulletItem::new(
27                    "Try it out for 14 days, no credit card required",
28                ))
29            })
30    }
31
32    pub fn pro_plan(&self) -> impl IntoElement {
33        List::new()
34            .child(ListBulletItem::new("Unlimited edit predictions"))
35            .child(ListBulletItem::new("$5 of tokens"))
36            .child(ListBulletItem::new("Usage-based billing beyond $5"))
37    }
38}