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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 26 deletions

View file

@ -7,14 +7,13 @@
import { useState, useEffect, useCallback } from 'react';
import * as fs from 'fs/promises';
import * as path from 'path';
import { isNodeError } from '@gemini-cli/core';
import { isNodeError, getProjectTempDir } from '@gemini-cli/core';
const HISTORY_DIR = '.gemini';
const HISTORY_FILE = 'shell_history';
const MAX_HISTORY_LENGTH = 100;
async function getHistoryFilePath(projectRoot: string): Promise<string> {
const historyDir = path.join(projectRoot, HISTORY_DIR);
const historyDir = getProjectTempDir(projectRoot);
return path.join(historyDir, HISTORY_FILE);
}