diff --git a/src/tools/search-codebase.ts b/src/tools/search-codebase.ts index 9e6081c..6a69e70 100644 --- a/src/tools/search-codebase.ts +++ b/src/tools/search-codebase.ts @@ -369,7 +369,9 @@ export async function handle( const candidates = new Map(); const addCandidate = (file: string, hop: 1 | 2, line?: number): void => { - if (Array.from(targetSet).some((t) => pathsMatch(t, file))) return; + for (const t of targetSet) { + if (pathsMatch(t, file)) return; + } const existing = candidates.get(file); if (existing) {