Add edit events for assistant panel and inline assist (#20418)

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2024-11-08 10:37:10 -05:00 committed by GitHub
parent 01e12c0d3c
commit 7142d3777f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 47 additions and 21 deletions

View file

@ -1084,7 +1084,21 @@ impl AssistantPanel {
self.show_updated_summary(&context_editor, cx);
cx.notify()
}
EditorEvent::Edited { .. } => cx.emit(AssistantPanelEvent::ContextEdited),
EditorEvent::Edited { .. } => {
self.workspace
.update(cx, |workspace, cx| {
let is_via_ssh = workspace
.project()
.update(cx, |project, _| project.is_via_ssh());
workspace
.client()
.telemetry()
.log_edit_event("assistant panel", is_via_ssh);
})
.log_err();
cx.emit(AssistantPanelEvent::ContextEdited)
}
_ => {}
}
}