mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
initialize FileDiscoveryService once (#1029)
This commit is contained in:
parent
209381f06f
commit
8eb505fbba
7 changed files with 42 additions and 12 deletions
|
|
@ -33,11 +33,12 @@ vi.mock('@gemini-cli/core', async () => {
|
|||
return {
|
||||
...actualServer,
|
||||
loadEnvironment: vi.fn(),
|
||||
loadServerHierarchicalMemory: vi.fn((cwd, debug, extensionPaths) =>
|
||||
Promise.resolve({
|
||||
memoryContent: extensionPaths?.join(',') || '',
|
||||
fileCount: extensionPaths?.length || 0,
|
||||
}),
|
||||
loadServerHierarchicalMemory: vi.fn(
|
||||
(cwd, debug, fileService, extensionPaths) =>
|
||||
Promise.resolve({
|
||||
memoryContent: extensionPaths?.join(',') || '',
|
||||
fileCount: extensionPaths?.length || 0,
|
||||
}),
|
||||
),
|
||||
};
|
||||
});
|
||||
|
|
@ -239,6 +240,7 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
|||
expect(ServerConfig.loadServerHierarchicalMemory).toHaveBeenCalledWith(
|
||||
expect.any(String),
|
||||
false,
|
||||
expect.any(Object),
|
||||
[
|
||||
'/path/to/ext1/GEMINI.md',
|
||||
'/path/to/ext3/context1.md',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue