Shorten temp directory (#17901)

This commit is contained in:
joshualitt
2026-02-06 08:10:17 -08:00
committed by GitHub
parent 30354892b3
commit 6fb3b09003
24 changed files with 989 additions and 27 deletions
+7 -5
View File
@@ -25,19 +25,21 @@ import { Storage } from '../config/storage.js';
import { promises as fs, existsSync } from 'node:fs';
import path from 'node:path';
import type { Content } from '@google/genai';
import crypto from 'node:crypto';
import os from 'node:os';
import { GEMINI_DIR } from '../utils/paths.js';
import { debugLogger } from '../utils/debugLogger.js';
const PROJECT_SLUG = 'project-slug';
const TMP_DIR_NAME = 'tmp';
const LOG_FILE_NAME = 'logs.json';
const CHECKPOINT_FILE_NAME = 'checkpoint.json';
const projectDir = process.cwd();
const hash = crypto.createHash('sha256').update(projectDir).digest('hex');
const TEST_GEMINI_DIR = path.join(os.homedir(), GEMINI_DIR, TMP_DIR_NAME, hash);
const TEST_GEMINI_DIR = path.join(
os.homedir(),
GEMINI_DIR,
TMP_DIR_NAME,
PROJECT_SLUG,
);
const TEST_LOG_FILE_PATH = path.join(TEST_GEMINI_DIR, LOG_FILE_NAME);
const TEST_CHECKPOINT_FILE_PATH = path.join(
+1
View File
@@ -141,6 +141,7 @@ export class Logger {
return;
}
await this.storage.initialize();
this.geminiDir = this.storage.getProjectTempDir();
this.logFilePath = path.join(this.geminiDir, LOG_FILE_NAME);