sourcegraph / cody

AI that knows your entire codebase
https://cody.dev
Apache License 2.0
2.22k stars 213 forks source link

Autocomplete: keep the last candidate in cache if it is not applicable #4717

Open valerybugakov opened 2 days ago

valerybugakov commented 2 days ago

Test plan

  1. Generate a single-line suggestion by adding a new line with some prefix.
  2. Delete this line, reverting the document to the previous state.
  3. Go to another line in the document below with less indentation and generate another suggestion.
  4. Generate the first suggestion again by returning to the first step.
  5. Ensure that it comes from the cache.