diff --git a/integration-tests/run-tests.js b/integration-tests/run-tests.js index 1573ab593f..1e8ccad9a1 100644 --- a/integration-tests/run-tests.js +++ b/integration-tests/run-tests.js @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { spawnSync } from 'child_process'; -import { spawn } from 'child_process'; +import { spawnSync, spawn } from 'child_process'; import { mkdirSync, rmSync, createWriteStream } from 'fs'; import { join, dirname, basename } from 'path'; import { fileURLToPath } from 'url'; diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 75b73a855b..59c9c1bd1b 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -21,10 +21,13 @@ import { ShellTool } from '../tools/shell.js'; import { WriteFileTool } from '../tools/write-file.js'; import { WebFetchTool } from '../tools/web-fetch.js'; import { ReadManyFilesTool } from '../tools/read-many-files.js'; -import { MemoryTool, setGeminiMdFilename } from '../tools/memoryTool.js'; +import { + MemoryTool, + setGeminiMdFilename, + GEMINI_CONFIG_DIR as GEMINI_DIR, +} from '../tools/memoryTool.js'; import { WebSearchTool } from '../tools/web-search.js'; import { GeminiClient } from '../core/client.js'; -import { GEMINI_CONFIG_DIR as GEMINI_DIR } from '../tools/memoryTool.js'; import { FileDiscoveryService } from '../services/fileDiscoveryService.js'; import { GitService } from '../services/gitService.js'; import { getProjectTempDir } from '../utils/paths.js'; diff --git a/packages/core/src/core/client.ts b/packages/core/src/core/client.ts index 1a629b2cc9..a0bb49fc1b 100644 --- a/packages/core/src/core/client.ts +++ b/packages/core/src/core/client.ts @@ -32,13 +32,13 @@ import { retryWithBackoff } from '../utils/retry.js'; import { getErrorMessage } from '../utils/errors.js'; import { tokenLimit } from './tokenLimits.js'; import { + AuthType, ContentGenerator, ContentGeneratorConfig, createContentGenerator, } from './contentGenerator.js'; import { ProxyAgent, setGlobalDispatcher } from 'undici'; import { DEFAULT_GEMINI_FLASH_MODEL } from '../config/models.js'; -import { AuthType } from './contentGenerator.js'; function isThinkingSupported(model: string) { if (model.startsWith('gemini-2.5')) return true; diff --git a/packages/core/src/core/coreToolScheduler.test.ts b/packages/core/src/core/coreToolScheduler.test.ts index 9f635e9f8a..ec01a3af1f 100644 --- a/packages/core/src/core/coreToolScheduler.test.ts +++ b/packages/core/src/core/coreToolScheduler.test.ts @@ -10,6 +10,7 @@ import { CoreToolScheduler, ToolCall, ValidatingToolCall, + convertToFunctionResponse, } from './coreToolScheduler.js'; import { BaseTool, @@ -19,7 +20,6 @@ import { Config, } from '../index.js'; import { Part, PartListUnion } from '@google/genai'; -import { convertToFunctionResponse } from './coreToolScheduler.js'; class MockTool extends BaseTool, ToolResult> { shouldConfirm = false; diff --git a/packages/core/src/core/turn.ts b/packages/core/src/core/turn.ts index cf5e062010..72a1180b5a 100644 --- a/packages/core/src/core/turn.ts +++ b/packages/core/src/core/turn.ts @@ -18,9 +18,12 @@ import { } from '../tools/tools.js'; import { getResponseText } from '../utils/generateContentResponseUtilities.js'; import { reportError } from '../utils/errorReporting.js'; -import { getErrorMessage } from '../utils/errors.js'; +import { + getErrorMessage, + UnauthorizedError, + toFriendlyError, +} from '../utils/errors.js'; import { GeminiChat } from './geminiChat.js'; -import { UnauthorizedError, toFriendlyError } from '../utils/errors.js'; // Define a structure for tools passed to the server export interface ServerTool { diff --git a/packages/core/src/tools/modifiable-tool.ts b/packages/core/src/tools/modifiable-tool.ts index 419aafebd9..4f96a49cbc 100644 --- a/packages/core/src/tools/modifiable-tool.ts +++ b/packages/core/src/tools/modifiable-tool.ts @@ -4,12 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EditorType } from '../utils/editor.js'; +import { EditorType, openDiff } from '../utils/editor.js'; import os from 'os'; import path from 'path'; import fs from 'fs'; import * as Diff from 'diff'; -import { openDiff } from '../utils/editor.js'; import { DEFAULT_DIFF_OPTIONS } from './diffOptions.js'; import { isNodeError } from '../utils/errors.js'; import { Tool } from './tools.js'; diff --git a/packages/core/src/tools/read-file.ts b/packages/core/src/tools/read-file.ts index 5cf4920950..1060ac8d91 100644 --- a/packages/core/src/tools/read-file.ts +++ b/packages/core/src/tools/read-file.ts @@ -8,9 +8,12 @@ import path from 'path'; import { SchemaValidator } from '../utils/schemaValidator.js'; import { makeRelative, shortenPath } from '../utils/paths.js'; import { BaseTool, ToolResult } from './tools.js'; -import { isWithinRoot, processSingleFileContent } from '../utils/fileUtils.js'; +import { + isWithinRoot, + processSingleFileContent, + getSpecificMimeType, +} from '../utils/fileUtils.js'; import { Config } from '../config/config.js'; -import { getSpecificMimeType } from '../utils/fileUtils.js'; import { recordFileOperationMetric, FileOperation, diff --git a/packages/core/src/tools/read-many-files.test.ts b/packages/core/src/tools/read-many-files.test.ts index 63cc7bb267..666c484c03 100644 --- a/packages/core/src/tools/read-many-files.test.ts +++ b/packages/core/src/tools/read-many-files.test.ts @@ -4,9 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { vi } from 'vitest'; +import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import type { Mock } from 'vitest'; -import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { mockControl } from '../__mocks__/fs/promises.js'; import { ReadManyFilesTool } from './read-many-files.js'; import { FileDiscoveryService } from '../services/fileDiscoveryService.js';