Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fa2ef98
merge duplicate imports in ide integration and auth components
Nixxx19 Mar 11, 2026
ed04432
merge duplicate imports in dialog components
Nixxx19 Mar 11, 2026
977ed85
merge duplicate imports in more dialog components
Nixxx19 Mar 11, 2026
33120b7
merge duplicate imports in input prompt
Nixxx19 Mar 11, 2026
b9750e3
merge duplicate imports in confirmation dialogs
Nixxx19 Mar 11, 2026
59b3a14
merge duplicate imports in trust and rewind components
Nixxx19 Mar 11, 2026
5dcac4e
merge duplicate imports in session and settings components
Nixxx19 Mar 11, 2026
7d8dc1b
merge duplicate imports in identity and stats components
Nixxx19 Mar 11, 2026
6ea005b
merge duplicate imports in message components
Nixxx19 Mar 11, 2026
6c5c6b1
merge duplicate imports in tool message components
Nixxx19 Mar 11, 2026
caa0f62
merge duplicate imports in message test files
Nixxx19 Mar 11, 2026
4e496bc
merge duplicate imports in shared components
Nixxx19 Mar 11, 2026
824bbc5
merge duplicate imports in text input and radio button
Nixxx19 Mar 11, 2026
6d82bd3
merge duplicate imports in triage components
Nixxx19 Mar 11, 2026
3850762
merge duplicate imports in view components
Nixxx19 Mar 11, 2026
139f24a
merge duplicate imports in component test files
Nixxx19 Mar 11, 2026
73cbf22
merge duplicate imports in more component test files
Nixxx19 Mar 11, 2026
88b8223
merge duplicate imports in remaining test files
Nixxx19 Mar 11, 2026
efc137d
merge duplicate imports in editor settings dialog
Nixxx19 Mar 11, 2026
044839a
merge duplicate imports in auth dialog
Nixxx19 Mar 11, 2026
cd819e0
fix: format React imports in InputPrompt and SessionBrowser
Nixxx19 Mar 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/cli/src/ui/IdeIntegrationNudge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

import type { IdeInfo } from '@google/gemini-cli-core';
import { Box, Text } from 'ink';
import type { RadioSelectItem } from './components/shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './components/shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './components/shared/RadioButtonSelect.js';
import { useKeypress } from './hooks/useKeypress.js';
import { theme } from './semantic-colors.js';

Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/ui/auth/AuthDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { useCallback, useState } from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import { RadioButtonSelect } from '../components/shared/RadioButtonSelect.js';
import type {
LoadableSettingScope,
LoadedSettings,
import {
SettingScope,
type LoadableSettingScope,
type LoadedSettings,
} from '../../config/settings.js';
import { SettingScope } from '../../config/settings.js';
import {
AuthType,
clearCachedCredentialFile,
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/ui/components/AgentConfigDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import type React from 'react';
import { useState, useEffect, useMemo, useCallback } from 'react';
import { Text } from 'ink';
import { theme } from '../semantic-colors.js';
import type {
LoadableSettingScope,
LoadedSettings,
import {
SettingScope,
type LoadableSettingScope,
type LoadedSettings,
} from '../../config/settings.js';
import { SettingScope } from '../../config/settings.js';
import type { AgentDefinition, AgentOverride } from '@google/gemini-cli-core';
import { getCachedStringWidth } from '../utils/textUtils.js';
import {
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/ui/components/AskUserDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ import {
} from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import type { Question } from '@google/gemini-cli-core';
import { checkExhaustive, type Question } from '@google/gemini-cli-core';
import { BaseSelectionList } from './shared/BaseSelectionList.js';
import type { SelectionListItem } from '../hooks/useSelectionList.js';
import { TabHeader, type Tab } from './shared/TabHeader.js';
import { useKeypress, type Key } from '../hooks/useKeypress.js';
import { Command } from '../key/keyMatchers.js';
import { checkExhaustive } from '@google/gemini-cli-core';
import { TextInput } from './shared/TextInput.js';
import { formatCommand } from '../key/keybindingUtils.js';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/ui/components/Checklist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import type React from 'react';
import { useMemo } from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import { useMemo } from 'react';
import { ChecklistItem, type ChecklistItemData } from './ChecklistItem.js';

export interface ChecklistProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { useRef, useCallback } from 'react';
import type React from 'react';
import { useRef, useCallback } from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import type { ConsoleMessageItem } from '../types.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import { render } from '../../test-utils/render.js';
import { EditorSettingsDialog } from './EditorSettingsDialog.js';
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 { KeypressProvider } from '../contexts/KeypressContext.js';
import { act } from 'react';
import { waitFor } from '../../test-utils/async.js';
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/ui/components/EditorSettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import {
type EditorDisplay,
} from '../editors/editorSettingsManager.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import type {
LoadableSettingScope,
LoadedSettings,
import {
SettingScope,
type LoadableSettingScope,
type LoadedSettings,
} from '../../config/settings.js';
import { SettingScope } from '../../config/settings.js';
import {
type EditorType,
isEditorAvailable,
EDITOR_DISPLAY_NAMES,
coreEvents,
} from '@google/gemini-cli-core';
import { useKeypress } from '../hooks/useKeypress.js';
import { coreEvents } from '@google/gemini-cli-core';

interface EditorDialogProps {
onSelect: (
Expand Down
6 changes: 4 additions & 2 deletions packages/cli/src/ui/components/FolderTrustDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import type React from 'react';
import { useEffect, useState, useCallback } from 'react';
import { theme } from '../semantic-colors.js';
import stripAnsi from 'strip-ansi';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { MaxSizedBox } from './shared/MaxSizedBox.js';
import { Scrollable } from './shared/Scrollable.js';
import { useKeypress } from '../hooks/useKeypress.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { describe, it, expect, vi } from 'vitest';
import { renderWithProviders } from '../../test-utils/render.js';
import * as SessionContext from '../contexts/SessionContext.js';
import type { SessionStatsState } from '../contexts/SessionContext.js';
import { type SessionStatsState } from '../contexts/SessionContext.js';
import { Banner } from './Banner.js';
import { Footer } from './Footer.js';
import { Header } from './Header.js';
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/ui/components/Help.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import { render } from '../../test-utils/render.js';
import { describe, it, expect } from 'vitest';
import { Help } from './Help.js';
import type { SlashCommand } from '../commands/types.js';
import { CommandKind } from '../commands/types.js';
import { CommandKind, type SlashCommand } from '../commands/types.js';

const mockCommands: readonly SlashCommand[] = [
{
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

import { describe, it, expect, vi } from 'vitest';
import { HistoryItemDisplay } from './HistoryItemDisplay.js';
import { type HistoryItem } from '../types.js';
import { MessageType } from '../types.js';
import { MessageType, type HistoryItem } from '../types.js';
import { SessionStatsProvider } from '../contexts/SessionContext.js';
import {
CoreToolCallStatus,
type Config,
type ToolExecuteConfirmationDetails,
CoreToolCallStatus,
} from '@google/gemini-cli-core';
import { ToolGroupMessage } from './messages/ToolGroupMessage.js';
import { renderWithProviders } from '../../test-utils/render.js';
Expand Down
43 changes: 29 additions & 14 deletions packages/cli/src/ui/components/InputPrompt.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,46 @@ import { renderWithProviders } from '../../test-utils/render.js';
import { createMockSettings } from '../../test-utils/settings.js';
import { waitFor } from '../../test-utils/async.js';
import { act, useState } from 'react';
import type { InputPromptProps } from './InputPrompt.js';
import { InputPrompt, tryTogglePasteExpansion } from './InputPrompt.js';
import type { TextBuffer } from './shared/text-buffer.js';
import {
InputPrompt,
tryTogglePasteExpansion,
type InputPromptProps,
} from './InputPrompt.js';
import {
calculateTransformationsForLine,
calculateTransformedLine,
type TextBuffer,
} from './shared/text-buffer.js';
import type { Config } from '@google/gemini-cli-core';
import { ApprovalMode, debugLogger } from '@google/gemini-cli-core';
import {
ApprovalMode,
debugLogger,
type Config,
} from '@google/gemini-cli-core';
import * as path from 'node:path';
import type { CommandContext, SlashCommand } from '../commands/types.js';
import { CommandKind } from '../commands/types.js';
import {
CommandKind,
type CommandContext,
type SlashCommand,
} from '../commands/types.js';
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
import { Text } from 'ink';
import type { UseShellHistoryReturn } from '../hooks/useShellHistory.js';
import { useShellHistory } from '../hooks/useShellHistory.js';
import type { UseCommandCompletionReturn } from '../hooks/useCommandCompletion.js';
import {
useShellHistory,
type UseShellHistoryReturn,
} from '../hooks/useShellHistory.js';
import {
useCommandCompletion,
CompletionMode,
type UseCommandCompletionReturn,
} from '../hooks/useCommandCompletion.js';
import type { UseInputHistoryReturn } from '../hooks/useInputHistory.js';
import { useInputHistory } from '../hooks/useInputHistory.js';
import type { UseReverseSearchCompletionReturn } from '../hooks/useReverseSearchCompletion.js';
import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
import {
useInputHistory,
type UseInputHistoryReturn,
} from '../hooks/useInputHistory.js';
import {
useReverseSearchCompletion,
type UseReverseSearchCompletionReturn,
} from '../hooks/useReverseSearchCompletion.js';
import clipboardy from 'clipboardy';
import * as clipboardUtils from '../utils/clipboardUtils.js';
import { useKittyKeyboardProtocol } from '../hooks/useKittyKeyboardProtocol.js';
Expand Down
13 changes: 8 additions & 5 deletions packages/cli/src/ui/components/InputPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import type React from 'react';
import clipboardy from 'clipboardy';
import { useCallback, useEffect, useState, useRef, useMemo } from 'react';
import clipboardy from 'clipboardy';
import { Box, Text, useStdout, type DOMElement } from 'ink';
import { SuggestionsDisplay, MAX_WIDTH } from './SuggestionsDisplay.js';
import { theme } from '../semantic-colors.js';
Expand Down Expand Up @@ -34,13 +34,16 @@ import {
useCommandCompletion,
CompletionMode,
} from '../hooks/useCommandCompletion.js';
import type { Key } from '../hooks/useKeypress.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { useKeypress, type Key } from '../hooks/useKeypress.js';
import { Command } from '../key/keyMatchers.js';
import { formatCommand } from '../key/keybindingUtils.js';
import type { CommandContext, SlashCommand } from '../commands/types.js';
import type { Config } from '@google/gemini-cli-core';
import { ApprovalMode, coreEvents, debugLogger } from '@google/gemini-cli-core';
import {
ApprovalMode,
coreEvents,
debugLogger,
type Config,
} from '@google/gemini-cli-core';
import {
parseInputForHighlighting,
parseSegmentsFromTokens,
Expand Down
6 changes: 4 additions & 2 deletions packages/cli/src/ui/components/LogoutConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import { Box, Text } from 'ink';
import type React from 'react';
import { theme } from '../semantic-colors.js';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { useKeypress } from '../hooks/useKeypress.js';

export enum LogoutChoice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
*/

import { Box, Text } from 'ink';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { theme } from '../semantic-colors.js';

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/ui/components/ModelStatsDisplay.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { describe, it, expect, vi, beforeAll, afterAll } from 'vitest';
import { ModelStatsDisplay } from './ModelStatsDisplay.js';
import * as SessionContext from '../contexts/SessionContext.js';
import * as SettingsContext from '../contexts/SettingsContext.js';
import type { LoadedSettings } from '../../config/settings.js';
import type { SessionMetrics } from '../contexts/SessionContext.js';
import { type LoadedSettings } from '../../config/settings.js';
import { type SessionMetrics } from '../contexts/SessionContext.js';
import { ToolCallDecision, LlmRole } from '@google/gemini-cli-core';

// Mock the context to provide controlled data for testing
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/ui/components/MultiFolderTrustDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import { Box, Text } from 'ink';
import type React from 'react';
import { useState } from 'react';
import { theme } from '../semantic-colors.js';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { loadTrustedFolders, TrustLevel } from '../../config/trustedFolders.js';
import { expandHomeDir } from '../utils/directoryUtils.js';
import * as path from 'node:path';
import { MessageType, type HistoryItem } from '../types.js';
import type { Config } from '@google/gemini-cli-core';
import { type Config } from '@google/gemini-cli-core';

export enum MultiFolderTrustChoice {
YES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Mock } from 'vitest';
import {
describe,
it,
expect,
vi,
beforeEach,
afterEach,
type Mock,
} from 'vitest';
import { renderWithProviders } from '../../test-utils/render.js';
import { waitFor } from '../../test-utils/async.js';
import { PermissionsModifyTrustDialog } from './PermissionsModifyTrustDialog.js';
Expand Down
10 changes: 6 additions & 4 deletions packages/cli/src/ui/components/PolicyUpdateDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
*/

import { Box, Text } from 'ink';
import { useCallback, useRef } from 'react';
import type React from 'react';
import { useCallback, useRef } from 'react';
import {
PolicyIntegrityManager,
type Config,
type PolicyUpdateConfirmationRequest,
PolicyIntegrityManager,
} from '@google/gemini-cli-core';
import { theme } from '../semantic-colors.js';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { Command } from '../key/keyMatchers.js';
import { useKeyMatchers } from '../hooks/useKeyMatchers.js';
Expand Down
6 changes: 4 additions & 2 deletions packages/cli/src/ui/components/RewindConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { Box, Text, useIsScreenReaderEnabled } from 'ink';
import type React from 'react';
import { useMemo } from 'react';
import { theme } from '../semantic-colors.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import type { RadioSelectItem } from './shared/RadioButtonSelect.js';
import {
RadioButtonSelect,
type RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import type { FileChangeStats } from '../utils/rewindFileOps.js';
import { useKeypress } from '../hooks/useKeypress.js';
import { formatTimeAgo } from '../utils/formatters.js';
Expand Down
7 changes: 3 additions & 4 deletions packages/cli/src/ui/components/SessionBrowser.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { act } from 'react';
import { render } from '../../test-utils/render.js';
import { waitFor } from '../../test-utils/async.js';
import type { Config } from '@google/gemini-cli-core';
import { SessionBrowser } from './SessionBrowser.js';
import type { SessionBrowserProps } from './SessionBrowser.js';
import type { SessionInfo } from '../../utils/sessionUtils.js';
import { type Config } from '@google/gemini-cli-core';
import { SessionBrowser, type SessionBrowserProps } from './SessionBrowser.js';
import { type SessionInfo } from '../../utils/sessionUtils.js';

// Collect key handlers registered via useKeypress so tests can
// simulate input without going through the full stdin pipeline.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { renderWithProviders } from '../../test-utils/render.js';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { SessionSummaryDisplay } from './SessionSummaryDisplay.js';
import * as SessionContext from '../contexts/SessionContext.js';
import type { SessionMetrics } from '../contexts/SessionContext.js';
import { type SessionMetrics } from '../contexts/SessionContext.js';
import {
ToolCallDecision,
getShellConfiguration,
Expand Down
Loading
Loading