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.25k stars 1.66k forks source link

Extension Hanging on Window (Re)Load #1370

Open jpaveg opened 5 months ago

jpaveg commented 5 months ago

Before submitting your bug report

Relevant environment info

- OS: W11 23H2
- Continue: 0.9.144
- IDE: VSCode 1.89.1

Description

When connecting to WSL folders, Continue hangs for about 15 seconds. After that time I am able to select a model from the dropdown, and the console is littered with over a dozen of the error listed below.

Seems to be an issue with the path - instead of looking for the .prompts folder in the continue folder, it's looking for it within my project folder.

To reproduce

Connect to WSL in VSCode

Log output

 ERR [Extension Host] EntryNotFound (FileSystemError): Unable to resolve nonexistent file 'vscode-remote://wsl/home/user/code/project/.prompts'
    at y.e (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:6797)
    at Object.readDirectory (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:4081)
    at async traverseDirectory (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371185:17)
    at async _VsCodeIdeUtils.getDirectoryContents (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371482:26)
    at async VsCodeIde.listWorkspaceContents (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371871:18)
    at async getPromptFiles (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346405:19)
    at async Promise.all (index 0)
    at async serializedToIntermediateConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346562:24)
    at async loadFullConfigNode (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346833:22)
    at async ConfigHandler.loadConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346958:28)
    at async ConfigHandler.getSerializedConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346941:30)
    at async c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:372809:20
    at async a.value (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:369423:32)
console.ts:137 [Extension Host] EntryNotFound (FileSystemError): Unable to resolve nonexistent file 'vscode-remote://wsl/home/user/code/project/.prompts'
    at y.e (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:6797)
    at Object.readDirectory (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:4081)
    at async traverseDirectory (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371185:17)
    at async _VsCodeIdeUtils.getDirectoryContents (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371482:26)
    at async VsCodeIde.listWorkspaceContents (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:371871:18)
    at async getPromptFiles (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346405:19)
    at async Promise.all (index 0)
    at async serializedToIntermediateConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346562:24)
    at async loadFullConfigNode (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346833:22)
    at async ConfigHandler.loadConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346958:28)
    at async ConfigHandler.getSerializedConfig (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:346941:30)
    at async c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:372809:20
    at async a.value (c:\Users\user\.vscode\extensions\continue.continue-0.9.144-win32-x64\out\extension.js:369423:32)
meanderix commented 5 months ago

I'm seeing a similar error in WSL (the path should really be /c/Users/matti/.continue/config.json):


[Extension Host] Error reading file EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '/Users/matti/.continue/config.json'
    at P.e (c:\Users\matti\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:6836)
    at Object.stat (c:\Users\matti\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:152:3894)
    at async _VsCodeIdeUtils.readFile (c:\Users\matti\.vscode\extensions\continue.continue-0.9.156-win32-x64\out\extension.js:366888:29)
    at async VsCodeIde.readFile (c:\Users\matti\.vscode\extensions\continue.continue-0.9.156-win32-x64\out\extension.js:367434:16)
    at async getTabCompletion (c:\Users\matti\.vscode\extensions\continue.continue-0.9.156-win32-x64\out\extension.js:41536:52)
    at async _CompletionProvider.provideInlineCompletionItems (c:\Users\matti\.vscode\extensions\continue.continue-0.9.156-win32-x64\out\extension.js:41958:27)
    at async ContinueCompletionProvider.provideInlineCompletionItems (c:\Users\matti\.vscode\extensions\continue.continue-0.9.156-win32-x64\out\extension.js:359803:27)
    at async Q.provideInlineCompletions (c:\Users\matti\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:118317)```