diff --git a/crates/edit_prediction/src/edit_prediction.rs b/crates/edit_prediction/src/edit_prediction.rs index 8a61a4a8fe0cd7a3dd7cc081c051839faa43112f..4e5ef2c9134618d1cc67780dc24611fa5d459a71 100644 --- a/crates/edit_prediction/src/edit_prediction.rs +++ b/crates/edit_prediction/src/edit_prediction.rs @@ -1801,6 +1801,9 @@ impl EditPredictionStore { // Prefer predictions from buffer if project_state.current_prediction.is_some() { + log::debug!( + "edit_prediction: diagnostic refresh skipped, current prediction already exists" + ); return; } @@ -2262,7 +2265,13 @@ impl EditPredictionStore { cx.spawn(async move |this, cx| { let prediction = task.await?; - if prediction.is_none() && allow_jump && has_events { + // Only fall back to diagnostics-based prediction if we got a + // the model had nothing to suggest for the buffer + if prediction.is_none() + && allow_jump + && has_events + && !matches!(trigger, PredictEditsRequestTrigger::Diagnostics) + { this.update(cx, |this, cx| { this.refresh_prediction_from_diagnostics( project,