Skip to content

# Extend the partial accept handler#241356

Open
marrej wants to merge 6 commits intomicrosoft:mainfrom
marrej:extend-partial-accept-handler
Open

# Extend the partial accept handler#241356
marrej wants to merge 6 commits intomicrosoft:mainfrom
marrej:extend-partial-accept-handler

Conversation

@marrej
Copy link
Contributor

@marrej marrej commented Feb 20, 2025

The main problem with the current partial acceptance is that it provides the full length of the original insertion, rather than just the added content to the editor. Having access to the addedLength would allow completion providers to truthfully report the change in characters.

The versionBeforeAcceptance can be used by the extensions to truthfully report the state sequence and changes

ReplacementRange allows to better track the original intended edit at the version of acceptance.

closes #195369

@isidorn isidorn assigned hediet and unassigned isidorn Feb 20, 2025
@hediet
Copy link
Member

hediet commented Feb 24, 2025

Thanks for the PR! I believe the properties shouldn't be optional though. If data is provided, it should always be provided, otherwise every consumer will wonder about the cases in which they are not available.

@marrej
Copy link
Contributor Author

marrej commented Feb 24, 2025

Fair point. Let me modify it so the data can be required. Thanks!

@marrej
Copy link
Contributor Author

marrej commented Feb 28, 2025

Hey @hediet I made the properties required and updated it for the suggest completion. Let me know if there is anything else you'd like to handle :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InlineCompletion PartialAccept additional info

3 participants