continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.85k stars 1.6k forks source link

[CON-281] Autocomplete sometimes doesn't display in VS Code #2524

Open sestinj opened 3 weeks ago

sestinj commented 3 weeks ago

Before submitting your bug report

Relevant environment info

- OS:*
- Continue version:*
- IDE version:VS Code

Description

VS Code sometimes does not show completions. There is some deterministic rule they use to decide this. I do not yet know what it is. We need to figure this out so that Continue can always display its completions.

Related issues:

To reproduce

A related observation:

seems like the completion have spaces or \t in it and it wont work because the mouse is not in the beginning of the line

Log output

No response

From SyncLinear.com | CON-281

Hi-Sun commented 6 days ago

I found that when the cursor is in the middle of a line of code, the model provides completion results and also correctly passes the values to vscode.InlineCompletionItem(), but the vscode is not displayed. The discovered pattern is that if the completed text contains content after the cursor, it can be displayed normally. For example, if our line of code is' if (res) {', we place the cursor after 'res' and enter a '.' , if the model provides' isSuccess() 'data, it will not be displayed. However, if the model provides' isSuccess(){' data, it will be displayed