flags.rs

 1use crate::FeatureFlag;
 2
 3pub struct PredictEditsRateCompletionsFeatureFlag;
 4
 5impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
 6    const NAME: &'static str = "predict-edits-rate-completions";
 7}
 8
 9pub struct BillingV2FeatureFlag {}
10
11impl FeatureFlag for BillingV2FeatureFlag {
12    const NAME: &'static str = "billing-v2";
13}
14
15pub struct NotebookFeatureFlag;
16
17impl FeatureFlag for NotebookFeatureFlag {
18    const NAME: &'static str = "notebooks";
19}
20
21pub struct PanicFeatureFlag;
22
23impl FeatureFlag for PanicFeatureFlag {
24    const NAME: &'static str = "panic";
25}
26
27pub struct JjUiFeatureFlag {}
28
29impl FeatureFlag for JjUiFeatureFlag {
30    const NAME: &'static str = "jj-ui";
31}
32
33pub struct GeminiAndNativeFeatureFlag;
34
35impl FeatureFlag for GeminiAndNativeFeatureFlag {
36    // This was previously called "acp".
37    //
38    // We renamed it because existing builds used it to enable the Claude Code
39    // integration too, and we'd like to turn Gemini/Native on in new builds
40    // without enabling Claude Code in old builds.
41    const NAME: &'static str = "gemini-and-native";
42
43    fn enabled_for_all() -> bool {
44        true
45    }
46}
47
48pub struct ClaudeCodeFeatureFlag;
49
50impl FeatureFlag for ClaudeCodeFeatureFlag {
51    const NAME: &'static str = "claude-code";
52
53    fn enabled_for_all() -> bool {
54        true
55    }
56}