inline_completion_button: Put "Eager Preview Mode" menu entry behind a feature flag (#24734)

This PR puts the "Eager Preview Mode" menu entry behind a feature flag
rather than a staff flag.

Currently it defaults to `false` for staff so that it doesn't leak into
any marketing/launch materials.

Folks who want to see it can opt-in to the flag explicitly, for now.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-02-12 11:23:23 -05:00 committed by GitHub
parent 51092c4e31
commit 3f95d79fc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 10 deletions

View file

@ -69,6 +69,17 @@ impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
const NAME: &'static str = "predict-edits-rate-completions";
}
/// A feature flag that controls whether "non eager mode" (holding `alt` to preview) is publicized.
pub struct PredictEditsNonEagerModeFeatureFlag;
impl FeatureFlag for PredictEditsNonEagerModeFeatureFlag {
const NAME: &'static str = "predict-edits-non-eager-mode";
fn enabled_for_staff() -> bool {
// Don't show to staff so it doesn't leak into media for the launch.
false
}
}
pub struct GitUiFeatureFlag;
impl FeatureFlag for GitUiFeatureFlag {
const NAME: &'static str = "git-ui";