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
16.44k stars 1.28k forks source link

Fix `config.ts` not loading in Jetbrains Editors #2407

Open LLukas22 opened 1 day ago

LLukas22 commented 1 day ago

Description

Fallback to a file:// url on windows if we failed to import the config.ts.

This fixes the following error when using Continue with jetbrains editors:

[info] Starting Continue core...
[2024-09-27T09:30:19] [info] Starting Continue core... 
[2024-09-27T09:30:19] Setup 
[2024-09-27T09:30:19] Core started 
[2024-09-27T09:30:20] Error loading config.ts:  Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
[2024-09-27T09:30:21] Indexing: 0.0% complete, elapsed time: 0s, NaN file/sec 

Checklist