mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
fix(plan): isolate plan files per session (#18757)
This commit is contained in:
@@ -154,12 +154,24 @@ describe('Storage – additional helpers', () => {
|
||||
expect(Storage.getGlobalBinDir()).toBe(expected);
|
||||
});
|
||||
|
||||
it('getProjectTempPlansDir returns ~/.gemini/tmp/<identifier>/plans', async () => {
|
||||
it('getProjectTempPlansDir returns ~/.gemini/tmp/<identifier>/plans when no sessionId is provided', async () => {
|
||||
await storage.initialize();
|
||||
const tempDir = storage.getProjectTempDir();
|
||||
const expected = path.join(tempDir, 'plans');
|
||||
expect(storage.getProjectTempPlansDir()).toBe(expected);
|
||||
});
|
||||
|
||||
it('getProjectTempPlansDir returns ~/.gemini/tmp/<identifier>/<sessionId>/plans when sessionId is provided', async () => {
|
||||
const sessionId = 'test-session-id';
|
||||
const storageWithSession = new Storage(projectRoot, sessionId);
|
||||
ProjectRegistry.prototype.getShortId = vi
|
||||
.fn()
|
||||
.mockReturnValue(PROJECT_SLUG);
|
||||
await storageWithSession.initialize();
|
||||
const tempDir = storageWithSession.getProjectTempDir();
|
||||
const expected = path.join(tempDir, sessionId, 'plans');
|
||||
expect(storageWithSession.getProjectTempPlansDir()).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Storage - System Paths', () => {
|
||||
|
||||
Reference in New Issue
Block a user