zeta: Send up diagnostics with prediction requests (#24384)
This PR makes it so we send up the diagnostic groups as additional data with the edit prediction request. We're not yet making use of them, but we are recording them so we can use them later (e.g., to train the model). Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
13089d7ec6
commit
09967ac3d0
16 changed files with 145 additions and 31 deletions
|
@ -14,3 +14,4 @@ path = "src/inline_completion.rs"
|
|||
[dependencies]
|
||||
gpui.workspace = true
|
||||
language.workspace = true
|
||||
project.workspace = true
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use gpui::{App, Context, Entity};
|
||||
use language::Buffer;
|
||||
use project::Project;
|
||||
use std::ops::Range;
|
||||
|
||||
// TODO: Find a better home for `Direction`.
|
||||
|
@ -58,6 +59,7 @@ pub trait InlineCompletionProvider: 'static + Sized {
|
|||
fn is_refreshing(&self) -> bool;
|
||||
fn refresh(
|
||||
&mut self,
|
||||
project: Option<Entity<Project>>,
|
||||
buffer: Entity<Buffer>,
|
||||
cursor_position: language::Anchor,
|
||||
debounce: bool,
|
||||
|
@ -101,6 +103,7 @@ pub trait InlineCompletionProviderHandle {
|
|||
fn is_refreshing(&self, cx: &App) -> bool;
|
||||
fn refresh(
|
||||
&self,
|
||||
project: Option<Entity<Project>>,
|
||||
buffer: Entity<Buffer>,
|
||||
cursor_position: language::Anchor,
|
||||
debounce: bool,
|
||||
|
@ -174,13 +177,14 @@ where
|
|||
|
||||
fn refresh(
|
||||
&self,
|
||||
project: Option<Entity<Project>>,
|
||||
buffer: Entity<Buffer>,
|
||||
cursor_position: language::Anchor,
|
||||
debounce: bool,
|
||||
cx: &mut App,
|
||||
) {
|
||||
self.update(cx, |this, cx| {
|
||||
this.refresh(buffer, cursor_position, debounce, cx)
|
||||
this.refresh(project, buffer, cursor_position, debounce, cx)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue