zeta2: Allow provider to suggest edits in different files (#39110)

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
Bennet Bo Fenner
2025-09-29 15:48:58 +00:00
committed by GitHub
co-authored by Agus Zubiaga
parent b7f9fd7d74
commit cda48a3a1c
16 changed files with 689 additions and 318 deletions
@@ -4,7 +4,6 @@ use edit_prediction::{Direction, EditPrediction, EditPredictionProvider};
use futures::StreamExt as _;
use gpui::{App, Context, Entity, EntityId, Task};
use language::{Anchor, Buffer, BufferSnapshot};
use project::Project;
use std::{
ops::{AddAssign, Range},
path::Path,
@@ -94,7 +93,7 @@ fn completion_from_diff(
edits.push((edit_range, edit_text));
}
EditPrediction {
EditPrediction::Local {
id: None,
edits,
edit_preview: None,
@@ -132,7 +131,6 @@ impl EditPredictionProvider for SupermavenCompletionProvider {
fn refresh(
&mut self,
_project: Option<Entity<Project>>,
buffer_handle: Entity<Buffer>,
cursor_position: Anchor,
debounce: bool,