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 StreamingEditFileToolFeatureFlag;
51
52impl FeatureFlag for StreamingEditFileToolFeatureFlag {
53    const NAME: &'static str = "streaming-edit-file-tool";
54
55    fn enabled_for_staff() -> bool {
56        true
57    }
58}
59
60pub struct UpdatePlanToolFeatureFlag;
61
62impl FeatureFlag for UpdatePlanToolFeatureFlag {
63    const NAME: &'static str = "update-plan-tool";
64
65    fn enabled_for_staff() -> bool {
66        false
67    }
68}
69
70pub struct ProjectPanelUndoRedoFeatureFlag;
71
72impl FeatureFlag for ProjectPanelUndoRedoFeatureFlag {
73    const NAME: &'static str = "project-panel-undo-redo";
74
75    fn enabled_for_staff() -> bool {
76        false
77    }
78}