Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

acp: Enable feature flag for everyone (#36928)

Bennet Bo Fenner372b3c7af632
diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs
index 269aec33659..267c76d73fa 100644
--- a/crates/agent_ui/src/agent_panel.rs
+++ b/crates/agent_ui/src/agent_panel.rs
@@ -591,17 +591,6 @@ impl AgentPanel {
None
};
- // Wait for the Gemini/Native feature flag to be available.
- let client = workspace.read_with(cx, |workspace, _| workspace.client().clone())?;
- if !client.status().borrow().is_signed_out() {
- cx.update(|_, cx| {
- cx.wait_for_flag_or_timeout::<feature_flags::GeminiAndNativeFeatureFlag>(
- Duration::from_secs(2),
- )
- })?
- .await;
- }
-
let panel = workspace.update_in(cx, |workspace, window, cx| {
let panel = cx.new(|cx| {
Self::new(
diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index 422979c4297..f5f7fc42b35 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -98,6 +98,10 @@ impl FeatureFlag for GeminiAndNativeFeatureFlag {
// integration too, and we'd like to turn Gemini/Native on in new builds
// without enabling Claude Code in old builds.
const NAME: &'static str = "gemini-and-native";
+
+ fn enabled_for_all() -> bool {
+ true
+ }
}
pub struct ClaudeCodeFeatureFlag;
@@ -201,7 +205,7 @@ impl FeatureFlagAppExt for App {
fn has_flag<T: FeatureFlag>(&self) -> bool {
self.try_global::<FeatureFlags>()
.map(|flags| flags.has_flag::<T>())
- .unwrap_or(false)
+ .unwrap_or(T::enabled_for_all())
}
fn is_staff(&self) -> bool {