Include prediction ID on edit prediction accepted/discarded events (#24480)

This PR updates the edit predictions to include the prediction ID
returned from the server on the resulting telemetry events indicating
whether the prediction was accepted or discarded.

The `prediction_id` on the events can then be correlated with the
`request_id` on the server-side prediction events.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-02-07 17:06:37 -05:00 committed by GitHub
parent ed5656813c
commit e17e838c07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 47 additions and 20 deletions

View file

@ -1,4 +1,4 @@
use gpui::{App, Context, Entity};
use gpui::{App, Context, Entity, SharedString};
use language::Buffer;
use project::Project;
use std::ops::Range;
@ -15,6 +15,8 @@ pub enum Direction {
#[derive(Clone)]
pub struct InlineCompletion {
/// The ID of the completion, if it has one.
pub id: Option<SharedString>,
pub edits: Vec<(Range<language::Anchor>, String)>,
pub edit_preview: Option<language::EditPreview>,
}