-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete: Log the number of lines of an accepted completion and f…
…ix a bug (#53878) This PR does two things: - First we add the number of lines of an accepted completion. Cool - But then I noticed an oversight on my side. When you hover over the autocomplete preview, the VS Code backends sends a new completion request concurrently which our previous logic was using the _clear the number of open completion requests_. That means that whenever we accepted a solution _after that_, we would not log it because we've already GCed it. - To fix this, I’m now using the LRU cache to keep more completions around (which will also help later as we need to do more shenanigans with the logger) ## Test plan - Trigger a multi-line completion - Hover over the suggested completion - Select a different one with a lower number of lines - Accept the completion - Observe that the right number for `lines` is logged https://github.com/sourcegraph/sourcegraph/assets/458591/4618d890-2491-4ac8-880d-8eba5c3622ba <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles -->
- Loading branch information
1 parent
7b6c0c7
commit 46cb2cd
Showing
4 changed files
with
42 additions
and
18 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