@vybestack/llxprt-code-core 0.1.13 → 0.1.14-nightly.250729.2076f7c6
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.
- package/README.md +24 -0
- package/dist/src/code_assist/codeAssist.d.ts +2 -1
- package/dist/src/code_assist/codeAssist.js +4 -3
- package/dist/src/code_assist/codeAssist.js.map +1 -1
- package/dist/src/code_assist/oauth2.js +9 -2
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +94 -2
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +5 -6
- package/dist/src/code_assist/server.js +7 -70
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/setup.d.ts +6 -1
- package/dist/src/code_assist/setup.js +4 -1
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/setup.test.js +4 -1
- package/dist/src/code_assist/setup.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +2 -2
- package/dist/src/config/config.d.ts +25 -3
- package/dist/src/config/config.js +47 -10
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +1 -26
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/flashFallback.test.js +1 -1
- package/dist/src/config/flashFallback.test.js.map +1 -1
- package/dist/src/core/client.d.ts +6 -2
- package/dist/src/core/client.js +41 -18
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +78 -24
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +1 -1
- package/dist/src/core/contentGenerator.js +1 -1
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/coreToolScheduler.js +14 -1
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +80 -0
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +4 -3
- package/dist/src/core/geminiChat.js +8 -11
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiRequest.js +2 -37
- package/dist/src/core/geminiRequest.js.map +1 -1
- package/dist/src/core/logger.js +6 -0
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +5 -5
- package/dist/src/core/prompts.js +42 -18
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +121 -4
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +7 -2
- package/dist/src/core/turn.js +9 -0
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/core/turn.test.js +129 -0
- package/dist/src/core/turn.test.js.map +1 -1
- package/dist/src/ide/ide-client.d.ts +28 -0
- package/dist/src/ide/ide-client.js +79 -0
- package/dist/src/ide/ide-client.js.map +1 -0
- package/dist/src/ide/ideContext.d.ts +174 -0
- package/dist/src/{services → ide}/ideContext.js +28 -25
- package/dist/src/ide/ideContext.js.map +1 -0
- package/dist/src/{services → ide}/ideContext.test.js +39 -39
- package/dist/src/ide/ideContext.test.js.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/google-auth-provider.d.ts +23 -0
- package/dist/src/mcp/google-auth-provider.js +63 -0
- package/dist/src/mcp/google-auth-provider.js.map +1 -0
- package/dist/src/mcp/google-auth-provider.test.js +54 -0
- package/dist/src/mcp/google-auth-provider.test.js.map +1 -0
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.d.ts +2 -0
- package/dist/src/providers/gemini/GeminiProvider.integration.test.js +36 -0
- package/dist/src/providers/gemini/GeminiProvider.integration.test.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.js +57 -10
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.js +10 -7
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.d.ts +4 -4
- package/dist/src/services/fileDiscoveryService.js +8 -8
- package/dist/src/services/gitService.js +1 -1
- package/dist/src/services/gitService.js.map +1 -1
- package/dist/src/services/gitService.test.js +1 -1
- package/dist/src/services/gitService.test.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +48 -5
- package/dist/src/services/loopDetectionService.js +127 -41
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +50 -123
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +2 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +17 -2
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/constants.d.ts +16 -15
- package/dist/src/telemetry/constants.js +16 -15
- package/dist/src/telemetry/constants.js.map +1 -1
- package/dist/src/telemetry/file-exporters.d.ts +28 -0
- package/dist/src/telemetry/file-exporters.js +62 -0
- package/dist/src/telemetry/file-exporters.js.map +1 -0
- package/dist/src/telemetry/loggers.d.ts +2 -1
- package/dist/src/telemetry/loggers.js +18 -3
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/sdk.js +22 -7
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +9 -2
- package/dist/src/telemetry/types.js +13 -1
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/tools/ToolFormatter.js +19 -1
- package/dist/src/tools/ToolFormatter.js.map +1 -1
- package/dist/src/tools/edit.js +10 -4
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +12 -0
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/grep.test.js +1 -1
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.d.ts +5 -2
- package/dist/src/tools/ls.js +39 -10
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +5 -1
- package/dist/src/tools/mcp-client.js +416 -29
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +46 -6
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.js +1 -1
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/mcp-tool.test.js +34 -0
- package/dist/src/tools/mcp-tool.test.js.map +1 -1
- package/dist/src/tools/read-file.js +1 -1
- package/dist/src/tools/read-file.test.js +98 -69
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +5 -2
- package/dist/src/tools/read-many-files.js +61 -16
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +5 -2
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +15 -26
- package/dist/src/tools/shell.js +137 -358
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +73 -318
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +13 -1
- package/dist/src/tools/tool-registry.js +45 -1
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +3 -3
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/utils/bfsFileSearch.d.ts +2 -0
- package/dist/src/utils/bfsFileSearch.js +4 -1
- package/dist/src/utils/bfsFileSearch.js.map +1 -1
- package/dist/src/utils/bfsFileSearch.test.js +108 -105
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
- package/dist/src/utils/editCorrector.js +4 -4
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +1 -1
- package/dist/src/utils/editor.js +16 -10
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +128 -28
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/errorReporting.d.ts +1 -1
- package/dist/src/utils/errorReporting.js +2 -2
- package/dist/src/utils/errorReporting.js.map +1 -1
- package/dist/src/utils/errorReporting.test.js +44 -38
- package/dist/src/utils/errorReporting.test.js.map +1 -1
- package/dist/src/utils/fileUtils.d.ts +4 -4
- package/dist/src/utils/fileUtils.js +31 -15
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/fileUtils.test.js +37 -37
- package/dist/src/utils/fileUtils.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.d.ts +3 -2
- package/dist/src/utils/getFolderStructure.js +27 -28
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/getFolderStructure.test.js +169 -185
- package/dist/src/utils/getFolderStructure.test.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.js +4 -7
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +71 -62
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.d.ts +2 -1
- package/dist/src/utils/memoryDiscovery.js +11 -5
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +160 -371
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/partUtils.d.ts +14 -0
- package/dist/src/utils/partUtils.js +65 -0
- package/dist/src/utils/partUtils.js.map +1 -0
- package/dist/src/utils/partUtils.test.d.ts +6 -0
- package/dist/src/utils/partUtils.test.js +130 -0
- package/dist/src/utils/partUtils.test.js.map +1 -0
- package/dist/src/utils/paths.d.ts +11 -0
- package/dist/src/utils/paths.js +17 -1
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/quotaErrorDetection.js.map +1 -1
- package/dist/src/utils/retry.js +1 -1
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/schemaValidator.js +5 -2
- package/dist/src/utils/schemaValidator.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +44 -0
- package/dist/src/utils/shell-utils.js +243 -0
- package/dist/src/utils/shell-utils.js.map +1 -0
- package/dist/src/utils/shell-utils.test.d.ts +6 -0
- package/dist/src/utils/shell-utils.test.js +450 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -0
- package/dist/src/utils/summarizer.js +1 -30
- package/dist/src/utils/summarizer.js.map +1 -1
- package/dist/src/utils/systemEncoding.d.ts +40 -0
- package/dist/src/utils/systemEncoding.js +149 -0
- package/dist/src/utils/systemEncoding.js.map +1 -0
- package/dist/src/utils/systemEncoding.test.d.ts +6 -0
- package/dist/src/utils/systemEncoding.test.js +368 -0
- package/dist/src/utils/systemEncoding.test.js.map +1 -0
- package/dist/src/utils/user_account.test.js +1 -1
- package/dist/src/utils/user_account.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -1
- package/dist/src/core/geminiRequest.test.js +0 -72
- package/dist/src/core/geminiRequest.test.js.map +0 -1
- package/dist/src/services/ideContext.d.ts +0 -126
- package/dist/src/services/ideContext.js.map +0 -1
- package/dist/src/services/ideContext.test.js.map +0 -1
- /package/dist/src/{services → ide}/ideContext.test.d.ts +0 -0
- /package/dist/src/{core/geminiRequest.test.d.ts → mcp/google-auth-provider.test.d.ts} +0 -0
|
@@ -3,430 +3,219 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
6
|
+
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
7
7
|
import * as fsPromises from 'fs/promises';
|
|
8
8
|
import * as os from 'os';
|
|
9
9
|
import * as path from 'path';
|
|
10
10
|
import { loadServerHierarchicalMemory } from './memoryDiscovery.js';
|
|
11
|
-
import { LLXPRT_CONFIG_DIR, setLlxprtMdFilename,
|
|
11
|
+
import { LLXPRT_CONFIG_DIR, setLlxprtMdFilename, DEFAULT_CONTEXT_FILENAME, } from '../tools/memoryTool.js';
|
|
12
12
|
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
vi.mock('fs/promises');
|
|
16
|
-
// Mock the parts of fsSync we might use (like constants or existsSync if needed)
|
|
17
|
-
vi.mock('fs', async (importOriginal) => {
|
|
18
|
-
const actual = await importOriginal();
|
|
13
|
+
vi.mock('os', async (importOriginal) => {
|
|
14
|
+
const actualOs = await importOriginal();
|
|
19
15
|
return {
|
|
20
|
-
...
|
|
21
|
-
|
|
16
|
+
...actualOs,
|
|
17
|
+
homedir: vi.fn(),
|
|
22
18
|
};
|
|
23
19
|
});
|
|
24
|
-
vi.mock('os');
|
|
25
20
|
describe('loadServerHierarchicalMemory', () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
let testRootDir;
|
|
22
|
+
let cwd;
|
|
23
|
+
let projectRoot;
|
|
24
|
+
let homedir;
|
|
25
|
+
async function createEmptyDir(fullPath) {
|
|
26
|
+
await fsPromises.mkdir(fullPath, { recursive: true });
|
|
27
|
+
return fullPath;
|
|
28
|
+
}
|
|
29
|
+
async function createTestFile(fullPath, fileContents) {
|
|
30
|
+
await fsPromises.mkdir(path.dirname(fullPath), { recursive: true });
|
|
31
|
+
await fsPromises.writeFile(fullPath, fileContents);
|
|
32
|
+
return path.resolve(testRootDir, fullPath);
|
|
33
|
+
}
|
|
34
|
+
beforeEach(async () => {
|
|
35
|
+
testRootDir = await fsPromises.mkdtemp(path.join(os.tmpdir(), 'folder-structure-test-'));
|
|
35
36
|
vi.resetAllMocks();
|
|
36
37
|
// Set environment variables to indicate test environment
|
|
37
38
|
process.env.NODE_ENV = 'test';
|
|
38
39
|
process.env.VITEST = 'true';
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
projectRoot = await createEmptyDir(path.join(testRootDir, 'project'));
|
|
41
|
+
cwd = await createEmptyDir(path.join(projectRoot, 'src'));
|
|
42
|
+
homedir = await createEmptyDir(path.join(testRootDir, 'userhome'));
|
|
43
|
+
vi.mocked(os.homedir).mockReturnValue(homedir);
|
|
44
|
+
});
|
|
45
|
+
afterEach(async () => {
|
|
46
|
+
// Some tests set this to a different value.
|
|
47
|
+
setLlxprtMdFilename(DEFAULT_CONTEXT_FILENAME);
|
|
48
|
+
// Clean up the temporary directory to prevent resource leaks.
|
|
49
|
+
await fsPromises.rm(testRootDir, { recursive: true, force: true });
|
|
48
50
|
});
|
|
49
51
|
it('should return empty memory and count if no context files are found', async () => {
|
|
50
|
-
const
|
|
51
|
-
expect(
|
|
52
|
-
|
|
52
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
53
|
+
expect(result).toEqual({
|
|
54
|
+
memoryContent: '',
|
|
55
|
+
fileCount: 0,
|
|
56
|
+
});
|
|
53
57
|
});
|
|
54
58
|
it('should load only the global context file if present and others are not (default filename)', async () => {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const defaultContextFile = await createTestFile(path.join(homedir, LLXPRT_CONFIG_DIR, DEFAULT_CONTEXT_FILENAME), 'default context content');
|
|
60
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
61
|
+
expect(result).toEqual({
|
|
62
|
+
memoryContent: `--- Context from: ${path.relative(cwd, defaultContextFile)} ---
|
|
63
|
+
default context content
|
|
64
|
+
--- End of Context from: ${path.relative(cwd, defaultContextFile)} ---`,
|
|
65
|
+
fileCount: 1,
|
|
61
66
|
});
|
|
62
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
63
|
-
if (p === globalDefaultFile) {
|
|
64
|
-
return 'Global memory content';
|
|
65
|
-
}
|
|
66
|
-
throw new Error('File not found');
|
|
67
|
-
});
|
|
68
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
69
|
-
expect(memoryContent).toBe(`--- Context from: ${path.relative(CWD, globalDefaultFile)} ---\nGlobal memory content\n--- End of Context from: ${path.relative(CWD, globalDefaultFile)} ---`);
|
|
70
|
-
expect(fileCount).toBe(1);
|
|
71
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(globalDefaultFile, 'utf-8');
|
|
72
67
|
});
|
|
73
68
|
it('should load only the global custom context file if present and filename is changed', async () => {
|
|
74
69
|
const customFilename = 'CUSTOM_AGENTS.md';
|
|
75
70
|
setLlxprtMdFilename(customFilename);
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
84
|
-
if (p === globalCustomFile) {
|
|
85
|
-
return 'Global custom memory';
|
|
86
|
-
}
|
|
87
|
-
throw new Error('File not found');
|
|
71
|
+
const customContextFile = await createTestFile(path.join(homedir, LLXPRT_CONFIG_DIR, customFilename), 'custom context content');
|
|
72
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
73
|
+
expect(result).toEqual({
|
|
74
|
+
memoryContent: `--- Context from: ${path.relative(cwd, customContextFile)} ---
|
|
75
|
+
custom context content
|
|
76
|
+
--- End of Context from: ${path.relative(cwd, customContextFile)} ---`,
|
|
77
|
+
fileCount: 1,
|
|
88
78
|
});
|
|
89
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
90
|
-
expect(memoryContent).toBe(`--- Context from: ${path.relative(CWD, globalCustomFile)} ---\nGlobal custom memory\n--- End of Context from: ${path.relative(CWD, globalCustomFile)} ---`);
|
|
91
|
-
expect(fileCount).toBe(1);
|
|
92
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(globalCustomFile, 'utf-8');
|
|
93
79
|
});
|
|
94
80
|
it('should load context files by upward traversal with custom filename', async () => {
|
|
95
81
|
const customFilename = 'PROJECT_CONTEXT.md';
|
|
96
82
|
setLlxprtMdFilename(customFilename);
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
83
|
+
const projectContextFile = await createTestFile(path.join(projectRoot, customFilename), 'project context content');
|
|
84
|
+
const cwdContextFile = await createTestFile(path.join(cwd, customFilename), 'cwd context content');
|
|
85
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
86
|
+
expect(result).toEqual({
|
|
87
|
+
memoryContent: `--- Context from: ${path.relative(cwd, projectContextFile)} ---
|
|
88
|
+
project context content
|
|
89
|
+
--- End of Context from: ${path.relative(cwd, projectContextFile)} ---
|
|
90
|
+
|
|
91
|
+
--- Context from: ${path.relative(cwd, cwdContextFile)} ---
|
|
92
|
+
cwd context content
|
|
93
|
+
--- End of Context from: ${path.relative(cwd, cwdContextFile)} ---`,
|
|
94
|
+
fileCount: 2,
|
|
104
95
|
});
|
|
105
|
-
mockFs.access.mockImplementation(async (p) => {
|
|
106
|
-
if (p === projectRootCustomFile || p === srcCustomFile) {
|
|
107
|
-
return undefined;
|
|
108
|
-
}
|
|
109
|
-
throw new Error('File not found');
|
|
110
|
-
});
|
|
111
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
112
|
-
if (p === projectRootCustomFile) {
|
|
113
|
-
return 'Project root custom memory';
|
|
114
|
-
}
|
|
115
|
-
if (p === srcCustomFile) {
|
|
116
|
-
return 'Src directory custom memory';
|
|
117
|
-
}
|
|
118
|
-
throw new Error('File not found');
|
|
119
|
-
});
|
|
120
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
121
|
-
const expectedContent = `--- Context from: ${path.relative(CWD, projectRootCustomFile)} ---\nProject root custom memory\n--- End of Context from: ${path.relative(CWD, projectRootCustomFile)} ---\n\n` +
|
|
122
|
-
`--- Context from: ${customFilename} ---\nSrc directory custom memory\n--- End of Context from: ${customFilename} ---`;
|
|
123
|
-
expect(memoryContent).toBe(expectedContent);
|
|
124
|
-
expect(fileCount).toBe(2);
|
|
125
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(projectRootCustomFile, 'utf-8');
|
|
126
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(srcCustomFile, 'utf-8');
|
|
127
96
|
});
|
|
128
97
|
it('should load context files by downward traversal with custom filename', async () => {
|
|
129
98
|
const customFilename = 'LOCAL_CONTEXT.md';
|
|
130
99
|
setLlxprtMdFilename(customFilename);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
100
|
+
await createTestFile(path.join(cwd, 'subdir', customFilename), 'Subdir custom memory');
|
|
101
|
+
await createTestFile(path.join(cwd, customFilename), 'CWD custom memory');
|
|
102
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
103
|
+
expect(result).toEqual({
|
|
104
|
+
memoryContent: `--- Context from: ${customFilename} ---
|
|
105
|
+
CWD custom memory
|
|
106
|
+
--- End of Context from: ${customFilename} ---
|
|
107
|
+
|
|
108
|
+
--- Context from: ${path.join('subdir', customFilename)} ---
|
|
109
|
+
Subdir custom memory
|
|
110
|
+
--- End of Context from: ${path.join('subdir', customFilename)} ---`,
|
|
111
|
+
fileCount: 2,
|
|
138
112
|
});
|
|
139
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
140
|
-
if (p === cwdCustomFile)
|
|
141
|
-
return 'CWD custom memory';
|
|
142
|
-
if (p === subDirCustomFile)
|
|
143
|
-
return 'Subdir custom memory';
|
|
144
|
-
throw new Error('File not found');
|
|
145
|
-
});
|
|
146
|
-
mockFs.readdir.mockImplementation((async (p) => {
|
|
147
|
-
if (p === CWD) {
|
|
148
|
-
return [
|
|
149
|
-
{
|
|
150
|
-
name: customFilename,
|
|
151
|
-
isFile: () => true,
|
|
152
|
-
isDirectory: () => false,
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: 'subdir',
|
|
156
|
-
isFile: () => false,
|
|
157
|
-
isDirectory: () => true,
|
|
158
|
-
},
|
|
159
|
-
];
|
|
160
|
-
}
|
|
161
|
-
if (p === subDir) {
|
|
162
|
-
return [
|
|
163
|
-
{
|
|
164
|
-
name: customFilename,
|
|
165
|
-
isFile: () => true,
|
|
166
|
-
isDirectory: () => false,
|
|
167
|
-
},
|
|
168
|
-
];
|
|
169
|
-
}
|
|
170
|
-
return [];
|
|
171
|
-
}));
|
|
172
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
173
|
-
const expectedContent = `--- Context from: ${customFilename} ---\nCWD custom memory\n--- End of Context from: ${customFilename} ---\n\n` +
|
|
174
|
-
`--- Context from: ${path.join('subdir', customFilename)} ---\nSubdir custom memory\n--- End of Context from: ${path.join('subdir', customFilename)} ---`;
|
|
175
|
-
expect(memoryContent).toBe(expectedContent);
|
|
176
|
-
expect(fileCount).toBe(2);
|
|
177
113
|
});
|
|
178
114
|
it('should load ORIGINAL_GEMINI_MD_FILENAME files by upward traversal from CWD to project root', async () => {
|
|
179
|
-
const projectRootGeminiFile = path.join(
|
|
180
|
-
const srcGeminiFile = path.join(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
throw new Error('File not found');
|
|
115
|
+
const projectRootGeminiFile = await createTestFile(path.join(projectRoot, DEFAULT_CONTEXT_FILENAME), 'Project root memory');
|
|
116
|
+
const srcGeminiFile = await createTestFile(path.join(cwd, DEFAULT_CONTEXT_FILENAME), 'Src directory memory');
|
|
117
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
118
|
+
expect(result).toEqual({
|
|
119
|
+
memoryContent: `--- Context from: ${path.relative(cwd, projectRootGeminiFile)} ---
|
|
120
|
+
Project root memory
|
|
121
|
+
--- End of Context from: ${path.relative(cwd, projectRootGeminiFile)} ---
|
|
122
|
+
|
|
123
|
+
--- Context from: ${path.relative(cwd, srcGeminiFile)} ---
|
|
124
|
+
Src directory memory
|
|
125
|
+
--- End of Context from: ${path.relative(cwd, srcGeminiFile)} ---`,
|
|
126
|
+
fileCount: 2,
|
|
192
127
|
});
|
|
193
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
194
|
-
if (p === projectRootGeminiFile) {
|
|
195
|
-
return 'Project root memory';
|
|
196
|
-
}
|
|
197
|
-
if (p === srcGeminiFile) {
|
|
198
|
-
return 'Src directory memory';
|
|
199
|
-
}
|
|
200
|
-
throw new Error('File not found');
|
|
201
|
-
});
|
|
202
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
203
|
-
const expectedContent = `--- Context from: ${path.relative(CWD, projectRootGeminiFile)} ---\nProject root memory\n--- End of Context from: ${path.relative(CWD, projectRootGeminiFile)} ---\n\n` +
|
|
204
|
-
`--- Context from: ${ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST} ---\nSrc directory memory\n--- End of Context from: ${ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST} ---`;
|
|
205
|
-
expect(memoryContent).toBe(expectedContent);
|
|
206
|
-
expect(fileCount).toBe(2);
|
|
207
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(projectRootGeminiFile, 'utf-8');
|
|
208
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(srcGeminiFile, 'utf-8');
|
|
209
128
|
});
|
|
210
129
|
it('should load ORIGINAL_GEMINI_MD_FILENAME files by downward traversal from CWD', async () => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return 'Subdir memory';
|
|
224
|
-
throw new Error('File not found');
|
|
130
|
+
await createTestFile(path.join(cwd, 'subdir', DEFAULT_CONTEXT_FILENAME), 'Subdir memory');
|
|
131
|
+
await createTestFile(path.join(cwd, DEFAULT_CONTEXT_FILENAME), 'CWD memory');
|
|
132
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
133
|
+
expect(result).toEqual({
|
|
134
|
+
memoryContent: `--- Context from: ${DEFAULT_CONTEXT_FILENAME} ---
|
|
135
|
+
CWD memory
|
|
136
|
+
--- End of Context from: ${DEFAULT_CONTEXT_FILENAME} ---
|
|
137
|
+
|
|
138
|
+
--- Context from: ${path.join('subdir', DEFAULT_CONTEXT_FILENAME)} ---
|
|
139
|
+
Subdir memory
|
|
140
|
+
--- End of Context from: ${path.join('subdir', DEFAULT_CONTEXT_FILENAME)} ---`,
|
|
141
|
+
fileCount: 2,
|
|
225
142
|
});
|
|
226
|
-
mockFs.readdir.mockImplementation((async (p) => {
|
|
227
|
-
if (p === CWD) {
|
|
228
|
-
return [
|
|
229
|
-
{
|
|
230
|
-
name: ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST,
|
|
231
|
-
isFile: () => true,
|
|
232
|
-
isDirectory: () => false,
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
name: 'subdir',
|
|
236
|
-
isFile: () => false,
|
|
237
|
-
isDirectory: () => true,
|
|
238
|
-
},
|
|
239
|
-
];
|
|
240
|
-
}
|
|
241
|
-
if (p === subDir) {
|
|
242
|
-
return [
|
|
243
|
-
{
|
|
244
|
-
name: ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST,
|
|
245
|
-
isFile: () => true,
|
|
246
|
-
isDirectory: () => false,
|
|
247
|
-
},
|
|
248
|
-
];
|
|
249
|
-
}
|
|
250
|
-
return [];
|
|
251
|
-
}));
|
|
252
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
253
|
-
const expectedContent = `--- Context from: ${ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST} ---\nCWD memory\n--- End of Context from: ${ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST} ---\n\n` +
|
|
254
|
-
`--- Context from: ${path.join('subdir', ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST)} ---\nSubdir memory\n--- End of Context from: ${path.join('subdir', ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST)} ---`;
|
|
255
|
-
expect(memoryContent).toBe(expectedContent);
|
|
256
|
-
expect(fileCount).toBe(2);
|
|
257
143
|
});
|
|
258
144
|
it('should load and correctly order global, upward, and downward ORIGINAL_GEMINI_MD_FILENAME files', async () => {
|
|
259
|
-
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
287
|
-
if (p === globalFileToUse)
|
|
288
|
-
return 'Global memory'; // Use the dynamically set global file path
|
|
289
|
-
if (p === projectParentGeminiFile)
|
|
290
|
-
return 'Project parent memory';
|
|
291
|
-
if (p === projectRootGeminiFile)
|
|
292
|
-
return 'Project root memory';
|
|
293
|
-
if (p === cwdGeminiFile)
|
|
294
|
-
return 'CWD memory';
|
|
295
|
-
if (p === subDirGeminiFile)
|
|
296
|
-
return 'Subdir memory';
|
|
297
|
-
throw new Error('File not found');
|
|
145
|
+
const defaultContextFile = await createTestFile(path.join(homedir, LLXPRT_CONFIG_DIR, DEFAULT_CONTEXT_FILENAME), 'default context content');
|
|
146
|
+
const rootGeminiFile = await createTestFile(path.join(testRootDir, DEFAULT_CONTEXT_FILENAME), 'Project parent memory');
|
|
147
|
+
const projectRootGeminiFile = await createTestFile(path.join(projectRoot, DEFAULT_CONTEXT_FILENAME), 'Project root memory');
|
|
148
|
+
const cwdGeminiFile = await createTestFile(path.join(cwd, DEFAULT_CONTEXT_FILENAME), 'CWD memory');
|
|
149
|
+
const subDirGeminiFile = await createTestFile(path.join(cwd, 'sub', DEFAULT_CONTEXT_FILENAME), 'Subdir memory');
|
|
150
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
151
|
+
expect(result).toEqual({
|
|
152
|
+
memoryContent: `--- Context from: ${path.relative(cwd, defaultContextFile)} ---
|
|
153
|
+
default context content
|
|
154
|
+
--- End of Context from: ${path.relative(cwd, defaultContextFile)} ---
|
|
155
|
+
|
|
156
|
+
--- Context from: ${path.relative(cwd, rootGeminiFile)} ---
|
|
157
|
+
Project parent memory
|
|
158
|
+
--- End of Context from: ${path.relative(cwd, rootGeminiFile)} ---
|
|
159
|
+
|
|
160
|
+
--- Context from: ${path.relative(cwd, projectRootGeminiFile)} ---
|
|
161
|
+
Project root memory
|
|
162
|
+
--- End of Context from: ${path.relative(cwd, projectRootGeminiFile)} ---
|
|
163
|
+
|
|
164
|
+
--- Context from: ${path.relative(cwd, cwdGeminiFile)} ---
|
|
165
|
+
CWD memory
|
|
166
|
+
--- End of Context from: ${path.relative(cwd, cwdGeminiFile)} ---
|
|
167
|
+
|
|
168
|
+
--- Context from: ${path.relative(cwd, subDirGeminiFile)} ---
|
|
169
|
+
Subdir memory
|
|
170
|
+
--- End of Context from: ${path.relative(cwd, subDirGeminiFile)} ---`,
|
|
171
|
+
fileCount: 5,
|
|
298
172
|
});
|
|
299
|
-
mockFs.readdir.mockImplementation((async (p) => {
|
|
300
|
-
if (p === CWD) {
|
|
301
|
-
return [
|
|
302
|
-
{
|
|
303
|
-
name: 'sub',
|
|
304
|
-
isFile: () => false,
|
|
305
|
-
isDirectory: () => true,
|
|
306
|
-
},
|
|
307
|
-
];
|
|
308
|
-
}
|
|
309
|
-
if (p === subDir) {
|
|
310
|
-
return [
|
|
311
|
-
{
|
|
312
|
-
name: ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST,
|
|
313
|
-
isFile: () => true,
|
|
314
|
-
isDirectory: () => false,
|
|
315
|
-
},
|
|
316
|
-
];
|
|
317
|
-
}
|
|
318
|
-
return [];
|
|
319
|
-
}));
|
|
320
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
321
|
-
const relPathGlobal = path.relative(CWD, GLOBAL_GEMINI_FILE);
|
|
322
|
-
const relPathProjectParent = path.relative(CWD, projectParentGeminiFile);
|
|
323
|
-
const relPathProjectRoot = path.relative(CWD, projectRootGeminiFile);
|
|
324
|
-
const relPathCwd = ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST;
|
|
325
|
-
const relPathSubDir = path.join('sub', ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST);
|
|
326
|
-
const expectedContent = [
|
|
327
|
-
`--- Context from: ${relPathGlobal} ---\nGlobal memory\n--- End of Context from: ${relPathGlobal} ---`,
|
|
328
|
-
`--- Context from: ${relPathProjectParent} ---\nProject parent memory\n--- End of Context from: ${relPathProjectParent} ---`,
|
|
329
|
-
`--- Context from: ${relPathProjectRoot} ---\nProject root memory\n--- End of Context from: ${relPathProjectRoot} ---`,
|
|
330
|
-
`--- Context from: ${relPathCwd} ---\nCWD memory\n--- End of Context from: ${relPathCwd} ---`,
|
|
331
|
-
`--- Context from: ${relPathSubDir} ---\nSubdir memory\n--- End of Context from: ${relPathSubDir} ---`,
|
|
332
|
-
].join('\n\n');
|
|
333
|
-
expect(memoryContent).toBe(expectedContent);
|
|
334
|
-
expect(fileCount).toBe(5);
|
|
335
173
|
});
|
|
336
174
|
it('should ignore specified directories during downward scan', async () => {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const regularSubDirGeminiFile = path.join(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
175
|
+
await createEmptyDir(path.join(projectRoot, '.git'));
|
|
176
|
+
await createTestFile(path.join(projectRoot, '.gitignore'), 'node_modules');
|
|
177
|
+
await createTestFile(path.join(cwd, 'node_modules', DEFAULT_CONTEXT_FILENAME), 'Ignored memory');
|
|
178
|
+
const regularSubDirGeminiFile = await createTestFile(path.join(cwd, 'my_code', DEFAULT_CONTEXT_FILENAME), 'My code memory');
|
|
179
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot), [], {
|
|
180
|
+
respectGitIgnore: true,
|
|
181
|
+
respectLlxprtIgnore: true,
|
|
182
|
+
});
|
|
183
|
+
expect(result).toEqual({
|
|
184
|
+
memoryContent: `--- Context from: ${path.relative(cwd, regularSubDirGeminiFile)} ---
|
|
185
|
+
My code memory
|
|
186
|
+
--- End of Context from: ${path.relative(cwd, regularSubDirGeminiFile)} ---`,
|
|
187
|
+
fileCount: 1,
|
|
347
188
|
});
|
|
348
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
349
|
-
if (p === regularSubDirGeminiFile)
|
|
350
|
-
return 'My code memory';
|
|
351
|
-
throw new Error('File not found');
|
|
352
|
-
});
|
|
353
|
-
mockFs.readdir.mockImplementation((async (p) => {
|
|
354
|
-
if (p === CWD) {
|
|
355
|
-
return [
|
|
356
|
-
{
|
|
357
|
-
name: 'node_modules',
|
|
358
|
-
isFile: () => false,
|
|
359
|
-
isDirectory: () => true,
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
name: 'my_code',
|
|
363
|
-
isFile: () => false,
|
|
364
|
-
isDirectory: () => true,
|
|
365
|
-
},
|
|
366
|
-
];
|
|
367
|
-
}
|
|
368
|
-
if (p === regularSubDir) {
|
|
369
|
-
return [
|
|
370
|
-
{
|
|
371
|
-
name: ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST,
|
|
372
|
-
isFile: () => true,
|
|
373
|
-
isDirectory: () => false,
|
|
374
|
-
},
|
|
375
|
-
];
|
|
376
|
-
}
|
|
377
|
-
if (p === ignoredDir) {
|
|
378
|
-
return [];
|
|
379
|
-
}
|
|
380
|
-
return [];
|
|
381
|
-
}));
|
|
382
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService);
|
|
383
|
-
const expectedContent = `--- Context from: ${path.join('my_code', ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST)} ---\nMy code memory\n--- End of Context from: ${path.join('my_code', ORIGINAL_LLXPRT_MD_FILENAME_CONST_FOR_TEST)} ---`;
|
|
384
|
-
expect(memoryContent).toBe(expectedContent);
|
|
385
|
-
expect(fileCount).toBe(1);
|
|
386
|
-
expect(mockFs.readFile).not.toHaveBeenCalledWith(ignoredDirGeminiFile, 'utf-8');
|
|
387
189
|
});
|
|
388
|
-
it('should respect
|
|
190
|
+
it('should respect the maxDirs parameter during downward scan', async () => {
|
|
389
191
|
const consoleDebugSpy = vi
|
|
390
192
|
.spyOn(console, 'debug')
|
|
391
193
|
.mockImplementation(() => { });
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
dirNames.push({
|
|
395
|
-
name: `deep_dir_${i}`,
|
|
396
|
-
isFile: () => false,
|
|
397
|
-
isDirectory: () => true,
|
|
398
|
-
});
|
|
194
|
+
for (let i = 0; i < 100; i++) {
|
|
195
|
+
await createEmptyDir(path.join(cwd, `deep_dir_${i}`));
|
|
399
196
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
197
|
+
// Pass the custom limit directly to the function
|
|
198
|
+
await loadServerHierarchicalMemory(cwd, true, new FileDiscoveryService(projectRoot), [], {
|
|
199
|
+
respectGitIgnore: true,
|
|
200
|
+
respectLlxprtIgnore: true,
|
|
201
|
+
}, 50);
|
|
202
|
+
expect(consoleDebugSpy).toHaveBeenCalledWith(expect.stringContaining('[DEBUG] [BfsFileSearch]'), expect.stringContaining('Scanning [50/50]:'));
|
|
203
|
+
vi.mocked(console.debug).mockRestore();
|
|
204
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot));
|
|
205
|
+
expect(result).toEqual({
|
|
206
|
+
memoryContent: '',
|
|
207
|
+
fileCount: 0,
|
|
208
|
+
});
|
|
411
209
|
});
|
|
412
210
|
it('should load extension context file paths', async () => {
|
|
413
|
-
const extensionFilePath = '
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
mockFs.readFile.mockImplementation(async (p) => {
|
|
421
|
-
if (p === extensionFilePath) {
|
|
422
|
-
return 'Extension memory content';
|
|
423
|
-
}
|
|
424
|
-
throw new Error('File not found');
|
|
211
|
+
const extensionFilePath = await createTestFile(path.join(testRootDir, 'extensions/ext1/LLXPRT.md'), 'Extension memory content');
|
|
212
|
+
const result = await loadServerHierarchicalMemory(cwd, false, new FileDiscoveryService(projectRoot), [extensionFilePath]);
|
|
213
|
+
expect(result).toEqual({
|
|
214
|
+
memoryContent: `--- Context from: ${path.relative(cwd, extensionFilePath)} ---
|
|
215
|
+
Extension memory content
|
|
216
|
+
--- End of Context from: ${path.relative(cwd, extensionFilePath)} ---`,
|
|
217
|
+
fileCount: 1,
|
|
425
218
|
});
|
|
426
|
-
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(CWD, false, fileService, [extensionFilePath]);
|
|
427
|
-
expect(memoryContent).toBe(`--- Context from: ${path.relative(CWD, extensionFilePath)} ---\nExtension memory content\n--- End of Context from: ${path.relative(CWD, extensionFilePath)} ---`);
|
|
428
|
-
expect(fileCount).toBe(1);
|
|
429
|
-
expect(mockFs.readFile).toHaveBeenCalledWith(extensionFilePath, 'utf-8');
|
|
430
219
|
});
|
|
431
220
|
});
|
|
432
221
|
//# sourceMappingURL=memoryDiscovery.test.js.map
|