cleanup unused `customIgnorePatterns` (#1009)

This commit is contained in:
Anas H. Sulaiman 2025-06-13 11:49:48 -04:00 committed by GitHub
parent d25459d815
commit c886f08525
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 2 additions and 6 deletions

View File

@ -49,13 +49,11 @@ When you create a `.gemini/settings.json` file for project-specific settings, or
- **Description:** Controls git-aware file filtering behavior for @ commands and file discovery tools. - **Description:** Controls git-aware file filtering behavior for @ commands and file discovery tools.
- **Properties:** - **Properties:**
- **`respectGitIgnore`** (boolean, default: `true`): Whether to respect .gitignore patterns when discovering files. When enabled, git-ignored files (like `node_modules/`, `dist/`, `.env`) are automatically excluded from @ commands and file listing operations. - **`respectGitIgnore`** (boolean, default: `true`): Whether to respect .gitignore patterns when discovering files. When enabled, git-ignored files (like `node_modules/`, `dist/`, `.env`) are automatically excluded from @ commands and file listing operations.
- **`customIgnorePatterns`** (array of strings, default: `[]`): Additional patterns to ignore beyond git-ignored files. Useful for excluding specific directories or file types.
- **`allowBuildArtifacts`** (boolean, default: `false`): Whether to include build artifacts and generated files in file discovery operations. - **`allowBuildArtifacts`** (boolean, default: `false`): Whether to include build artifacts and generated files in file discovery operations.
- **Example:** - **Example:**
```json ```json
"fileFiltering": { "fileFiltering": {
"respectGitIgnore": true, "respectGitIgnore": true,
"customIgnorePatterns": ["temp/", "*.log"],
"allowBuildArtifacts": false "allowBuildArtifacts": false
} }
``` ```

View File

@ -92,7 +92,7 @@ describe('handleAtCommand', () => {
initialize: vi.fn(), initialize: vi.fn(),
shouldIgnoreFile: vi.fn(() => false), shouldIgnoreFile: vi.fn(() => false),
filterFiles: vi.fn((files) => files), filterFiles: vi.fn((files) => files),
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [], customIgnored: [] })), getIgnoreInfo: vi.fn(() => ({ gitIgnored: [] })),
isGitRepository: vi.fn(() => true), isGitRepository: vi.fn(() => true),
}; };
vi.mocked(FileDiscoveryService).mockImplementation( vi.mocked(FileDiscoveryService).mockImplementation(

View File

@ -41,7 +41,7 @@ describe('useCompletion git-aware filtering integration', () => {
initialize: vi.fn(), initialize: vi.fn(),
shouldIgnoreFile: vi.fn(), shouldIgnoreFile: vi.fn(),
filterFiles: vi.fn(), filterFiles: vi.fn(),
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [], customIgnored: [] })), getIgnoreInfo: vi.fn(() => ({ gitIgnored: [] })),
glob: vi.fn().mockResolvedValue([]), glob: vi.fn().mockResolvedValue([]),
}; };

View File

@ -26,7 +26,6 @@ describe('GlobTool', () => {
return service; return service;
}, },
getFileFilteringRespectGitIgnore: () => true, getFileFilteringRespectGitIgnore: () => true,
getFileFilteringCustomIgnorePatterns: () => [],
getFileFilteringAllowBuildArtifacts: () => false, getFileFilteringAllowBuildArtifacts: () => false,
} as Partial<Config> as Config; } as Partial<Config> as Config;

View File

@ -29,7 +29,6 @@ describe('ReadManyFilesTool', () => {
return service; return service;
}, },
getFileFilteringRespectGitIgnore: () => true, getFileFilteringRespectGitIgnore: () => true,
getFileFilteringCustomIgnorePatterns: () => [],
getFileFilteringAllowBuildArtifacts: () => false, getFileFilteringAllowBuildArtifacts: () => false,
getGeminiIgnorePatterns: () => ['**/foo.bar', 'foo.baz', 'foo.*'], getGeminiIgnorePatterns: () => ['**/foo.bar', 'foo.baz', 'foo.*'],
} as Partial<Config> as Config; } as Partial<Config> as Config;