mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 10:31:16 -07:00
chore: Extract '.gemini' to GEMINI_DIR constant (#10540)
Co-authored-by: Richie Foreman <richie.foreman@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7beaa368a9
commit
518caae62e
@@ -19,23 +19,14 @@ import {
|
||||
} from 'node:fs/promises';
|
||||
import { join, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import * as os from 'node:os';
|
||||
|
||||
import {
|
||||
GEMINI_CONFIG_DIR,
|
||||
DEFAULT_CONTEXT_FILENAME,
|
||||
} from '../packages/core/src/tools/memoryTool.js';
|
||||
import { getGlobalMemoryFilePath } from '../packages/core/src/tools/memoryTool.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const rootDir = join(__dirname, '..');
|
||||
const integrationTestsDir = join(rootDir, '.integration-tests');
|
||||
let runDir = ''; // Make runDir accessible in teardown
|
||||
|
||||
const memoryFilePath = join(
|
||||
os.homedir(),
|
||||
GEMINI_CONFIG_DIR,
|
||||
DEFAULT_CONTEXT_FILENAME,
|
||||
);
|
||||
const memoryFilePath = getGlobalMemoryFilePath();
|
||||
let originalMemoryContent: string | null = null;
|
||||
|
||||
export async function setup() {
|
||||
|
||||
@@ -15,6 +15,7 @@ import fs from 'node:fs';
|
||||
import * as pty from '@lydell/node-pty';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import * as os from 'node:os';
|
||||
import { GEMINI_DIR } from '../packages/core/src/utils/paths.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -244,7 +245,7 @@ export class TestRig {
|
||||
mkdirSync(this.testDir, { recursive: true });
|
||||
|
||||
// Create a settings file to point the CLI to the local collector
|
||||
const geminiDir = join(this.testDir, '.gemini');
|
||||
const geminiDir = join(this.testDir, GEMINI_DIR);
|
||||
mkdirSync(geminiDir, { recursive: true });
|
||||
// In sandbox mode, use an absolute path for telemetry inside the container
|
||||
// The container mounts the test directory at the same path as the host
|
||||
|
||||
Reference in New Issue
Block a user