mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
Refac: Centralize storage file management (#4078)
Co-authored-by: Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
parent
1049d38845
commit
21c6480b65
50 changed files with 889 additions and 532 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue