agent: Add telemetry for checkpoint action usage (#65326)

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>

## Summary

What problem does this solve, how, and why does this change matter?
Use "Closes #123" for each issue resolved.
Include artifacts produced when testing: before/after screenshots, GIFs,
videos, benchmarks.

## Testing

Manually test your changes; report results, mention platforms if
relevant.
How can reviewers test this easily? Include setup and steps.

## Self-review

- [ ] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- Added telemetry for usage of checkpointing feature in the agent panel.
This telemetry is opt-in and has no effect with telemetry disabled.

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
Piotr Osiewicz 2026-10-08 10:36:43 +00:00 • committed by GitHub
parent 67b41bf976
commit f1a10a5227
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3428,6 +3428,11 @@ impl ThreadView {
pub fn restore_checkpoint(&mut self, client_id: &ClientUserMessageId, cx: &mut Context<Self>) {
self.thread
.update(cx, |thread, cx| {
telemetry::event!(
"Agent Checkpoint Restored",
agent = thread.connection().telemetry_id(),
session = thread.session_id().clone(),
);
thread.restore_checkpoint(client_id.clone(), cx)
})
.detach_and_log_err(cx);