Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
zeta: Fix data collection display on the status bar menu (#24177)
Danilo Leal386cfacb25aa
diff --git a/crates/inline_completion_button/src/inline_completion_button.rs b/crates/inline_completion_button/src/inline_completion_button.rsindex 55bf2f31782..20cad6ec0b1 100644--- a/crates/inline_completion_button/src/inline_completion_button.rs+++ b/crates/inline_completion_button/src/inline_completion_button.rs@@ -429,7 +429,7 @@ impl InlineCompletionButton {menu = menu.separator().header("Help Improve The Model")- .header("For OSS Projects Only");+ .header("Valid Only For OSS Projects");menu = menu.item(// TODO: We want to add something later that communicates whether// the current project is open-source.diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rsindex f2b388486e2..1611614ca3a 100644--- a/crates/zeta/src/zeta.rs+++ b/crates/zeta/src/zeta.rs@@ -1359,6 +1359,12 @@ impl ProviderDataCollection {}}+ pub fn user_data_collection_choice(&self, cx: &App) -> bool {+ self.choice+ .as_ref()+ .map_or(false, |choice| choice.read(cx).is_enabled())+ }+pub fn data_collection_permission(&self, cx: &App) -> bool {self.choice.as_ref()@@ -1432,7 +1438,10 @@ impl inline_completion::InlineCompletionProvider for ZetaInlineCompletionProvide}fn data_collection_state(&self, cx: &App) -> DataCollectionState {- if self.provider_data_collection.data_collection_permission(cx) {+ if self+ .provider_data_collection+ .user_data_collection_choice(cx)+ {DataCollectionState::Enabled} else {DataCollectionState::Disabled