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.9k stars 1.6k forks source link

Accepting diff breaks language server, need to reload file #528

Open pcuci opened 1 year ago

pcuci commented 1 year ago

Must reload file to restart language server so things like "Go to definition" keep working

image

Relevant environment info

- OS: Win 11
- Continue v0.0.409
- VSCode 1.82.3
- OpenAI GPT4
- TypeScript

To reproduce

Accept any /edit diff in TypeScript, clicking on any symbol doesn't work anymore, e.g.: can't go to its definition, it has become "dumb" plain text

Log output

No warnings/errors in the logs:

[2023-10-02 21:41:21,752] [DEBUG] Received GUI message {"messageType":"main_input","data":{"input":"/edit refactor to one bash line such that if the lockfile already exists we should wait, otherwise create the lockfile and not wait"}}

Warkaround

Closing and reopening the file gets things working again

image

sestinj commented 1 year ago

Does it seem like the language server completely dies (i.e. you also can't get it working in other files)? And is this only happening on occasion?

My first hypothesis is that such frequent updates to the file when we stream the diff are overloading the language server. Might be possible to disable it for that time to avoid if so