fix(core): move project memory dir under tmp directory (#24542)

This commit is contained in:
Sandy Tao
2026-04-02 10:50:43 -07:00
committed by GitHub
parent 08b926796c
commit 06173c0885
2 changed files with 4 additions and 4 deletions

View File

@@ -147,13 +147,14 @@ describe('Storage additional helpers', () => {
expect(storage.getProjectAgentsDir()).toBe(expected);
});
it('getProjectMemoryDir returns ~/.gemini/memory/<identifier>', async () => {
it('getProjectMemoryDir returns ~/.gemini/tmp/<identifier>/memory', async () => {
await storage.initialize();
const expected = path.join(
os.homedir(),
GEMINI_DIR,
'memory',
'tmp',
PROJECT_SLUG,
'memory',
);
expect(storage.getProjectMemoryDir()).toBe(expected);
});

View File

@@ -267,8 +267,7 @@ export class Storage {
}
getProjectMemoryDir(): string {
const identifier = this.getProjectIdentifier();
return path.join(Storage.getGlobalGeminiDir(), 'memory', identifier);
return this.getProjectMemoryTempDir();
}
getProjectMemoryTempDir(): string {