Move the shell history our of the project .gemini to the home dir (#1195)

This commit is contained in:
Louis Jimenez
2025-06-19 23:53:24 -04:00
committed by GitHub
parent 7a419282c8
commit ea63a8401e
5 changed files with 53 additions and 26 deletions
+2 -15
View File
@@ -5,13 +5,10 @@
*/
import path from 'node:path';
import os from 'node:os';
import crypto from 'node:crypto';
import { promises as fs } from 'node:fs';
import { Content } from '@google/genai';
import { getProjectTempDir } from '../utils/paths.js';
const GEMINI_DIR = '.gemini';
const TMP_DIR_NAME = 'tmp';
const LOG_FILE_NAME = 'logs.json';
const CHECKPOINT_FILE_NAME = 'checkpoint.json';
@@ -99,17 +96,7 @@ export class Logger {
return;
}
const projectHash = crypto
.createHash('sha256')
.update(process.cwd())
.digest('hex');
this.geminiDir = path.join(
os.homedir(),
GEMINI_DIR,
TMP_DIR_NAME,
projectHash,
);
this.geminiDir = getProjectTempDir(process.cwd());
this.logFilePath = path.join(this.geminiDir, LOG_FILE_NAME);
this.checkpointFilePath = path.join(this.geminiDir, CHECKPOINT_FILE_NAME);