From 98f3b8441c2dea9404bd8ebf4cba47e8a9c862ff Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 13:05:02 +0000 Subject: [PATCH] Fix delay in Copilot completion (#46885) (cherry-pick to preview) (#46895) Cherry-pick of #46885 to preview ---- This PR fixes an issue when copilot takes 3s to complete. Right now, in copilot edit prediction, we issue requests to both the Next Edit Suggestion (NES) and the regular copilot inline completion endpoints. Whichever come back first will be shown. However, there is a bug where even if inline completion (which is usually much faster) comes back, we still wait for NES (which takes about 3s). This should address https://github.com/zed-industries/zed/issues/46389 and https://github.com/zed-industries/zed/issues/46880 Release notes: - Improved responsiveness of Copilot inline completions. Co-authored-by: Hieu Pham --- crates/copilot/src/copilot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rs index 759c2d9d53496b1f9a2313c5a9ea9e2ef8acbb1b..767f4dbab3066fe130d483092641e42b2eba9b08 100644 --- a/crates/copilot/src/copilot.rs +++ b/crates/copilot/src/copilot.rs @@ -1021,7 +1021,7 @@ impl Copilot { } inline = inline_request => { let completions = inline.into_response().ok().map(convert_inline).unwrap_or_default(); - if !completions.is_empty() && nes_result.is_some() { + if !completions.is_empty() { return Ok(completions); } inline_result = Some(completions);