huggingface/llm-vscode

[BUG] Completion doesn't override parentheses

DanielAdari opened this issue · 8 comments

Extension: 0.1.6
LLM LS: 0.4.0

Usually when you declare a function or other variables, the editor adds a closing bracket.

For example:

def foo(<CURSOR>)

When you type (, the editor adds ) automatically. After accepting the completion, the output looks something like:

def foo(bar: str):)

Maybe we should use the bracket as a stop token, but that would mean the completion would be one line only for these cases.

Note: I'm using a local model

Yes this issue is a pain, I think post-processing would be best though it might be complicated given there are so many edge cases.

Not sure if this issue should live in https://github.com/huggingface/llm-ls.

What do you mean by post processing?

Should the extension get the completion from LLM LS and then, according to the editor's state, accept the completion with the right characters removed?

Or should the extension propagate more metadata back to the LLM LS so he would do the heavy lifting in an editor generic way?

This issue is stale because it has been open for 30 days with no activity.

Still relevant 👆🏻

This issue is stale because it has been open for 30 days with no activity.

Super duper relevant! 😀

Don't worry about the staleness bot, I'll come back to this when I have more time!

This issue is stale because it has been open for 30 days with no activity.