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
21pub struct AcpBetaFeatureFlag;
22
23impl FeatureFlag for AcpBetaFeatureFlag {
24    const NAME: &'static str = "acp-beta";
25}
26
27pub struct ToolPermissionsFeatureFlag;
28
29impl FeatureFlag for ToolPermissionsFeatureFlag {
30    const NAME: &'static str = "tool-permissions";
31
32    fn enabled_for_staff() -> bool {
33        false
34    }
35}
36
37pub struct AgentSharingFeatureFlag;
38
39impl FeatureFlag for AgentSharingFeatureFlag {
40    const NAME: &'static str = "agent-sharing";
41}
42
43pub struct SubagentsFeatureFlag;
44
45impl FeatureFlag for SubagentsFeatureFlag {
46    const NAME: &'static str = "subagents";
47
48    fn enabled_for_staff() -> bool {
49        false
50    }
51}
52
53pub struct DiffReviewFeatureFlag;
54
55impl FeatureFlag for DiffReviewFeatureFlag {
56    const NAME: &'static str = "diff-review";
57
58    fn enabled_for_staff() -> bool {
59        false
60    }
61}
62
63/// Whether to use the OpenAI Responses API format when sending requests to Cloud.
64pub struct OpenAiResponsesApiFeatureFlag;
65
66impl FeatureFlag for OpenAiResponsesApiFeatureFlag {
67    const NAME: &'static str = "open-ai-responses-api";
68
69    fn enabled_for_staff() -> bool {
70        // Add yourself to the flag manually to test it out.
71        false
72    }
73}