Do not report same project type multiple times for same worktree (#32785)

Follow-up to: https://github.com/zed-industries/zed/pull/32769

Now that the project type identification telemetry can look for multiple
files in order to identify the project type, we need to make sure we
still only send a single event for a given worktree.

Also, simplifies project detection telemetry code

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-06-16 02:09:43 -04:00 committed by GitHub
parent 4733f188da
commit c72cdfd843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 48 additions and 65 deletions

View file

@ -2945,7 +2945,7 @@ impl Project {
WorktreeStoreEvent::WorktreeUpdatedEntries(worktree_id, changes) => {
self.client()
.telemetry()
.report_discovered_project_events(*worktree_id, changes);
.report_discovered_project_type_events(*worktree_id, changes);
cx.emit(Event::WorktreeUpdatedEntries(*worktree_id, changes.clone()))
}
WorktreeStoreEvent::WorktreeDeletedEntry(worktree_id, id) => {