zeta: Scope edit prediction event history to current project (#37595)

This change also causes Zeta to not do anything for editors that are not
associated with a project. In practice, this shouldn't affect any
behavior - those editors shouldn't have edit predictions anyway.

Release Notes:

- Edit Prediction: Requests no longer include recent edits from other
projects (other Zed windows).
This commit is contained in:
Michael Sloan
2025-09-05 01:15:59 +00:00
committed by GitHub
parent a660527036
commit fded3fbcdb
3 changed files with 150 additions and 260 deletions
@@ -207,9 +207,10 @@ fn assign_edit_prediction_provider(
if let Some(buffer) = &singleton_buffer
&& buffer.read(cx).file().is_some()
&& let Some(project) = editor.project()
{
zeta.update(cx, |zeta, cx| {
zeta.register_buffer(buffer, cx);
zeta.register_buffer(buffer, project, cx);
});
}