-
-
Notifications
You must be signed in to change notification settings - Fork 484
Description
Vue - Official extension or vue-tsc version
3.0.5
VSCode version
1.103.0
Vue version
3.5.18
TypeScript version
6.0.0
System Info
package.json dependencies
{
"dependencies": {
"vue": "^3.5.18"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.1",
"@vue/tsconfig": "^0.7.0",
"typescript": "~5.8.3",
"vite": "^7.1.0",
"vue-tsc": "^3.0.5"
}
}
Steps to reproduce
- Clone sample repo: https://github.com/stweedie/slow-copilot
- install deps and open in vscode
- initially, opening a .vue / .ts file will look in the proper places (I put a log statement in a local copy of typescript):


What is expected?
copilot doesn't mess with the context of typescript
What is actually happening?
somehow, copilot (or volar, or typescript) are messing with the context. I've traced the originating code down to this code block (though this is not the culprit itself):
I am not sure what the root cause or trigger is, but normally the "getCurrentDirectory()" call on the languageServiceHost will return a path that is related to the project. After the corruption, getCurrentDirectory() returns the absolute URL of the vscode installation itself, which causes volar (via typescript's compiler API) to read that directory
Link to minimal reproduction
https://github.com/stweedie/slow-copilot
Any additional comments?
I have created an issue on the vscode tracker, but I figured you guys would have a better idea of how the "getVueCompilerOptions" is invoked.
Also, I would like to try to continue tracing this myself, but the best I could do was manually modifying the minified "typescript-plugin.js" file that is in the dist directory of the volar vscode plugin. Is there documentation and configuration available such that I can build the volar project and then have vscode reference that, rather than the published dist folder that comes from installing the extension?