feat(core): add project-level memory scope to save_memory tool (#24161)

This commit is contained in:
Sandy Tao
2026-03-30 18:32:15 -07:00
committed by GitHub
parent 80929c48c5
commit 46d6b119b6
19 changed files with 382 additions and 63 deletions
+3
View File
@@ -227,6 +227,7 @@ vi.mock('../services/contextManager.js', () => ({
getGlobalMemory: vi.fn().mockReturnValue(''),
getExtensionMemory: vi.fn().mockReturnValue(''),
getEnvironmentMemory: vi.fn().mockReturnValue(''),
getUserProjectMemory: vi.fn().mockReturnValue(''),
getLoadedPaths: vi.fn().mockReturnValue(new Set()),
})),
}));
@@ -2948,6 +2949,7 @@ describe('Config JIT Initialization', () => {
getEnvironmentMemory: vi
.fn()
.mockReturnValue('Environment Memory\n\nMCP Instructions'),
getUserProjectMemory: vi.fn().mockReturnValue(''),
getLoadedPaths: vi.fn().mockReturnValue(new Set(['/path/to/GEMINI.md'])),
} as unknown as ContextManager;
(ContextManager as unknown as Mock).mockImplementation(
@@ -2975,6 +2977,7 @@ describe('Config JIT Initialization', () => {
global: 'Global Memory',
extension: 'Extension Memory',
project: 'Environment Memory\n\nMCP Instructions',
userProjectMemory: '',
});
// Tier 1: system instruction gets only global memory