flags.rs

 1use crate::FeatureFlag;
 2
 3pub struct NotebookFeatureFlag;
 4
 5impl FeatureFlag for NotebookFeatureFlag {
 6    const NAME: &'static str = "notebooks";
 7}
 8
 9pub struct PanicFeatureFlag;
10
11impl FeatureFlag for PanicFeatureFlag {
12    const NAME: &'static str = "panic";
13}
14
15pub struct AgentV2FeatureFlag;
16
17impl FeatureFlag for AgentV2FeatureFlag {
18    const NAME: &'static str = "agent-v2";
19
20    fn enabled_for_staff() -> bool {
21        true
22    }
23}
24
25/// A feature flag for granting access to beta ACP features.
26///
27/// We reuse this feature flag for new betas, so don't delete it if it is not currently in use.
28pub struct AcpBetaFeatureFlag;
29
30impl FeatureFlag for AcpBetaFeatureFlag {
31    const NAME: &'static str = "acp-beta";
32}
33
34pub struct AgentSharingFeatureFlag;
35
36impl FeatureFlag for AgentSharingFeatureFlag {
37    const NAME: &'static str = "agent-sharing";
38}
39
40pub struct DiffReviewFeatureFlag;
41
42impl FeatureFlag for DiffReviewFeatureFlag {
43    const NAME: &'static str = "diff-review";
44
45    fn enabled_for_staff() -> bool {
46        false
47    }
48}
49
50pub struct GitGraphFeatureFlag;
51
52impl FeatureFlag for GitGraphFeatureFlag {
53    const NAME: &'static str = "git-graph";
54}
55
56pub struct StreamingEditFileToolFeatureFlag;
57
58impl FeatureFlag for StreamingEditFileToolFeatureFlag {
59    const NAME: &'static str = "streaming-edit-file-tool";
60
61    fn enabled_for_staff() -> bool {
62        true
63    }
64}
65
66pub struct UpdatePlanToolFeatureFlag;
67
68impl FeatureFlag for UpdatePlanToolFeatureFlag {
69    const NAME: &'static str = "update-plan-tool";
70
71    fn enabled_for_staff() -> bool {
72        false
73    }
74}
75
76pub struct ProjectPanelUndoRedoFeatureFlag;
77
78impl FeatureFlag for ProjectPanelUndoRedoFeatureFlag {
79    const NAME: &'static str = "project-panel-undo-redo";
80
81    fn enabled_for_staff() -> bool {
82        false
83    }
84}