Avoid cloning ignored analytics notifications (#36020)

## What changed

- Pass server notifications to analytics tracking by reference.
- Clone only the notification variants that are recorded as analytics facts.

## Testing

- Add unit coverage that verifies a turn diff notification is enqueued and a command output delta notification is ignored.

GitOrigin-RevId: 2fa0711dbdcca33dce82c3ef78ee53a3f5a65bd9
This commit is contained in:
Charlie Marsh
2026-07-29 20:09:41 +00:00
committed by copyberry
parent a5082373f1
commit 88d6c2b2b4
3 changed files with 43 additions and 3 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ impl ThreadScopedOutgoingMessageSender {
pub(crate) async fn send_server_notification(&self, notification: ServerNotification) {
self.outgoing
.analytics_events_client
.track_notification(notification.clone());
.track_notification(&notification);
if self.connection_ids.is_empty() {
return;
}