Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't make events for every rejected suggestion
Joseph Lyonsffd503951ba4
diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rsindex d11a78bb62a..5e3c78420d9 100644--- a/crates/client/src/telemetry.rs+++ b/crates/client/src/telemetry.rs@@ -87,7 +87,7 @@ pub enum ClickhouseEvent {copilot_enabled_for_language: bool,},Copilot {- suggestion_id: String,+ suggestion_id: Option<String>,suggestion_accepted: bool,file_extension: Option<String>,},diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex c51ed1a14a3..ff4c0846cb7 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -3098,7 +3098,7 @@ impl Editor {.update(cx, |copilot, cx| copilot.accept_completion(completion, cx)).detach_and_log_err(cx);- self.report_copilot_event(completion.uuid.clone(), true, cx)+ self.report_copilot_event(Some(completion.uuid.clone()), true, cx)}self.insert_with_autoindent_mode(&suggestion.text.to_string(), None, cx);cx.notify();@@ -3117,9 +3117,7 @@ impl Editor {}).detach_and_log_err(cx);- for completion in &self.copilot_state.completions {- self.report_copilot_event(completion.uuid.clone(), false, cx)- }+ self.report_copilot_event(None, false, cx)}self.display_map@@ -6884,7 +6882,7 @@ impl Editor {fn report_copilot_event(&self,- suggestion_id: String,+ suggestion_id: Option<String>,suggestion_accepted: bool,cx: &AppContext,) {