continue icon indicating copy to clipboard operation
continue copied to clipboard

Custom config.ts is not being loaded on Windows/IntelliJ

Open artyom-melnikov opened this issue 1 year ago • 3 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 10
- Continue: 0.0.64 (also tried 0.0.67)
- IDE: WebStorm / IntelliJ
- Model: -
- config.json:
  
-

Description

Trying to add some custom context providers via config.ts, but it does not have any effect.

Looking at the place where the loading happens it can be seen that there is no fallback, config is simply ignored if any error: https://github.com/continuedev/continue/blob/ee50108b64e63d4c500e7803d12f76ef155c33de/core/config/load.ts#L600

Google told me that the common way to fix this kind of error is to rename .js file to .cjs. (but maybe not, since the error is about file:// schema, not the extension)

To reproduce

  1. Modify config.ts:
export function modifyConfig(config: Config): Config {
  console.log('Test from config.ts');
  return config;
}
  1. Start extension on Windows/IntelliJ

Expected: Test from config.ts in the logs Got: Error loading config.ts

Log output

[2024-09-03T06:54:31] [info] Starting Continue core... 
[2024-09-03T06:54:31] Setup 
[2024-09-03T06:54:31] Core started 
[2024-09-03T06:54:32] 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:'

artyom-melnikov avatar Sep 03 '24 07:09 artyom-melnikov

Same issue here.

- OS: Windows 11 Pro
- Continue: 0.0.64
- IDE: IntelliJ 2024.2.1

Log

[2024-09-04T12:05:57] [info] Starting Continue core... 
[2024-09-04T12:05:57] Setup 
[2024-09-04T12:05:57] Core started 
[2024-09-04T12:05:58] 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:'

bigyoo avatar Sep 04 '24 12:09 bigyoo

Same issue. It seems like 3 weeks ago it was working.

unixshaman avatar Sep 09 '24 10:09 unixshaman

Same issue, custom slash commands were not loaded.

lucasloo avatar Sep 27 '24 03:09 lucasloo

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Mar 03 '25 04:03 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Mar 14 '25 02:03 github-actions[bot]

config.ts script isn't picked up by the plugin for me as well.

olekse avatar Jun 09 '25 09:06 olekse