@google/gemini-cli 0.30.1 → 0.31.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/google-gemini-cli-0.31.0-preview.0.tgz +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/package.json +7 -6
- package/dist/src/commands/extensions/install.js +72 -4
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +153 -20
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/utils.js +1 -0
- package/dist/src/commands/extensions/utils.js.map +1 -1
- package/dist/src/config/config.js +17 -5
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +79 -4
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager-hydration.test.js +2 -2
- package/dist/src/config/extension-manager-hydration.test.js.map +1 -1
- package/dist/src/config/extension-manager.js +10 -6
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +20 -20
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensionRegistryClient.js +3 -2
- package/dist/src/config/extensionRegistryClient.js.map +1 -1
- package/dist/src/config/extensionRegistryClient.test.js +52 -0
- package/dist/src/config/extensionRegistryClient.test.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +10 -0
- package/dist/src/config/extensions/consent.js +10 -3
- package/dist/src/config/extensions/consent.js.map +1 -1
- package/dist/src/config/extensions/consent.test.js +1 -1
- package/dist/src/config/extensions/consent.test.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.js +1 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.js +20 -3
- package/dist/src/config/extensions/extensionSettings.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +16 -0
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +1 -1
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/extensions/variables.js +3 -1
- package/dist/src/config/extensions/variables.js.map +1 -1
- package/dist/src/config/keyBindings.js +6 -2
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/policy-engine.integration.test.js +51 -13
- package/dist/src/config/policy-engine.integration.test.js.map +1 -1
- package/dist/src/config/policy.d.ts +15 -3
- package/dist/src/config/policy.js +49 -4
- package/dist/src/config/policy.js.map +1 -1
- package/dist/src/config/policy.test.d.ts +6 -0
- package/dist/src/config/policy.test.js +152 -0
- package/dist/src/config/policy.test.js.map +1 -0
- package/dist/src/config/settings-validation.js +1 -1
- package/dist/src/config/settings-validation.js.map +1 -1
- package/dist/src/config/settings-validation.test.js +2 -3
- package/dist/src/config/settings-validation.test.js.map +1 -1
- package/dist/src/config/settings.d.ts +2 -0
- package/dist/src/config/settings.js +18 -20
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +118 -18
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +171 -9
- package/dist/src/config/settingsSchema.js +159 -9
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +26 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/settings_repro.test.js +0 -1
- package/dist/src/config/settings_repro.test.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +3 -1
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/config/workspace-policy-cli.test.d.ts +6 -0
- package/dist/src/config/workspace-policy-cli.test.js +180 -0
- package/dist/src/config/workspace-policy-cli.test.js.map +1 -0
- package/dist/src/gemini.d.ts +2 -2
- package/dist/src/gemini.js +15 -5
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +18 -2
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/gemini_cleanup.test.js +27 -24
- package/dist/src/gemini_cleanup.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/integration-tests/modelSteering.test.d.ts +6 -0
- package/dist/src/integration-tests/modelSteering.test.js +65 -0
- package/dist/src/integration-tests/modelSteering.test.js.map +1 -0
- package/dist/src/nonInteractiveCli.js +2 -3
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/test-utils/AppRig.d.ts +1 -1
- package/dist/src/test-utils/AppRig.js +16 -7
- package/dist/src/test-utils/AppRig.js.map +1 -1
- package/dist/src/test-utils/AppRig.test.js +37 -2
- package/dist/src/test-utils/AppRig.test.js.map +1 -1
- package/dist/src/test-utils/async.d.ts +1 -1
- package/dist/src/test-utils/async.js +1 -1
- package/dist/src/test-utils/async.js.map +1 -1
- package/dist/src/test-utils/customMatchers.js +1 -1
- package/dist/src/test-utils/customMatchers.js.map +1 -1
- package/dist/src/test-utils/mockCommandContext.js +8 -2
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/test-utils/mockConfig.js +2 -1
- package/dist/src/test-utils/mockConfig.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +81 -5
- package/dist/src/test-utils/render.js +299 -29
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/test-utils/render.test.js +49 -23
- package/dist/src/test-utils/render.test.js.map +1 -1
- package/dist/src/test-utils/settings.js +4 -2
- package/dist/src/test-utils/settings.js.map +1 -1
- package/dist/src/ui/App.test.js +56 -24
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/AppContainer.d.ts +2 -2
- package/dist/src/ui/AppContainer.js +231 -11
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +561 -7
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.test.js +29 -33
- package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.js +19 -9
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.js +1 -1
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +61 -27
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthInProgress.test.js +35 -14
- package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +11 -5
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +1 -1
- package/dist/src/ui/colors.js +6 -0
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +2 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +7 -1
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.js +2 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.test.js +6 -4
- package/dist/src/ui/commands/copyCommand.test.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +18 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.test.js +4 -4
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/planCommand.js +1 -1
- package/dist/src/ui/commands/planCommand.js.map +1 -1
- package/dist/src/ui/commands/planCommand.test.js +1 -1
- package/dist/src/ui/commands/planCommand.test.js.map +1 -1
- package/dist/src/ui/commands/policiesCommand.js +5 -0
- package/dist/src/ui/commands/policiesCommand.js.map +1 -1
- package/dist/src/ui/commands/policiesCommand.test.js +38 -1
- package/dist/src/ui/commands/policiesCommand.test.js.map +1 -1
- package/dist/src/ui/commands/rewindCommand.js +3 -2
- package/dist/src/ui/commands/rewindCommand.js.map +1 -1
- package/dist/src/ui/components/AboutBox.test.js +16 -8
- package/dist/src/ui/components/AboutBox.test.js.map +1 -1
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +7 -4
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +1 -1
- package/dist/src/ui/components/AgentConfigDialog.test.js +41 -19
- package/dist/src/ui/components/AgentConfigDialog.test.js.map +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +24 -12
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -1
- package/dist/src/ui/components/AnsiOutput.test.js +35 -19
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -1
- package/dist/src/ui/components/AppHeader.test.js +27 -17
- package/dist/src/ui/components/AppHeader.test.js.map +1 -1
- package/dist/src/ui/components/ApprovalModeIndicator.test.js +18 -12
- package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +1 -1
- package/dist/src/ui/components/AskUserDialog.test.js +147 -85
- package/dist/src/ui/components/AskUserDialog.test.js.map +1 -1
- package/dist/src/ui/components/BackgroundShellDisplay.test.js +50 -48
- package/dist/src/ui/components/BackgroundShellDisplay.test.js.map +1 -1
- package/dist/src/ui/components/Banner.test.js +8 -4
- package/dist/src/ui/components/Banner.test.js.map +1 -1
- package/dist/src/ui/components/Checklist.test.js +17 -12
- package/dist/src/ui/components/Checklist.test.js.map +1 -1
- package/dist/src/ui/components/ChecklistItem.test.js +9 -6
- package/dist/src/ui/components/ChecklistItem.test.js.map +1 -1
- package/dist/src/ui/components/CliSpinner.test.js +8 -5
- package/dist/src/ui/components/CliSpinner.test.js.map +1 -1
- package/dist/src/ui/components/Composer.js +5 -5
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/Composer.test.js +104 -100
- package/dist/src/ui/components/Composer.test.js.map +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.test.js +3 -2
- package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ConsentPrompt.test.js +15 -8
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +9 -5
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +16 -14
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.test.js +12 -6
- package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -1
- package/dist/src/ui/components/CopyModeWarning.test.js +9 -5
- package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.test.js +17 -14
- package/dist/src/ui/components/DebugProfiler.test.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js +13 -7
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +5 -1
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/DialogManager.test.js +9 -5
- package/dist/src/ui/components/DialogManager.test.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +16 -8
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ExitPlanModeDialog.js +2 -2
- package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
- package/dist/src/ui/components/ExitPlanModeDialog.test.js +2 -2
- package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +1 -1
- package/dist/src/ui/components/ExitWarning.test.js +18 -10
- package/dist/src/ui/components/ExitWarning.test.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.d.ts +2 -0
- package/dist/src/ui/components/FolderTrustDialog.js +49 -3
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +249 -18
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.test.js +101 -50
- package/dist/src/ui/components/Footer.test.js.map +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +23 -13
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -1
- package/dist/src/ui/components/GradientRegression.test.js +20 -10
- package/dist/src/ui/components/GradientRegression.test.js.map +1 -1
- package/dist/src/ui/components/Header.test.js +2 -0
- package/dist/src/ui/components/Header.test.js.map +1 -1
- package/dist/src/ui/components/Help.test.js +9 -6
- package/dist/src/ui/components/Help.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +1 -2
- package/dist/src/ui/components/HistoryItemDisplay.js +4 -3
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +80 -35
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/HookStatusDisplay.test.js +13 -9
- package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +36 -16
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +10 -12
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +127 -13
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +97 -47
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js +25 -9
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +9 -5
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -1
- package/dist/src/ui/components/MainContent.js +35 -14
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/MainContent.test.js +224 -10
- package/dist/src/ui/components/MainContent.test.js.map +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.test.js +8 -3
- package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +6 -6
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +142 -16
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +38 -24
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +32 -9
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/NewAgentsNotification.test.js +6 -4
- package/dist/src/ui/components/NewAgentsNotification.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +50 -4
- package/dist/src/ui/components/Notifications.js.map +1 -1
- package/dist/src/ui/components/Notifications.test.js +162 -30
- package/dist/src/ui/components/Notifications.test.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +36 -10
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/PolicyUpdateDialog.d.ts +18 -0
- package/dist/src/ui/components/PolicyUpdateDialog.js +59 -0
- package/dist/src/ui/components/PolicyUpdateDialog.js.map +1 -0
- package/dist/src/ui/components/PolicyUpdateDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PolicyUpdateDialog.test.js +93 -0
- package/dist/src/ui/components/PolicyUpdateDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +16 -11
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -1
- package/dist/src/ui/components/QuittingDisplay.test.js +9 -5
- package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -1
- package/dist/src/ui/components/QuotaDisplay.test.js +40 -22
- package/dist/src/ui/components/QuotaDisplay.test.js.map +1 -1
- package/dist/src/ui/components/RawMarkdownIndicator.test.js +8 -4
- package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -1
- package/dist/src/ui/components/RewindConfirmation.test.js +15 -7
- package/dist/src/ui/components/RewindConfirmation.test.js.map +1 -1
- package/dist/src/ui/components/RewindViewer.js +9 -7
- package/dist/src/ui/components/RewindViewer.js.map +1 -1
- package/dist/src/ui/components/RewindViewer.test.js +54 -17
- package/dist/src/ui/components/RewindViewer.test.js.map +1 -1
- package/dist/src/ui/components/SessionBrowser.test.js +24 -11
- package/dist/src/ui/components/SessionBrowser.test.js.map +1 -1
- package/dist/src/ui/components/SessionRetentionWarningDialog.test.js +12 -7
- package/dist/src/ui/components/SessionRetentionWarningDialog.test.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +7 -4
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +76 -7
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +252 -109
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellInputPrompt.test.js +120 -67
- package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/ShellModeIndicator.test.js +4 -2
- package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -1
- package/dist/src/ui/components/ShortcutsHelp.js +1 -1
- package/dist/src/ui/components/ShortcutsHelp.js.map +1 -1
- package/dist/src/ui/components/ShortcutsHelp.test.js +6 -3
- package/dist/src/ui/components/ShortcutsHelp.test.js.map +1 -1
- package/dist/src/ui/components/ShowMoreLines.d.ts +2 -1
- package/dist/src/ui/components/ShowMoreLines.js +10 -5
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
- package/dist/src/ui/components/ShowMoreLines.test.js +47 -7
- package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -0
- package/dist/src/ui/components/StatsDisplay.js +9 -3
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +51 -34
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/StatusDisplay.test.js +30 -17
- package/dist/src/ui/components/StatusDisplay.test.js.map +1 -1
- package/dist/src/ui/components/StickyHeader.test.js +4 -2
- package/dist/src/ui/components/StickyHeader.test.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.test.js +19 -13
- package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/Table.test.js +9 -6
- package/dist/src/ui/components/Table.test.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.test.js +42 -19
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
- package/dist/src/ui/components/ThemedGradient.test.js +4 -2
- package/dist/src/ui/components/ThemedGradient.test.js.map +1 -1
- package/dist/src/ui/components/Tips.test.js +4 -2
- package/dist/src/ui/components/Tips.test.js.map +1 -1
- package/dist/src/ui/components/ToastDisplay.js +6 -1
- package/dist/src/ui/components/ToastDisplay.js.map +1 -1
- package/dist/src/ui/components/ToastDisplay.test.js +48 -17
- package/dist/src/ui/components/ToastDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ToolConfirmationQueue.js +11 -8
- package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
- package/dist/src/ui/components/ToolConfirmationQueue.test.js +75 -17
- package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.js +19 -12
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/UpdateNotification.test.js +4 -2
- package/dist/src/ui/components/UpdateNotification.test.js.map +1 -1
- package/dist/src/ui/components/UserIdentity.test.js +16 -11
- package/dist/src/ui/components/UserIdentity.test.js.map +1 -1
- package/dist/src/ui/components/ValidationDialog.test.js +33 -16
- package/dist/src/ui/components/ValidationDialog.test.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.js +99 -101
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ErrorMessage.test.js +8 -4
- package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.js +5 -1
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.test.js +12 -6
- package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/HintMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/HintMessage.js +14 -0
- package/dist/src/ui/components/messages/HintMessage.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -0
- package/dist/src/ui/components/messages/InfoMessage.js +2 -2
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.test.js +12 -6
- package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +4 -2
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.d.ts +1 -2
- package/dist/src/ui/components/messages/ShellToolMessage.js +15 -29
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +91 -22
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ThinkingMessage.test.js +25 -13
- package/dist/src/ui/components/messages/ThinkingMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/Todo.test.js +34 -19
- package/dist/src/ui/components/messages/Todo.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +128 -13
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +175 -20
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +3 -4
- package/dist/src/ui/components/messages/ToolGroupMessage.js +91 -35
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +286 -63
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +4 -4
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +118 -39
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +15 -6
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +4 -2
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +79 -0
- package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.js +25 -14
- package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +81 -31
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +5 -5
- package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolShared.d.ts +8 -0
- package/dist/src/ui/components/messages/ToolShared.js +27 -9
- package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
- package/dist/src/ui/components/messages/ToolShared.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolShared.test.js +52 -0
- package/dist/src/ui/components/messages/ToolShared.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +11 -4
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +1 -2
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.test.js +16 -8
- package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserShellMessage.js +1 -2
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -1
- package/dist/src/ui/components/messages/WarningMessage.test.js +8 -4
- package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +118 -106
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.js +22 -24
- package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +139 -40
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +10 -6
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -1
- package/dist/src/ui/components/shared/EnumSelector.test.js +42 -20
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -1
- package/dist/src/ui/components/shared/ExpandableText.test.js +21 -14
- package/dist/src/ui/components/shared/ExpandableText.test.js.map +1 -1
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +8 -4
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +41 -30
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
- package/dist/src/ui/components/shared/Scrollable.js +2 -3
- package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
- package/dist/src/ui/components/shared/Scrollable.test.js +33 -17
- package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -1
- package/dist/src/ui/components/shared/ScrollableList.js +1 -1
- package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
- package/dist/src/ui/components/shared/ScrollableList.test.js +36 -6
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -1
- package/dist/src/ui/components/shared/SearchableList.d.ts +46 -14
- package/dist/src/ui/components/shared/SearchableList.js +69 -57
- package/dist/src/ui/components/shared/SearchableList.js.map +1 -1
- package/dist/src/ui/components/shared/SearchableList.test.js +67 -14
- package/dist/src/ui/components/shared/SearchableList.test.js.map +1 -1
- package/dist/src/ui/components/shared/SectionHeader.d.ts +1 -0
- package/dist/src/ui/components/shared/SectionHeader.js +1 -1
- package/dist/src/ui/components/shared/SectionHeader.js.map +1 -1
- package/dist/src/ui/components/shared/SectionHeader.test.js +9 -2
- package/dist/src/ui/components/shared/SectionHeader.test.js.map +1 -1
- package/dist/src/ui/components/shared/TabHeader.js +1 -1
- package/dist/src/ui/components/shared/TabHeader.js.map +1 -1
- package/dist/src/ui/components/shared/TabHeader.test.js +65 -25
- package/dist/src/ui/components/shared/TabHeader.test.js.map +1 -1
- package/dist/src/ui/components/shared/TextInput.test.js +111 -65
- package/dist/src/ui/components/shared/TextInput.test.js.map +1 -1
- package/dist/src/ui/components/shared/VirtualizedList.test.js +27 -35
- package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -1
- package/dist/src/ui/components/triage/TriageDuplicates.js +1 -0
- package/dist/src/ui/components/triage/TriageDuplicates.js.map +1 -1
- package/dist/src/ui/components/triage/TriageIssues.js +1 -0
- package/dist/src/ui/components/triage/TriageIssues.js.map +1 -1
- package/dist/src/ui/components/views/ChatList.test.js +9 -6
- package/dist/src/ui/components/views/ChatList.test.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionRegistryView.d.ts +15 -0
- package/dist/src/ui/components/views/ExtensionRegistryView.js +60 -0
- package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionRegistryView.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionRegistryView.test.js +168 -0
- package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +21 -19
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +38 -25
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
- package/dist/src/ui/components/views/SkillsList.test.js +18 -12
- package/dist/src/ui/components/views/SkillsList.test.js.map +1 -1
- package/dist/src/ui/components/views/ToolsList.test.js +9 -6
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -1
- package/dist/src/ui/constants/tips.js +1 -1
- package/dist/src/ui/constants/tips.js.map +1 -1
- package/dist/src/ui/constants.d.ts +2 -1
- package/dist/src/ui/constants.js +2 -1
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/AppContext.d.ts +2 -1
- package/dist/src/ui/contexts/AppContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +37 -8
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +68 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/OverflowContext.d.ts +3 -3
- package/dist/src/ui/contexts/OverflowContext.js +5 -1
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
- package/dist/src/ui/contexts/TerminalContext.test.js +26 -15
- package/dist/src/ui/contexts/TerminalContext.test.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +6 -1
- package/dist/src/ui/contexts/UIActionsContext.js +1 -1
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +7 -1
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +6 -2
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +23 -11
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +30 -14
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/toolMapping.d.ts +2 -0
- package/dist/src/ui/hooks/toolMapping.js +13 -1
- package/dist/src/ui/hooks/toolMapping.js.map +1 -1
- package/dist/src/ui/hooks/toolMapping.test.js +42 -0
- package/dist/src/ui/hooks/toolMapping.test.js.map +1 -1
- package/dist/src/ui/hooks/useAnimatedScrollbar.js +13 -3
- package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +74 -22
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.test.js +88 -0
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.js +2 -3
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -4
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useConfirmingTool.d.ts +2 -6
- package/dist/src/ui/hooks/useConfirmingTool.js +2 -23
- package/dist/src/ui/hooks/useConfirmingTool.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +18 -6
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.js +4 -4
- package/dist/src/ui/hooks/useExtensionRegistry.d.ts +13 -0
- package/dist/src/ui/hooks/useExtensionRegistry.js +70 -0
- package/dist/src/ui/hooks/useExtensionRegistry.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +4 -1
- package/dist/src/ui/hooks/useFocus.js +7 -1
- package/dist/src/ui/hooks/useFocus.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.test.js +20 -11
- package/dist/src/ui/hooks/useFocus.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -0
- package/dist/src/ui/hooks/useFolderTrust.js +15 -3
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +3 -0
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +86 -20
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +150 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +3 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +9 -4
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useMouseClick.test.js +15 -7
- package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +4 -2
- package/dist/src/ui/hooks/usePhraseCycler.js +38 -26
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.test.js +123 -73
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +1 -2
- package/dist/src/ui/hooks/usePromptCompletion.js +2 -2
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useRegistrySearch.d.ts +19 -0
- package/dist/src/ui/hooks/useRegistrySearch.js +35 -0
- package/dist/src/ui/hooks/useRegistrySearch.js.map +1 -0
- package/dist/src/ui/hooks/useRunEventNotifications.d.ts +22 -0
- package/dist/src/ui/hooks/useRunEventNotifications.js +93 -0
- package/dist/src/ui/hooks/useRunEventNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useSearchBuffer.d.ts +11 -0
- package/dist/src/ui/hooks/useSearchBuffer.js +24 -0
- package/dist/src/ui/hooks/useSearchBuffer.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +111 -45
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.js +3 -2
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.js +15 -12
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.js +2 -2
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useStateAndRef.js +1 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
- package/dist/src/ui/hooks/useTerminalTheme.test.js +29 -18
- package/dist/src/ui/hooks/useTerminalTheme.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.js +19 -2
- package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +44 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +1 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.test.js +12 -6
- package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +24 -8
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +16 -5
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +16 -5
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.test.js +4 -2
- package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +4 -0
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/semantic-tokens.d.ts +2 -0
- package/dist/src/ui/themes/semantic-tokens.js +6 -2
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
- package/dist/src/ui/themes/solarized-dark.js +2 -0
- package/dist/src/ui/themes/solarized-dark.js.map +1 -1
- package/dist/src/ui/themes/solarized-light.js +2 -0
- package/dist/src/ui/themes/solarized-light.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.js +9 -4
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +2 -0
- package/dist/src/ui/themes/theme.js +20 -7
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/theme.test.js +7 -7
- package/dist/src/ui/themes/theme.test.js.map +1 -1
- package/dist/src/ui/types.d.ts +14 -2
- package/dist/src/ui/types.js +1 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +3 -5
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.test.js +4 -2
- package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +3 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +65 -33
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +7 -3
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.test.js +43 -22
- package/dist/src/ui/utils/TableRenderer.test.js.map +1 -1
- package/dist/src/ui/utils/borderStyles.d.ts +18 -0
- package/dist/src/ui/utils/borderStyles.js +78 -0
- package/dist/src/ui/utils/borderStyles.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +2 -1
- package/dist/src/ui/utils/commandUtils.js +8 -3
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +18 -0
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/confirmingTool.d.ts +15 -0
- package/dist/src/ui/utils/confirmingTool.js +27 -0
- package/dist/src/ui/utils/confirmingTool.js.map +1 -0
- package/dist/src/ui/utils/pendingAttentionNotification.d.ts +12 -0
- package/dist/src/ui/utils/pendingAttentionNotification.js +101 -0
- package/dist/src/ui/utils/pendingAttentionNotification.js.map +1 -0
- package/dist/src/ui/utils/pendingAttentionNotification.test.d.ts +6 -0
- package/dist/src/ui/utils/pendingAttentionNotification.test.js +79 -0
- package/dist/src/ui/utils/pendingAttentionNotification.test.js.map +1 -0
- package/dist/src/ui/utils/terminalCapabilityManager.d.ts +2 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js +18 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
- package/dist/src/ui/utils/terminalCapabilityManager.test.js +68 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.d.ts +24 -0
- package/dist/src/ui/utils/terminalSetup.js +130 -34
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.test.js +35 -1
- package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
- package/dist/src/ui/utils/textUtils.d.ts +4 -0
- package/dist/src/ui/utils/textUtils.js +10 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/textUtils.test.js +25 -2
- package/dist/src/ui/utils/textUtils.test.js.map +1 -1
- package/dist/src/ui/utils/toolLayoutUtils.d.ts +44 -0
- package/dist/src/ui/utils/toolLayoutUtils.js +73 -0
- package/dist/src/ui/utils/toolLayoutUtils.js.map +1 -0
- package/dist/src/ui/utils/urlSecurityUtils.d.ts +32 -0
- package/dist/src/ui/utils/urlSecurityUtils.js +71 -0
- package/dist/src/ui/utils/urlSecurityUtils.js.map +1 -0
- package/dist/src/ui/utils/urlSecurityUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/urlSecurityUtils.test.js +49 -0
- package/dist/src/ui/utils/urlSecurityUtils.test.js.map +1 -0
- package/dist/src/utils/activityLogger.js +95 -24
- package/dist/src/utils/activityLogger.js.map +1 -1
- package/dist/src/utils/devtoolsService.js +1 -2
- package/dist/src/utils/devtoolsService.js.map +1 -1
- package/dist/src/utils/devtoolsService.test.js +1 -1
- package/dist/src/utils/devtoolsService.test.js.map +1 -1
- package/dist/src/utils/envVarResolver.js +4 -1
- package/dist/src/utils/envVarResolver.js.map +1 -1
- package/dist/src/utils/gitUtils.js +2 -0
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/jsonoutput.js +2 -0
- package/dist/src/utils/jsonoutput.js.map +1 -1
- package/dist/src/utils/persistentState.d.ts +2 -0
- package/dist/src/utils/persistentState.js +1 -0
- package/dist/src/utils/persistentState.js.map +1 -1
- package/dist/src/utils/readStdin.js +1 -0
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +1 -6
- package/dist/src/utils/sessionUtils.js +8 -101
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.js +47 -0
- package/dist/src/utils/sessionUtils.test.js.map +1 -1
- package/dist/src/utils/settingsUtils.js +2 -0
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/skillUtils.test.js +7 -5
- package/dist/src/utils/skillUtils.test.js.map +1 -1
- package/dist/src/utils/terminalNotifications.d.ts +25 -0
- package/dist/src/utils/terminalNotifications.js +77 -0
- package/dist/src/utils/terminalNotifications.js.map +1 -0
- package/dist/src/utils/terminalNotifications.test.d.ts +6 -0
- package/dist/src/utils/terminalNotifications.test.js +123 -0
- package/dist/src/utils/terminalNotifications.test.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +4 -1
- package/dist/src/utils/userStartupWarnings.js +22 -4
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +53 -11
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- package/dist/src/zed-integration/acpErrors.js +2 -0
- package/dist/src/zed-integration/acpErrors.js.map +1 -1
- package/dist/src/zed-integration/acpResume.test.js +53 -3
- package/dist/src/zed-integration/acpResume.test.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.js +2 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +2 -0
- package/dist/src/zed-integration/zedIntegration.js +77 -6
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.test.js +176 -2
- package/dist/src/zed-integration/zedIntegration.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/google-gemini-cli-0.30.0.tgz +0 -0
- package/dist/src/ui/hooks/useFuzzyList.d.ts +0 -25
- package/dist/src/ui/hooks/useFuzzyList.js +0 -100
- package/dist/src/ui/hooks/useFuzzyList.js.map +0 -1
|
@@ -5,14 +5,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
8
|
-
import { render, persistentStateMock } from '../test-utils/render.js';
|
|
8
|
+
import { render, cleanup, persistentStateMock } from '../test-utils/render.js';
|
|
9
9
|
import { waitFor } from '../test-utils/async.js';
|
|
10
|
-
import { cleanup } from 'ink-testing-library';
|
|
11
10
|
import { act, useContext } from 'react';
|
|
12
11
|
import { AppContainer } from './AppContainer.js';
|
|
13
12
|
import { SettingsContext } from './contexts/SettingsContext.js';
|
|
14
13
|
import {} from './hooks/useToolScheduler.js';
|
|
15
|
-
import { makeFakeConfig, CoreEvent, AuthType, CoreToolCallStatus, } from '@google/gemini-cli-core';
|
|
14
|
+
import { makeFakeConfig, CoreEvent, WarningPriority, AuthType, CoreToolCallStatus, } from '@google/gemini-cli-core';
|
|
16
15
|
// Mock coreEvents
|
|
17
16
|
const mockCoreEvents = vi.hoisted(() => ({
|
|
18
17
|
on: vi.fn(),
|
|
@@ -28,6 +27,15 @@ const mockIdeClient = vi.hoisted(() => ({
|
|
|
28
27
|
const mocks = vi.hoisted(() => ({
|
|
29
28
|
mockStdout: { write: vi.fn() },
|
|
30
29
|
}));
|
|
30
|
+
const terminalNotificationsMocks = vi.hoisted(() => ({
|
|
31
|
+
notifyViaTerminal: vi.fn().mockResolvedValue(true),
|
|
32
|
+
isNotificationsEnabled: vi.fn(() => true),
|
|
33
|
+
buildRunEventNotificationContent: vi.fn((event) => ({
|
|
34
|
+
title: 'Mock Notification',
|
|
35
|
+
subtitle: 'Mock Subtitle',
|
|
36
|
+
body: JSON.stringify(event),
|
|
37
|
+
})),
|
|
38
|
+
}));
|
|
31
39
|
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
|
32
40
|
const actual = await importOriginal();
|
|
33
41
|
return {
|
|
@@ -60,6 +68,8 @@ import { StreamingState } from './types.js';
|
|
|
60
68
|
import { UIStateContext } from './contexts/UIStateContext.js';
|
|
61
69
|
import { UIActionsContext, } from './contexts/UIActionsContext.js';
|
|
62
70
|
import { KeypressProvider } from './contexts/KeypressContext.js';
|
|
71
|
+
import { OverflowProvider } from './contexts/OverflowContext.js';
|
|
72
|
+
import { useOverflowActions, } from './contexts/OverflowContext.js';
|
|
63
73
|
// Mock useStdout to capture terminal title writes
|
|
64
74
|
vi.mock('ink', async (importOriginal) => {
|
|
65
75
|
const actual = await importOriginal();
|
|
@@ -73,9 +83,11 @@ vi.mock('ink', async (importOriginal) => {
|
|
|
73
83
|
// so we can assert against them in our tests.
|
|
74
84
|
let capturedUIState;
|
|
75
85
|
let capturedUIActions;
|
|
86
|
+
let capturedOverflowActions;
|
|
76
87
|
function TestContextConsumer() {
|
|
77
88
|
capturedUIState = useContext(UIStateContext);
|
|
78
89
|
capturedUIActions = useContext(UIActionsContext);
|
|
90
|
+
capturedOverflowActions = useOverflowActions();
|
|
79
91
|
return null;
|
|
80
92
|
}
|
|
81
93
|
vi.mock('./App.js', () => ({
|
|
@@ -124,12 +136,18 @@ vi.mock('./hooks/useShellInactivityStatus.js', () => ({
|
|
|
124
136
|
inactivityStatus: 'none',
|
|
125
137
|
})),
|
|
126
138
|
}));
|
|
139
|
+
vi.mock('../utils/terminalNotifications.js', () => ({
|
|
140
|
+
notifyViaTerminal: terminalNotificationsMocks.notifyViaTerminal,
|
|
141
|
+
isNotificationsEnabled: terminalNotificationsMocks.isNotificationsEnabled,
|
|
142
|
+
buildRunEventNotificationContent: terminalNotificationsMocks.buildRunEventNotificationContent,
|
|
143
|
+
}));
|
|
127
144
|
vi.mock('./hooks/useTerminalTheme.js', () => ({
|
|
128
145
|
useTerminalTheme: vi.fn(),
|
|
129
146
|
}));
|
|
130
147
|
import { useHookDisplayState } from './hooks/useHookDisplayState.js';
|
|
131
148
|
import { useTerminalTheme } from './hooks/useTerminalTheme.js';
|
|
132
149
|
import { useShellInactivityStatus } from './hooks/useShellInactivityStatus.js';
|
|
150
|
+
import { useFocus } from './hooks/useFocus.js';
|
|
133
151
|
// Mock external utilities
|
|
134
152
|
vi.mock('../utils/events.js');
|
|
135
153
|
vi.mock('../utils/handleAutoUpdate.js');
|
|
@@ -163,14 +181,14 @@ import { measureElement } from 'ink';
|
|
|
163
181
|
import { useTerminalSize } from './hooks/useTerminalSize.js';
|
|
164
182
|
import { ShellExecutionService, writeToStdout, enableMouseEvents, disableMouseEvents, } from '@google/gemini-cli-core';
|
|
165
183
|
import {} from '../config/extension-manager.js';
|
|
166
|
-
import { WARNING_PROMPT_DURATION_MS } from './constants.js';
|
|
184
|
+
import { WARNING_PROMPT_DURATION_MS, EXPAND_HINT_DURATION_MS, } from './constants.js';
|
|
167
185
|
describe('AppContainer State Management', () => {
|
|
168
186
|
let mockConfig;
|
|
169
187
|
let mockSettings;
|
|
170
188
|
let mockInitResult;
|
|
171
189
|
let mockExtensionManager;
|
|
172
190
|
// Helper to generate the AppContainer JSX for render and rerender
|
|
173
|
-
const getAppContainer = ({ settings = mockSettings, config = mockConfig, version = '1.0.0', initResult = mockInitResult, startupWarnings, resumedSessionData, } = {}) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: config, children: _jsx(AppContainer, { config: config, version: version, initializationResult: initResult, startupWarnings: startupWarnings, resumedSessionData: resumedSessionData }) }) }));
|
|
191
|
+
const getAppContainer = ({ settings = mockSettings, config = mockConfig, version = '1.0.0', initResult = mockInitResult, startupWarnings, resumedSessionData, } = {}) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: config, children: _jsx(OverflowProvider, { children: _jsx(AppContainer, { config: config, version: version, initializationResult: initResult, startupWarnings: startupWarnings, resumedSessionData: resumedSessionData }) }) }) }));
|
|
174
192
|
// Helper to render the AppContainer
|
|
175
193
|
const renderAppContainer = (props) => render(getAppContainer(props));
|
|
176
194
|
// Create typed mocks for all hooks
|
|
@@ -200,6 +218,7 @@ describe('AppContainer State Management', () => {
|
|
|
200
218
|
const mockedUseHookDisplayState = useHookDisplayState;
|
|
201
219
|
const mockedUseTerminalTheme = useTerminalTheme;
|
|
202
220
|
const mockedUseShellInactivityStatus = useShellInactivityStatus;
|
|
221
|
+
const mockedUseFocusState = useFocus;
|
|
203
222
|
const DEFAULT_GEMINI_STREAM_MOCK = {
|
|
204
223
|
streamingState: 'idle',
|
|
205
224
|
submitQuery: vi.fn(),
|
|
@@ -330,6 +349,10 @@ describe('AppContainer State Management', () => {
|
|
|
330
349
|
shouldShowFocusHint: false,
|
|
331
350
|
inactivityStatus: 'none',
|
|
332
351
|
});
|
|
352
|
+
mockedUseFocusState.mockReturnValue({
|
|
353
|
+
isFocused: true,
|
|
354
|
+
hasReceivedFocusEvent: true,
|
|
355
|
+
});
|
|
333
356
|
// Mock Config
|
|
334
357
|
mockConfig = makeFakeConfig();
|
|
335
358
|
// Mock config's getTargetDir to return consistent workspace directory
|
|
@@ -384,7 +407,18 @@ describe('AppContainer State Management', () => {
|
|
|
384
407
|
unmount();
|
|
385
408
|
});
|
|
386
409
|
it('renders with startup warnings', async () => {
|
|
387
|
-
const startupWarnings = [
|
|
410
|
+
const startupWarnings = [
|
|
411
|
+
{
|
|
412
|
+
id: 'w1',
|
|
413
|
+
message: 'Warning 1',
|
|
414
|
+
priority: WarningPriority.High,
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
id: 'w2',
|
|
418
|
+
message: 'Warning 2',
|
|
419
|
+
priority: WarningPriority.High,
|
|
420
|
+
},
|
|
421
|
+
];
|
|
388
422
|
let unmount;
|
|
389
423
|
await act(async () => {
|
|
390
424
|
const result = renderAppContainer({ startupWarnings });
|
|
@@ -421,6 +455,286 @@ describe('AppContainer State Management', () => {
|
|
|
421
455
|
});
|
|
422
456
|
});
|
|
423
457
|
describe('State Initialization', () => {
|
|
458
|
+
it('sends a macOS notification when confirmation is pending and terminal is unfocused', async () => {
|
|
459
|
+
mockedUseFocusState.mockReturnValue({
|
|
460
|
+
isFocused: false,
|
|
461
|
+
hasReceivedFocusEvent: true,
|
|
462
|
+
});
|
|
463
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
464
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
465
|
+
pendingHistoryItems: [
|
|
466
|
+
{
|
|
467
|
+
type: 'tool_group',
|
|
468
|
+
tools: [
|
|
469
|
+
{
|
|
470
|
+
callId: 'call-1',
|
|
471
|
+
name: 'run_shell_command',
|
|
472
|
+
description: 'Run command',
|
|
473
|
+
resultDisplay: undefined,
|
|
474
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
475
|
+
confirmationDetails: {
|
|
476
|
+
type: 'exec',
|
|
477
|
+
title: 'Run shell command',
|
|
478
|
+
command: 'ls',
|
|
479
|
+
rootCommand: 'ls',
|
|
480
|
+
rootCommands: ['ls'],
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
],
|
|
486
|
+
});
|
|
487
|
+
let unmount;
|
|
488
|
+
await act(async () => {
|
|
489
|
+
const rendered = renderAppContainer();
|
|
490
|
+
unmount = rendered.unmount;
|
|
491
|
+
});
|
|
492
|
+
await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled());
|
|
493
|
+
expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
|
|
494
|
+
type: 'attention',
|
|
495
|
+
}));
|
|
496
|
+
await act(async () => {
|
|
497
|
+
unmount?.();
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
it('does not send attention notification when terminal is focused', async () => {
|
|
501
|
+
mockedUseFocusState.mockReturnValue({
|
|
502
|
+
isFocused: true,
|
|
503
|
+
hasReceivedFocusEvent: true,
|
|
504
|
+
});
|
|
505
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
506
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
507
|
+
pendingHistoryItems: [
|
|
508
|
+
{
|
|
509
|
+
type: 'tool_group',
|
|
510
|
+
tools: [
|
|
511
|
+
{
|
|
512
|
+
callId: 'call-2',
|
|
513
|
+
name: 'run_shell_command',
|
|
514
|
+
description: 'Run command',
|
|
515
|
+
resultDisplay: undefined,
|
|
516
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
517
|
+
confirmationDetails: {
|
|
518
|
+
type: 'exec',
|
|
519
|
+
title: 'Run shell command',
|
|
520
|
+
command: 'ls',
|
|
521
|
+
rootCommand: 'ls',
|
|
522
|
+
rootCommands: ['ls'],
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
],
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
});
|
|
529
|
+
let unmount;
|
|
530
|
+
await act(async () => {
|
|
531
|
+
const rendered = renderAppContainer();
|
|
532
|
+
unmount = rendered.unmount;
|
|
533
|
+
});
|
|
534
|
+
expect(terminalNotificationsMocks.notifyViaTerminal).not.toHaveBeenCalled();
|
|
535
|
+
await act(async () => {
|
|
536
|
+
unmount?.();
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
it('sends attention notification when focus reporting is unavailable', async () => {
|
|
540
|
+
mockedUseFocusState.mockReturnValue({
|
|
541
|
+
isFocused: true,
|
|
542
|
+
hasReceivedFocusEvent: false,
|
|
543
|
+
});
|
|
544
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
545
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
546
|
+
pendingHistoryItems: [
|
|
547
|
+
{
|
|
548
|
+
type: 'tool_group',
|
|
549
|
+
tools: [
|
|
550
|
+
{
|
|
551
|
+
callId: 'call-focus-unknown',
|
|
552
|
+
name: 'run_shell_command',
|
|
553
|
+
description: 'Run command',
|
|
554
|
+
resultDisplay: undefined,
|
|
555
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
556
|
+
confirmationDetails: {
|
|
557
|
+
type: 'exec',
|
|
558
|
+
title: 'Run shell command',
|
|
559
|
+
command: 'ls',
|
|
560
|
+
rootCommand: 'ls',
|
|
561
|
+
rootCommands: ['ls'],
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
},
|
|
566
|
+
],
|
|
567
|
+
});
|
|
568
|
+
let unmount;
|
|
569
|
+
await act(async () => {
|
|
570
|
+
const rendered = renderAppContainer();
|
|
571
|
+
unmount = rendered.unmount;
|
|
572
|
+
});
|
|
573
|
+
await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled());
|
|
574
|
+
await act(async () => {
|
|
575
|
+
unmount?.();
|
|
576
|
+
});
|
|
577
|
+
});
|
|
578
|
+
it('sends a macOS notification when a response completes while unfocused', async () => {
|
|
579
|
+
mockedUseFocusState.mockReturnValue({
|
|
580
|
+
isFocused: false,
|
|
581
|
+
hasReceivedFocusEvent: true,
|
|
582
|
+
});
|
|
583
|
+
let currentStreamingState = 'responding';
|
|
584
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
585
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
586
|
+
streamingState: currentStreamingState,
|
|
587
|
+
}));
|
|
588
|
+
let unmount;
|
|
589
|
+
let rerender;
|
|
590
|
+
await act(async () => {
|
|
591
|
+
const rendered = renderAppContainer();
|
|
592
|
+
unmount = rendered.unmount;
|
|
593
|
+
rerender = rendered.rerender;
|
|
594
|
+
});
|
|
595
|
+
currentStreamingState = 'idle';
|
|
596
|
+
await act(async () => {
|
|
597
|
+
rerender?.(getAppContainer());
|
|
598
|
+
});
|
|
599
|
+
await waitFor(() => expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
|
|
600
|
+
type: 'session_complete',
|
|
601
|
+
detail: 'Gemini CLI finished responding.',
|
|
602
|
+
})));
|
|
603
|
+
expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled();
|
|
604
|
+
await act(async () => {
|
|
605
|
+
unmount?.();
|
|
606
|
+
});
|
|
607
|
+
});
|
|
608
|
+
it('sends completion notification when focus reporting is unavailable', async () => {
|
|
609
|
+
mockedUseFocusState.mockReturnValue({
|
|
610
|
+
isFocused: true,
|
|
611
|
+
hasReceivedFocusEvent: false,
|
|
612
|
+
});
|
|
613
|
+
let currentStreamingState = 'responding';
|
|
614
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
615
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
616
|
+
streamingState: currentStreamingState,
|
|
617
|
+
}));
|
|
618
|
+
let unmount;
|
|
619
|
+
let rerender;
|
|
620
|
+
await act(async () => {
|
|
621
|
+
const rendered = renderAppContainer();
|
|
622
|
+
unmount = rendered.unmount;
|
|
623
|
+
rerender = rendered.rerender;
|
|
624
|
+
});
|
|
625
|
+
currentStreamingState = 'idle';
|
|
626
|
+
await act(async () => {
|
|
627
|
+
rerender?.(getAppContainer());
|
|
628
|
+
});
|
|
629
|
+
await waitFor(() => expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
|
|
630
|
+
type: 'session_complete',
|
|
631
|
+
detail: 'Gemini CLI finished responding.',
|
|
632
|
+
})));
|
|
633
|
+
await act(async () => {
|
|
634
|
+
unmount?.();
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
it('does not send completion notification when another action-required dialog is pending', async () => {
|
|
638
|
+
mockedUseFocusState.mockReturnValue({
|
|
639
|
+
isFocused: false,
|
|
640
|
+
hasReceivedFocusEvent: true,
|
|
641
|
+
});
|
|
642
|
+
mockedUseQuotaAndFallback.mockReturnValue({
|
|
643
|
+
proQuotaRequest: { kind: 'upgrade' },
|
|
644
|
+
handleProQuotaChoice: vi.fn(),
|
|
645
|
+
});
|
|
646
|
+
let currentStreamingState = 'responding';
|
|
647
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
648
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
649
|
+
streamingState: currentStreamingState,
|
|
650
|
+
}));
|
|
651
|
+
let unmount;
|
|
652
|
+
let rerender;
|
|
653
|
+
await act(async () => {
|
|
654
|
+
const rendered = renderAppContainer();
|
|
655
|
+
unmount = rendered.unmount;
|
|
656
|
+
rerender = rendered.rerender;
|
|
657
|
+
});
|
|
658
|
+
currentStreamingState = 'idle';
|
|
659
|
+
await act(async () => {
|
|
660
|
+
rerender?.(getAppContainer());
|
|
661
|
+
});
|
|
662
|
+
expect(terminalNotificationsMocks.notifyViaTerminal).not.toHaveBeenCalled();
|
|
663
|
+
await act(async () => {
|
|
664
|
+
unmount?.();
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
it('can send repeated attention notifications for the same key after pending state clears', async () => {
|
|
668
|
+
mockedUseFocusState.mockReturnValue({
|
|
669
|
+
isFocused: false,
|
|
670
|
+
hasReceivedFocusEvent: true,
|
|
671
|
+
});
|
|
672
|
+
let pendingHistoryItems = [
|
|
673
|
+
{
|
|
674
|
+
type: 'tool_group',
|
|
675
|
+
tools: [
|
|
676
|
+
{
|
|
677
|
+
callId: 'repeat-key-call',
|
|
678
|
+
name: 'run_shell_command',
|
|
679
|
+
description: 'Run command',
|
|
680
|
+
resultDisplay: undefined,
|
|
681
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
682
|
+
confirmationDetails: {
|
|
683
|
+
type: 'exec',
|
|
684
|
+
title: 'Run shell command',
|
|
685
|
+
command: 'ls',
|
|
686
|
+
rootCommand: 'ls',
|
|
687
|
+
rootCommands: ['ls'],
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
],
|
|
691
|
+
},
|
|
692
|
+
];
|
|
693
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
694
|
+
...DEFAULT_GEMINI_STREAM_MOCK,
|
|
695
|
+
pendingHistoryItems,
|
|
696
|
+
}));
|
|
697
|
+
let unmount;
|
|
698
|
+
let rerender;
|
|
699
|
+
await act(async () => {
|
|
700
|
+
const rendered = renderAppContainer();
|
|
701
|
+
unmount = rendered.unmount;
|
|
702
|
+
rerender = rendered.rerender;
|
|
703
|
+
});
|
|
704
|
+
await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalledTimes(1));
|
|
705
|
+
pendingHistoryItems = [];
|
|
706
|
+
await act(async () => {
|
|
707
|
+
rerender?.(getAppContainer());
|
|
708
|
+
});
|
|
709
|
+
pendingHistoryItems = [
|
|
710
|
+
{
|
|
711
|
+
type: 'tool_group',
|
|
712
|
+
tools: [
|
|
713
|
+
{
|
|
714
|
+
callId: 'repeat-key-call',
|
|
715
|
+
name: 'run_shell_command',
|
|
716
|
+
description: 'Run command',
|
|
717
|
+
resultDisplay: undefined,
|
|
718
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
719
|
+
confirmationDetails: {
|
|
720
|
+
type: 'exec',
|
|
721
|
+
title: 'Run shell command',
|
|
722
|
+
command: 'ls',
|
|
723
|
+
rootCommand: 'ls',
|
|
724
|
+
rootCommands: ['ls'],
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
],
|
|
728
|
+
},
|
|
729
|
+
];
|
|
730
|
+
await act(async () => {
|
|
731
|
+
rerender?.(getAppContainer());
|
|
732
|
+
});
|
|
733
|
+
await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalledTimes(2));
|
|
734
|
+
await act(async () => {
|
|
735
|
+
unmount?.();
|
|
736
|
+
});
|
|
737
|
+
});
|
|
424
738
|
it('initializes with theme error from initialization result', async () => {
|
|
425
739
|
const initResultWithError = {
|
|
426
740
|
...mockInitResult,
|
|
@@ -1853,7 +2167,7 @@ describe('AppContainer State Management', () => {
|
|
|
1853
2167
|
});
|
|
1854
2168
|
return null;
|
|
1855
2169
|
}
|
|
1856
|
-
const getTree = (settings) => (_jsx(SettingsContext.Provider, { value: settings, children:
|
|
2170
|
+
const getTree = (settings) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: mockConfig, children: _jsxs(OverflowProvider, { children: [_jsx(AppContainer, { config: mockConfig, version: "1.0.0", initializationResult: mockInitResult }), _jsx(TestChild, {})] }) }) }));
|
|
1857
2171
|
const renderResult = render(getTree(testSettings));
|
|
1858
2172
|
stdin = renderResult.stdin;
|
|
1859
2173
|
await act(async () => {
|
|
@@ -2323,6 +2637,246 @@ describe('AppContainer State Management', () => {
|
|
|
2323
2637
|
compUnmount();
|
|
2324
2638
|
});
|
|
2325
2639
|
});
|
|
2640
|
+
describe('Submission Handling', () => {
|
|
2641
|
+
it('resets expansion state on submission when not in alternate buffer', async () => {
|
|
2642
|
+
const { checkPermissions } = await import('./hooks/atCommandProcessor.js');
|
|
2643
|
+
vi.mocked(checkPermissions).mockResolvedValue([]);
|
|
2644
|
+
let unmount;
|
|
2645
|
+
await act(async () => {
|
|
2646
|
+
unmount = renderAppContainer({
|
|
2647
|
+
settings: {
|
|
2648
|
+
...mockSettings,
|
|
2649
|
+
merged: {
|
|
2650
|
+
...mockSettings.merged,
|
|
2651
|
+
ui: { ...mockSettings.merged.ui, useAlternateBuffer: false },
|
|
2652
|
+
},
|
|
2653
|
+
},
|
|
2654
|
+
}).unmount;
|
|
2655
|
+
});
|
|
2656
|
+
await waitFor(() => expect(capturedUIActions).toBeTruthy());
|
|
2657
|
+
// Expand first
|
|
2658
|
+
act(() => capturedUIActions.setConstrainHeight(false));
|
|
2659
|
+
expect(capturedUIState.constrainHeight).toBe(false);
|
|
2660
|
+
// Reset mock stdout to clear any initial writes
|
|
2661
|
+
mocks.mockStdout.write.mockClear();
|
|
2662
|
+
// Submit
|
|
2663
|
+
await act(async () => capturedUIActions.handleFinalSubmit('test prompt'));
|
|
2664
|
+
// Should be reset
|
|
2665
|
+
expect(capturedUIState.constrainHeight).toBe(true);
|
|
2666
|
+
// Should refresh static (which clears terminal in non-alternate buffer)
|
|
2667
|
+
expect(mocks.mockStdout.write).toHaveBeenCalledWith(ansiEscapes.clearTerminal);
|
|
2668
|
+
unmount();
|
|
2669
|
+
});
|
|
2670
|
+
it('resets expansion state on submission when in alternate buffer without clearing terminal', async () => {
|
|
2671
|
+
const { checkPermissions } = await import('./hooks/atCommandProcessor.js');
|
|
2672
|
+
vi.mocked(checkPermissions).mockResolvedValue([]);
|
|
2673
|
+
let unmount;
|
|
2674
|
+
await act(async () => {
|
|
2675
|
+
unmount = renderAppContainer({
|
|
2676
|
+
settings: {
|
|
2677
|
+
...mockSettings,
|
|
2678
|
+
merged: {
|
|
2679
|
+
...mockSettings.merged,
|
|
2680
|
+
ui: { ...mockSettings.merged.ui, useAlternateBuffer: true },
|
|
2681
|
+
},
|
|
2682
|
+
},
|
|
2683
|
+
}).unmount;
|
|
2684
|
+
});
|
|
2685
|
+
await waitFor(() => expect(capturedUIActions).toBeTruthy());
|
|
2686
|
+
// Expand first
|
|
2687
|
+
act(() => capturedUIActions.setConstrainHeight(false));
|
|
2688
|
+
expect(capturedUIState.constrainHeight).toBe(false);
|
|
2689
|
+
// Reset mock stdout
|
|
2690
|
+
mocks.mockStdout.write.mockClear();
|
|
2691
|
+
// Submit
|
|
2692
|
+
await act(async () => capturedUIActions.handleFinalSubmit('test prompt'));
|
|
2693
|
+
// Should be reset
|
|
2694
|
+
expect(capturedUIState.constrainHeight).toBe(true);
|
|
2695
|
+
// Should NOT refresh static's clearTerminal in alternate buffer
|
|
2696
|
+
expect(mocks.mockStdout.write).not.toHaveBeenCalledWith(ansiEscapes.clearTerminal);
|
|
2697
|
+
unmount();
|
|
2698
|
+
});
|
|
2699
|
+
});
|
|
2700
|
+
describe('Overflow Hint Handling', () => {
|
|
2701
|
+
beforeEach(() => {
|
|
2702
|
+
vi.useFakeTimers();
|
|
2703
|
+
});
|
|
2704
|
+
afterEach(() => {
|
|
2705
|
+
vi.useRealTimers();
|
|
2706
|
+
});
|
|
2707
|
+
it('sets showIsExpandableHint when overflow occurs in Standard Mode and hides after 10s', async () => {
|
|
2708
|
+
let unmount;
|
|
2709
|
+
await act(async () => {
|
|
2710
|
+
const result = renderAppContainer();
|
|
2711
|
+
unmount = result.unmount;
|
|
2712
|
+
});
|
|
2713
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
2714
|
+
// Trigger overflow
|
|
2715
|
+
act(() => {
|
|
2716
|
+
capturedOverflowActions.addOverflowingId('test-id');
|
|
2717
|
+
});
|
|
2718
|
+
await waitFor(() => {
|
|
2719
|
+
// Should show hint because we are in Standard Mode (default settings) and have overflow
|
|
2720
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2721
|
+
});
|
|
2722
|
+
// Advance just before the timeout
|
|
2723
|
+
act(() => {
|
|
2724
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS - 100);
|
|
2725
|
+
});
|
|
2726
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2727
|
+
// Advance to hit the timeout mark
|
|
2728
|
+
act(() => {
|
|
2729
|
+
vi.advanceTimersByTime(100);
|
|
2730
|
+
});
|
|
2731
|
+
await waitFor(() => {
|
|
2732
|
+
expect(capturedUIState.showIsExpandableHint).toBe(false);
|
|
2733
|
+
});
|
|
2734
|
+
unmount();
|
|
2735
|
+
});
|
|
2736
|
+
it('toggles expansion state and resets the hint timer when Ctrl+O is pressed in Standard Mode', async () => {
|
|
2737
|
+
let unmount;
|
|
2738
|
+
let stdin;
|
|
2739
|
+
await act(async () => {
|
|
2740
|
+
const result = renderAppContainer();
|
|
2741
|
+
unmount = result.unmount;
|
|
2742
|
+
stdin = result.stdin;
|
|
2743
|
+
});
|
|
2744
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
2745
|
+
// Initial state is constrainHeight = true
|
|
2746
|
+
expect(capturedUIState.constrainHeight).toBe(true);
|
|
2747
|
+
// Trigger overflow so the hint starts showing
|
|
2748
|
+
act(() => {
|
|
2749
|
+
capturedOverflowActions.addOverflowingId('test-id');
|
|
2750
|
+
});
|
|
2751
|
+
await waitFor(() => {
|
|
2752
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2753
|
+
});
|
|
2754
|
+
// Advance half the duration
|
|
2755
|
+
act(() => {
|
|
2756
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2);
|
|
2757
|
+
});
|
|
2758
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2759
|
+
// Simulate Ctrl+O
|
|
2760
|
+
act(() => {
|
|
2761
|
+
stdin.write('\x0f'); // \x0f is Ctrl+O
|
|
2762
|
+
});
|
|
2763
|
+
await waitFor(() => {
|
|
2764
|
+
// constrainHeight should toggle
|
|
2765
|
+
expect(capturedUIState.constrainHeight).toBe(false);
|
|
2766
|
+
});
|
|
2767
|
+
// Advance enough that the original timer would have expired if it hadn't reset
|
|
2768
|
+
act(() => {
|
|
2769
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2 + 1000);
|
|
2770
|
+
});
|
|
2771
|
+
// We expect it to still be true because Ctrl+O should have reset the timer
|
|
2772
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2773
|
+
// Advance remaining time to reach the new timeout
|
|
2774
|
+
act(() => {
|
|
2775
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2 - 1000);
|
|
2776
|
+
});
|
|
2777
|
+
await waitFor(() => {
|
|
2778
|
+
expect(capturedUIState.showIsExpandableHint).toBe(false);
|
|
2779
|
+
});
|
|
2780
|
+
unmount();
|
|
2781
|
+
});
|
|
2782
|
+
it('toggles Ctrl+O multiple times and verifies the hint disappears exactly after the last toggle', async () => {
|
|
2783
|
+
let unmount;
|
|
2784
|
+
let stdin;
|
|
2785
|
+
await act(async () => {
|
|
2786
|
+
const result = renderAppContainer();
|
|
2787
|
+
unmount = result.unmount;
|
|
2788
|
+
stdin = result.stdin;
|
|
2789
|
+
});
|
|
2790
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
2791
|
+
// Initial state is constrainHeight = true
|
|
2792
|
+
expect(capturedUIState.constrainHeight).toBe(true);
|
|
2793
|
+
// Trigger overflow so the hint starts showing
|
|
2794
|
+
act(() => {
|
|
2795
|
+
capturedOverflowActions.addOverflowingId('test-id');
|
|
2796
|
+
});
|
|
2797
|
+
await waitFor(() => {
|
|
2798
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2799
|
+
});
|
|
2800
|
+
// Advance half the duration
|
|
2801
|
+
act(() => {
|
|
2802
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2);
|
|
2803
|
+
});
|
|
2804
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2805
|
+
// First toggle 'on' (expanded)
|
|
2806
|
+
act(() => {
|
|
2807
|
+
stdin.write('\x0f'); // Ctrl+O
|
|
2808
|
+
});
|
|
2809
|
+
await waitFor(() => {
|
|
2810
|
+
expect(capturedUIState.constrainHeight).toBe(false);
|
|
2811
|
+
});
|
|
2812
|
+
// Wait 1 second
|
|
2813
|
+
act(() => {
|
|
2814
|
+
vi.advanceTimersByTime(1000);
|
|
2815
|
+
});
|
|
2816
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2817
|
+
// Second toggle 'off' (collapsed)
|
|
2818
|
+
act(() => {
|
|
2819
|
+
stdin.write('\x0f'); // Ctrl+O
|
|
2820
|
+
});
|
|
2821
|
+
await waitFor(() => {
|
|
2822
|
+
expect(capturedUIState.constrainHeight).toBe(true);
|
|
2823
|
+
});
|
|
2824
|
+
// Wait 1 second
|
|
2825
|
+
act(() => {
|
|
2826
|
+
vi.advanceTimersByTime(1000);
|
|
2827
|
+
});
|
|
2828
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2829
|
+
// Third toggle 'on' (expanded)
|
|
2830
|
+
act(() => {
|
|
2831
|
+
stdin.write('\x0f'); // Ctrl+O
|
|
2832
|
+
});
|
|
2833
|
+
await waitFor(() => {
|
|
2834
|
+
expect(capturedUIState.constrainHeight).toBe(false);
|
|
2835
|
+
});
|
|
2836
|
+
// Now we wait just before the timeout from the LAST toggle.
|
|
2837
|
+
// It should still be true.
|
|
2838
|
+
act(() => {
|
|
2839
|
+
vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS - 100);
|
|
2840
|
+
});
|
|
2841
|
+
expect(capturedUIState.showIsExpandableHint).toBe(true);
|
|
2842
|
+
// Wait 0.1s more to hit exactly the timeout since the last toggle.
|
|
2843
|
+
// It should hide now.
|
|
2844
|
+
act(() => {
|
|
2845
|
+
vi.advanceTimersByTime(100);
|
|
2846
|
+
});
|
|
2847
|
+
await waitFor(() => {
|
|
2848
|
+
expect(capturedUIState.showIsExpandableHint).toBe(false);
|
|
2849
|
+
});
|
|
2850
|
+
unmount();
|
|
2851
|
+
});
|
|
2852
|
+
it('does NOT set showIsExpandableHint when overflow occurs in Alternate Buffer Mode', async () => {
|
|
2853
|
+
const alternateSettings = mergeSettings({}, {}, {}, {}, true);
|
|
2854
|
+
const settingsWithAlternateBuffer = {
|
|
2855
|
+
merged: {
|
|
2856
|
+
...alternateSettings,
|
|
2857
|
+
ui: {
|
|
2858
|
+
...alternateSettings.ui,
|
|
2859
|
+
useAlternateBuffer: true,
|
|
2860
|
+
},
|
|
2861
|
+
},
|
|
2862
|
+
};
|
|
2863
|
+
let unmount;
|
|
2864
|
+
await act(async () => {
|
|
2865
|
+
const result = renderAppContainer({
|
|
2866
|
+
settings: settingsWithAlternateBuffer,
|
|
2867
|
+
});
|
|
2868
|
+
unmount = result.unmount;
|
|
2869
|
+
});
|
|
2870
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
2871
|
+
// Trigger overflow
|
|
2872
|
+
act(() => {
|
|
2873
|
+
capturedOverflowActions.addOverflowingId('test-id');
|
|
2874
|
+
});
|
|
2875
|
+
// Should NOT show hint because we are in Alternate Buffer Mode
|
|
2876
|
+
expect(capturedUIState.showIsExpandableHint).toBe(false);
|
|
2877
|
+
unmount();
|
|
2878
|
+
});
|
|
2879
|
+
});
|
|
2326
2880
|
describe('Permission Handling', () => {
|
|
2327
2881
|
it('shows permission dialog when checkPermissions returns paths', async () => {
|
|
2328
2882
|
const { checkPermissions } = await import('./hooks/atCommandProcessor.js');
|