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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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';