Does this issue occur when all extensions are disabled?: No because the API needs to be implemented by an extension
VS Code Version: 1.96.0-insider and earlier
OS Version: Mac OS X 10.5
The InlineCompletionItemProvider.handleDidPartiallyAcceptCompletionItem method has 2 problems:
The acceptedLength depends on the trigger kind. Let's look at a scenario in the screenshot:
Here we see that a partial acceptance should apply the word unction which has 7 characters. If I accept partially using the suggestion widget the method gets invoked with 7. If I accept the suggestion partially using cmd + -> the method gets invoked with 14. This makes computation very hard.
The problem gets even harder because the acceptedLength and PartialAcceptInfo are not passed in a single method call. First the method with the length is invoked before you invoke the same method with the info object. Because of the first issue we need to know the trigger kind in order to compute the length correctly. I think PartialAcceptInfo should at least contain the acceptedLength to avoid implementors to cache the length across several method invocations.
Does this issue occur when all extensions are disabled?: No because the API needs to be implemented by an extension
The
InlineCompletionItemProvider.handleDidPartiallyAcceptCompletionItem
method has 2 problems:acceptedLength
depends on the trigger kind. Let's look at a scenario in the screenshot: Here we see that a partial acceptance should apply the wordunction
which has 7 characters. If I accept partially using the suggestion widget the method gets invoked with7
. If I accept the suggestion partially usingcmd + ->
the method gets invoked with14
. This makes computation very hard.acceptedLength
andPartialAcceptInfo
are not passed in a single method call. First the method with the length is invoked before you invoke the same method with the info object. Because of the first issue we need to know the trigger kind in order to compute the length correctly. I thinkPartialAcceptInfo
should at least contain theacceptedLength
to avoid implementors to cache the length across several method invocations.