mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-10 00:47:16 -07:00
Move the shell history our of the project .gemini to the home dir (#1195)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user