diff options
| author | Yuki Okita <[email protected]> | 2025-08-20 10:55:47 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-20 01:55:47 +0000 |
| commit | 21c6480b65528a98ac0e1e3855f3c78c1f9b7cbe (patch) | |
| tree | 5555ec429209e87e0c21483c9e5fddd53ac01dbc /packages/cli/src/utils/cleanup.ts | |
| parent | 1049d388451120587a8643a401fd71430a8cd5fe (diff) | |
Refac: Centralize storage file management (#4078)
Co-authored-by: Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/cli/src/utils/cleanup.ts')
| -rw-r--r-- | packages/cli/src/utils/cleanup.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/cli/src/utils/cleanup.ts b/packages/cli/src/utils/cleanup.ts index 1200b6da..33ca9ddb 100644 --- a/packages/cli/src/utils/cleanup.ts +++ b/packages/cli/src/utils/cleanup.ts @@ -6,7 +6,7 @@ import { promises as fs } from 'fs'; import { join } from 'path'; -import { getProjectTempDir } from '@google/gemini-cli-core'; +import { Storage } from '@google/gemini-cli-core'; const cleanupFunctions: Array<(() => void) | (() => Promise<void>)> = []; @@ -26,7 +26,8 @@ export async function runExitCleanup() { } export async function cleanupCheckpoints() { - const tempDir = getProjectTempDir(process.cwd()); + const storage = new Storage(process.cwd()); + const tempDir = storage.getProjectTempDir(); const checkpointsDir = join(tempDir, 'checkpoints'); try { await fs.rm(checkpointsDir, { recursive: true, force: true }); |
