Skip to content

fix: merge duplicate imports in packages/cli (4/4)#19795

Closed
Nixxx19 wants to merge 8 commits into
google-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates-cli
Closed

fix: merge duplicate imports in packages/cli (4/4)#19795
Nixxx19 wants to merge 8 commits into
google-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates-cli

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Merged duplicate import statements across 171 files in packages/cli
  • Combined type and value imports from the same module using inline type syntax
  • Fixed import ordering to comply with import/no-duplicates ESLint rule

Changes

  • Used ESLint's --fix with import/no-duplicates rule and prefer-inline option
  • Reduced import redundancy across the CLI package
  • Improved code consistency and maintainability

Stats

  • 171 files changed
  • +705 insertions, -542 deletions

Testing

  • Pre-commit hooks passed successfully
  • ESLint formatting applied
  • Note: Some React imports in TSX files remain as separate statements where both value and type imports are required (acceptable pattern)

Related

Fixes #19753 - PR 4 of 4 (packages/cli) - FINAL PR! 🎉

Previous PRs:

Merged duplicate import statements across 171 files in packages/cli
to comply with the import/no-duplicates ESLint rule. Changes include:

- Combined type and value imports from the same module
- Used inline type syntax for better import consolidation
- Fixed import ordering to reduce redundancy
- Applied ESLint autofix with prefer-inline option

Note: Some React imports remain as separate statements as they require
both value and type imports in TSX files, which is acceptable.

Related to google-gemini#19753
@Nixxx19 Nixxx19 requested a review from a team as a code owner February 21, 2026 05:57
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Nixxx19, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors import statements throughout the packages/cli directory to enhance code consistency and maintainability. By merging redundant import declarations and standardizing the use of inline type specifiers, the changes align the codebase with modern TypeScript and ESLint best practices for module imports, contributing to a cleaner and more efficient codebase.

Highlights

  • Import Consolidation: Consolidated duplicate import statements across 171 files within the packages/cli directory.
  • Inline Type Imports: Combined type and value imports from the same module using TypeScript's inline type syntax for improved readability and maintainability.
  • ESLint Compliance: Ensured import ordering and structure comply with the import/no-duplicates ESLint rule, applied using the --fix option with prefer-inline.
Changelog
  • packages/cli/src/commands/mcp.test.ts
    • Merged separate type and default imports for 'yargs' into a single statement.
  • packages/cli/src/commands/mcp/list.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/config/config.integration.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/config/extensions/update.test.ts
    • Combined type and value imports from '../extension-manager.js' into a single line.
  • packages/cli/src/config/keyBindings.test.ts
    • Consolidated type and value imports from './keyBindings.js' into one statement.
  • packages/cli/src/config/trustedFolders.test.ts
    • Combined type and value imports from './settings.js' into a single line.
  • packages/cli/src/deferred.test.ts
    • Consolidated type and value imports from 'vitest' into one statement.
    • Removed duplicate 'MockInstance' type import from 'vitest'.
  • packages/cli/src/gemini.test.tsx
    • Consolidated type and value imports from './config/config.js' into one statement.
  • packages/cli/src/gemini.tsx
    • Consolidated type and value imports from './config/settings.js' into one statement.
  • packages/cli/src/gemini_cleanup.test.tsx
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/nonInteractiveCli.test.ts
    • Consolidated multiple type imports from '@google/gemini-cli-core' into a single statement.
  • packages/cli/src/nonInteractiveCli.ts
    • Consolidated multiple type imports from '@google/gemini-cli-core' into a single statement.
    • Moved 'isSlashCommand' and 'LoadedSettings' imports to a combined statement.
  • packages/cli/src/services/BuiltinCommandLoader.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/services/BuiltinCommandLoader.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/services/FileCommandLoader.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/services/FileCommandLoader.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../ui/commands/types.js' into one statement.
    • Consolidated type and value imports from './prompt-processors/types.js' into one statement.
  • packages/cli/src/services/McpPromptLoader.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../ui/commands/types.js' into one statement.
  • packages/cli/src/services/prompt-processors/shellProcessor.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/services/prompt-processors/shellProcessor.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/test-utils/customMatchers.ts
    • Combined type and value imports from 'vitest' into a single line.
  • packages/cli/src/test-utils/mockCommandContext.ts
    • Combined type and value imports from '../config/settings.js' into a single line.
  • packages/cli/src/test-utils/mockConfig.ts
    • Consolidated type and value imports from '../config/settings.js' into one statement.
  • packages/cli/src/test-utils/render.tsx
    • Reordered and consolidated imports from 'ink' and 'react'.
  • packages/cli/src/ui/AppContainer.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from './contexts/OverflowContext.js' into one statement.
    • Removed redundant imports from '@google/gemini-cli-core' due to consolidation.
  • packages/cli/src/ui/AppContainer.tsx
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/IdeIntegrationNudge.tsx
    • Consolidated type and value imports from './components/shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/auth/AuthDialog.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
  • packages/cli/src/ui/auth/useAuth.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/commands/aboutCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/agentsCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/authCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/chatCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../types.js' into one statement.
  • packages/cli/src/ui/commands/clearCommand.test.ts
    • Combined type and value imports from 'vitest' into a single line.
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/commands/clearCommand.ts
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/commands/compressCommand.ts
    • Combined type and value imports from '../types.js' into a single line.
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/commands/copyCommand.test.ts
    • Combined type and value imports from 'vitest' into a single line.
  • packages/cli/src/ui/commands/copyCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/directoryCommand.test.tsx
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/commands/directoryCommand.tsx
    • Consolidated type and value imports from './types.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/commands/helpCommand.test.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/helpCommand.ts
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/commands/hooksCommand.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/commands/hooksCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/commands/ideCommand.test.ts
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/commands/ideCommand.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/initCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/mcpCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/commands/memoryCommand.test.ts
    • Combined type and value imports from 'vitest' into a single line.
  • packages/cli/src/ui/commands/memoryCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/permissionsCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/privacyCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/resumeCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/settingsCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/setupGithubCommand.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/commands/setupGithubCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/shortcutsCommand.ts
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/commands/statsCommand.ts
    • Consolidated type and value imports from '../types.js' into one statement.
  • packages/cli/src/ui/commands/terminalSetupCommand.ts
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/commands/themeCommand.ts
    • Consolidated type and value imports from './types.js' into one statement.
  • packages/cli/src/ui/commands/toolsCommand.test.ts
    • Combined type and value imports from 'vitest' into a single line.
  • packages/cli/src/ui/commands/vimCommand.ts
    • Combined type and value imports from './types.js' into a single line.
  • packages/cli/src/ui/components/AgentConfigDialog.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
  • packages/cli/src/ui/components/AskUserDialog.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/Checklist.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/Composer.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/EditorSettingsDialog.test.tsx
    • Combined type and value imports from '../../config/settings.js' into a single line.
  • packages/cli/src/ui/components/EditorSettingsDialog.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/FolderTrustDialog.tsx
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/Help.test.tsx
    • Combined type and value imports from '../commands/types.js' into a single line.
  • packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
    • Combined type and value imports from '../types.js' into a single line.
  • packages/cli/src/ui/components/InputPrompt.test.tsx
    • Consolidated type and value imports from './InputPrompt.js' into one statement.
    • Consolidated type and value imports from './shared/text-buffer.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../commands/types.js' into one statement.
    • Consolidated type and value imports from '../hooks/useShellHistory.js' into one statement.
    • Consolidated type and value imports from '../hooks/useCommandCompletion.js' into one statement.
    • Consolidated type and value imports from '../hooks/useInputHistory.js' into one statement.
    • Consolidated type and value imports from '../hooks/useReverseSearchCompletion.js' into one statement.
  • packages/cli/src/ui/components/InputPrompt.tsx
    • Reordered React imports.
    • Consolidated type and value imports from '../hooks/useKeypress.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/LogoutConfirmationDialog.tsx
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/LoopDetectionConfirmation.tsx
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/ModelDialog.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/MultiFolderTrustDialog.tsx
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/components/PolicyUpdateDialog.tsx
    • Reordered React imports.
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/RewindConfirmation.tsx
    • Consolidated type and value imports from './shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/SessionBrowser.test.tsx
    • Combined type and value imports from './SessionBrowser.js' into a single line.
  • packages/cli/src/ui/components/SessionBrowser.tsx
    • Consolidated type and value imports from 'react' into one statement.
    • Consolidated type and value imports from '../../utils/sessionUtils.js' into one statement.
  • packages/cli/src/ui/components/SettingsDialog.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/ShellInputPrompt.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/StatsDisplay.tsx
    • Consolidated type and value imports from '../contexts/SessionContext.js' into one statement.
  • packages/cli/src/ui/components/ThemeDialog.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
  • packages/cli/src/ui/components/messages/CompressionMessage.test.tsx
    • Consolidated type and value imports from './CompressionMessage.js' into one statement.
  • packages/cli/src/ui/components/messages/RedirectionConfirmation.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/messages/Todo.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../../contexts/UIStateContext.js' into one statement.
  • packages/cli/src/ui/components/messages/Todo.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
    • Consolidated type and value imports from '../shared/RadioButtonSelect.js' into one statement.
  • packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
    • Consolidated type and value imports from '../../types.js' into one statement.
  • packages/cli/src/ui/components/messages/ToolMessageRawMarkdown.test.tsx
    • Combined type and value imports from './ToolMessage.js' into a single line.
  • packages/cli/src/ui/components/shared/BaseSelectionList.tsx
    • Consolidated type and value imports from '../../hooks/useSelectionList.js' into one statement.
  • packages/cli/src/ui/components/shared/EnumSelector.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/shared/RadioButtonSelect.test.tsx
    • Combined type and value imports from 'ink' into a single line.
  • packages/cli/src/ui/components/shared/ScrollableList.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/shared/TextInput.tsx
    • Combined type and value imports from '../../hooks/useKeypress.js' into a single line.
  • packages/cli/src/ui/components/shared/VirtualizedList.tsx
    • Reordered React imports.
  • packages/cli/src/ui/components/shared/text-buffer.test.ts
    • Consolidated type and value imports from './text-buffer.js' into one statement.
  • packages/cli/src/ui/components/shared/text-buffer.ts
    • Combined type and value imports from './vim-buffer-actions.js' into a single line.
  • packages/cli/src/ui/components/shared/vim-buffer-actions.ts
    • Consolidated type and value imports from './text-buffer.js' into one statement.
  • packages/cli/src/ui/components/triage/TriageDuplicates.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/triage/TriageIssues.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/components/views/McpStatus.tsx
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/contexts/KeypressContext.test.tsx
    • Consolidated type and value imports from 'vitest' into one statement.
    • Consolidated type and value imports from './KeypressContext.js' into one statement.
  • packages/cli/src/ui/contexts/MouseContext.test.tsx
    • Reordered React imports.
  • packages/cli/src/ui/contexts/SessionContext.test.tsx
    • Consolidated type and value imports from 'react' into one statement.
    • Consolidated type and value imports from './SessionContext.js' into one statement.
  • packages/cli/src/ui/contexts/SessionContext.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/contexts/SettingsContext.test.tsx
    • Consolidated type and value imports from 'react' into one statement.
  • packages/cli/src/ui/contexts/SettingsContext.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
  • packages/cli/src/ui/contexts/VimModeContext.tsx
    • Combined type and value imports from '../../config/settings.js' into a single line.
  • packages/cli/src/ui/hooks/atCommandProcessor.test.ts
    • Consolidated type and value imports from 'vitest' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/atCommandProcessor.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/atCommandProcessor_agents.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/shellCommandProcessor.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/slashCommandProcessor.test.tsx
    • Combined type and value imports from '../commands/types.js' into a single line.
  • packages/cli/src/ui/hooks/slashCommandProcessor.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../types.js' into one statement.
  • packages/cli/src/ui/hooks/useApprovalModeIndicator.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Combined type and value imports from './useKeypress.js' into a single line.
  • packages/cli/src/ui/hooks/useApprovalModeIndicator.ts
    • Combined type and value imports from '../types.js' into a single line.
  • packages/cli/src/ui/hooks/useAtCompletion.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-test-utils' into one statement.
  • packages/cli/src/ui/hooks/useAtCompletion.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../components/SuggestionsDisplay.js' into one statement.
  • packages/cli/src/ui/hooks/useCommandCompletion.test.tsx
    • Consolidated type and value imports from './useAtCompletion.js' into one statement.
    • Consolidated type and value imports from './useSlashCompletion.js' into one statement.
  • packages/cli/src/ui/hooks/useCommandCompletion.tsx
    • Consolidated type and value imports from '../components/shared/text-buffer.js' into one statement.
    • Consolidated type and value imports from './usePromptCompletion.js' into one statement.
  • packages/cli/src/ui/hooks/useCompletion.ts
    • Consolidated type and value imports from '../components/SuggestionsDisplay.js' into one statement.
  • packages/cli/src/ui/hooks/useConfirmingTool.ts
    • Consolidated type and value imports from '../utils/confirmingTool.js' into one statement.
  • packages/cli/src/ui/hooks/useEditorSettings.test.tsx
    • Consolidated type and value imports from '../../config/settings.js' into one statement.
  • packages/cli/src/ui/hooks/useEditorSettings.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/useExtensionUpdates.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Removed redundant 'checkExhaustive' import from '@google/gemini-cli-core'.
  • packages/cli/src/ui/hooks/useFlickerDetector.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/hooks/useFolderTrust.test.ts
    • Consolidated type and value imports from '../../config/trustedFolders.js' into one statement.
  • packages/cli/src/ui/hooks/useGeminiStream.test.tsx
    • Consolidated type and value imports from './useToolScheduler.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../types.js' into one statement.
  • packages/cli/src/ui/hooks/useGeminiStream.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../types.js' into one statement.
  • packages/cli/src/ui/hooks/useGitBranchName.test.tsx
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/hooks/useIncludeDirsTrust.test.tsx
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/hooks/useIncludeDirsTrust.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/useLogger.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/hooks/useMouse.ts
    • Consolidated type and value imports from '../contexts/MouseContext.js' into one statement.
  • packages/cli/src/ui/hooks/usePermissionsModifyTrust.test.ts
    • Consolidated type and value imports from '../../config/trustedFolders.js' into one statement.
  • packages/cli/src/ui/hooks/usePrivacySettings.test.tsx
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/usePromptCompletion.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/useSessionBrowser.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/hooks/useSessionBrowser.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../../utils/sessionUtils.js' into one statement.
  • packages/cli/src/ui/hooks/useSlashCompletion.test.ts
    • Consolidated type and value imports from '../commands/types.js' into one statement.
  • packages/cli/src/ui/hooks/vim-passthrough.test.tsx
    • Combined type and value imports from './vim.js' into a single line.
  • packages/cli/src/ui/hooks/vim.test.tsx
    • Combined type and value imports from './vim.js' into a single line.
    • Consolidated type and value imports from '../components/shared/text-buffer.js' into one statement.
  • packages/cli/src/ui/keyMatchers.test.ts
    • Consolidated type and value imports from '../config/keyBindings.js' into one statement.
  • packages/cli/src/ui/keyMatchers.ts
    • Consolidated type and value imports from '../config/keyBindings.js' into one statement.
  • packages/cli/src/ui/themes/no-color.ts
    • Combined type and value imports from './theme.js' into a single line.
  • packages/cli/src/ui/themes/theme-manager.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/ui/themes/theme-manager.ts
    • Consolidated type and value imports from './theme.js' into one statement.
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Removed redundant imports from '@google/gemini-cli-core'.
  • packages/cli/src/ui/utils/TableRenderer.tsx
    • Consolidated type and value imports from 'ink' into one statement.
  • packages/cli/src/ui/utils/commandUtils.test.ts
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/ui/utils/rewindFileOps.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/ui/utils/textOutput.test.ts
    • Combined type and value imports from 'vitest' into a single line.
  • packages/cli/src/utils/cleanup.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/utils/devtoolsService.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/utils/dialogScopeUtils.test.ts
    • Combined type and value imports from '../config/settings.js' into a single line.
  • packages/cli/src/utils/dialogScopeUtils.ts
    • Consolidated type and value imports from '../config/settings.js' into one statement.
  • packages/cli/src/utils/errors.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/utils/errors.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/utils/handleAutoUpdate.test.ts
    • Consolidated type and value imports from 'vitest' into one statement.
  • packages/cli/src/utils/handleAutoUpdate.ts
    • Combined type and value imports from '../ui/types.js' into a single line.
  • packages/cli/src/utils/relaunch.test.ts
    • Combined type and value imports from 'node:child_process' into a single line.
  • packages/cli/src/utils/sandbox.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/utils/sessionUtils.test.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
  • packages/cli/src/utils/sessions.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/utils/settingsUtils.ts
    • Consolidated type and value imports from '../config/settingsSchema.js' into one statement.
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/validateNonInterActiveAuth.test.ts
    • Combined type and value imports from '@google/gemini-cli-core' into a single line.
  • packages/cli/src/validateNonInterActiveAuth.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from './config/settings.js' into one statement.
  • packages/cli/src/zed-integration/zedIntegration.ts
    • Consolidated type and value imports from '@google/gemini-cli-core' into one statement.
    • Consolidated type and value imports from '../config/settings.js' into one statement.
    • Consolidated type and value imports from '../config/config.js' into one statement.
Activity
  • Pre-commit hooks passed successfully.
  • ESLint formatting was applied using --fix with the import/no-duplicates rule and prefer-inline option.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a comprehensive cleanup of import statements across the packages/cli package, merging duplicates and adopting inline type syntax. The refactor, driven by ESLint rules, enhances code clarity and maintainability without altering application logic. The changes are consistent with the Repository Style Guide's emphasis on specific imports (Rule 74-75) and follow established patterns for combining value and type imports. No issues of high or critical severity were found during the review.

@gemini-cli gemini-cli Bot added the area/core Issues related to User Interface, OS Support, Core Functionality label Feb 21, 2026
@Nixxx19 Nixxx19 changed the title fix: merge duplicate imports in packages/cli fix: merge duplicate imports in packages/cli (4/4) Feb 21, 2026
@anowardear062-svg

Copy link
Copy Markdown

Thanks for the update

Resolved conflicts in:
- packages/cli/src/nonInteractiveCli.ts: Added convertSessionToClientHistory import
- packages/cli/src/ui/hooks/useSessionBrowser.ts: Consolidated imports, removed duplicate coreEvents
- packages/cli/src/ui/hooks/useSessionBrowser.test.ts: Added convertSessionToClientHistory import
@gemini-cli gemini-cli Bot added priority/p2 Important but can be addressed in a future release. help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 26, 2026
@scidomino scidomino enabled auto-merge February 27, 2026 21:19
- Fix duplicate PromptCompletion import in useCommandCompletion.tsx
- Fix duplicate imports in useGeminiStream.test.tsx (useToolScheduler, Config, EditorType, AnyToolInvocation)
- Add missing getErrorMessage import in useAuth.ts
- Add missing Config type import in cleanup.ts
- Add explicit return type to registerTelemetryConfig

All ESLint, TypeScript, and build checks now pass.
auto-merge was automatically disabled February 28, 2026 00:11

Head branch was pushed to by a user without write access

@gemini-cli gemini-cli Bot added the area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt label Mar 3, 2026
@scidomino

Copy link
Copy Markdown
Collaborator

@Nixxx19 I don't understand why we never merged this. It's now grown super stale. Can you send me some smaller PRs to do this? You can ping me on them and I will review them as they are for existing work.

@Nixxx19

Nixxx19 commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

@Nixxx19 I don't understand why we never merged this. It's now grown super stale. Can you send me some smaller PRs to do this? You can ping me on them and I will review them as they are for existing work.

hey, I think it got conflicts after auto-merge was enabled so i had to push and then auto merge stopped, and over time the branch became quite stale.

I can split this into smaller PRs (directory-wise) if that works for you, thanks!!

@Nixxx19

Nixxx19 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

created fresh pr queue #22040 and others to fix this issue and breaking into smaller tasks, so closing this pr

@Nixxx19 Nixxx19 closed this Mar 11, 2026
@sripasg sripasg added the size/xl An extra large PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release. size/xl An extra large PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup existing import/no-duplicates warnings and suppressions

4 participants