mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-11 05:41:08 -07:00
feat(core): Isolate and cleanup truncated tool outputs (#17594)
This commit is contained in:
@@ -17,11 +17,24 @@ import { cleanupExpiredSessions } from './sessionCleanup.js';
|
||||
import { type SessionInfo, getAllSessionFiles } from './sessionUtils.js';
|
||||
|
||||
// Mock the fs module
|
||||
vi.mock('fs/promises');
|
||||
vi.mock('node:fs/promises');
|
||||
vi.mock('./sessionUtils.js', () => ({
|
||||
getAllSessionFiles: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<typeof import('@google/gemini-cli-core')>();
|
||||
return {
|
||||
...actual,
|
||||
Storage: class MockStorage {
|
||||
getProjectTempDir() {
|
||||
return '/tmp/test-project';
|
||||
}
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const mockFs = vi.mocked(fs);
|
||||
const mockGetAllSessionFiles = vi.mocked(getAllSessionFiles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user