cleanup unused `customIgnorePatterns` (#1009)
This commit is contained in:
parent
d25459d815
commit
c886f08525
|
@ -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.
|
||||
- **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.
|
||||
- **`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.
|
||||
- **Example:**
|
||||
```json
|
||||
"fileFiltering": {
|
||||
"respectGitIgnore": true,
|
||||
"customIgnorePatterns": ["temp/", "*.log"],
|
||||
"allowBuildArtifacts": false
|
||||
}
|
||||
```
|
||||
|
|
|
@ -92,7 +92,7 @@ describe('handleAtCommand', () => {
|
|||
initialize: vi.fn(),
|
||||
shouldIgnoreFile: vi.fn(() => false),
|
||||
filterFiles: vi.fn((files) => files),
|
||||
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [], customIgnored: [] })),
|
||||
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [] })),
|
||||
isGitRepository: vi.fn(() => true),
|
||||
};
|
||||
vi.mocked(FileDiscoveryService).mockImplementation(
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('useCompletion git-aware filtering integration', () => {
|
|||
initialize: vi.fn(),
|
||||
shouldIgnoreFile: vi.fn(),
|
||||
filterFiles: vi.fn(),
|
||||
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [], customIgnored: [] })),
|
||||
getIgnoreInfo: vi.fn(() => ({ gitIgnored: [] })),
|
||||
glob: vi.fn().mockResolvedValue([]),
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('GlobTool', () => {
|
|||
return service;
|
||||
},
|
||||
getFileFilteringRespectGitIgnore: () => true,
|
||||
getFileFilteringCustomIgnorePatterns: () => [],
|
||||
getFileFilteringAllowBuildArtifacts: () => false,
|
||||
} as Partial<Config> as Config;
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ describe('ReadManyFilesTool', () => {
|
|||
return service;
|
||||
},
|
||||
getFileFilteringRespectGitIgnore: () => true,
|
||||
getFileFilteringCustomIgnorePatterns: () => [],
|
||||
getFileFilteringAllowBuildArtifacts: () => false,
|
||||
getGeminiIgnorePatterns: () => ['**/foo.bar', 'foo.baz', 'foo.*'],
|
||||
} as Partial<Config> as Config;
|
||||
|
|
Loading…
Reference in New Issue