diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index d11a78bb62..5e3c78420d 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, suggestion_accepted: bool, file_extension: Option, }, diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index c51ed1a14a..ff4c0846cb 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, suggestion_accepted: bool, cx: &AppContext, ) {