@vybestack/llxprt-code-core 0.1.17 → 0.1.18-nightly.250808.f9b79d74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/README.md +1 -1
  2. package/dist/src/config/config.alwaysAllow.test.d.ts +6 -0
  3. package/dist/src/config/config.alwaysAllow.test.js +84 -0
  4. package/dist/src/config/config.alwaysAllow.test.js.map +1 -0
  5. package/dist/src/config/config.d.ts +13 -0
  6. package/dist/src/config/config.js +30 -2
  7. package/dist/src/config/config.js.map +1 -1
  8. package/dist/src/core/client.d.ts +9 -4
  9. package/dist/src/core/client.js +44 -88
  10. package/dist/src/core/client.js.map +1 -1
  11. package/dist/src/core/client.test.js +1 -1
  12. package/dist/src/core/client.test.js.map +1 -1
  13. package/dist/src/core/contentGenerator.js +1 -1
  14. package/dist/src/core/contentGenerator.js.map +1 -1
  15. package/dist/src/core/coreToolScheduler.d.ts +19 -7
  16. package/dist/src/core/coreToolScheduler.js +124 -19
  17. package/dist/src/core/coreToolScheduler.js.map +1 -1
  18. package/dist/src/core/coreToolScheduler.test.js +31 -37
  19. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  20. package/dist/src/core/geminiChat.d.ts +4 -0
  21. package/dist/src/core/geminiChat.js +41 -4
  22. package/dist/src/core/geminiChat.js.map +1 -1
  23. package/dist/src/core/nonInteractiveToolExecutor.js +4 -1
  24. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
  25. package/dist/src/core/nonInteractiveToolExecutor.test.js +8 -31
  26. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
  27. package/dist/src/core/subagent.d.ts +230 -0
  28. package/dist/src/core/subagent.js +453 -0
  29. package/dist/src/core/subagent.js.map +1 -0
  30. package/dist/src/core/subagent.test.d.ts +6 -0
  31. package/dist/src/core/subagent.test.js +519 -0
  32. package/dist/src/core/subagent.test.js.map +1 -0
  33. package/dist/src/hooks/tool-render-suppression-hook.d.ts +16 -0
  34. package/dist/src/hooks/tool-render-suppression-hook.js +26 -0
  35. package/dist/src/hooks/tool-render-suppression-hook.js.map +1 -0
  36. package/dist/src/hooks/tool-render-suppression-hook.test.d.ts +6 -0
  37. package/dist/src/hooks/tool-render-suppression-hook.test.js +59 -0
  38. package/dist/src/hooks/tool-render-suppression-hook.test.js.map +1 -0
  39. package/dist/src/ide/ide-client.d.ts +21 -0
  40. package/dist/src/ide/ide-client.js +107 -1
  41. package/dist/src/ide/ide-client.js.map +1 -1
  42. package/dist/src/ide/ideContext.d.ts +127 -32
  43. package/dist/src/ide/ideContext.js +45 -0
  44. package/dist/src/ide/ideContext.js.map +1 -1
  45. package/dist/src/index.d.ts +4 -0
  46. package/dist/src/index.js +4 -0
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/integration-tests/todo-system.test.js +38 -602
  49. package/dist/src/integration-tests/todo-system.test.js.map +1 -1
  50. package/dist/src/mcp/oauth-provider.d.ts +1 -0
  51. package/dist/src/mcp/oauth-provider.js +14 -1
  52. package/dist/src/mcp/oauth-provider.js.map +1 -1
  53. package/dist/src/mcp/oauth-provider.test.js +87 -6
  54. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  55. package/dist/src/prompts/prompt-registry.d.ts +8 -0
  56. package/dist/src/prompts/prompt-registry.js +16 -0
  57. package/dist/src/prompts/prompt-registry.js.map +1 -1
  58. package/dist/src/providers/gemini/GeminiProvider.js +5 -5
  59. package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
  60. package/dist/src/providers/openai/OpenAIProvider.integration.test.js +1 -1
  61. package/dist/src/providers/openai/OpenAIProvider.integration.test.js.map +1 -1
  62. package/dist/src/providers/openai/OpenAIProvider.js +8 -1
  63. package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
  64. package/dist/src/providers/openai/OpenAIProvider.test.js +106 -0
  65. package/dist/src/providers/openai/OpenAIProvider.test.js.map +1 -1
  66. package/dist/src/providers/types/IProviderConfig.d.ts +5 -0
  67. package/dist/src/services/loopDetectionService.js +2 -4
  68. package/dist/src/services/loopDetectionService.js.map +1 -1
  69. package/dist/src/services/shellExecutionService.js +29 -5
  70. package/dist/src/services/shellExecutionService.js.map +1 -1
  71. package/dist/src/services/shellExecutionService.test.js +8 -0
  72. package/dist/src/services/shellExecutionService.test.js.map +1 -1
  73. package/dist/src/services/todo-context-tracker.d.ts +31 -0
  74. package/dist/src/services/todo-context-tracker.js +45 -0
  75. package/dist/src/services/todo-context-tracker.js.map +1 -0
  76. package/dist/src/services/tool-call-tracker-service.d.ts +52 -0
  77. package/dist/src/services/tool-call-tracker-service.js +170 -0
  78. package/dist/src/services/tool-call-tracker-service.js.map +1 -0
  79. package/dist/src/services/tool-call-tracker-service.test.d.ts +6 -0
  80. package/dist/src/services/tool-call-tracker-service.test.js +99 -0
  81. package/dist/src/services/tool-call-tracker-service.test.js.map +1 -0
  82. package/dist/src/telemetry/loggers.test.circular.js +7 -2
  83. package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
  84. package/dist/src/telemetry/loggers.test.js +5 -1
  85. package/dist/src/telemetry/loggers.test.js.map +1 -1
  86. package/dist/src/telemetry/metrics.d.ts +1 -1
  87. package/dist/src/telemetry/metrics.js.map +1 -1
  88. package/dist/src/telemetry/types.d.ts +2 -1
  89. package/dist/src/telemetry/types.js +3 -1
  90. package/dist/src/telemetry/types.js.map +1 -1
  91. package/dist/src/telemetry/uiTelemetry.d.ts +2 -0
  92. package/dist/src/telemetry/uiTelemetry.js +2 -0
  93. package/dist/src/telemetry/uiTelemetry.js.map +1 -1
  94. package/dist/src/telemetry/uiTelemetry.test.js +11 -1
  95. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
  96. package/dist/src/test-utils/tools.d.ts +23 -0
  97. package/dist/src/test-utils/tools.js +41 -0
  98. package/dist/src/test-utils/tools.js.map +1 -0
  99. package/dist/src/tools/edit.d.ts +2 -2
  100. package/dist/src/tools/edit.js +18 -0
  101. package/dist/src/tools/edit.js.map +1 -1
  102. package/dist/src/tools/edit.test.js +48 -0
  103. package/dist/src/tools/edit.test.js.map +1 -1
  104. package/dist/src/tools/glob.d.ts +4 -0
  105. package/dist/src/tools/glob.js +31 -5
  106. package/dist/src/tools/glob.js.map +1 -1
  107. package/dist/src/tools/grep.d.ts +4 -0
  108. package/dist/src/tools/grep.js +22 -5
  109. package/dist/src/tools/grep.js.map +1 -1
  110. package/dist/src/tools/ls.d.ts +4 -0
  111. package/dist/src/tools/ls.js +30 -5
  112. package/dist/src/tools/ls.js.map +1 -1
  113. package/dist/src/tools/mcp-client.d.ts +10 -0
  114. package/dist/src/tools/mcp-client.js +59 -0
  115. package/dist/src/tools/mcp-client.js.map +1 -1
  116. package/dist/src/tools/mcp-client.test.js +294 -1
  117. package/dist/src/tools/mcp-client.test.js.map +1 -1
  118. package/dist/src/tools/mcp-tool.js +104 -45
  119. package/dist/src/tools/mcp-tool.js.map +1 -1
  120. package/dist/src/tools/mcp-tool.test.js +280 -2
  121. package/dist/src/tools/mcp-tool.test.js.map +1 -1
  122. package/dist/src/tools/memoryTool.d.ts +2 -2
  123. package/dist/src/tools/memoryTool.js +1 -0
  124. package/dist/src/tools/memoryTool.js.map +1 -1
  125. package/dist/src/tools/modifiable-tool.d.ts +9 -6
  126. package/dist/src/tools/modifiable-tool.js +6 -3
  127. package/dist/src/tools/modifiable-tool.js.map +1 -1
  128. package/dist/src/tools/modifiable-tool.test.js +12 -12
  129. package/dist/src/tools/modifiable-tool.test.js.map +1 -1
  130. package/dist/src/tools/read-file.d.ts +4 -6
  131. package/dist/src/tools/read-file.js +59 -46
  132. package/dist/src/tools/read-file.js.map +1 -1
  133. package/dist/src/tools/read-file.test.js +201 -126
  134. package/dist/src/tools/read-file.test.js.map +1 -1
  135. package/dist/src/tools/read-many-files.js +8 -2
  136. package/dist/src/tools/read-many-files.js.map +1 -1
  137. package/dist/src/tools/read-many-files.test.js +16 -0
  138. package/dist/src/tools/read-many-files.test.js.map +1 -1
  139. package/dist/src/tools/shell.js +14 -2
  140. package/dist/src/tools/shell.js.map +1 -1
  141. package/dist/src/tools/todo-events.d.ts +22 -0
  142. package/dist/src/tools/todo-events.js +24 -0
  143. package/dist/src/tools/todo-events.js.map +1 -0
  144. package/dist/src/tools/todo-read.js.map +1 -1
  145. package/dist/src/tools/todo-schemas.d.ts +232 -4
  146. package/dist/src/tools/todo-schemas.js +13 -0
  147. package/dist/src/tools/todo-schemas.js.map +1 -1
  148. package/dist/src/tools/todo-schemas.test.js +190 -1
  149. package/dist/src/tools/todo-schemas.test.js.map +1 -1
  150. package/dist/src/tools/todo-store.d.ts +1 -4
  151. package/dist/src/tools/todo-store.js +41 -40
  152. package/dist/src/tools/todo-store.js.map +1 -1
  153. package/dist/src/tools/todo-store.test.js +34 -40
  154. package/dist/src/tools/todo-store.test.js.map +1 -1
  155. package/dist/src/tools/todo-write.d.ts +1 -1
  156. package/dist/src/tools/todo-write.js +84 -47
  157. package/dist/src/tools/todo-write.js.map +1 -1
  158. package/dist/src/tools/todo-write.test.js +23 -9
  159. package/dist/src/tools/todo-write.test.js.map +1 -1
  160. package/dist/src/tools/tool-context.d.ts +2 -0
  161. package/dist/src/tools/tool-registry.d.ts +13 -6
  162. package/dist/src/tools/tool-registry.js +28 -11
  163. package/dist/src/tools/tool-registry.js.map +1 -1
  164. package/dist/src/tools/tool-registry.test.js +7 -20
  165. package/dist/src/tools/tool-registry.test.js.map +1 -1
  166. package/dist/src/tools/tools.d.ts +122 -39
  167. package/dist/src/tools/tools.js +165 -10
  168. package/dist/src/tools/tools.js.map +1 -1
  169. package/dist/src/tools/tools.test.d.ts +6 -0
  170. package/dist/src/tools/tools.test.js +117 -0
  171. package/dist/src/tools/tools.test.js.map +1 -0
  172. package/dist/src/tools/write-file.d.ts +2 -2
  173. package/dist/src/tools/write-file.js +16 -0
  174. package/dist/src/tools/write-file.js.map +1 -1
  175. package/dist/src/tools/write-file.test.js +20 -3
  176. package/dist/src/tools/write-file.test.js.map +1 -1
  177. package/dist/src/types/modelParams.d.ts +2 -0
  178. package/dist/src/utils/editor.d.ts +1 -1
  179. package/dist/src/utils/editor.js +13 -5
  180. package/dist/src/utils/editor.js.map +1 -1
  181. package/dist/src/utils/editor.test.js +38 -6
  182. package/dist/src/utils/editor.test.js.map +1 -1
  183. package/dist/src/utils/environmentContext.d.ts +21 -0
  184. package/dist/src/utils/environmentContext.js +90 -0
  185. package/dist/src/utils/environmentContext.js.map +1 -0
  186. package/dist/src/utils/environmentContext.test.d.ts +6 -0
  187. package/dist/src/utils/environmentContext.test.js +139 -0
  188. package/dist/src/utils/environmentContext.test.js.map +1 -0
  189. package/dist/src/utils/fileUtils.js +7 -14
  190. package/dist/src/utils/fileUtils.js.map +1 -1
  191. package/dist/src/utils/fileUtils.test.js +18 -4
  192. package/dist/src/utils/fileUtils.test.js.map +1 -1
  193. package/dist/src/utils/filesearch/crawlCache.d.ts +25 -0
  194. package/dist/src/utils/filesearch/crawlCache.js +57 -0
  195. package/dist/src/utils/filesearch/crawlCache.js.map +1 -0
  196. package/dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
  197. package/dist/src/utils/filesearch/crawlCache.test.js +103 -0
  198. package/dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
  199. package/dist/src/utils/filesearch/fileSearch.d.ts +80 -0
  200. package/dist/src/utils/filesearch/fileSearch.js +233 -0
  201. package/dist/src/utils/filesearch/fileSearch.js.map +1 -0
  202. package/dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
  203. package/dist/src/utils/filesearch/fileSearch.test.js +654 -0
  204. package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
  205. package/dist/src/utils/filesearch/ignore.d.ts +35 -0
  206. package/dist/src/utils/filesearch/ignore.js +81 -0
  207. package/dist/src/utils/filesearch/ignore.js.map +1 -0
  208. package/dist/src/utils/filesearch/ignore.test.d.ts +6 -0
  209. package/dist/src/utils/filesearch/ignore.test.js +57 -0
  210. package/dist/src/utils/filesearch/ignore.test.js.map +1 -0
  211. package/dist/src/utils/filesearch/result-cache.d.ts +34 -0
  212. package/dist/src/utils/filesearch/result-cache.js +61 -0
  213. package/dist/src/utils/filesearch/result-cache.js.map +1 -0
  214. package/dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
  215. package/dist/src/utils/filesearch/result-cache.test.js +47 -0
  216. package/dist/src/utils/filesearch/result-cache.test.js.map +1 -0
  217. package/dist/src/utils/memoryDiscovery.d.ts +1 -1
  218. package/dist/src/utils/memoryDiscovery.js +22 -7
  219. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  220. package/dist/src/utils/memoryDiscovery.test.js +30 -71
  221. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  222. package/dist/src/utils/shell-utils.js +14 -2
  223. package/dist/src/utils/shell-utils.js.map +1 -1
  224. package/dist/src/utils/shell-utils.shellReplacement.test.d.ts +6 -0
  225. package/dist/src/utils/shell-utils.shellReplacement.test.js +149 -0
  226. package/dist/src/utils/shell-utils.shellReplacement.test.js.map +1 -0
  227. package/dist/src/utils/toolOutputLimiter.js +5 -1
  228. package/dist/src/utils/toolOutputLimiter.js.map +1 -1
  229. package/dist/src/utils/workspaceContext.d.ts +4 -0
  230. package/dist/src/utils/workspaceContext.js +33 -0
  231. package/dist/src/utils/workspaceContext.js.map +1 -1
  232. package/package.json +6 -1
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest';
7
+ import { getCacheKey, read, write, clear } from './crawlCache.js';
8
+ describe('CrawlCache', () => {
9
+ describe('getCacheKey', () => {
10
+ it('should generate a consistent hash', () => {
11
+ const key1 = getCacheKey('/foo', 'bar');
12
+ const key2 = getCacheKey('/foo', 'bar');
13
+ expect(key1).toBe(key2);
14
+ });
15
+ it('should generate a different hash for different directories', () => {
16
+ const key1 = getCacheKey('/foo', 'bar');
17
+ const key2 = getCacheKey('/bar', 'bar');
18
+ expect(key1).not.toBe(key2);
19
+ });
20
+ it('should generate a different hash for different ignore content', () => {
21
+ const key1 = getCacheKey('/foo', 'bar');
22
+ const key2 = getCacheKey('/foo', 'baz');
23
+ expect(key1).not.toBe(key2);
24
+ });
25
+ it('should generate a different hash for different maxDepth values', () => {
26
+ const key1 = getCacheKey('/foo', 'bar', 1);
27
+ const key2 = getCacheKey('/foo', 'bar', 2);
28
+ const key3 = getCacheKey('/foo', 'bar', undefined);
29
+ const key4 = getCacheKey('/foo', 'bar');
30
+ expect(key1).not.toBe(key2);
31
+ expect(key1).not.toBe(key3);
32
+ expect(key2).not.toBe(key3);
33
+ expect(key3).toBe(key4);
34
+ });
35
+ });
36
+ describe('in-memory cache operations', () => {
37
+ beforeEach(() => {
38
+ // Ensure a clean slate before each test
39
+ clear();
40
+ });
41
+ afterEach(() => {
42
+ // Restore real timers after each test that uses fake ones
43
+ vi.useRealTimers();
44
+ });
45
+ it('should write and read data from the cache', () => {
46
+ const key = 'test-key';
47
+ const data = ['foo', 'bar'];
48
+ write(key, data, 10000); // 10 second TTL
49
+ const cachedData = read(key);
50
+ expect(cachedData).toEqual(data);
51
+ });
52
+ it('should return undefined for a nonexistent key', () => {
53
+ const cachedData = read('nonexistent-key');
54
+ expect(cachedData).toBeUndefined();
55
+ });
56
+ it('should clear the cache', () => {
57
+ const key = 'test-key';
58
+ const data = ['foo', 'bar'];
59
+ write(key, data, 10000);
60
+ clear();
61
+ const cachedData = read(key);
62
+ expect(cachedData).toBeUndefined();
63
+ });
64
+ it('should automatically evict a cache entry after its TTL expires', async () => {
65
+ vi.useFakeTimers();
66
+ const key = 'ttl-key';
67
+ const data = ['foo'];
68
+ const ttl = 5000; // 5 seconds
69
+ write(key, data, ttl);
70
+ // Should exist immediately after writing
71
+ expect(read(key)).toEqual(data);
72
+ // Advance time just before expiration
73
+ await vi.advanceTimersByTimeAsync(ttl - 1);
74
+ expect(read(key)).toEqual(data);
75
+ // Advance time past expiration
76
+ await vi.advanceTimersByTimeAsync(1);
77
+ expect(read(key)).toBeUndefined();
78
+ });
79
+ it('should reset the timer when an entry is updated', async () => {
80
+ vi.useFakeTimers();
81
+ const key = 'update-key';
82
+ const initialData = ['initial'];
83
+ const updatedData = ['updated'];
84
+ const ttl = 5000; // 5 seconds
85
+ // Write initial data
86
+ write(key, initialData, ttl);
87
+ // Advance time, but not enough to expire
88
+ await vi.advanceTimersByTimeAsync(3000);
89
+ expect(read(key)).toEqual(initialData);
90
+ // Update the data, which should reset the timer
91
+ write(key, updatedData, ttl);
92
+ expect(read(key)).toEqual(updatedData);
93
+ // Advance time again. If the timer wasn't reset, the total elapsed
94
+ // time (3000 + 3000 = 6000) would cause an eviction.
95
+ await vi.advanceTimersByTimeAsync(3000);
96
+ expect(read(key)).toEqual(updatedData);
97
+ // Advance past the new expiration time
98
+ await vi.advanceTimersByTimeAsync(2001);
99
+ expect(read(key)).toBeUndefined();
100
+ });
101
+ });
102
+ });
103
+ //# sourceMappingURL=crawlCache.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawlCache.test.js","sourceRoot":"","sources":["../../../../src/utils/filesearch/crawlCache.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAElE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACxC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACxC,MAAM,CAAC,I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;YAEvC,gDAAgD;YAChD,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAEvC,mEAAmE;YACnE,qDAAqD;YACrD,MAAM,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAEvC,uCAAuC;YACvC,MAAM,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export type FileSearchOptions = {
7
+ projectRoot: string;
8
+ ignoreDirs: string[];
9
+ useGitignore: boolean;
10
+ useGeminiignore: boolean;
11
+ cache: boolean;
12
+ cacheTtl: number;
13
+ maxDepth?: number;
14
+ };
15
+ export declare class AbortError extends Error {
16
+ constructor(message?: string);
17
+ }
18
+ /**
19
+ * Filters a list of paths based on a given pattern.
20
+ * @param allPaths The list of all paths to filter.
21
+ * @param pattern The picomatch pattern to filter by.
22
+ * @param signal An AbortSignal to cancel the operation.
23
+ * @returns A promise that resolves to the filtered and sorted list of paths.
24
+ */
25
+ export declare function filter(allPaths: string[], pattern: string, signal: AbortSignal | undefined): Promise<string[]>;
26
+ export type SearchOptions = {
27
+ signal?: AbortSignal;
28
+ maxResults?: number;
29
+ };
30
+ /**
31
+ * Provides a fast and efficient way to search for files within a project,
32
+ * respecting .gitignore and .geminiignore rules, and utilizing caching
33
+ * for improved performance.
34
+ */
35
+ export declare class FileSearch {
36
+ private readonly options;
37
+ private readonly absoluteDir;
38
+ private readonly ignore;
39
+ private resultCache;
40
+ private allFiles;
41
+ /**
42
+ * Constructs a new `FileSearch` instance.
43
+ * @param options Configuration options for the file search.
44
+ */
45
+ constructor(options: FileSearchOptions);
46
+ /**
47
+ * Initializes the file search engine by loading ignore rules, crawling the
48
+ * file system, and building the in-memory cache. This method must be called
49
+ * before performing any searches.
50
+ */
51
+ initialize(): Promise<void>;
52
+ /**
53
+ * Searches for files matching a given pattern.
54
+ * @param pattern The picomatch pattern to search for (e.g., '*.js', 'src/**').
55
+ * @param options Search options, including an AbortSignal and maxResults.
56
+ * @returns A promise that resolves to a list of matching file paths, relative
57
+ * to the project root.
58
+ */
59
+ search(pattern: string, options?: SearchOptions): Promise<string[]>;
60
+ /**
61
+ * Loads ignore rules from .gitignore and .geminiignore files, and applies
62
+ * any additional ignore directories specified in the options.
63
+ */
64
+ private loadIgnoreRules;
65
+ /**
66
+ * Crawls the file system to get a list of all files and directories,
67
+ * optionally using a cache for faster initialization.
68
+ */
69
+ private crawlFiles;
70
+ /**
71
+ * Performs the actual file system crawl using `fdir`, applying directory
72
+ * ignore rules.
73
+ * @returns A promise that resolves to a list of all files and directories.
74
+ */
75
+ private performCrawl;
76
+ /**
77
+ * Builds the in-memory cache for fast pattern matching.
78
+ */
79
+ private buildResultCache;
80
+ }
@@ -0,0 +1,233 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import path from 'node:path';
7
+ import fs from 'node:fs';
8
+ import { fdir } from 'fdir';
9
+ import picomatch from 'picomatch';
10
+ import { Ignore } from './ignore.js';
11
+ import { ResultCache } from './result-cache.js';
12
+ import * as cache from './crawlCache.js';
13
+ import { Fzf } from 'fzf';
14
+ export class AbortError extends Error {
15
+ constructor(message = 'Search aborted') {
16
+ super(message);
17
+ this.name = 'AbortError';
18
+ }
19
+ }
20
+ /**
21
+ * Filters a list of paths based on a given pattern.
22
+ * @param allPaths The list of all paths to filter.
23
+ * @param pattern The picomatch pattern to filter by.
24
+ * @param signal An AbortSignal to cancel the operation.
25
+ * @returns A promise that resolves to the filtered and sorted list of paths.
26
+ */
27
+ export async function filter(allPaths, pattern, signal) {
28
+ const patternFilter = picomatch(pattern, {
29
+ dot: true,
30
+ contains: true,
31
+ nocase: true,
32
+ });
33
+ const results = [];
34
+ for (const [i, p] of allPaths.entries()) {
35
+ // Yield control to the event loop periodically to prevent blocking.
36
+ if (i % 1000 === 0) {
37
+ await new Promise((resolve) => setImmediate(resolve));
38
+ if (signal?.aborted) {
39
+ throw new AbortError();
40
+ }
41
+ }
42
+ if (patternFilter(p)) {
43
+ results.push(p);
44
+ }
45
+ }
46
+ results.sort((a, b) => {
47
+ const aIsDir = a.endsWith('/');
48
+ const bIsDir = b.endsWith('/');
49
+ if (aIsDir && !bIsDir)
50
+ return -1;
51
+ if (!aIsDir && bIsDir)
52
+ return 1;
53
+ // This is 40% faster than localeCompare and the only thing we would really
54
+ // gain from localeCompare is case-sensitive sort
55
+ return a < b ? -1 : a > b ? 1 : 0;
56
+ });
57
+ return results;
58
+ }
59
+ /**
60
+ * Filters a list of paths based on a given pattern using fzf.
61
+ * @param allPaths The list of all paths to filter.
62
+ * @param pattern The fzf pattern to filter by.
63
+ * @returns The filtered and sorted list of paths.
64
+ */
65
+ function filterByFzf(allPaths, pattern) {
66
+ return new Fzf(allPaths)
67
+ .find(pattern)
68
+ .map((entry) => entry.item);
69
+ }
70
+ /**
71
+ * Provides a fast and efficient way to search for files within a project,
72
+ * respecting .gitignore and .geminiignore rules, and utilizing caching
73
+ * for improved performance.
74
+ */
75
+ export class FileSearch {
76
+ options;
77
+ absoluteDir;
78
+ ignore = new Ignore();
79
+ resultCache;
80
+ allFiles = [];
81
+ /**
82
+ * Constructs a new `FileSearch` instance.
83
+ * @param options Configuration options for the file search.
84
+ */
85
+ constructor(options) {
86
+ this.options = options;
87
+ this.absoluteDir = path.resolve(options.projectRoot);
88
+ }
89
+ /**
90
+ * Initializes the file search engine by loading ignore rules, crawling the
91
+ * file system, and building the in-memory cache. This method must be called
92
+ * before performing any searches.
93
+ */
94
+ async initialize() {
95
+ this.loadIgnoreRules();
96
+ await this.crawlFiles();
97
+ this.buildResultCache();
98
+ }
99
+ /**
100
+ * Searches for files matching a given pattern.
101
+ * @param pattern The picomatch pattern to search for (e.g., '*.js', 'src/**').
102
+ * @param options Search options, including an AbortSignal and maxResults.
103
+ * @returns A promise that resolves to a list of matching file paths, relative
104
+ * to the project root.
105
+ */
106
+ async search(pattern, options = {}) {
107
+ if (!this.resultCache) {
108
+ throw new Error('Engine not initialized. Call initialize() first.');
109
+ }
110
+ pattern = pattern || '*';
111
+ const { files: candidates, isExactMatch } = await this.resultCache.get(pattern);
112
+ let filteredCandidates;
113
+ if (isExactMatch) {
114
+ filteredCandidates = candidates;
115
+ }
116
+ else {
117
+ // Apply the user's picomatch pattern filter
118
+ filteredCandidates = pattern.includes('*')
119
+ ? await filter(candidates, pattern, options.signal)
120
+ : filterByFzf(this.allFiles, pattern);
121
+ this.resultCache.set(pattern, filteredCandidates);
122
+ }
123
+ // Trade-off: We apply a two-stage filtering process.
124
+ // 1. During the file system crawl (`performCrawl`), we only apply directory-level
125
+ // ignore rules (e.g., `node_modules/`, `dist/`). This is because applying
126
+ // a full ignore filter (which includes file-specific patterns like `*.log`)
127
+ // during the crawl can significantly slow down `fdir`.
128
+ // 2. Here, in the `search` method, we apply the full ignore filter
129
+ // (including file patterns) to the `filteredCandidates` (which have already
130
+ // been filtered by the user's search pattern and sorted). For autocomplete,
131
+ // the number of displayed results is small (MAX_SUGGESTIONS_TO_SHOW),
132
+ // so applying the full filter to this truncated list is much more efficient
133
+ // than applying it to every file during the initial crawl.
134
+ const fileFilter = this.ignore.getFileFilter();
135
+ const results = [];
136
+ for (const [i, candidate] of filteredCandidates.entries()) {
137
+ // Yield to the event loop to avoid blocking on large result sets.
138
+ if (i % 1000 === 0) {
139
+ await new Promise((resolve) => setImmediate(resolve));
140
+ if (options.signal?.aborted) {
141
+ throw new AbortError();
142
+ }
143
+ }
144
+ if (results.length >= (options.maxResults ?? Infinity)) {
145
+ break;
146
+ }
147
+ // The `ignore` library throws an error if the path is '.', so we skip it.
148
+ if (candidate === '.') {
149
+ continue;
150
+ }
151
+ if (!fileFilter(candidate)) {
152
+ results.push(candidate);
153
+ }
154
+ }
155
+ return results;
156
+ }
157
+ /**
158
+ * Loads ignore rules from .gitignore and .geminiignore files, and applies
159
+ * any additional ignore directories specified in the options.
160
+ */
161
+ loadIgnoreRules() {
162
+ if (this.options.useGitignore) {
163
+ const gitignorePath = path.join(this.absoluteDir, '.gitignore');
164
+ if (fs.existsSync(gitignorePath)) {
165
+ this.ignore.add(fs.readFileSync(gitignorePath, 'utf8'));
166
+ }
167
+ }
168
+ if (this.options.useGeminiignore) {
169
+ const geminiignorePath = path.join(this.absoluteDir, '.geminiignore');
170
+ if (fs.existsSync(geminiignorePath)) {
171
+ this.ignore.add(fs.readFileSync(geminiignorePath, 'utf8'));
172
+ }
173
+ }
174
+ const ignoreDirs = ['.git', ...this.options.ignoreDirs];
175
+ this.ignore.add(ignoreDirs.map((dir) => {
176
+ if (dir.endsWith('/')) {
177
+ return dir;
178
+ }
179
+ return `${dir}/`;
180
+ }));
181
+ }
182
+ /**
183
+ * Crawls the file system to get a list of all files and directories,
184
+ * optionally using a cache for faster initialization.
185
+ */
186
+ async crawlFiles() {
187
+ if (this.options.cache) {
188
+ const cacheKey = cache.getCacheKey(this.absoluteDir, this.ignore.getFingerprint(), this.options.maxDepth);
189
+ const cachedResults = cache.read(cacheKey);
190
+ if (cachedResults) {
191
+ this.allFiles = cachedResults;
192
+ return;
193
+ }
194
+ }
195
+ this.allFiles = await this.performCrawl();
196
+ if (this.options.cache) {
197
+ const cacheKey = cache.getCacheKey(this.absoluteDir, this.ignore.getFingerprint(), this.options.maxDepth);
198
+ cache.write(cacheKey, this.allFiles, this.options.cacheTtl * 1000);
199
+ }
200
+ }
201
+ /**
202
+ * Performs the actual file system crawl using `fdir`, applying directory
203
+ * ignore rules.
204
+ * @returns A promise that resolves to a list of all files and directories.
205
+ */
206
+ async performCrawl() {
207
+ const dirFilter = this.ignore.getDirectoryFilter();
208
+ // We use `fdir` for fast file system traversal. A key performance
209
+ // optimization for large workspaces is to exclude entire directories
210
+ // early in the traversal process. This is why we apply directory-specific
211
+ // ignore rules (e.g., `node_modules/`, `dist/`) directly to `fdir`'s
212
+ // exclude filter.
213
+ const api = new fdir()
214
+ .withRelativePaths()
215
+ .withDirs()
216
+ .withPathSeparator('/') // Always use unix style paths
217
+ .exclude((_, dirPath) => {
218
+ const relativePath = path.relative(this.absoluteDir, dirPath);
219
+ return dirFilter(`${relativePath}/`);
220
+ });
221
+ if (this.options.maxDepth !== undefined) {
222
+ api.withMaxDepth(this.options.maxDepth);
223
+ }
224
+ return api.crawl(this.absoluteDir).withPromise();
225
+ }
226
+ /**
227
+ * Builds the in-memory cache for fast pattern matching.
228
+ */
229
+ buildResultCache() {
230
+ this.resultCache = new ResultCache(this.allFiles, this.absoluteDir);
231
+ }
232
+ }
233
+ //# sourceMappingURL=fileSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSearch.js","sourceRoot":"","sources":["../../../../src/utils/filesearch/fileSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAYzC,MAAM,OAAO,UAAW,SAA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