diff --git a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-generate-a-consent-string-with-all-fields.snap.svg b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-generate-a-consent-string-with-all-fields.snap.svg index 64c5c35241..d42af4490c 100644 --- a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-generate-a-consent-string-with-all-fields.snap.svg +++ b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-generate-a-consent-string-with-all-fields.snap.svg @@ -10,9 +10,9 @@ * server2 (remote): https://remote.com This extension will append info to your gemini.md context using my-context.md This extension will exclude the following core tools: tool1,tool2 - The extension you are about to install may have been created by a third-party developer and sourced - from a public repository. Google does not vet, endorse, or guarantee the functionality or security - of extensions. Please carefully inspect any extension and its source code before installing to - understand the permissions it requires and the actions it may perform. + The extension you are about to install may have been created by a third-party developer and sourced + from a public repository. Google does not vet, endorse, or guarantee the functionality or security + of extensions. Please carefully inspect any extension and its source code before installing to + understand the permissions it requires and the actions it may perform. \ No newline at end of file diff --git a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-include-warning-when-hooks-are-present.snap.svg b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-include-warning-when-hooks-are-present.snap.svg index 298ee141e2..9f4866dbdd 100644 --- a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-include-warning-when-hooks-are-present.snap.svg +++ b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-include-warning-when-hooks-are-present.snap.svg @@ -6,9 +6,9 @@ Installing extension "test-ext". ⚠️ This extension contains Hooks which can automatically execute commands. - The extension you are about to install may have been created by a third-party developer and sourced - from a public repository. Google does not vet, endorse, or guarantee the functionality or security - of extensions. Please carefully inspect any extension and its source code before installing to - understand the permissions it requires and the actions it may perform. + The extension you are about to install may have been created by a third-party developer and sourced + from a public repository. Google does not vet, endorse, or guarantee the functionality or security + of extensions. Please carefully inspect any extension and its source code before installing to + understand the permissions it requires and the actions it may perform. \ No newline at end of file diff --git a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-request-consent-if-skills-change.snap.svg b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-request-consent-if-skills-change.snap.svg index 69ff91035c..6f5879df4c 100644 --- a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-request-consent-if-skills-change.snap.svg +++ b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-request-consent-if-skills-change.snap.svg @@ -16,13 +16,13 @@ (Source: /mock/temp/dir/skill1/SKILL.md) (2 items in directory) * skill2: desc2 (Source: /mock/temp/dir/skill2/SKILL.md) (1 items in directory) - The extension you are about to install may have been created by a third-party developer and sourced - from a public repository. Google does not vet, endorse, or guarantee the functionality or security - of extensions. Please carefully inspect any extension and its source code before installing to - understand the permissions it requires and the actions it may perform. - Agent skills inject specialized instructions and domain-specific knowledge into the agent's system - prompt. This can change how the agent interprets your requests and interacts with your environment. - Review the skill definitions at the location(s) provided below to ensure they meet your security - standards. + The extension you are about to install may have been created by a third-party developer and sourced + from a public repository. Google does not vet, endorse, or guarantee the functionality or security + of extensions. Please carefully inspect any extension and its source code before installing to + understand the permissions it requires and the actions it may perform. + Agent skills inject specialized instructions and domain-specific knowledge into the agent's system + prompt. This can change how the agent interprets your requests and interacts with your environment. + Review the skill definitions at the location(s) provided below to ensure they meet your security + standards. \ No newline at end of file diff --git a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-show-a-warning-if-the-skill-directory-cannot-be-read.snap.svg b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-show-a-warning-if-the-skill-directory-cannot-be-read.snap.svg index 247f1ab7b8..3fff32664a 100644 --- a/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-show-a-warning-if-the-skill-directory-cannot-be-read.snap.svg +++ b/packages/cli/src/config/extensions/__snapshots__/consent-consent-maybeRequestConsentOrFail-consent-string-generation-should-show-a-warning-if-the-skill-directory-cannot-be-read.snap.svg @@ -8,14 +8,15 @@ Agent Skills: This extension will install the following agent skills: * locked-skill: A skill in a locked dir - (Source: /mock/temp/dir/locked/SKILL.md) ⚠️ (Could not count items in directory) - The extension you are about to install may have been created by a third-party developer and sourced - from a public repository. Google does not vet, endorse, or guarantee the functionality or security - of extensions. Please carefully inspect any extension and its source code before installing to - understand the permissions it requires and the actions it may perform. - Agent skills inject specialized instructions and domain-specific knowledge into the agent's system - prompt. This can change how the agent interprets your requests and interacts with your environment. - Review the skill definitions at the location(s) provided below to ensure they meet your security - standards. + (Source: /mock/temp/dir/locked/SKILL.md) + ⚠️ (Could not count items in directory) + The extension you are about to install may have been created by a third-party developer and sourced + from a public repository. Google does not vet, endorse, or guarantee the functionality or security + of extensions. Please carefully inspect any extension and its source code before installing to + understand the permissions it requires and the actions it may perform. + Agent skills inject specialized instructions and domain-specific knowledge into the agent's system + prompt. This can change how the agent interprets your requests and interacts with your environment. + Review the skill definitions at the location(s) provided below to ensure they meet your security + standards. \ No newline at end of file diff --git a/packages/cli/src/config/extensions/__snapshots__/consent-consent-skillsConsentString-should-generate-a-consent-string-for-skills.snap.svg b/packages/cli/src/config/extensions/__snapshots__/consent-consent-skillsConsentString-should-generate-a-consent-string-for-skills.snap.svg index 362c247ad2..c52724836e 100644 --- a/packages/cli/src/config/extensions/__snapshots__/consent-consent-skillsConsentString-should-generate-a-consent-string-for-skills.snap.svg +++ b/packages/cli/src/config/extensions/__snapshots__/consent-consent-skillsConsentString-should-generate-a-consent-string-for-skills.snap.svg @@ -9,9 +9,9 @@ * skill1: desc1 (Source: /mock/temp/dir/skill1/SKILL.md) (1 items in directory) Install Destination: /mock/target/dir - Agent skills inject specialized instructions and domain-specific knowledge into the agent's system - prompt. This can change how the agent interprets your requests and interacts with your environment. - Review the skill definitions at the location(s) provided below to ensure they meet your security - standards. + Agent skills inject specialized instructions and domain-specific knowledge into the agent's system + prompt. This can change how the agent interprets your requests and interacts with your environment. + Review the skill definitions at the location(s) provided below to ensure they meet your security + standards. \ No newline at end of file diff --git a/packages/cli/src/deferred.test.ts b/packages/cli/src/deferred.test.ts index 99b86c9827..fd9b7697ac 100644 --- a/packages/cli/src/deferred.test.ts +++ b/packages/cli/src/deferred.test.ts @@ -4,7 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { + beforeEach, + describe, + expect, + it, + type MockInstance, + vi, +} from 'vitest'; import { runDeferredCommand, defer, @@ -14,7 +21,6 @@ import { import { ExitCodes } from '@google/gemini-cli-core'; import type { ArgumentsCamelCase, CommandModule } from 'yargs'; import { createMockSettings } from './test-utils/settings.js'; -import type { MockInstance } from 'vitest'; const { mockRunExitCleanup, mockCoreEvents } = vi.hoisted(() => ({ mockRunExitCleanup: vi.fn(), diff --git a/packages/cli/src/services/FileCommandLoader.test.ts b/packages/cli/src/services/FileCommandLoader.test.ts index 450c6bf282..a79fb1e2b6 100644 --- a/packages/cli/src/services/FileCommandLoader.test.ts +++ b/packages/cli/src/services/FileCommandLoader.test.ts @@ -10,7 +10,15 @@ import type { Config } from '@google/gemini-cli-core'; import { GEMINI_DIR, Storage } from '@google/gemini-cli-core'; import mock from 'mock-fs'; import { FileCommandLoader } from './FileCommandLoader.js'; -import { assert, vi } from 'vitest'; +import { + assert, + vi, + describe, + it, + expect, + beforeEach, + afterEach, +} from 'vitest'; import { createMockCommandContext } from '../test-utils/mockCommandContext.js'; import { SHELL_INJECTION_TRIGGER, diff --git a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap index d95adcda95..450da8362e 100644 --- a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap +++ b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap @@ -2,14 +2,14 @@ exports[`App > Snapshots > renders default layout correctly 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -47,14 +47,14 @@ exports[`App > Snapshots > renders screen reader layout correctly 1`] = ` "Notifications Footer - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -67,14 +67,14 @@ Composer exports[`App > Snapshots > renders with dialogs visible 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ @@ -110,14 +110,14 @@ DialogManager exports[`App > should render ToolConfirmationQueue along with Composer when tool is confirming and experiment is on 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. diff --git a/packages/cli/src/ui/commands/clearCommand.test.ts b/packages/cli/src/ui/commands/clearCommand.test.ts index d33dc5884d..9467142b32 100644 --- a/packages/cli/src/ui/commands/clearCommand.test.ts +++ b/packages/cli/src/ui/commands/clearCommand.test.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { Mock } from 'vitest'; -import { vi, describe, it, expect, beforeEach } from 'vitest'; +import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'; import { clearCommand } from './clearCommand.js'; import { type CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; diff --git a/packages/cli/src/ui/commands/copyCommand.test.ts b/packages/cli/src/ui/commands/copyCommand.test.ts index e8aace1bcc..29c6b94b71 100644 --- a/packages/cli/src/ui/commands/copyCommand.test.ts +++ b/packages/cli/src/ui/commands/copyCommand.test.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { Mock } from 'vitest'; -import { vi, describe, it, expect, beforeEach } from 'vitest'; +import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'; import { copyCommand } from './copyCommand.js'; import { type CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; diff --git a/packages/cli/src/ui/commands/ideCommand.test.ts b/packages/cli/src/ui/commands/ideCommand.test.ts index 73486e2bf1..7b01f80ba9 100644 --- a/packages/cli/src/ui/commands/ideCommand.test.ts +++ b/packages/cli/src/ui/commands/ideCommand.test.ts @@ -4,8 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { MockInstance } from 'vitest'; -import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type MockInstance, + vi, +} from 'vitest'; import { ideCommand } from './ideCommand.js'; import { type CommandContext } from './types.js'; import { IDE_DEFINITIONS } from '@google/gemini-cli-core'; diff --git a/packages/cli/src/ui/commands/memoryCommand.test.ts b/packages/cli/src/ui/commands/memoryCommand.test.ts index 1a2c7e3936..fafdc89c26 100644 --- a/packages/cli/src/ui/commands/memoryCommand.test.ts +++ b/packages/cli/src/ui/commands/memoryCommand.test.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { Mock } from 'vitest'; -import { vi, describe, it, expect, beforeEach } from 'vitest'; +import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'; import { memoryCommand } from './memoryCommand.js'; import type { SlashCommand, CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; diff --git a/packages/cli/src/ui/commands/toolsCommand.test.ts b/packages/cli/src/ui/commands/toolsCommand.test.ts index 257e6ba167..9c99d05619 100644 --- a/packages/cli/src/ui/commands/toolsCommand.test.ts +++ b/packages/cli/src/ui/commands/toolsCommand.test.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { vi } from 'vitest'; -import { describe, it, expect } from 'vitest'; +import { describe, expect, it, type vi } from 'vitest'; import { toolsCommand } from './toolsCommand.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { MessageType } from '../types.js'; diff --git a/packages/cli/src/ui/commands/workspaceCommand.test.tsx b/packages/cli/src/ui/commands/workspaceCommand.test.tsx index 4ea35b1549..8440b3d089 100644 --- a/packages/cli/src/ui/commands/workspaceCommand.test.tsx +++ b/packages/cli/src/ui/commands/workspaceCommand.test.tsx @@ -4,8 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; -import type { Mock } from 'vitest'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { workspaceCommand } from './workspaceCommand.js'; import { expandHomeDir, diff --git a/packages/cli/src/ui/components/AnsiOutput.test.tsx b/packages/cli/src/ui/components/AnsiOutput.test.tsx index ac824fefe6..6acc24db9a 100644 --- a/packages/cli/src/ui/components/AnsiOutput.test.tsx +++ b/packages/cli/src/ui/components/AnsiOutput.test.tsx @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { describe, it, expect } from 'vitest'; import { render } from '../../test-utils/render.js'; import { AnsiOutputText } from './AnsiOutput.js'; import type { AnsiOutput, AnsiToken } from '@google/gemini-cli-core'; diff --git a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx index f2a869c78a..0acd02763d 100644 --- a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx +++ b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx @@ -292,7 +292,7 @@ describe('FolderTrustDialog', () => { describe('directory display', () => { it('should correctly display the folder name for a nested directory', async () => { - mockedCwd.mockReturnValue('/home/user/project'); + mockedCwd.mockReturnValue('/home/user/workspace'); const { lastFrame, waitUntilReady, unmount } = renderWithProviders( , ); @@ -302,7 +302,7 @@ describe('FolderTrustDialog', () => { }); it('should correctly display the parent folder name for a nested directory', async () => { - mockedCwd.mockReturnValue('/home/user/project'); + mockedCwd.mockReturnValue('/home/user/workspace'); const { lastFrame, waitUntilReady, unmount } = renderWithProviders( , ); diff --git a/packages/cli/src/ui/components/LoadingIndicator.test.tsx b/packages/cli/src/ui/components/LoadingIndicator.test.tsx index 61cd64d07a..5fbc93d9f8 100644 --- a/packages/cli/src/ui/components/LoadingIndicator.test.tsx +++ b/packages/cli/src/ui/components/LoadingIndicator.test.tsx @@ -1,16 +1,15 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - +import { describe, expect, it, vi } from 'vitest'; import React, { act } from 'react'; import { renderWithProviders } from '../../test-utils/render.js'; import { Text } from 'ink'; import { LoadingIndicator } from './LoadingIndicator.js'; import { StreamingContext } from '../contexts/StreamingContext.js'; import { StreamingState } from '../types.js'; -import { vi } from 'vitest'; import * as useTerminalSize from '../hooks/useTerminalSize.js'; // Mock GeminiRespondingSpinner diff --git a/packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx b/packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx index 9ffaa8797b..69458c3036 100644 --- a/packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx +++ b/packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx @@ -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 { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { renderWithProviders } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; import { PermissionsModifyTrustDialog } from './PermissionsModifyTrustDialog.js'; diff --git a/packages/cli/src/ui/components/RewindViewer.test.tsx b/packages/cli/src/ui/components/RewindViewer.test.tsx index 1f398873f7..4fe4835a7c 100644 --- a/packages/cli/src/ui/components/RewindViewer.test.tsx +++ b/packages/cli/src/ui/components/RewindViewer.test.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { describe, it, expect, vi, afterEach } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { act } from 'react'; import { renderWithProviders } from '../../test-utils/render.js'; import { RewindViewer } from './RewindViewer.js'; diff --git a/packages/cli/src/ui/components/SettingsDialog.test.tsx b/packages/cli/src/ui/components/SettingsDialog.test.tsx index 80a822f9dd..7f193c4151 100644 --- a/packages/cli/src/ui/components/SettingsDialog.test.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.test.tsx @@ -1,3 +1,8 @@ +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ /** * @license * Copyright 2025 Google LLC @@ -24,7 +29,7 @@ import { render } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; import { describe, it, expect, vi, beforeEach } from 'vitest'; -import '../../../test-utils/customMatchers.js'; +import '../../test-utils/customMatchers.js'; import { SettingsDialog } from './SettingsDialog.js'; import { LoadedSettings, SettingScope } from '../../config/settings.js'; import { createMockSettings } from '../../test-utils/settings.js'; diff --git a/packages/cli/src/ui/components/Table.test.tsx b/packages/cli/src/ui/components/Table.test.tsx index e8f312d9af..4a1b9122a5 100644 --- a/packages/cli/src/ui/components/Table.test.tsx +++ b/packages/cli/src/ui/components/Table.test.tsx @@ -1,9 +1,16 @@ +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +import '../../test-utils/customMatchers.js'; /** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ +import { describe, it, expect } from 'vitest'; import { render } from '../../test-utils/render.js'; import { Table } from './Table.js'; import { Text } from 'ink'; diff --git a/packages/cli/src/ui/components/__snapshots__/AlternateBufferQuittingDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/AlternateBufferQuittingDisplay.test.tsx.snap index 8fb49b8b71..18e75b75e2 100644 --- a/packages/cli/src/ui/components/__snapshots__/AlternateBufferQuittingDisplay.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/AlternateBufferQuittingDisplay.test.tsx.snap @@ -2,14 +2,14 @@ exports[`AlternateBufferQuittingDisplay > renders with a tool awaiting confirmation > with_confirming_tool 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -25,14 +25,14 @@ Action Required (was prompted): exports[`AlternateBufferQuittingDisplay > renders with active and pending tool messages > with_history_and_pending 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -52,14 +52,14 @@ Tips for getting started: exports[`AlternateBufferQuittingDisplay > renders with empty history and no pending items > empty 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -71,14 +71,14 @@ Tips for getting started: exports[`AlternateBufferQuittingDisplay > renders with history but no pending items > with_history_no_pending 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -98,14 +98,14 @@ Tips for getting started: exports[`AlternateBufferQuittingDisplay > renders with pending items but no history > with_pending_no_history 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -117,14 +117,14 @@ Tips for getting started: exports[`AlternateBufferQuittingDisplay > renders with user and gemini messages > with_user_gemini_messages 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -132,7 +132,7 @@ Tips for getting started: 3. Create GEMINI.md files to customize your interactions with Gemini. 4. /help for more information. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Hello Gemini + > Hello Gemini ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ✦ Hello User! " diff --git a/packages/cli/src/ui/components/__snapshots__/AppHeader.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/AppHeader.test.tsx.snap index 59cf561759..324274fddd 100644 --- a/packages/cli/src/ui/components/__snapshots__/AppHeader.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/AppHeader.test.tsx.snap @@ -2,14 +2,14 @@ exports[` > should not render the banner when no flags are set 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -21,14 +21,14 @@ Tips for getting started: exports[` > should not render the default banner if shown count is 5 or more 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ Tips for getting started: 1. Ask questions, edit files, or run commands. @@ -40,14 +40,14 @@ Tips for getting started: exports[` > should render the banner with default text 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │ This is the default banner │ @@ -62,14 +62,14 @@ Tips for getting started: exports[` > should render the banner with warning text 1`] = ` " - ███ █████████ + ███ █████████ ░░░███ ███░░░░░███ - ░░░███ ███ ░░░ - ░░░███░███ + ░░░███ ███ ░░░ + ░░░███░███ ███░ ░███ █████ - ███░ ░░███ ░░███ - ███░ ░░█████████ -░░░ ░░░░░░░░░ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │ There are capacity issues │ diff --git a/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap index 6a9bf5aeac..88a1b0486f 100644 --- a/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap @@ -2,16 +2,16 @@ exports[`InputPrompt > History Navigation and Completion Suppression > should not render suggestions during history navigation 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > second message + > second message ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > command search (Ctrl+R when not in shell) > expands and collapses long suggestion via Right/Left arrows > command-search-render-collapsed-match 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - (r:) Type your message or @path/to/file + (r:) Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ - lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll → + lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll → lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ... " @@ -19,9 +19,9 @@ exports[`InputPrompt > command search (Ctrl+R when not in shell) > expands and c exports[`InputPrompt > command search (Ctrl+R when not in shell) > expands and collapses long suggestion via Right/Left arrows > command-search-render-expanded-match 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - (r:) Type your message or @path/to/file + (r:) Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ - lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ← + lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ← lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllllllllllllllllllllllllll " @@ -29,7 +29,7 @@ exports[`InputPrompt > command search (Ctrl+R when not in shell) > expands and c exports[`InputPrompt > command search (Ctrl+R when not in shell) > renders match window and expanded view (snapshots) > command-search-render-collapsed-match 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - (r:) commit + (r:) commit ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ git commit -m "feat: add search" in src/app " @@ -37,7 +37,7 @@ exports[`InputPrompt > command search (Ctrl+R when not in shell) > renders match exports[`InputPrompt > command search (Ctrl+R when not in shell) > renders match window and expanded view (snapshots) > command-search-render-expanded-match 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - (r:) commit + (r:) commit ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ git commit -m "feat: add search" in src/app " @@ -45,63 +45,63 @@ exports[`InputPrompt > command search (Ctrl+R when not in shell) > renders match exports[`InputPrompt > image path transformation snapshots > should snapshot collapsed image path 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > [Image ...reenshot2x.png] + > [Image ...reenshot2x.png] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > image path transformation snapshots > should snapshot expanded image path when cursor is on it 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > @/path/to/screenshots/screenshot2x.png + > @/path/to/screenshots/screenshot2x.png ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > [Pasted Text: 10 lines] + > [Pasted Text: 10 lines] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 2`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > [Pasted Text: 10 lines] + > [Pasted Text: 10 lines] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 3`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > [Pasted Text: 10 lines] + > [Pasted Text: 10 lines] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > snapshots > should not show inverted cursor when shell is focused 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Type your message or @path/to/file + > Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > snapshots > should render correctly in shell mode 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - ! Type your message or @path/to/file + ! Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > snapshots > should render correctly in yolo mode 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - * Type your message or @path/to/file + * Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`InputPrompt > snapshots > should render correctly when accepting edits 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Type your message or @path/to/file + > Type your message or @path/to/file ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; diff --git a/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap new file mode 100644 index 0000000000..be2dd8d9a2 --- /dev/null +++ b/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap @@ -0,0 +1,415 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`SettingsDialog > Initial Rendering > should render settings list with visual indicators 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'accessibility settings enabled' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode true* │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'all boolean settings disabled' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false* │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true* │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false* │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'default state' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'file filtering settings configured' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'focused on scope selector' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ Vim Mode false │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ > Apply To │ +│ ● 1. User Settings │ +│ 2. Workspace Settings │ +│ 3. System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'mixed boolean and number settings' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false* │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update false* │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'tools and security settings' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode false │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update true │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging false │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`SettingsDialog > Snapshot Tests > should render 'various boolean settings enabled' correctly 1`] = ` +"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ > Settings │ +│ │ +│ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ +│ │ Search to filter │ │ +│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ │ +│ ▲ │ +│ ● Vim Mode true* │ +│ Enable Vim keybindings │ +│ │ +│ Default Approval Mode Default │ +│ The default approval mode for tool execution. 'default' prompts for approval, 'au… │ +│ │ +│ Enable Auto Update false* │ +│ Enable automatic updates. │ +│ │ +│ Enable Notifications false │ +│ Enable run-event notifications for action-required prompts and session completion. … │ +│ │ +│ Plan Directory undefined │ +│ The directory where planning artifacts are stored. If not specified, defaults t… │ +│ │ +│ Plan Model Routing true │ +│ Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pr… │ +│ │ +│ Max Chat Model Attempts 10 │ +│ Maximum number of attempts for requests to the main chat model. Cannot exceed 10. │ +│ │ +│ Debug Keystroke Logging true* │ +│ Enable debug logging of keystrokes to the console. │ +│ │ +│ ▼ │ +│ │ +│ Apply To │ +│ ● User Settings │ +│ Workspace Settings │ +│ System Settings │ +│ │ +│ (Use Enter to select, Ctrl+L to reset, Tab to change focus, Esc to close) │ +│ │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" +`; diff --git a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx index 9063606146..64e27548ea 100644 --- a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx +++ b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx @@ -4,12 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { beforeEach, describe, expect, it, vi } from 'vitest'; import { OverflowProvider } from '../../contexts/OverflowContext.js'; import { renderWithProviders } from '../../../test-utils/render.js'; import { waitFor } from '../../../test-utils/async.js'; import { DiffRenderer } from './DiffRenderer.js'; import * as CodeColorizer from '../../utils/CodeColorizer.js'; -import { vi } from 'vitest'; describe('', () => { const mockColorizeCode = vi.spyOn(CodeColorizer, 'colorizeCode'); diff --git a/packages/cli/src/ui/components/messages/GeminiMessage.test.tsx b/packages/cli/src/ui/components/messages/GeminiMessage.test.tsx index dca4a9a652..c0539dc8ea 100644 --- a/packages/cli/src/ui/components/messages/GeminiMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/GeminiMessage.test.tsx @@ -1,9 +1,9 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - +import { describe, expect, it } from 'vitest'; import { GeminiMessage } from './GeminiMessage.js'; import { StreamingState } from '../../types.js'; import { renderWithProviders } from '../../../test-utils/render.js'; diff --git a/packages/cli/src/ui/components/messages/ToolMessage.test.tsx b/packages/cli/src/ui/components/messages/ToolMessage.test.tsx index df4354b1c4..3877c039c6 100644 --- a/packages/cli/src/ui/components/messages/ToolMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/ToolMessage.test.tsx @@ -5,8 +5,8 @@ */ import type React from 'react'; +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { ToolMessage, type ToolMessageProps } from './ToolMessage.js'; -import { describe, it, expect, vi } from 'vitest'; import { StreamingState } from '../../types.js'; import { Text } from 'ink'; import { type AnsiOutput, CoreToolCallStatus } from '@google/gemini-cli-core'; diff --git a/packages/cli/src/ui/components/messages/__snapshots__/UserMessage.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/UserMessage.test.tsx.snap index 9488a20ba3..679a5885d1 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/UserMessage.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/UserMessage.test.tsx.snap @@ -2,29 +2,29 @@ exports[`UserMessage > renders multiline user message 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Line 1 - Line 2 + > Line 1 + Line 2 ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`UserMessage > renders normal user message with correct prefix 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Hello Gemini + > Hello Gemini ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`UserMessage > renders slash command message 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > /help + > /help ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; exports[`UserMessage > transforms image paths in user message 1`] = ` "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - > Check out this image: [Image my-image.png] + > Check out this image: [Image my-image.png] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; diff --git a/packages/cli/src/ui/components/shared/ExpandableText.test.tsx b/packages/cli/src/ui/components/shared/ExpandableText.test.tsx index 429e35acd3..859b1bb4c3 100644 --- a/packages/cli/src/ui/components/shared/ExpandableText.test.tsx +++ b/packages/cli/src/ui/components/shared/ExpandableText.test.tsx @@ -5,7 +5,7 @@ */ import { describe, it, expect } from 'vitest'; -import '../../../../test-utils/customMatchers.js'; +import '../../../test-utils/customMatchers.js'; import { render } from '../../../test-utils/render.js'; import { ExpandableText, MAX_WIDTH } from './ExpandableText.js'; diff --git a/packages/cli/src/ui/components/shared/__snapshots__/EnumSelector.test.tsx.snap b/packages/cli/src/ui/components/shared/__snapshots__/EnumSelector.test.tsx.snap index 8fd19b3868..203ceb61d6 100644 --- a/packages/cli/src/ui/components/shared/__snapshots__/EnumSelector.test.tsx.snap +++ b/packages/cli/src/ui/components/shared/__snapshots__/EnumSelector.test.tsx.snap @@ -11,7 +11,7 @@ exports[` > renders with numeric options and matches snapshot 1` `; exports[` > renders with single option and matches snapshot 1`] = ` -" Only Option +" Only Option " `; diff --git a/packages/cli/src/ui/components/shared/__snapshots__/ExpandableText.test.tsx.snap b/packages/cli/src/ui/components/shared/__snapshots__/ExpandableText.test.tsx.snap new file mode 100644 index 0000000000..8716c962ea --- /dev/null +++ b/packages/cli/src/ui/components/shared/__snapshots__/ExpandableText.test.tsx.snap @@ -0,0 +1,27 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`ExpandableText > creates centered window around match when collapsed 1`] = ` +"...ry/long/path/that/keeps/going/cd_/very/long/path/that/keeps/going/search-here/and/then/some/more/ +components//and/then/some/more/components//and/..." +`; + +exports[`ExpandableText > highlights matched substring when expanded (text only visible) 1`] = `"run: git commit -m "feat: add search""`; + +exports[`ExpandableText > renders plain label when no match (short label) 1`] = `"simple command"`; + +exports[`ExpandableText > respects custom maxWidth 1`] = `"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz..."`; + +exports[`ExpandableText > shows full long label when expanded and no match 1`] = ` +"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy +yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" +`; + +exports[`ExpandableText > truncates long label when collapsed and no match 1`] = ` +"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..." +`; + +exports[`ExpandableText > truncates match itself when match is very long 1`] = ` +"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..." +`; diff --git a/packages/cli/src/ui/components/shared/__snapshots__/HalfLinePaddedBox.test.tsx.snap b/packages/cli/src/ui/components/shared/__snapshots__/HalfLinePaddedBox.test.tsx.snap index 5dcbfda73d..dbb9af2991 100644 --- a/packages/cli/src/ui/components/shared/__snapshots__/HalfLinePaddedBox.test.tsx.snap +++ b/packages/cli/src/ui/components/shared/__snapshots__/HalfLinePaddedBox.test.tsx.snap @@ -2,7 +2,7 @@ exports[` > renders iTerm2-specific blocks when iTerm2 is detected 1`] = ` "▄▄▄▄▄▄▄▄▄▄ -Content +Content ▀▀▀▀▀▀▀▀▀▀ " `; @@ -19,7 +19,7 @@ exports[` > renders nothing when useBackgroundColor is fals exports[` > renders standard background and blocks when not iTerm2 1`] = ` "▀▀▀▀▀▀▀▀▀▀ -Content +Content ▄▄▄▄▄▄▄▄▄▄ " `; diff --git a/packages/cli/src/ui/components/shared/__snapshots__/SearchableList.test.tsx.snap b/packages/cli/src/ui/components/shared/__snapshots__/SearchableList.test.tsx.snap index 35f21daee3..803ec8dd98 100644 --- a/packages/cli/src/ui/components/shared/__snapshots__/SearchableList.test.tsx.snap +++ b/packages/cli/src/ui/components/shared/__snapshots__/SearchableList.test.tsx.snap @@ -7,7 +7,7 @@ exports[`SearchableList > should match snapshot 1`] = ` │ Search... │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ - ● Item One + ● Item One Description for item one Item Two @@ -28,7 +28,7 @@ exports[`SearchableList > should reset selection to top when items change if res Item One Description for item one - ● Item Two + ● Item Two Description for item two Item Three @@ -43,7 +43,7 @@ exports[`SearchableList > should reset selection to top when items change if res │ One │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ - ● Item One + ● Item One Description for item one " `; @@ -55,7 +55,7 @@ exports[`SearchableList > should reset selection to top when items change if res │ Search... │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ - ● Item One + ● Item One Description for item one Item Two diff --git a/packages/cli/src/ui/contexts/KeypressContext.test.tsx b/packages/cli/src/ui/contexts/KeypressContext.test.tsx index e25ff57642..2b946eb35f 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.test.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.test.tsx @@ -7,10 +7,19 @@ import { debugLogger } from '@google/gemini-cli-core'; import type React from 'react'; import { act } from 'react'; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { renderHook } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; -import type { Mock } from 'vitest'; -import { vi, afterAll, beforeAll } from 'vitest'; import type { Key } from './KeypressContext.js'; import { KeypressProvider, diff --git a/packages/cli/src/ui/contexts/MouseContext.test.tsx b/packages/cli/src/ui/contexts/MouseContext.test.tsx index 2f0d9ed1ed..c678442ce7 100644 --- a/packages/cli/src/ui/contexts/MouseContext.test.tsx +++ b/packages/cli/src/ui/contexts/MouseContext.test.tsx @@ -4,10 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { renderHook } from '../../test-utils/render.js'; import { act } from 'react'; import { MouseProvider, useMouseContext, useMouse } from './MouseContext.js'; -import { vi, type Mock } from 'vitest'; import type React from 'react'; import { useStdin } from 'ink'; import { EventEmitter } from 'node:events'; diff --git a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts index 0d6fc2393a..dbc5714e28 100644 --- a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts @@ -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 { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { handleAtCommand } from './atCommandProcessor.js'; import type { Config, DiscoveredMCPResource } from '@google/gemini-cli-core'; import { diff --git a/packages/cli/src/ui/hooks/useConsoleMessages.test.tsx b/packages/cli/src/ui/hooks/useConsoleMessages.test.tsx index 8761ef7167..5316deaeac 100644 --- a/packages/cli/src/ui/hooks/useConsoleMessages.test.tsx +++ b/packages/cli/src/ui/hooks/useConsoleMessages.test.tsx @@ -5,7 +5,7 @@ */ import { act, useCallback } from 'react'; -import { vi } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { render } from '../../test-utils/render.js'; import { useConsoleMessages } from './useConsoleMessages.js'; import { CoreEvent, type ConsoleLogPayload } from '@google/gemini-cli-core'; diff --git a/packages/cli/src/ui/hooks/useFlickerDetector.test.ts b/packages/cli/src/ui/hooks/useFlickerDetector.test.ts index cbe5e4f14e..39e7663a11 100644 --- a/packages/cli/src/ui/hooks/useFlickerDetector.test.ts +++ b/packages/cli/src/ui/hooks/useFlickerDetector.test.ts @@ -4,8 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { renderHook } from '../../test-utils/render.js'; -import { vi, type Mock } from 'vitest'; import { useFlickerDetector } from './useFlickerDetector.js'; import { useConfig } from '../contexts/ConfigContext.js'; import { recordFlickerFrame } from '@google/gemini-cli-core'; diff --git a/packages/cli/src/ui/hooks/useFocus.test.tsx b/packages/cli/src/ui/hooks/useFocus.test.tsx index 86484cc1b9..10662fb829 100644 --- a/packages/cli/src/ui/hooks/useFocus.test.tsx +++ b/packages/cli/src/ui/hooks/useFocus.test.tsx @@ -4,10 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { render } from '../../test-utils/render.js'; import { EventEmitter } from 'node:events'; import { useFocus } from './useFocus.js'; -import { vi, type Mock } from 'vitest'; import { useStdin, useStdout } from 'ink'; import { KeypressProvider } from '../contexts/KeypressContext.js'; import { act } from 'react'; diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx index df8c17bd23..5621ebd646 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx +++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx @@ -5,8 +5,15 @@ */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { Mock, MockInstance } from 'vitest'; -import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { + beforeEach, + describe, + expect, + it, + type Mock, + type MockInstance, + vi, +} from 'vitest'; import { act } from 'react'; import { renderHookWithProviders } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; diff --git a/packages/cli/src/ui/hooks/useGitBranchName.test.tsx b/packages/cli/src/ui/hooks/useGitBranchName.test.tsx index dd85e73e7e..71b1de2a38 100644 --- a/packages/cli/src/ui/hooks/useGitBranchName.test.tsx +++ b/packages/cli/src/ui/hooks/useGitBranchName.test.tsx @@ -4,8 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { MockedFunction } from 'vitest'; -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type MockedFunction, + vi, +} from 'vitest'; import { act } from 'react'; import { render } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; diff --git a/packages/cli/src/ui/hooks/useIncludeDirsTrust.test.tsx b/packages/cli/src/ui/hooks/useIncludeDirsTrust.test.tsx index 87fb0cc358..e59c9b0405 100644 --- a/packages/cli/src/ui/hooks/useIncludeDirsTrust.test.tsx +++ b/packages/cli/src/ui/hooks/useIncludeDirsTrust.test.tsx @@ -4,8 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; -import type { Mock } from 'vitest'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { renderHook } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; import { useIncludeDirsTrust } from './useIncludeDirsTrust.js'; diff --git a/packages/cli/src/ui/hooks/useKeypress.test.tsx b/packages/cli/src/ui/hooks/useKeypress.test.tsx index cde15186d9..331d6a4bc4 100644 --- a/packages/cli/src/ui/hooks/useKeypress.test.tsx +++ b/packages/cli/src/ui/hooks/useKeypress.test.tsx @@ -5,12 +5,20 @@ */ import { act } from 'react'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { render } from '../../test-utils/render.js'; import { useKeypress } from './useKeypress.js'; import { KeypressProvider } from '../contexts/KeypressContext.js'; import { useStdin } from 'ink'; import { EventEmitter } from 'node:events'; -import type { Mock } from 'vitest'; // Mock the 'ink' module to control stdin vi.mock('ink', async (importOriginal) => { diff --git a/packages/cli/src/ui/hooks/useMemoryMonitor.test.tsx b/packages/cli/src/ui/hooks/useMemoryMonitor.test.tsx index c421270d81..4066f73f63 100644 --- a/packages/cli/src/ui/hooks/useMemoryMonitor.test.tsx +++ b/packages/cli/src/ui/hooks/useMemoryMonitor.test.tsx @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { render } from '../../test-utils/render.js'; -import { vi } from 'vitest'; import { useMemoryMonitor, MEMORY_CHECK_INTERVAL, diff --git a/packages/cli/src/ui/hooks/useMouse.test.ts b/packages/cli/src/ui/hooks/useMouse.test.ts index 2dea0ee16c..7a72ff7805 100644 --- a/packages/cli/src/ui/hooks/useMouse.test.ts +++ b/packages/cli/src/ui/hooks/useMouse.test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { vi } from 'vitest'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; import { renderHook } from '../../test-utils/render.js'; import { useMouse } from './useMouse.js'; import { MouseProvider, useMouseContext } from '../contexts/MouseContext.js'; diff --git a/packages/cli/src/ui/hooks/vim.test.tsx b/packages/cli/src/ui/hooks/vim.test.tsx index 7b03354eae..8a488594e2 100644 --- a/packages/cli/src/ui/hooks/vim.test.tsx +++ b/packages/cli/src/ui/hooks/vim.test.tsx @@ -4,7 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { describe, it, expect, vi, beforeEach, type Mock } from 'vitest'; +import { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import type React from 'react'; import { act } from 'react'; import { renderHook } from '../../test-utils/render.js'; diff --git a/packages/cli/src/ui/utils/TableRenderer.test.tsx b/packages/cli/src/ui/utils/TableRenderer.test.tsx index e3f736d183..5d0e24d531 100644 --- a/packages/cli/src/ui/utils/TableRenderer.test.tsx +++ b/packages/cli/src/ui/utils/TableRenderer.test.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; -import '../../../test-utils/customMatchers.js'; +import '../../test-utils/customMatchers.js'; import { TableRenderer } from './TableRenderer.js'; import { renderWithProviders } from '../../test-utils/render.js'; diff --git a/packages/cli/src/ui/utils/__snapshots__/TableRenderer.test.tsx.snap b/packages/cli/src/ui/utils/__snapshots__/TableRenderer.test.tsx.snap new file mode 100644 index 0000000000..9b5c1e875a --- /dev/null +++ b/packages/cli/src/ui/utils/__snapshots__/TableRenderer.test.tsx.snap @@ -0,0 +1,270 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`TableRenderer > 'calculates column widths based on ren…' 1`] = ` +" +┌────────┬────────┬────────┐ +│ Col 1 │ Col 2 │ Col 3 │ +├────────┼────────┼────────┤ +│ 123456 │ Normal │ Short │ +│ Short │ 123456 │ Normal │ +│ Normal │ Short │ 123456 │ +└────────┴────────┴────────┘ +" +`; + +exports[`TableRenderer > 'calculates width correctly for conten…' 1`] = ` +" +┌───────────────────────────────────┬───────────────────────────────┬─────────────────────────────────┐ +│ Col 1 │ Col 2 │ Col 3 │ +├───────────────────────────────────┼───────────────────────────────┼─────────────────────────────────┤ +│ Visit Google (https://google.com) │ Plain Text │ More Info │ +│ Info Here │ Visit Bing (https://bing.com) │ Links │ +│ Check This │ Search │ Visit Yahoo (https://yahoo.com) │ +└───────────────────────────────────┴───────────────────────────────┴─────────────────────────────────┘ +" +`; + +exports[`TableRenderer > 'does not parse markdown inside code s…' 1`] = ` +" +┌─────────────────┬──────────────────────┬──────────────────┐ +│ Col 1 │ Col 2 │ Col 3 │ +├─────────────────┼──────────────────────┼──────────────────┤ +│ **not bold** │ _not italic_ │ ~~not strike~~ │ +│ [not link](url) │ not underline │ https://not.link │ +│ Normal Text │ More Code: *test* │ ***nested*** │ +└─────────────────┴──────────────────────┴──────────────────┘ +" +`; + +exports[`TableRenderer > 'handles nested markdown styles recurs…' 1`] = ` +" +┌─────────────────────────────┬─────────────────────────────┬─────────────────────────────┐ +│ Header 1 │ Header 2 │ Header 3 │ +├─────────────────────────────┼─────────────────────────────┼─────────────────────────────┤ +│ Bold with Italic and Strike │ Normal │ Short │ +│ Short │ Bold with Italic and Strike │ Normal │ +│ Normal │ Short │ Bold with Italic and Strike │ +└─────────────────────────────┴─────────────────────────────┴─────────────────────────────┘ +" +`; + +exports[`TableRenderer > 'handles non-ASCII characters (emojis …' 1`] = ` +" +┌──────────────┬────────────┬───────────────┐ +│ Emoji 😃 │ Asian 汉字 │ Mixed 🚀 Text │ +├──────────────┼────────────┼───────────────┤ +│ Start 🌟 End │ 你好世界 │ Rocket 🚀 Man │ +│ Thumbs 👍 Up │ こんにちは │ Fire 🔥 │ +└──────────────┴────────────┴───────────────┘ +" +`; + +exports[`TableRenderer > 'renders a table with mixed emojis, As…' 1`] = ` +" +┌───────────────┬───────────────────┬────────────────┐ +│ Mixed 😃 中文 │ Complex 🚀 日本語 │ Text 📝 한국어 │ +├───────────────┼───────────────────┼────────────────┤ +│ 你好 😃 │ こんにちは 🚀 │ 안녕하세요 📝 │ +│ World 🌍 │ Code 💻 │ Pizza 🍕 │ +└───────────────┴───────────────────┴────────────────┘ +" +`; + +exports[`TableRenderer > 'renders a table with only Asian chara…' 1`] = ` +" +┌──────────────┬─────────────────┬───────────────┐ +│ Chinese 中文 │ Japanese 日本語 │ Korean 한국어 │ +├──────────────┼─────────────────┼───────────────┤ +│ 你好 │ こんにちは │ 안녕하세요 │ +│ 世界 │ 世界 │ 세계 │ +└──────────────┴─────────────────┴───────────────┘ +" +`; + +exports[`TableRenderer > 'renders a table with only emojis and …' 1`] = ` +" +┌──────────┬───────────┬──────────┐ +│ Happy 😀 │ Rocket 🚀 │ Heart ❤️ │ +├──────────┼───────────┼──────────┤ +│ Smile 😃 │ Fire 🔥 │ Love 💖 │ +│ Cool 😎 │ Star ⭐ │ Blue 💙 │ +└──────────┴───────────┴──────────┘ +" +`; + +exports[`TableRenderer > 'renders complex markdown in rows and …' 1`] = ` +" +┌───────────────┬─────────────────────────────┐ +│ Feature │ Markdown │ +├───────────────┼─────────────────────────────┤ +│ Bold │ Bold Text │ +│ Italic │ Italic Text │ +│ Combined │ Bold and Italic │ +│ Link │ Google (https://google.com) │ +│ Code │ const x = 1 │ +│ Strikethrough │ Strike │ +│ Underline │ Underline │ +└───────────────┴─────────────────────────────┘ +" +`; + +exports[`TableRenderer > 'renders correctly when headers are em…' 1`] = ` +" +┌────────┬────────┐ +│ │ │ +├────────┼────────┤ +│ Data 1 │ Data 2 │ +└────────┴────────┘ +" +`; + +exports[`TableRenderer > 'renders correctly when there are more…' 1`] = ` +" +┌──────────┬──────────┬──────────┐ +│ Header 1 │ Header 2 │ Header 3 │ +├──────────┼──────────┼──────────┤ +│ Data 1 │ Data 2 │ │ +└──────────┴──────────┴──────────┘ +" +`; + +exports[`TableRenderer > handles wrapped bold headers without showing markers 1`] = ` +" +┌─────────────┬───────┬─────────┐ +│ Very Long │ Short │ Another │ +│ Bold Header │ │ Long │ +│ That Will │ │ Header │ +│ Wrap │ │ │ +├─────────────┼───────┼─────────┤ +│ Data 1 │ Data │ Data 3 │ +│ │ 2 │ │ +└─────────────┴───────┴─────────┘ +" +`; + +exports[`TableRenderer > renders a 3x3 table correctly 1`] = ` +" +┌──────────────┬──────────────┬──────────────┐ +│ Header 1 │ Header 2 │ Header 3 │ +├──────────────┼──────────────┼──────────────┤ +│ Row 1, Col 1 │ Row 1, Col 2 │ Row 1, Col 3 │ +│ Row 2, Col 1 │ Row 2, Col 2 │ Row 2, Col 3 │ +│ Row 3, Col 1 │ Row 3, Col 2 │ Row 3, Col 3 │ +└──────────────┴──────────────┴──────────────┘ +" +`; + +exports[`TableRenderer > renders a complex table with mixed content lengths correctly 1`] = ` +" +┌─────────────────────────────┬──────────────────────────────┬─────────────────────────────┬──────────────────────────────┬─────┬────────┬─────────┬───────┐ +│ Comprehensive Architectural │ Implementation Details for │ Longitudinal Performance │ Strategic Security Framework │ Key │ Status │ Version │ Owner │ +│ Specification for the │ the High-Throughput │ Analysis Across │ for Mitigating Sophisticated │ │ │ │ │ +│ Distributed Infrastructure │ Asynchronous Message │ Multi-Regional Cloud │ Cross-Site Scripting │ │ │ │ │ +│ Layer │ Processing Pipeline with │ Deployment Clusters │ Vulnerabilities │ │ │ │ │ +│ │ Extended Scalability │ │ │ │ │ │ │ +│ │ Features and Redundancy │ │ │ │ │ │ │ +│ │ Protocols │ │ │ │ │ │ │ +├─────────────────────────────┼──────────────────────────────┼─────────────────────────────┼──────────────────────────────┼─────┼────────┼─────────┼───────┤ +│ The primary architecture │ Each message is processed │ Historical data indicates a │ A multi-layered defense │ INF │ Active │ v2.4 │ J. │ +│ utilizes a decoupled │ through a series of │ significant reduction in │ strategy incorporates │ │ │ │ Doe │ +│ microservices approach, │ specialized workers that │ tail latency when utilizing │ content security policies, │ │ │ │ │ +│ leveraging container │ handle data transformation, │ edge computing nodes closer │ input sanitization │ │ │ │ │ +│ orchestration for │ validation, and persistent │ to the geographic location │ libraries, and regular │ │ │ │ │ +│ scalability and fault │ storage using a persistent │ of the end-user base. │ automated penetration │ │ │ │ │ +│ tolerance in high-load │ queue. │ │ testing routines. │ │ │ │ │ +│ scenarios. │ │ Monitoring tools have │ │ │ │ │ │ +│ │ The pipeline features │ captured a steady increase │ Developers are required to │ │ │ │ │ +│ This layer provides the │ built-in retry mechanisms │ in throughput efficiency │ undergo mandatory security │ │ │ │ │ +│ fundamental building blocks │ with exponential backoff to │ since the introduction of │ training focusing on the │ │ │ │ │ +│ for service discovery, load │ ensure message delivery │ the vectorized query engine │ OWASP Top Ten to ensure that │ │ │ │ │ +│ balancing, and │ integrity even during │ in the primary data │ security is integrated into │ │ │ │ │ +│ inter-service communication │ transient network or service │ warehouse. │ the initial design phase. │ │ │ │ │ +│ via highly efficient │ failures. │ │ │ │ │ │ │ +│ protocol buffers. │ │ Resource utilization │ The implementation of a │ │ │ │ │ +│ │ Horizontal autoscaling is │ metrics demonstrate that │ robust Identity and Access │ │ │ │ │ +│ Advanced telemetry and │ triggered automatically │ the transition to │ Management system ensures │ │ │ │ │ +│ logging integrations allow │ based on the depth of the │ serverless compute for │ that the principle of least │ │ │ │ │ +│ for real-time monitoring of │ processing queue, ensuring │ intermittent tasks has │ privilege is strictly │ │ │ │ │ +│ system health and rapid │ consistent performance │ resulted in a thirty │ enforced across all │ │ │ │ │ +│ identification of │ during unexpected traffic │ percent cost optimization. │ environments. │ │ │ │ │ +│ bottlenecks within the │ spikes. │ │ │ │ │ │ │ +│ service mesh. │ │ │ │ │ │ │ │ +└─────────────────────────────┴──────────────────────────────┴─────────────────────────────┴──────────────────────────────┴─────┴────────┴─────────┴───────┘ +" +`; + +exports[`TableRenderer > renders a table with long headers and 4 columns correctly 1`] = ` +" +┌───────────────┬───────────────┬──────────────────┬──────────────────┐ +│ Very Long │ Very Long │ Very Long Column │ Very Long Column │ +│ Column Header │ Column Header │ Header Three │ Header Four │ +│ One │ Two │ │ │ +├───────────────┼───────────────┼──────────────────┼──────────────────┤ +│ Data 1.1 │ Data 1.2 │ Data 1.3 │ Data 1.4 │ +│ Data 2.1 │ Data 2.2 │ Data 2.3 │ Data 2.4 │ +│ Data 3.1 │ Data 3.2 │ Data 3.3 │ Data 3.4 │ +└───────────────┴───────────────┴──────────────────┴──────────────────┘ +" +`; + +exports[`TableRenderer > strips bold markers from headers and renders them correctly 1`] = ` +" +┌─────────────┬───────────────┬──────────────┐ +│ Bold Header │ Normal Header │ Another Bold │ +├─────────────┼───────────────┼──────────────┤ +│ Data 1 │ Data 2 │ Data 3 │ +└─────────────┴───────────────┴──────────────┘ +" +`; + +exports[`TableRenderer > wraps all long columns correctly 1`] = ` +" +┌────────────────┬────────────────┬─────────────────┐ +│ Col 1 │ Col 2 │ Col 3 │ +├────────────────┼────────────────┼─────────────────┤ +│ This is a very │ This is also a │ And this is the │ +│ long text that │ very long text │ third long text │ +│ needs wrapping │ that needs │ that needs │ +│ in column 1 │ wrapping in │ wrapping in │ +│ │ column 2 │ column 3 │ +└────────────────┴────────────────┴─────────────────┘ +" +`; + +exports[`TableRenderer > wraps columns with punctuation correctly 1`] = ` +" +┌───────────────────┬───────────────┬─────────────────┐ +│ Punctuation 1 │ Punctuation 2 │ Punctuation 3 │ +├───────────────────┼───────────────┼─────────────────┤ +│ Start. Stop. │ Semi; colon: │ At@ Hash# │ +│ Comma, separated. │ Pipe| Slash/ │ Dollar$ │ +│ Exclamation! │ Backslash\\ │ Percent% Caret^ │ +│ Question? │ │ Ampersand& │ +│ hyphen-ated │ │ Asterisk* │ +└───────────────────┴───────────────┴─────────────────┘ +" +`; + +exports[`TableRenderer > wraps long cell content correctly 1`] = ` +" +┌───────┬─────────────────────────────┬───────┐ +│ Col 1 │ Col 2 │ Col 3 │ +├───────┼─────────────────────────────┼───────┤ +│ Short │ This is a very long cell │ Short │ +│ │ content that should wrap to │ │ +│ │ multiple lines │ │ +└───────┴─────────────────────────────┴───────┘ +" +`; + +exports[`TableRenderer > wraps mixed long and short columns correctly 1`] = ` +" +┌───────┬──────────────────────────┬────────┐ +│ Short │ Long │ Medium │ +├───────┼──────────────────────────┼────────┤ +│ Tiny │ This is a very long text │ Not so │ +│ │ that definitely needs to │ long │ +│ │ wrap to the next line │ │ +└───────┴──────────────────────────┴────────┘ +" +`; diff --git a/packages/cli/src/ui/utils/__snapshots__/borderStyles.test.tsx.snap b/packages/cli/src/ui/utils/__snapshots__/borderStyles.test.tsx.snap new file mode 100644 index 0000000000..fbdc559480 --- /dev/null +++ b/packages/cli/src/ui/utils/__snapshots__/borderStyles.test.tsx.snap @@ -0,0 +1,55 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`MainContent tool group border SVG snapshots > should render SVG snapshot for a pending search dialog (google_web_search) 1`] = ` +" + ███ █████████ +░░░███ ███░░░░░███ + ░░░███ ███ ░░░ + ░░░███░███ + ███░ ░███ █████ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ + +╭──────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ⊷ google_web_search │ +│ │ +│ Searching... │ +╰──────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`MainContent tool group border SVG snapshots > should render SVG snapshot for a shell tool 1`] = ` +" + ███ █████████ +░░░███ ███░░░░░███ + ░░░███ ███ ░░░ + ░░░███░███ + ███░ ░███ █████ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ + +╭──────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ⊷ run_shell_command │ +│ │ +│ Running command... │ +╰──────────────────────────────────────────────────────────────────────────────────────────────╯" +`; + +exports[`MainContent tool group border SVG snapshots > should render SVG snapshot for an empty slice following a search tool 1`] = ` +" + ███ █████████ +░░░███ ███░░░░░███ + ░░░███ ███ ░░░ + ░░░███░███ + ███░ ░███ █████ + ███░ ░░███ ░░███ + ███░ ░░█████████ +░░░ ░░░░░░░░░ + +╭──────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ⊷ google_web_search │ +│ │ +│ Searching... │ +╰──────────────────────────────────────────────────────────────────────────────────────────────╯" +`; diff --git a/packages/cli/src/ui/utils/borderStyles.test.tsx b/packages/cli/src/ui/utils/borderStyles.test.tsx index b5e61144a9..8b2377b4cd 100644 --- a/packages/cli/src/ui/utils/borderStyles.test.tsx +++ b/packages/cli/src/ui/utils/borderStyles.test.tsx @@ -5,7 +5,7 @@ */ import { describe, expect, it } from 'vitest'; -import '../../../test-utils/customMatchers.js'; +import '../../test-utils/customMatchers.js'; import { getToolGroupBorderAppearance } from './borderStyles.js'; import { CoreToolCallStatus } from '@google/gemini-cli-core'; import { theme } from '../semantic-colors.js'; diff --git a/packages/cli/src/ui/utils/commandUtils.test.ts b/packages/cli/src/ui/utils/commandUtils.test.ts index 737948ce98..11b16f928f 100644 --- a/packages/cli/src/ui/utils/commandUtils.test.ts +++ b/packages/cli/src/ui/utils/commandUtils.test.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { Mock } from 'vitest'; -import { vi, describe, it, expect, beforeEach } from 'vitest'; +import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'; import { EventEmitter } from 'node:events'; import clipboardy from 'clipboardy'; import { diff --git a/packages/cli/src/ui/utils/input.test.ts b/packages/cli/src/ui/utils/input.test.ts index 0b15497081..d6fbdf0a67 100644 --- a/packages/cli/src/ui/utils/input.test.ts +++ b/packages/cli/src/ui/utils/input.test.ts @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { describe, expect, it } from 'vitest'; import { couldBeSGRMouseSequence, SGR_MOUSE_REGEX, ESC } from './input.js'; describe('input utils', () => { diff --git a/packages/cli/src/ui/utils/textOutput.test.ts b/packages/cli/src/ui/utils/textOutput.test.ts index b8a0882d64..aba4cfc317 100644 --- a/packages/cli/src/ui/utils/textOutput.test.ts +++ b/packages/cli/src/ui/utils/textOutput.test.ts @@ -6,8 +6,7 @@ /// -import type { MockInstance } from 'vitest'; -import { vi } from 'vitest'; +import { describe, it, expect, vi, type MockInstance } from 'vitest'; import { TextOutput } from './textOutput.js'; describe('TextOutput', () => { diff --git a/packages/cli/src/utils/handleAutoUpdate.test.ts b/packages/cli/src/utils/handleAutoUpdate.test.ts index 0af2de37b1..7747512b89 100644 --- a/packages/cli/src/utils/handleAutoUpdate.test.ts +++ b/packages/cli/src/utils/handleAutoUpdate.test.ts @@ -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 { + afterEach, + beforeEach, + describe, + expect, + it, + type Mock, + vi, +} from 'vitest'; import { getInstallationInfo, PackageManager } from './installationInfo.js'; import { updateEventEmitter } from './updateEventEmitter.js'; import type { UpdateObject } from '../ui/utils/updateCheck.js'; diff --git a/packages/cli/src/utils/processUtils.test.ts b/packages/cli/src/utils/processUtils.test.ts index be85a4dbad..fe8752678a 100644 --- a/packages/cli/src/utils/processUtils.test.ts +++ b/packages/cli/src/utils/processUtils.test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { vi } from 'vitest'; +import { vi, describe, it, expect } from 'vitest'; import { RELAUNCH_EXIT_CODE, relaunchApp } from './processUtils.js'; import * as cleanup from './cleanup.js'; diff --git a/packages/cli/src/utils/settingsUtils.test.ts b/packages/cli/src/utils/settingsUtils.test.ts index 75bdeb65e6..a8ea176a58 100644 --- a/packages/cli/src/utils/settingsUtils.test.ts +++ b/packages/cli/src/utils/settingsUtils.test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { // Schema utilities getSettingsByCategory, diff --git a/packages/core/src/config/storage.ts b/packages/core/src/config/storage.ts index 20e0c6f631..6d8b10a485 100644 --- a/packages/core/src/config/storage.ts +++ b/packages/core/src/config/storage.ts @@ -203,7 +203,7 @@ export class Storage { return crypto.createHash('sha256').update(filePath).digest('hex'); } - private getProjectIdentifier(): string { + getProjectIdentifier(): string { if (!this.projectIdentifier) { throw new Error('Storage must be initialized before use'); }