summaryrefslogtreecommitdiff
path: root/packages/core/src/utils/bfsFileSearch.ts
diff options
context:
space:
mode:
authorPyush Sinha <[email protected]>2025-07-20 00:55:33 -0700
committerGitHub <[email protected]>2025-07-20 07:55:33 +0000
commita01b1219a3e814c370f6827b81c9118f2cbc7a64 (patch)
treeb4b406518a04f3cc4fc054b3b86612bf9b1ade51 /packages/core/src/utils/bfsFileSearch.ts
parent76b935d598b895240b9bc2b182eb9f1e1b24be0d (diff)
feat: full implementation for .geminiignore in settings and respective tool calls (#3727)
Diffstat (limited to 'packages/core/src/utils/bfsFileSearch.ts')
-rw-r--r--packages/core/src/utils/bfsFileSearch.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/core/src/utils/bfsFileSearch.ts b/packages/core/src/utils/bfsFileSearch.ts
index e552f520..790521e0 100644
--- a/packages/core/src/utils/bfsFileSearch.ts
+++ b/packages/core/src/utils/bfsFileSearch.ts
@@ -8,7 +8,7 @@ import * as fs from 'fs/promises';
import * as path from 'path';
import { Dirent } from 'fs';
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
-
+import { FileFilteringOptions } from '../config/config.js';
// Simple console logger for now.
// TODO: Integrate with a more robust server-side logger.
const logger = {
@@ -22,6 +22,7 @@ interface BfsFileSearchOptions {
maxDirs?: number;
debug?: boolean;
fileService?: FileDiscoveryService;
+ fileFilteringOptions?: FileFilteringOptions;
}
/**
@@ -69,7 +70,13 @@ export async function bfsFileSearch(
for (const entry of entries) {
const fullPath = path.join(currentDir, entry.name);
- if (fileService?.shouldGitIgnoreFile(fullPath)) {
+ if (
+ fileService?.shouldIgnoreFile(fullPath, {
+ respectGitIgnore: options.fileFilteringOptions?.respectGitIgnore,
+ respectGeminiIgnore:
+ options.fileFilteringOptions?.respectGeminiIgnore,
+ })
+ ) {
continue;
}