From 2e7c90bb537b5795fd55071e313612e1c291586b Mon Sep 17 00:00:00 2001 From: Hieu Pham Date: Thu, 15 Jan 2026 04:22:03 -0800 Subject: [PATCH] Fix delay in Copilot completion (#46885) 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. --- 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 759c2d9d53..767f4dbab3 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);