LSP-copilot icon indicating copy to clipboard operation
LSP-copilot copied to clipboard

Handle text changes when phantom completion is visible

Open timfjord opened this issue 3 years ago • 2 comments

Currently, when a phantom completion is displayed typing characters that match the beginning of the ghost text hides the completion and instantiates a new request.

This can be improved and the currently displayed ghost text can be updated without triggering a new request when typed characters match the begging of the ghost text

timfjord avatar Aug 17 '22 13:08 timfjord

I wonder if this could interfere with copilot returning more accurate results. Or different results.

Perhaps we should update the phantom and still request. And if the result doesn't meet the current completion we update.

TerminalFi avatar Aug 21 '22 19:08 TerminalFi

As far as I understand, in VSCode they don't do any requests.
At least the status indicator doesn't show anything when you type characters that match the beginning of the ghost text, but I think it is handled on the core level because they use the suggestion API(or what is the official name for it) and it works the same for other completions.

We can do some requests, but I am afraid the experience won't be smooth.
Plus, I don't think that we would see different results there

I would handle this in a follow-up maybe

timfjord avatar Aug 22 '22 07:08 timfjord