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
19.05k stars 1.63k forks source link

In autocomplete, an error occurs when I enter open brackets #1038

Open sh2 opened 7 months ago

sh2 commented 7 months ago

Before submitting your bug report

Relevant environment info

- OS: Windows 10
- Continue: 0.9.96(preview)
- IDE: VSCode 1.87.2
- LLM: Ollama 0.1.28 on WSL2, starcoder2:15b

Description

When using autocomplete in JavaScript, an error occurs when I enter open brackets. Autocomplete itself is working in my environment ;-)

To reproduce

  1. Open a new folder and create a test1.js file.
  2. Enter the following string into the file
    console.log(

    Windows itself: popup_local

Remote SSH from Windows to Linux: popup

Log output

Windows Logs:
workbench.desktop.main.js:sourcemap:148 [Extension Host] Error generating autocompletion:  Error: Unable to resolve resource c:%5CUsers%5Ctaira%5Cdev%5Collama%5Ctest1.js
    at a.r (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:25870)
    at a.r (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:25856)
    at async C.acquire (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:37:3392)
    at async u.createModelReference (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:27205)

Remote SSH Logs:
console.ts:137 [Extension Host] Error generating autocompletion:  Error: Unable to read file '\taira\nfs\work\20240328_continue\ollama\test1.js' (Error: Unable to resolve nonexistent file '\taira\nfs\work\20240328_continue\ollama\test1.js')
    at n.F (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:653:19968)
    at n.D (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:653:19763)
    at async d.M (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2423:42865)
    at async d.readStream (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2423:42622)
    at async T.Cb (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:13526)
    at async T.resolve (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:11973)
    at async r.W (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2423:39016)
    at async a.r (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:25628)
    at async C.acquire (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:37:3392)
    at async u.createModelReference (vscode-file://vscode-app/c:/Users/taira/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2412:27205)
mariusgau commented 7 months ago

I can confirm the exact same error.

- OS: Windows 11
- Continue: 0.9.103(preview)
- IDE: VSCode 1.87.2
nwesterhausen commented 6 months ago

Happens for me as well, although I only got it to happen reliably with a brand new file, following the reproduce steps in the OP.

- OS: Windows 11
- Continue: v0.9.119 (pre-release)
- IDE: VSCode 1.89.0-insider
- LLM: Ollama 0.1.32(on windows) running starcoder2 for autocomplete

Open a new file in the folder. Put in text console.log( and then get "unable to resolve resource" for the current file.

wuchaojsyz commented 1 month ago

use vscode.Uri.file instead of vscode.Uri.parse?