mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
fix: merge duplicate imports in sdk and test-utils packages (1/4) (#19777)
This commit is contained in:
@@ -8,10 +8,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|||||||
import { GeminiCliAgent } from './agent.js';
|
import { GeminiCliAgent } from './agent.js';
|
||||||
import * as path from 'node:path';
|
import * as path from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { dirname } from 'node:path';
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// Set this to true locally when you need to update snapshots
|
// Set this to true locally when you need to update snapshots
|
||||||
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
||||||
|
|||||||
@@ -4,8 +4,11 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Config as CoreConfig } from '@google/gemini-cli-core';
|
import {
|
||||||
import { ShellExecutionService, ShellTool } from '@google/gemini-cli-core';
|
ShellExecutionService,
|
||||||
|
ShellTool,
|
||||||
|
type Config as CoreConfig,
|
||||||
|
} from '@google/gemini-cli-core';
|
||||||
import type {
|
import type {
|
||||||
AgentShell,
|
AgentShell,
|
||||||
AgentShellResult,
|
AgentShellResult,
|
||||||
|
|||||||
@@ -9,10 +9,9 @@ import { GeminiCliAgent } from './agent.js';
|
|||||||
import { skillDir } from './skills.js';
|
import { skillDir } from './skills.js';
|
||||||
import * as path from 'node:path';
|
import * as path from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { dirname } from 'node:path';
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// Set this to true locally when you need to update snapshots
|
// Set this to true locally when you need to update snapshots
|
||||||
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
||||||
|
|||||||
@@ -10,10 +10,9 @@ import * as path from 'node:path';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { tool, ModelVisibleError } from './tool.js';
|
import { tool, ModelVisibleError } from './tool.js';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { dirname } from 'node:path';
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// Set this to true locally when you need to update snapshots
|
// Set this to true locally when you need to update snapshots
|
||||||
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
const RECORD_MODE = process.env['RECORD_NEW_RESPONSES'] === 'true';
|
||||||
|
|||||||
@@ -6,13 +6,12 @@
|
|||||||
|
|
||||||
import { expect } from 'vitest';
|
import { expect } from 'vitest';
|
||||||
import { execSync, spawn, type ChildProcess } from 'node:child_process';
|
import { execSync, spawn, type ChildProcess } from 'node:child_process';
|
||||||
import { mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
import fs, { mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
||||||
import { join, dirname } from 'node:path';
|
import { join, dirname } from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { env } from 'node:process';
|
import { env } from 'node:process';
|
||||||
import { setTimeout as sleep } from 'node:timers/promises';
|
import { setTimeout as sleep } from 'node:timers/promises';
|
||||||
import { DEFAULT_GEMINI_MODEL, GEMINI_DIR } from '@google/gemini-cli-core';
|
import { DEFAULT_GEMINI_MODEL, GEMINI_DIR } from '@google/gemini-cli-core';
|
||||||
import fs from 'node:fs';
|
|
||||||
import * as pty from '@lydell/node-pty';
|
import * as pty from '@lydell/node-pty';
|
||||||
import stripAnsi from 'strip-ansi';
|
import stripAnsi from 'strip-ansi';
|
||||||
import * as os from 'node:os';
|
import * as os from 'node:os';
|
||||||
|
|||||||
Reference in New Issue
Block a user