continue icon indicating copy to clipboard operation
continue copied to clipboard

VsCodeExtension when listening to config changes is using an inconsistent system file path on windows.

Open al3x-lm opened this issue 1 year ago • 1 comments

Before submitting your bug report

Relevant environment info

- OS:Win
- Continue:0.8.50
- IDE:VSCODE
- Model:1.92.1
- config.json:

Description

The VsCodeExtension file is listening for config changes but it is not getting triggered on windows due to an inconsistency on the system path, one method returns a lower case drive letter on windows and the other returns an upper case drive letter.

filepath === getConfigJsonPath()
c:\Users\snappy\.continue\config.json === C:\Users\snappy\.continue\config.json

I temporarly used filepath.toLowerCase() === getConfigJsonPath().toLowerCase(). Is there a better way to handle the system filepath?

To reproduce

` vscode.workspace.onDidSaveTextDocument(async (event) => { // Listen for file changes in the workspace const filepath = event.uri.fsPath;

  console.log("some file saved");
  console.log("filepath");
  console.log(filepath);
  console.log("getConfigJsonPath()");
  console.log(getConfigJsonPath());

  if (filepath === getConfigJsonPath()) {
    console.log("config saved");`

this returns

`[Extension Host] some file saved
console.ts:137 [Extension Host] filepath
console.ts:137 [Extension Host] c:\Users\snappy\.continue\config.json
console.ts:137 [Extension Host] getConfigJsonPath()
console.ts:137 [Extension Host] C:\Users\snappy\.continue\config.json`

Log output

No response

al3x-lm avatar Sep 24 '24 21:09 al3x-lm

@al3x-lm Thanks for being thorough, this made it much easier to come to a good solution : )

In this commit we make sure that the check is case insensitive on windows: https://github.com/continuedev/continue/commit/a3fa8653b92e0f54b1ede875ab07b5ffeeea9aa9

I'll leave the issue open until we've had the chance to release in pre-release and validate the fix

sestinj avatar Sep 29 '24 21:09 sestinj

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 15 '25 02:03 github-actions[bot]