diff --git a/Claudable/ViewModels/FilterViewModel.cs b/Claudable/ViewModels/FilterViewModel.cs index 9aa2af4..1c7bb37 100644 --- a/Claudable/ViewModels/FilterViewModel.cs +++ b/Claudable/ViewModels/FilterViewModel.cs @@ -43,6 +43,10 @@ public FilterViewModel() Filters = new ObservableCollection(); AddFilterCommand = new RelayCommand(AddFilter, CanAddFilter); RemoveFilterCommand = new RelayCommand(RemoveFilter); + + // Add default filters for common folders to ignore + Filters.Add(new Filter(".*")); // Special filter for all dot folders + Filters.Add(new Filter("node_modules")); } private bool CanAddFilter() diff --git a/Claudable/ViewModels/MainViewModel.cs b/Claudable/ViewModels/MainViewModel.cs index 4d130cb..3cc3b70 100644 --- a/Claudable/ViewModels/MainViewModel.cs +++ b/Claudable/ViewModels/MainViewModel.cs @@ -383,6 +383,13 @@ private bool UpdateProjectStructureRecursive(ProjectFolder folder) private bool ShouldExcludeEntry(Filter filter, string filePath) { + // Special case for dot folders filter + if (filter.Value == ".*") + { + string fileName = Path.GetFileName(filePath); + return fileName.StartsWith("."); + } + var filterValue = filter.ShouldPrependProjectFolder ? Path.Combine(RootProjectFolder.FullPath, filter.Value) : filter.Value; diff --git a/README.md b/README.md index 5532617..5cb54d1 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,9 @@ The source code of Claudable is open and concise, allowing for easy review. If c - Real-time file system monitoring - Context menu integration with Windows Explorer - Drag-and-drop support -- Custom file filtering system +- Custom file filtering system with default filters for: + - Hidden folders (starting with a dot) + - Common dependency folders (node_modules) ### 3. Artifact Synchronization - Track local files as Claude artifacts @@ -155,8 +157,11 @@ The source code of Claudable is open and concise, allowing for easy review. If c ### Custom Filters 1. Go to Filter Settings tab 2. Enter file/folder patterns to exclude -3. Filters apply across all view modes -4. Settings persist between sessions +3. Default filters are applied automatically: + - All folders starting with a dot (like .git, .vs, etc.) + - The node_modules folder +4. Filters apply across all view modes +5. Settings persist between sessions ### Working with Artifacts - Double-click files to view content