fix: include global mode rules files in export #5835
+26
−9
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.
This PR fixes issue #5834 where global mode exports were not including rules files from the global
.roo
directory.Problem
The
exportModeWithRules
method inCustomModesManager.ts
was only checking for rules files in the workspace directory, even for global modes. This meant that when exporting a global mode, any rules files stored in the global~/.roo/rules-{mode-slug}/
directory were not included in the export.Solution
Modified the export logic to determine the correct rules directory based on the mode source:
getGlobalRooDirectory()/rules-{slug}/
workspacePath/.roo/rules-{slug}/
(existing behavior)Changes
exportModeWithRules
method to use mode source to determine rules directoryTesting
The fix ensures that:
Fixes #5834
Important
Fixes
exportModeWithRules
to include global mode rules files from the global.roo
directory in exports.exportModeWithRules
inCustomModesManager.ts
to include rules files from global.roo
directory for global modes.getGlobalRooDirectory()/rules-{slug}/
, project modes useworkspacePath/.roo/rules-{slug}/
.This description was created by
for 85bff1c. You can customize this summary. It will automatically update as commits are pushed.