-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete: Improve suggest widget interop and add feature flag (#1158
) Fixes #808 This PR does a few distinct things: 1. It fixes a bug in the `completionMatchesPopupItem` behavior (where we reimplement when a completion is shown in VS Code). Turns out that sometimes, with the completion range being extended to start at the beginning of the line, we don't have the right text to compare it against. This fixes it. 2. Does some bookeeping about the previous call to the completion callback in `lastCompletionRequest`. We can use this to know if _only_ the suggest widget was changed and use this to complete from the suggest widget selection. This fixes the number 1 issue people had with #808 where low quality suggest widget selection caused a bad experience. Now, we only use the suggest widget if the user changed it _or_ it happens to match the completion we would do without considering this. This results in a much nicer UX IMO. 3. Adds a feature flag to enable this behavior https://github.com/sourcegraph/cody/assets/458591/fd640143-a09f-4567-983c-2f32d939589e (One time it appears to be buggy but you can see the backend returns `go` instead of `og` for `.log` 🙃 <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. -->
- Loading branch information
1 parent
b7b0f28
commit af56d18
Showing
5 changed files
with
128 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters