diff options
| author | Anas H. Sulaiman <[email protected]> | 2025-06-14 10:25:34 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-14 14:25:34 +0000 |
| commit | 4873fce7919b4d74cee183a91fa8a3af58aef993 (patch) | |
| tree | c08502c1e4592667160cb006528f868fd6283294 /packages/core/src/tools/ls.ts | |
| parent | e6d54771686b3f9537a5a05c9f9101afad3ffdcd (diff) | |
centralize file filtering in `FileDiscoveryService` (#1039)
Diffstat (limited to 'packages/core/src/tools/ls.ts')
| -rw-r--r-- | packages/core/src/tools/ls.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/core/src/tools/ls.ts b/packages/core/src/tools/ls.ts index 56a016aa..6e3869be 100644 --- a/packages/core/src/tools/ls.ts +++ b/packages/core/src/tools/ls.ts @@ -233,7 +233,7 @@ export class LSTool extends BaseTool<LSToolParams, ToolResult> { const respectGitIgnore = params.respect_git_ignore ?? this.config.getFileFilteringRespectGitIgnore(); - const fileDiscovery = await this.config.getFileService(); + const fileDiscovery = this.config.getFileService(); const entries: FileEntry[] = []; let gitIgnoredCount = 0; @@ -257,8 +257,7 @@ export class LSTool extends BaseTool<LSToolParams, ToolResult> { // Check if this file should be git-ignored (only in git repositories) if ( respectGitIgnore && - fileDiscovery.isGitRepository() && - fileDiscovery.shouldIgnoreFile(relativePath) + fileDiscovery.shouldGitIgnoreFile(relativePath) ) { gitIgnoredCount++; continue; |
