Replace vscode.workspace.workspaceFolders with host bridge getWorkspacePaths
Description
-
Use the host bridge in utils/path.ts Update utils/path.ts to use the host bridge to get the workspace folders, instead of the vscode SDK. Update callers to use await as the functions are now async.
-
Replace vscode workspaceFolders in WorkspaceTracker Make the cwd an instance property because await cannot be used at the top level.
-
Use the host bridge getWorkspacePaths in FileContextTracker Replace the vscode SDK getWorkspaceFolders with the util function getCwd (this is already switched to the host bridge).
There are seven more non-test files using workspaceFolders that need to be switched over.
Test Procedure
Tested manually in the vscode extension host
Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] ♻️ Refactor Changes
- [ ] 💅 Cosmetic Changes
- [ ] 📚 Documentation update
- [ ] 🏃 Workflow Changes
Pre-flight Checklist
- [x] Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
- [x] Tests are passing (
npm test) and code is formatted and linted (npm run format && npm run lint) - [ ] I have created a changeset using
npm run changeset(required for user-facing changes) - [x] I have reviewed contributor guidelines
Screenshots
NA
Additional Notes
NA
⚠️ No Changeset found
Latest commit: 47cdf2c8e08f278d21dfaf99399375a951b2c394
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
There seem to be some problems with this, but I love the direction -- I had done a hacky thing to make cwd work in my version of this, but this seems better. Let's sync up about the UX of creating a new task with a workspace specified, which I have done
There seem to be some problems with this, but I love the direction -- I had done a hacky thing to make cwd work in my version of this, but this seems better. Let's sync up about the UX of creating a new task with a workspace specified, which I have done
It doesn't work without the other PR that is not submitted. I was trying avoid needing 4 approvals on this PR, but just submitting them separately won't work either because this one will need a rebase.
Coverage Report
Extension Coverage
Base branch: 46%
PR branch: 46%
✅ Coverage increased or remained the same
Webview Coverage
Base branch: 13%
PR branch: 13%
✅ Coverage increased or remained the same
Overall Assessment
✅ Test coverage has been maintained or improved
Last updated: 2025-06-27T18:48:43.509675