1+++
2repository_url = "git@github.com:zed-industries/zed"
3revision = "be5763632dccb33470ca233c36ccd9e5e790e3b2"
4+++
5
6This prediction requires the model to see the `project::Event` enum.
7
8## Edit History
9
10```diff
11--- a/crates/edit_prediction/src/edit_prediction.rs
12+++ b/crates/edit_prediction/src/edit_prediction.rs
13@@ -1035,7 +1035,7 @@
14 project_state.recent_paths.push_front(path);
15 }
16 }
17- project::Event::DiagnosticsUpdated { .. } => {
18+ project::Event::Disk { .. } => {
19 if cx.has_flag::<EditPredictionJumpsFeatureFlag>() {
20 self.refresh_prediction_from_diagnostics(
21 project,
22```
23
24## Cursor Position
25
26```crates/edit_prediction/src/edit_prediction.rs
27 {
28 project_state.recent_paths.remove(ix);
29 }
30 project_state.recent_paths.push_front(path);
31 }
32 }
33 project::Event::Disk { .. } => {
34 // ^[CURSOR_POSITION]
35 if cx.has_flag::<EditPredictionJumpsFeatureFlag>() {
36 self.refresh_prediction_from_diagnostics(
37 project,
38```
39
40## Expected Patch
41
42```diff
43--- a/crates/edit_prediction/src/edit_prediction.rs
44+++ b/crates/edit_prediction/src/edit_prediction.rs
45@@ -1032,10 +1032,10 @@
46 project_state.recent_paths.push_front(path);
47 }
48 }
49- project::Event::Disk { .. } => {
50+ project::Event::DiskBasedDiagnosticsFinished { .. } => {
51 if cx.has_flag::<EditPredictionJumpsFeatureFlag>() {
52 self.refresh_prediction_from_diagnostics(
53 project,
54```
55
56```diff
57--- a/crates/edit_prediction/src/edit_prediction.rs
58+++ b/crates/edit_prediction/src/edit_prediction.rs
59@@ -1032,10 +1032,10 @@
60 project_state.recent_paths.push_front(path);
61 }
62 }
63- project::Event::Disk { .. } => {
64+ project::Event::DiskBasedDiagnosticsStarted { .. } => {
65 if cx.has_flag::<EditPredictionJumpsFeatureFlag>() {
66 self.refresh_prediction_from_diagnostics(
67 project,
68```