mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Don't make events for every rejected suggestion
This commit is contained in:
parent
afe75e8cbd
commit
ffd503951b
@ -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>,
|
||||
},
|
||||
|
@ -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,
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user