summaryrefslogtreecommitdiff
path: root/packages/core/src/utils/filesearch/crawlCache.ts
diff options
context:
space:
mode:
authorBryant Chandler <[email protected]>2025-08-05 23:33:27 -0700
committerGitHub <[email protected]>2025-08-06 06:33:27 +0000
commitaab850668c99e1c39a55036069d9f4b06ca458f4 (patch)
treef134a01a96c18f4185536503c91033454b31e1ec /packages/core/src/utils/filesearch/crawlCache.ts
parent8b1d5a2e3c84e488d90184e7da856cf1130ea5ef (diff)
feat(file-search): Add support for non-recursive file search (#5648)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/core/src/utils/filesearch/crawlCache.ts')
-rw-r--r--packages/core/src/utils/filesearch/crawlCache.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/core/src/utils/filesearch/crawlCache.ts b/packages/core/src/utils/filesearch/crawlCache.ts
index 3cc948c6..b905c9df 100644
--- a/packages/core/src/utils/filesearch/crawlCache.ts
+++ b/packages/core/src/utils/filesearch/crawlCache.ts
@@ -17,10 +17,14 @@ const cacheTimers = new Map<string, NodeJS.Timeout>();
export const getCacheKey = (
directory: string,
ignoreContent: string,
+ maxDepth?: number,
): string => {
const hash = crypto.createHash('sha256');
hash.update(directory);
hash.update(ignoreContent);
+ if (maxDepth !== undefined) {
+ hash.update(String(maxDepth));
+ }
return hash.digest('hex');
};