[VSCode Extension] Enable code generation with user selected text only (CVS-119131) #757
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable code generation with user selected text only (CVS-119131)
For inline code completion context is used and it is sent to the generation model as input.
Now this context/input is a text from the beginning of the file till current cursor position.
The idea is to add mechanism that will limit this context by sending to generation model only text explicitly selected by user.
It is an open question how to implement it from the UI/UX perspective, how it should look like and how user should interact with it.
Such feature and interaction examples can be found in other similar VSCode extensions (e.g. refact.ai, cody, etc.)