fix: correctly identify .roo folder in multi-root workspaces #6721
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes issue #6720 where Roo Code incorrectly identifies the .roo folder location in multi-root workspaces. When .roo is added as one of the workspace folders, it should be recognized directly rather than being treated as a subdirectory of another workspace folder.
Problem
In multi-root workspaces, when .roo is added as a workspace folder, Roo Code was still creating/looking for .roo as a subdirectory of the first workspace folder instead of recognizing the existing .roo workspace folder.
Solution
findWorkspaceWithRoo()utility function to detect when .roo is one of the workspace foldersgetProjectRooDirectoryForCwd()to return the .roo workspace folder path directly when it existsChanges
findWorkspaceWithRoo()and updatedgetProjectRooDirectoryForCwd()getProjectRooDirectoryForCwd()getProjectRooDirectoryForCwd()getProjectRooDirectoryForCwd()getProjectRooDirectoryForCwd()Testing
findWorkspaceWithRoo()functiongetProjectRooDirectoryForCwd()with multi-root workspace scenariosFixes #6720
Important
Fixes issue #6720 by correctly identifying
.roofolder in multi-root workspaces using a new utility function and updating relevant code paths..roofolder in multi-root workspaces.findWorkspaceWithRoo()to detect.rooas a workspace folder.getProjectRooDirectoryForCwd()to return.roofolder path directly if it exists.src/services/roo-config/index.ts: AddsfindWorkspaceWithRoo()and updatesgetProjectRooDirectoryForCwd().src/core/webview/webviewMessageHandler.ts,src/services/mcp/McpHub.ts,src/services/marketplace/SimpleInstaller.ts, andsrc/core/config/CustomModesManager.ts: Updated to usegetProjectRooDirectoryForCwd().findWorkspaceWithRoo()andgetProjectRooDirectoryForCwd()insrc/services/roo-config/__tests__/index.spec.ts.vscodeUtilsinsrc/extension.tsforroo-configwrapper.This description was created by
for 97e969a. You can customize this summary. It will automatically update as commits are pushed.