# Fix delay in Copilot completion \(\#46885\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4a2d1e3747c3714865dcf6711465973a1489e0dd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4a2d1e3747c3714865dcf6711465973a1489e0dd

Requested commit: 4a2d1e3747c3714865dcf6711465973a1489e0dd

Commit: 4a2d1e3747c3714865dcf6711465973a1489e0dd

Tree: d5a4ec8bda01b993d7dea9ea88803b34d70420dc

Author: Hieu Pham

Committer: GitHub

## Message

```
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.
```

## Parents

- [1321aa932ca5975e968023f698b8b610711d48be](https://git.cafe/gitcafe/zed/commit/1321aa932ca5975e968023f698b8b610711d48be?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4a2d1e3747c3714865dcf6711465973a1489e0dd?format=markdown)
