centralize file filtering in FileDiscoveryService (#1039)

This commit is contained in:
Anas H. Sulaiman
2025-06-14 10:25:34 -04:00
committed by GitHub
parent e6d5477168
commit 4873fce791
27 changed files with 221 additions and 567 deletions

View File

@@ -135,7 +135,7 @@ export async function handleAtCommand({
addItem({ type: 'user', text: query }, userMessageTimestamp);
// Get centralized file discovery service
const fileDiscovery = await config.getFileService();
const fileDiscovery = config.getFileService();
const respectGitIgnore = config.getFileFilteringRespectGitIgnore();
const pathSpecsToRead: string[] = [];
@@ -182,7 +182,7 @@ export async function handleAtCommand({
}
// Check if path should be ignored by git
if (fileDiscovery.shouldIgnoreFile(pathName)) {
if (fileDiscovery.shouldGitIgnoreFile(pathName)) {
const reason = respectGitIgnore
? 'git-ignored and will be skipped'
: 'ignored by custom patterns';