continue icon indicating copy to clipboard operation
continue copied to clipboard

Draft: autocompletion rework and granite completion fixes

Open halfline opened this issue 5 months ago • 5 comments

This is a draft merge request that reworks how autocomplete behaves with regard to the intellisense suggestion widget.

The core idea is that the LLM is the smart thing, so it should be informing the suggestion widget, not the other way around. The top item in the suggestion widget is frequently something the user doesn't want, so including it in autocomplete can make the autocomplete text go off in the wrong direction.

If we defer showing the suggestion widget until the LLM has come back, then we can get a good inline complete and still show the suggestion pop up, but with the LLM suggested menu item preselected.

We can also simplify the completion item range calculation, by doing this, because we're only ever inserting new code, not replacing existing code.

This is a draft pull request, because I've only tested it with granite models at the moment, and there are some hacks for granite models at end of the patchset.

Once I do some more testing (with e.g. qwen2.5-coder or some other non-granite model), and drop some of the bottom commits, I'll drop draft status.

halfline avatar May 06 '25 15:05 halfline