diff --git a/documentation/docs/guides/file-management.md b/documentation/docs/guides/file-management.md index c05e44f69dbc..7c40cf50e81d 100644 --- a/documentation/docs/guides/file-management.md +++ b/documentation/docs/guides/file-management.md @@ -32,7 +32,8 @@ To close the search box without selecting a file, press `Esc` or click in the ch - **Fuzzy matching**: Intelligently matches partial text and prioritizes matches at word boundaries - **Highlighted results**: Shows matched characters highlighted in the search results - **Performance optimized**: Scans up to 5 directory levels deep with intelligent filtering -- **Auto-filtering**: Automatically excludes common directories like `.git`, `node_modules`, `__pycache__`, `.vscode`, `.idea`, `target`, `dist`, and `build` +- **Auto-filtering**: Automatically excludes common directories like `.git`, `node_modules`, `__pycache__`, `target`, `dist`, and `build` +- **Hidden folder support**: Includes important configuration directories like `.github`, `.vscode`, `.idea`, `.config`, and other CI/CD folders (`.circleci`, `.gitlab`, `.azure`, `.jenkins`) - **Cross-platform**: Searches from user directories (`/Users` on macOS, `C:\Users` on Windows, `/home` on Linux) - **Visual indicators**: Distinguishes between files and directories with clear icons diff --git a/ui/desktop/src/components/MentionPopover.tsx b/ui/desktop/src/components/MentionPopover.tsx index 0220ab617dd8..17a2ef01af63 100644 --- a/ui/desktop/src/components/MentionPopover.tsx +++ b/ui/desktop/src/components/MentionPopover.tsx @@ -158,8 +158,6 @@ const MentionPopover = forwardRef< '.hg', 'node_modules', '__pycache__', - '.vscode', - '.idea', 'target', 'dist', 'build', @@ -172,6 +170,17 @@ const MentionPopover = forwardRef< '.Trash', ]; + const allowedHiddenDirs = [ + '.github', + '.vscode', + '.idea', + '.config', + '.gitlab', + '.circleci', + '.azure', + '.jenkins', + ]; + // Don't skip as many directories at deeper levels to find more items const skipDirsAtDepth = depth > 2 ? ['.git', '.svn', '.hg', 'node_modules', '__pycache__'] : skipDirs; @@ -192,8 +201,13 @@ const MentionPopover = forwardRef< const fullPath = `${dirPath}/${item}`; const itemRelativePath = relativePath ? `${relativePath}/${item}` : item; - // Skip hidden items and common ignore patterns - if (item.startsWith('.') || skipDirsAtDepth.includes(item)) { + // Skip items in the skip list + if (skipDirsAtDepth.includes(item)) { + continue; + } + + // Skip hidden items except for allowed hidden directories + if (item.startsWith('.') && !allowedHiddenDirs.includes(item)) { continue; }