You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
hstaudacher
changed the title
InlineCompletionItemProvider.handleDidPartiallyAcceptCompletionItem accepted length is dependent on the triggerInlineCompletionItemProvider.handleDidPartiallyAcceptCompletionItem accepted length is dependent on the trigger
Nov 21, 2024
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 word
unction
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.The text was updated successfully, but these errors were encountered: