Draft: feat: Handle partial acceptance gracefully
Description
This MR attempts to resolve [VS Code] Code Suggestions Toolbar: Inability t... (#1170) by adding:
- A new
Middleware
to memoize returnedCompletionItem
and determine if the user is partially completing this or not. - A
composeMiddlewares
helper to compose multiple Language ServerMiddleware
s into one.
Screenshots (if appropriate):
partial_complete_middleware_demo
KNOW ISSUE: When the user is manually typing and matches the completion we don't run a new generation even though the old generation is no longer visible in the editor.