Commit f530a71
# fix: list_files recursive mode now works for dot directories (#5176)
* feat: add Issue Fixer Orchestrator mode
* The `list_files` tool with `recursive: true` was returning empty results when targeting directories that start with a dot (e.g., `.roo-memory`). This happened because the recursive mode was applying a blanket exclusion pattern `!**/.*//**` that excluded all files inside any hidden directory, even when the user explicitly requested to list that directory.
- `src/services/glob/list-files.ts`
- **Modified `buildRecursiveArgs()`**: Removed the problematic `!**/.*//**` exclusion pattern for hidden directories in recursive mode
- **Enhanced `listFilteredDirectories()`**: Added `isTargetDir` parameter to distinguish between explicitly targeted directories and discovered subdirectories
- **Updated `shouldIncludeDirectory()`**: Always include explicitly targeted directories (even if hidden), while still applying ignore rules to subdirectories found during traversal
- **Before**: `list_files` with `path: ".roo-memory"` and `recursive: true` → Empty results
- **After**: `list_files` with `path: ".roo-memory"` and `recursive: true` → Returns directory contents
- **Preserved**: Hidden subdirectories discovered during traversal are still filtered out
This maintains consistency with `.gitignore` and `.rooignore` mechanisms while ensuring explicitly targeted directories are always processed.
Fixes #2992
* Update src/services/glob/list-files.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: list_files recursive mode now works correctly for hidden directories
- Fixed ripgrep exclusion pattern from `!**/.*//**` to `!**/.*/**`
- Hidden directories (like .git/) now appear in recursive listings but their contents are excluded
- Contents of hidden directories are only shown when explicitly targeting that directory
- Prevents context window overflow from massive hidden directories like .git/
- Maintains consistent behavior: show directory exists, avoid flooding with contents
Fixes #2992
* fix(glob): show top-level hidden directories in list_files
- Modified list-files.ts to show hidden directories at top level
- Added test coverage for hidden directory visibility behavior
- Maintains existing functionality while fixing the .roo directory issue
Addresses PR #5176 feedback with simplified implementation
* fix(glob): include top-level files when recursively listing ignored directories
- Fix issue where files at root level of directories in DIRS_TO_IGNORE were excluded
- Add explicit include patterns (* and **/*) when targeting ignored directories
- Modify exclusion pattern to use !*/dir/** instead of !**/dir/** for target directory
- Add comprehensive test case for .roo/temp scenario
Fixes #5176
* fix(list-files): improve handling of explicitly targeted ignored directories
- Fixed issue where recursive listing would skip files in explicitly targeted directories that are in DIRS_TO_IGNORE
- When targeting a directory like 'temp' that's in the ignore list, we now skip adding exclusion patterns for it
- This ensures all files in the target directory are listed while still preventing recursion into nested directories with the same ignored name
- Also fixed path resolution to convert relative paths from ripgrep to absolute paths
* fix(tests): add missing mocks for list-files tests
* refactor: improve list-files implementation
- Remove redundant path resolution in listFilesWithRipgrep
- Convert CRITICAL_IGNORE_PATTERNS to Set for better performance
- Standardize error message format across all console.warn calls
* fix: update tests to handle cross-platform path resolution
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Daniel Riccio <[email protected]>1 parent 4d0550c commit f530a71
File tree
3 files changed
+584
-48
lines changed- src/services/glob
- __tests__
3 files changed
+584
-48
lines changed
0 commit comments