VsCodeExtension when listening to config changes is using an inconsistent system file path on windows.
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
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 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
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.
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!