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.

assistant_settings: Disable "Suggest Edits" in the `assistant2` feature flag (#27802)

Marshall Bowersddc102c7e071
diff --git a/crates/assistant_settings/src/assistant_settings.rs b/crates/assistant_settings/src/assistant_settings.rs
index f496311486d..63dac837c9c 100644
--- a/crates/assistant_settings/src/assistant_settings.rs
+++ b/crates/assistant_settings/src/assistant_settings.rs
@@ -5,7 +5,7 @@ use std::sync::Arc;
use ::open_ai::Model as OpenAiModel;
use anthropic::Model as AnthropicModel;
use deepseek::Model as DeepseekModel;
-use feature_flags::FeatureFlagAppExt;
+use feature_flags::{Assistant2FeatureFlag, FeatureFlagAppExt};
use gpui::{App, Pixels};
use indexmap::IndexMap;
use language_model::{CloudModel, LanguageModel};
@@ -88,6 +88,10 @@ pub struct AssistantSettings {
impl AssistantSettings {
pub fn are_live_diffs_enabled(&self, cx: &App) -> bool {
+ if cx.has_flag::<Assistant2FeatureFlag>() {
+ return false;
+ }
+
cx.is_staff() || self.enable_experimental_live_diffs
}
}