merge duplicate imports packages/cli/src subtask3 (#22056)

This commit is contained in:
nityam
2026-03-12 02:51:40 +05:30
committed by GitHub
parent 3bf4f885d8
commit 352bbc36c0
46 changed files with 192 additions and 127 deletions

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { debugLogger } from '@google/gemini-cli-core';
import type { Config } from '@google/gemini-cli-core';
import { debugLogger, type Config } from '@google/gemini-cli-core';
import WebSocket from 'ws';
import {
initActivityLogger,

View File

@@ -5,8 +5,7 @@
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { SettingScope } from '../config/settings.js';
import type { LoadedSettings } from '../config/settings.js';
import { SettingScope, type LoadedSettings } from '../config/settings.js';
import {
getScopeItems,
getScopeMessageForSetting,

View File

@@ -4,8 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { LoadableSettingScope, Settings } from '../config/settings.js';
import { isLoadableSettingScope, SettingScope } from '../config/settings.js';
import {
isLoadableSettingScope,
SettingScope,
type LoadableSettingScope,
type Settings,
} from '../config/settings.js';
import { isInSettingsScope } from './settingsUtils.js';
/**

View File

@@ -4,8 +4,15 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { Mock } from 'vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import {
describe,
it,
expect,
vi,
beforeEach,
afterEach,
type Mock,
} from 'vitest';
import { getInstallationInfo, PackageManager } from './installationInfo.js';
import { updateEventEmitter } from './updateEventEmitter.js';
import type { UpdateObject } from '../ui/utils/updateCheck.js';

View File

@@ -8,8 +8,7 @@ import type { UpdateObject } from '../ui/utils/updateCheck.js';
import type { LoadedSettings } from '../config/settings.js';
import { getInstallationInfo, PackageManager } from './installationInfo.js';
import { updateEventEmitter } from './updateEventEmitter.js';
import type { HistoryItem } from '../ui/types.js';
import { MessageType } from '../ui/types.js';
import { MessageType, type HistoryItem } from '../ui/types.js';
import { spawnWrapper } from './spawnWrapper.js';
import type { spawn } from 'node:child_process';
import { debugLogger } from '@google/gemini-cli-core';

View File

@@ -15,8 +15,7 @@ import {
} from 'vitest';
import { EventEmitter } from 'node:events';
import { RELAUNCH_EXIT_CODE } from './processUtils.js';
import type { ChildProcess } from 'node:child_process';
import { spawn } from 'node:child_process';
import { spawn, type ChildProcess } from 'node:child_process';
const mocks = vi.hoisted(() => ({
writeToStderr: vi.fn(),

View File

@@ -12,8 +12,11 @@ import {
hasUserOrAssistantMessage,
SessionError,
} from './sessionUtils.js';
import type { Config, MessageRecord } from '@google/gemini-cli-core';
import { SESSION_FILE_PREFIX } from '@google/gemini-cli-core';
import {
SESSION_FILE_PREFIX,
type Config,
type MessageRecord,
} from '@google/gemini-cli-core';
import * as fs from 'node:fs/promises';
import path from 'node:path';
import { randomUUID } from 'node:crypto';

View File

@@ -5,8 +5,7 @@
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Config } from '@google/gemini-cli-core';
import { ChatRecordingService } from '@google/gemini-cli-core';
import { ChatRecordingService, type Config } from '@google/gemini-cli-core';
import { listSessions, deleteSession } from './sessions.js';
import { SessionSelector, type SessionInfo } from './sessionUtils.js';

View File

@@ -5,15 +5,14 @@
*/
import type { Settings } from '../config/settings.js';
import type {
SettingDefinition,
SettingsSchema,
SettingsType,
SettingsValue,
import {
getSettingsSchema,
type SettingDefinition,
type SettingsSchema,
type SettingsType,
type SettingsValue,
} from '../config/settingsSchema.js';
import { getSettingsSchema } from '../config/settingsSchema.js';
import type { Config } from '@google/gemini-cli-core';
import { ExperimentFlags } from '@google/gemini-cli-core';
import { ExperimentFlags, type Config } from '@google/gemini-cli-core';
// The schema is now nested, but many parts of the UI and logic work better
// with a flattened structure and dot-notation keys. This section flattens the