@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
|
@@ -182,58 +182,67 @@ describe('SettingsDialog', () => {
|
|
|
182
182
|
vi.resetAllMocks();
|
|
183
183
|
});
|
|
184
184
|
describe('Initial Rendering', () => {
|
|
185
|
-
it('should render the settings dialog with default state', () => {
|
|
185
|
+
it('should render the settings dialog with default state', async () => {
|
|
186
186
|
const settings = createMockSettings();
|
|
187
187
|
const onSelect = vi.fn();
|
|
188
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
188
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
189
|
+
await waitUntilReady();
|
|
189
190
|
const output = lastFrame();
|
|
190
191
|
expect(output).toContain('Settings');
|
|
191
192
|
expect(output).toContain('Apply To');
|
|
192
193
|
// Use regex for more flexible help text matching
|
|
193
194
|
expect(output).toMatch(/Enter.*select.*Esc.*close/);
|
|
195
|
+
unmount();
|
|
194
196
|
});
|
|
195
|
-
it('should accept availableTerminalHeight prop without errors', () => {
|
|
197
|
+
it('should accept availableTerminalHeight prop without errors', async () => {
|
|
196
198
|
const settings = createMockSettings();
|
|
197
199
|
const onSelect = vi.fn();
|
|
198
|
-
const { lastFrame } = renderDialog(settings, onSelect, {
|
|
200
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect, {
|
|
199
201
|
availableTerminalHeight: 20,
|
|
200
202
|
});
|
|
203
|
+
await waitUntilReady();
|
|
201
204
|
const output = lastFrame();
|
|
202
205
|
// Should still render properly with the height prop
|
|
203
206
|
expect(output).toContain('Settings');
|
|
204
207
|
// Use regex for more flexible help text matching
|
|
205
208
|
expect(output).toMatch(/Enter.*select.*Esc.*close/);
|
|
209
|
+
unmount();
|
|
206
210
|
});
|
|
207
|
-
it('should render settings list with visual indicators', () => {
|
|
211
|
+
it('should render settings list with visual indicators', async () => {
|
|
208
212
|
const settings = createMockSettings();
|
|
209
213
|
const onSelect = vi.fn();
|
|
210
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
214
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
215
|
+
await waitUntilReady();
|
|
211
216
|
const output = lastFrame();
|
|
212
217
|
// Use snapshot to capture visual layout including indicators
|
|
213
218
|
expect(output).toMatchSnapshot();
|
|
219
|
+
unmount();
|
|
214
220
|
});
|
|
215
221
|
it('should use almost full height of the window but no more when the window height is 25 rows', async () => {
|
|
216
222
|
const settings = createMockSettings();
|
|
217
223
|
const onSelect = vi.fn();
|
|
218
224
|
// Render with a fixed height of 25 rows
|
|
219
|
-
const { lastFrame } = renderDialog(settings, onSelect, {
|
|
225
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect, {
|
|
220
226
|
availableTerminalHeight: 25,
|
|
221
227
|
});
|
|
228
|
+
await waitUntilReady();
|
|
222
229
|
// Wait for the dialog to render
|
|
223
230
|
await waitFor(() => {
|
|
224
231
|
const output = lastFrame();
|
|
225
232
|
expect(output).toBeDefined();
|
|
226
|
-
const lines = output.split('\n');
|
|
233
|
+
const lines = output.trim().split('\n');
|
|
227
234
|
expect(lines.length).toBeGreaterThanOrEqual(24);
|
|
228
235
|
expect(lines.length).toBeLessThanOrEqual(25);
|
|
229
236
|
});
|
|
237
|
+
unmount();
|
|
230
238
|
});
|
|
231
239
|
});
|
|
232
240
|
describe('Setting Descriptions', () => {
|
|
233
|
-
it('should render descriptions for settings that have them', () => {
|
|
241
|
+
it('should render descriptions for settings that have them', async () => {
|
|
234
242
|
const settings = createMockSettings();
|
|
235
243
|
const onSelect = vi.fn();
|
|
236
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
244
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
245
|
+
await waitUntilReady();
|
|
237
246
|
const output = lastFrame();
|
|
238
247
|
// 'general.vimMode' has description 'Enable Vim keybindings' in settingsSchema.ts
|
|
239
248
|
expect(output).toContain('Vim Mode');
|
|
@@ -241,6 +250,7 @@ describe('SettingsDialog', () => {
|
|
|
241
250
|
// 'general.enableAutoUpdate' has description 'Enable automatic updates.'
|
|
242
251
|
expect(output).toContain('Enable Auto Update');
|
|
243
252
|
expect(output).toContain('Enable automatic updates.');
|
|
253
|
+
unmount();
|
|
244
254
|
});
|
|
245
255
|
});
|
|
246
256
|
describe('Settings Navigation', () => {
|
|
@@ -258,20 +268,23 @@ describe('SettingsDialog', () => {
|
|
|
258
268
|
])('should navigate with $name', async ({ down, up }) => {
|
|
259
269
|
const settings = createMockSettings();
|
|
260
270
|
const onSelect = vi.fn();
|
|
261
|
-
const { stdin, unmount, lastFrame } = renderDialog(settings, onSelect);
|
|
271
|
+
const { stdin, unmount, lastFrame, waitUntilReady } = renderDialog(settings, onSelect);
|
|
272
|
+
await waitUntilReady();
|
|
262
273
|
const initialFrame = lastFrame();
|
|
263
274
|
expect(initialFrame).toContain('Vim Mode');
|
|
264
275
|
// Navigate down
|
|
265
|
-
act(() => {
|
|
276
|
+
await act(async () => {
|
|
266
277
|
stdin.write(down);
|
|
267
278
|
});
|
|
279
|
+
await waitUntilReady();
|
|
268
280
|
await waitFor(() => {
|
|
269
281
|
expect(lastFrame()).toContain('Enable Auto Update');
|
|
270
282
|
});
|
|
271
283
|
// Navigate up
|
|
272
|
-
act(() => {
|
|
284
|
+
await act(async () => {
|
|
273
285
|
stdin.write(up);
|
|
274
286
|
});
|
|
287
|
+
await waitUntilReady();
|
|
275
288
|
await waitFor(() => {
|
|
276
289
|
expect(lastFrame()).toContain('Vim Mode');
|
|
277
290
|
});
|
|
@@ -280,11 +293,13 @@ describe('SettingsDialog', () => {
|
|
|
280
293
|
it('wraps around when at the top of the list', async () => {
|
|
281
294
|
const settings = createMockSettings();
|
|
282
295
|
const onSelect = vi.fn();
|
|
283
|
-
const { stdin, unmount, lastFrame } = renderDialog(settings, onSelect);
|
|
296
|
+
const { stdin, unmount, lastFrame, waitUntilReady } = renderDialog(settings, onSelect);
|
|
297
|
+
await waitUntilReady();
|
|
284
298
|
// Try to go up from first item
|
|
285
|
-
act(() => {
|
|
299
|
+
await act(async () => {
|
|
286
300
|
stdin.write(TerminalKeys.UP_ARROW);
|
|
287
301
|
});
|
|
302
|
+
await waitUntilReady();
|
|
288
303
|
await waitFor(() => {
|
|
289
304
|
// Should wrap to last setting (without relying on exact bullet character)
|
|
290
305
|
expect(lastFrame()).toContain('Hook Notifications');
|
|
@@ -297,15 +312,17 @@ describe('SettingsDialog', () => {
|
|
|
297
312
|
vi.mocked(saveModifiedSettings).mockClear();
|
|
298
313
|
const settings = createMockSettings();
|
|
299
314
|
const onSelect = vi.fn();
|
|
300
|
-
const { stdin, unmount, lastFrame } = renderDialog(settings, onSelect);
|
|
315
|
+
const { stdin, unmount, lastFrame, waitUntilReady } = renderDialog(settings, onSelect);
|
|
316
|
+
await waitUntilReady();
|
|
301
317
|
// Wait for initial render and verify we're on Vim Mode (first setting)
|
|
302
318
|
await waitFor(() => {
|
|
303
319
|
expect(lastFrame()).toContain('Vim Mode');
|
|
304
320
|
});
|
|
305
321
|
// Toggle the setting (Vim Mode is the first setting now)
|
|
306
|
-
act(() => {
|
|
322
|
+
await act(async () => {
|
|
307
323
|
stdin.write(TerminalKeys.ENTER);
|
|
308
324
|
});
|
|
325
|
+
await waitUntilReady();
|
|
309
326
|
// Wait for the setting change to be processed
|
|
310
327
|
await waitFor(() => {
|
|
311
328
|
expect(vi.mocked(saveModifiedSettings).mock.calls.length).toBeGreaterThan(0);
|
|
@@ -341,11 +358,16 @@ describe('SettingsDialog', () => {
|
|
|
341
358
|
settings.setValue(SettingScope.User, 'ui.theme', initialValue);
|
|
342
359
|
}
|
|
343
360
|
const onSelect = vi.fn();
|
|
344
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
345
|
-
|
|
361
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
362
|
+
await waitUntilReady();
|
|
363
|
+
await act(async () => {
|
|
346
364
|
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
365
|
+
});
|
|
366
|
+
await waitUntilReady();
|
|
367
|
+
await act(async () => {
|
|
347
368
|
stdin.write(TerminalKeys.ENTER);
|
|
348
369
|
});
|
|
370
|
+
await waitUntilReady();
|
|
349
371
|
await waitFor(() => {
|
|
350
372
|
expect(vi.mocked(saveModifiedSettings)).toHaveBeenCalled();
|
|
351
373
|
});
|
|
@@ -360,12 +382,14 @@ describe('SettingsDialog', () => {
|
|
|
360
382
|
it('should handle vim mode setting specially', async () => {
|
|
361
383
|
const settings = createMockSettings();
|
|
362
384
|
const onSelect = vi.fn();
|
|
363
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
385
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
386
|
+
await waitUntilReady();
|
|
364
387
|
// Navigate to vim mode setting and toggle it
|
|
365
388
|
// This would require knowing the exact position, so we'll just test that the mock is called
|
|
366
|
-
act(() => {
|
|
389
|
+
await act(async () => {
|
|
367
390
|
stdin.write(TerminalKeys.ENTER); // Enter key
|
|
368
391
|
});
|
|
392
|
+
await waitUntilReady();
|
|
369
393
|
// The mock should potentially be called if vim mode was toggled
|
|
370
394
|
unmount();
|
|
371
395
|
});
|
|
@@ -374,19 +398,22 @@ describe('SettingsDialog', () => {
|
|
|
374
398
|
it('should switch between scopes', async () => {
|
|
375
399
|
const settings = createMockSettings();
|
|
376
400
|
const onSelect = vi.fn();
|
|
377
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
401
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
402
|
+
await waitUntilReady();
|
|
378
403
|
// Switch to scope focus
|
|
379
|
-
act(() => {
|
|
404
|
+
await act(async () => {
|
|
380
405
|
stdin.write(TerminalKeys.TAB); // Tab key
|
|
381
406
|
// Select different scope (numbers 1-3 typically available)
|
|
382
407
|
stdin.write('2'); // Select second scope option
|
|
383
408
|
});
|
|
409
|
+
await waitUntilReady();
|
|
384
410
|
unmount();
|
|
385
411
|
});
|
|
386
412
|
it('should reset to settings focus when scope is selected', async () => {
|
|
387
413
|
const settings = createMockSettings();
|
|
388
414
|
const onSelect = vi.fn();
|
|
389
|
-
const { lastFrame, unmount } = renderDialog(settings, onSelect);
|
|
415
|
+
const { lastFrame, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
416
|
+
await waitUntilReady();
|
|
390
417
|
// Wait for initial render
|
|
391
418
|
await waitFor(() => {
|
|
392
419
|
expect(lastFrame()).toContain('Vim Mode');
|
|
@@ -403,9 +430,10 @@ describe('SettingsDialog', () => {
|
|
|
403
430
|
it('should show restart prompt for restart-required settings', async () => {
|
|
404
431
|
const settings = createMockSettings();
|
|
405
432
|
const onRestartRequest = vi.fn();
|
|
406
|
-
const { unmount } = renderDialog(settings, vi.fn(), {
|
|
433
|
+
const { unmount, waitUntilReady } = renderDialog(settings, vi.fn(), {
|
|
407
434
|
onRestartRequest,
|
|
408
435
|
});
|
|
436
|
+
await waitUntilReady();
|
|
409
437
|
// This test would need to trigger a restart-required setting change
|
|
410
438
|
// The exact steps depend on which settings require restart
|
|
411
439
|
unmount();
|
|
@@ -413,13 +441,15 @@ describe('SettingsDialog', () => {
|
|
|
413
441
|
it('should handle restart request when r is pressed', async () => {
|
|
414
442
|
const settings = createMockSettings();
|
|
415
443
|
const onRestartRequest = vi.fn();
|
|
416
|
-
const { stdin, unmount } = renderDialog(settings, vi.fn(), {
|
|
444
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, vi.fn(), {
|
|
417
445
|
onRestartRequest,
|
|
418
446
|
});
|
|
447
|
+
await waitUntilReady();
|
|
419
448
|
// Press 'r' key (this would only work if restart prompt is showing)
|
|
420
|
-
act(() => {
|
|
449
|
+
await act(async () => {
|
|
421
450
|
stdin.write('r');
|
|
422
451
|
});
|
|
452
|
+
await waitUntilReady();
|
|
423
453
|
// If restart prompt was showing, onRestartRequest should be called
|
|
424
454
|
unmount();
|
|
425
455
|
});
|
|
@@ -428,7 +458,8 @@ describe('SettingsDialog', () => {
|
|
|
428
458
|
it('should call onSelect with undefined when Escape is pressed', async () => {
|
|
429
459
|
const settings = createMockSettings();
|
|
430
460
|
const onSelect = vi.fn();
|
|
431
|
-
const { lastFrame, unmount } = renderDialog(settings, onSelect);
|
|
461
|
+
const { lastFrame, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
462
|
+
await waitUntilReady();
|
|
432
463
|
// Wait for initial render
|
|
433
464
|
await waitFor(() => {
|
|
434
465
|
expect(lastFrame()).toContain('Vim Mode');
|
|
@@ -445,16 +476,18 @@ describe('SettingsDialog', () => {
|
|
|
445
476
|
it('should persist settings across scope changes', async () => {
|
|
446
477
|
const settings = createMockSettings({ vimMode: true });
|
|
447
478
|
const onSelect = vi.fn();
|
|
448
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
479
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
480
|
+
await waitUntilReady();
|
|
449
481
|
// Switch to scope selector and change scope
|
|
450
|
-
act(() => {
|
|
482
|
+
await act(async () => {
|
|
451
483
|
stdin.write(TerminalKeys.TAB); // Tab
|
|
452
484
|
stdin.write('2'); // Select workspace scope
|
|
453
485
|
});
|
|
486
|
+
await waitUntilReady();
|
|
454
487
|
// Settings should be reloaded for new scope
|
|
455
488
|
unmount();
|
|
456
489
|
});
|
|
457
|
-
it('should show different values for different scopes', () => {
|
|
490
|
+
it('should show different values for different scopes', async () => {
|
|
458
491
|
const settings = createMockSettings({
|
|
459
492
|
user: {
|
|
460
493
|
settings: { vimMode: true },
|
|
@@ -473,10 +506,12 @@ describe('SettingsDialog', () => {
|
|
|
473
506
|
},
|
|
474
507
|
});
|
|
475
508
|
const onSelect = vi.fn();
|
|
476
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
509
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
510
|
+
await waitUntilReady();
|
|
477
511
|
// Should show user scope values initially
|
|
478
512
|
const output = lastFrame();
|
|
479
513
|
expect(output).toContain('Settings');
|
|
514
|
+
unmount();
|
|
480
515
|
});
|
|
481
516
|
});
|
|
482
517
|
describe('Error Handling', () => {
|
|
@@ -484,11 +519,13 @@ describe('SettingsDialog', () => {
|
|
|
484
519
|
mockToggleVimEnabled.mockRejectedValue(new Error('Toggle failed'));
|
|
485
520
|
const settings = createMockSettings();
|
|
486
521
|
const onSelect = vi.fn();
|
|
487
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
522
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
523
|
+
await waitUntilReady();
|
|
488
524
|
// Try to toggle a setting (this might trigger vim mode toggle)
|
|
489
|
-
act(() => {
|
|
525
|
+
await act(async () => {
|
|
490
526
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
491
527
|
});
|
|
528
|
+
await waitUntilReady();
|
|
492
529
|
// Should not crash
|
|
493
530
|
unmount();
|
|
494
531
|
});
|
|
@@ -497,26 +534,36 @@ describe('SettingsDialog', () => {
|
|
|
497
534
|
it('should track modified settings correctly', async () => {
|
|
498
535
|
const settings = createMockSettings();
|
|
499
536
|
const onSelect = vi.fn();
|
|
500
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
537
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
538
|
+
await waitUntilReady();
|
|
501
539
|
// Toggle a setting, then toggle another setting
|
|
502
|
-
act(() => {
|
|
540
|
+
await act(async () => {
|
|
503
541
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
542
|
+
});
|
|
543
|
+
await waitUntilReady();
|
|
544
|
+
await act(async () => {
|
|
504
545
|
stdin.write(TerminalKeys.DOWN_ARROW); // Down
|
|
546
|
+
});
|
|
547
|
+
await waitUntilReady();
|
|
548
|
+
await act(async () => {
|
|
505
549
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
506
550
|
});
|
|
551
|
+
await waitUntilReady();
|
|
507
552
|
// Should track multiple modified settings
|
|
508
553
|
unmount();
|
|
509
554
|
});
|
|
510
555
|
it('should handle scrolling when there are many settings', async () => {
|
|
511
556
|
const settings = createMockSettings();
|
|
512
557
|
const onSelect = vi.fn();
|
|
513
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
558
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
559
|
+
await waitUntilReady();
|
|
514
560
|
// Navigate down many times to test scrolling
|
|
515
|
-
act(() => {
|
|
561
|
+
await act(async () => {
|
|
516
562
|
for (let i = 0; i < 10; i++) {
|
|
517
563
|
stdin.write(TerminalKeys.DOWN_ARROW); // Down arrow
|
|
518
564
|
}
|
|
519
565
|
});
|
|
566
|
+
await waitUntilReady();
|
|
520
567
|
unmount();
|
|
521
568
|
});
|
|
522
569
|
});
|
|
@@ -524,17 +571,19 @@ describe('SettingsDialog', () => {
|
|
|
524
571
|
it('should sync with VimModeContext when vim mode is toggled', async () => {
|
|
525
572
|
const settings = createMockSettings();
|
|
526
573
|
const onSelect = vi.fn();
|
|
527
|
-
const { stdin, unmount } = render(_jsx(VimModeProvider, { settings: settings, children: _jsx(KeypressProvider, { children: _jsx(SettingsDialog, { settings: settings, onSelect: onSelect }) }) }));
|
|
574
|
+
const { stdin, unmount, waitUntilReady } = render(_jsx(VimModeProvider, { settings: settings, children: _jsx(KeypressProvider, { children: _jsx(SettingsDialog, { settings: settings, onSelect: onSelect }) }) }));
|
|
575
|
+
await waitUntilReady();
|
|
528
576
|
// Navigate to and toggle vim mode setting
|
|
529
577
|
// This would require knowing the exact position of vim mode setting
|
|
530
|
-
act(() => {
|
|
578
|
+
await act(async () => {
|
|
531
579
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
532
580
|
});
|
|
581
|
+
await waitUntilReady();
|
|
533
582
|
unmount();
|
|
534
583
|
});
|
|
535
584
|
});
|
|
536
585
|
describe('Specific Settings Behavior', () => {
|
|
537
|
-
it('should show correct display values for settings with different states', () => {
|
|
586
|
+
it('should show correct display values for settings with different states', async () => {
|
|
538
587
|
const settings = createMockSettings({
|
|
539
588
|
user: {
|
|
540
589
|
settings: { vimMode: true, hideTips: false },
|
|
@@ -553,26 +602,31 @@ describe('SettingsDialog', () => {
|
|
|
553
602
|
},
|
|
554
603
|
});
|
|
555
604
|
const onSelect = vi.fn();
|
|
556
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
605
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
606
|
+
await waitUntilReady();
|
|
557
607
|
const output = lastFrame();
|
|
558
608
|
// Should contain settings labels
|
|
559
609
|
expect(output).toContain('Settings');
|
|
610
|
+
unmount();
|
|
560
611
|
});
|
|
561
612
|
it('should handle immediate settings save for non-restart-required settings', async () => {
|
|
562
613
|
const settings = createMockSettings();
|
|
563
614
|
const onSelect = vi.fn();
|
|
564
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
615
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
616
|
+
await waitUntilReady();
|
|
565
617
|
// Toggle a non-restart-required setting (like hideTips)
|
|
566
|
-
act(() => {
|
|
618
|
+
await act(async () => {
|
|
567
619
|
stdin.write(TerminalKeys.ENTER); // Enter - toggle current setting
|
|
568
620
|
});
|
|
621
|
+
await waitUntilReady();
|
|
569
622
|
// Should save immediately without showing restart prompt
|
|
570
623
|
unmount();
|
|
571
624
|
});
|
|
572
625
|
it('should show restart prompt for restart-required settings', async () => {
|
|
573
626
|
const settings = createMockSettings();
|
|
574
627
|
const onSelect = vi.fn();
|
|
575
|
-
const { lastFrame, unmount } = renderDialog(settings, onSelect);
|
|
628
|
+
const { lastFrame, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
629
|
+
await waitUntilReady();
|
|
576
630
|
// This test would need to navigate to a specific restart-required setting
|
|
577
631
|
// Since we can't easily target specific settings, we test the general behavior
|
|
578
632
|
// Should not show restart prompt initially
|
|
@@ -584,13 +638,14 @@ describe('SettingsDialog', () => {
|
|
|
584
638
|
it('should clear restart prompt when switching scopes', async () => {
|
|
585
639
|
const settings = createMockSettings();
|
|
586
640
|
const onSelect = vi.fn();
|
|
587
|
-
const { unmount } = renderDialog(settings, onSelect);
|
|
641
|
+
const { unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
642
|
+
await waitUntilReady();
|
|
588
643
|
// Restart prompt should be cleared when switching scopes
|
|
589
644
|
unmount();
|
|
590
645
|
});
|
|
591
646
|
});
|
|
592
647
|
describe('Settings Display Values', () => {
|
|
593
|
-
it('should show correct values for inherited settings', () => {
|
|
648
|
+
it('should show correct values for inherited settings', async () => {
|
|
594
649
|
const settings = createMockSettings({
|
|
595
650
|
system: {
|
|
596
651
|
settings: { vimMode: true, hideWindowTitle: false },
|
|
@@ -599,12 +654,14 @@ describe('SettingsDialog', () => {
|
|
|
599
654
|
},
|
|
600
655
|
});
|
|
601
656
|
const onSelect = vi.fn();
|
|
602
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
657
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
658
|
+
await waitUntilReady();
|
|
603
659
|
const output = lastFrame();
|
|
604
660
|
// Settings should show inherited values
|
|
605
661
|
expect(output).toContain('Settings');
|
|
662
|
+
unmount();
|
|
606
663
|
});
|
|
607
|
-
it('should show override indicator for overridden settings', () => {
|
|
664
|
+
it('should show override indicator for overridden settings', async () => {
|
|
608
665
|
const settings = createMockSettings({
|
|
609
666
|
user: {
|
|
610
667
|
settings: { vimMode: false },
|
|
@@ -618,10 +675,12 @@ describe('SettingsDialog', () => {
|
|
|
618
675
|
},
|
|
619
676
|
});
|
|
620
677
|
const onSelect = vi.fn();
|
|
621
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
678
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
679
|
+
await waitUntilReady();
|
|
622
680
|
const output = lastFrame();
|
|
623
681
|
// Should show settings with override indicators
|
|
624
682
|
expect(output).toContain('Settings');
|
|
683
|
+
unmount();
|
|
625
684
|
});
|
|
626
685
|
});
|
|
627
686
|
describe('Race Condition Regression Tests', () => {
|
|
@@ -659,11 +718,13 @@ describe('SettingsDialog', () => {
|
|
|
659
718
|
},
|
|
660
719
|
});
|
|
661
720
|
const onSelect = vi.fn();
|
|
662
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
721
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
722
|
+
await waitUntilReady();
|
|
663
723
|
for (let i = 0; i < toggleCount; i++) {
|
|
664
|
-
act(() => {
|
|
724
|
+
await act(async () => {
|
|
665
725
|
stdin.write(TerminalKeys.ENTER);
|
|
666
726
|
});
|
|
727
|
+
await waitUntilReady();
|
|
667
728
|
}
|
|
668
729
|
await waitFor(() => {
|
|
669
730
|
expect(vi.mocked(saveModifiedSettings).mock.calls.length).toBeGreaterThan(0);
|
|
@@ -688,14 +749,16 @@ describe('SettingsDialog', () => {
|
|
|
688
749
|
it('should handle rapid key presses gracefully', async () => {
|
|
689
750
|
const settings = createMockSettings();
|
|
690
751
|
const onSelect = vi.fn();
|
|
691
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
752
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
753
|
+
await waitUntilReady();
|
|
692
754
|
// Rapid navigation
|
|
693
|
-
act(() => {
|
|
755
|
+
await act(async () => {
|
|
694
756
|
for (let i = 0; i < 5; i++) {
|
|
695
757
|
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
696
758
|
stdin.write(TerminalKeys.UP_ARROW);
|
|
697
759
|
}
|
|
698
760
|
});
|
|
761
|
+
await waitUntilReady();
|
|
699
762
|
// Should not crash
|
|
700
763
|
unmount();
|
|
701
764
|
});
|
|
@@ -705,28 +768,36 @@ describe('SettingsDialog', () => {
|
|
|
705
768
|
])('should handle $key to reset current setting to default', async ({ code }) => {
|
|
706
769
|
const settings = createMockSettings({ vimMode: true });
|
|
707
770
|
const onSelect = vi.fn();
|
|
708
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
709
|
-
|
|
771
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
772
|
+
await waitUntilReady();
|
|
773
|
+
await act(async () => {
|
|
710
774
|
stdin.write(code);
|
|
711
775
|
});
|
|
776
|
+
await waitUntilReady();
|
|
712
777
|
// Should reset the current setting to its default value
|
|
713
778
|
unmount();
|
|
714
779
|
});
|
|
715
780
|
it('should handle navigation when only one setting exists', async () => {
|
|
716
781
|
const settings = createMockSettings();
|
|
717
782
|
const onSelect = vi.fn();
|
|
718
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
783
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
784
|
+
await waitUntilReady();
|
|
719
785
|
// Try to navigate when potentially at bounds
|
|
720
|
-
act(() => {
|
|
786
|
+
await act(async () => {
|
|
721
787
|
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
788
|
+
});
|
|
789
|
+
await waitUntilReady();
|
|
790
|
+
await act(async () => {
|
|
722
791
|
stdin.write(TerminalKeys.UP_ARROW);
|
|
723
792
|
});
|
|
793
|
+
await waitUntilReady();
|
|
724
794
|
unmount();
|
|
725
795
|
});
|
|
726
796
|
it('should properly handle Tab navigation between sections', async () => {
|
|
727
797
|
const settings = createMockSettings();
|
|
728
798
|
const onSelect = vi.fn();
|
|
729
|
-
const { lastFrame, unmount } = renderDialog(settings, onSelect);
|
|
799
|
+
const { lastFrame, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
800
|
+
await waitUntilReady();
|
|
730
801
|
// Wait for initial render
|
|
731
802
|
await waitFor(() => {
|
|
732
803
|
expect(lastFrame()).toContain('Vim Mode');
|
|
@@ -740,7 +811,7 @@ describe('SettingsDialog', () => {
|
|
|
740
811
|
});
|
|
741
812
|
});
|
|
742
813
|
describe('Error Recovery', () => {
|
|
743
|
-
it('should handle malformed settings gracefully', () => {
|
|
814
|
+
it('should handle malformed settings gracefully', async () => {
|
|
744
815
|
// Create settings with potentially problematic values
|
|
745
816
|
const settings = createMockSettings({
|
|
746
817
|
user: {
|
|
@@ -750,23 +821,28 @@ describe('SettingsDialog', () => {
|
|
|
750
821
|
},
|
|
751
822
|
});
|
|
752
823
|
const onSelect = vi.fn();
|
|
753
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
824
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
825
|
+
await waitUntilReady();
|
|
754
826
|
// Should still render without crashing
|
|
755
827
|
expect(lastFrame()).toContain('Settings');
|
|
828
|
+
unmount();
|
|
756
829
|
});
|
|
757
|
-
it('should handle missing setting definitions gracefully', () => {
|
|
830
|
+
it('should handle missing setting definitions gracefully', async () => {
|
|
758
831
|
const settings = createMockSettings();
|
|
759
832
|
const onSelect = vi.fn();
|
|
760
833
|
// Should not crash even if some settings are missing definitions
|
|
761
|
-
const { lastFrame } = renderDialog(settings, onSelect);
|
|
834
|
+
const { lastFrame, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
835
|
+
await waitUntilReady();
|
|
762
836
|
expect(lastFrame()).toContain('Settings');
|
|
837
|
+
unmount();
|
|
763
838
|
});
|
|
764
839
|
});
|
|
765
840
|
describe('Complex User Interactions', () => {
|
|
766
841
|
it('should handle complete user workflow: navigate, toggle, change scope, exit', async () => {
|
|
767
842
|
const settings = createMockSettings();
|
|
768
843
|
const onSelect = vi.fn();
|
|
769
|
-
const { lastFrame, unmount } = renderDialog(settings, onSelect);
|
|
844
|
+
const { lastFrame, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
845
|
+
await waitUntilReady();
|
|
770
846
|
// Wait for initial render
|
|
771
847
|
await waitFor(() => {
|
|
772
848
|
expect(lastFrame()).toContain('Vim Mode');
|
|
@@ -785,15 +861,29 @@ describe('SettingsDialog', () => {
|
|
|
785
861
|
it('should allow changing multiple settings without losing pending changes', async () => {
|
|
786
862
|
const settings = createMockSettings();
|
|
787
863
|
const onSelect = vi.fn();
|
|
788
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
864
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
865
|
+
await waitUntilReady();
|
|
789
866
|
// Toggle multiple settings
|
|
790
|
-
act(() => {
|
|
867
|
+
await act(async () => {
|
|
791
868
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
869
|
+
});
|
|
870
|
+
await waitUntilReady();
|
|
871
|
+
await act(async () => {
|
|
792
872
|
stdin.write(TerminalKeys.DOWN_ARROW); // Down
|
|
873
|
+
});
|
|
874
|
+
await waitUntilReady();
|
|
875
|
+
await act(async () => {
|
|
793
876
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
877
|
+
});
|
|
878
|
+
await waitUntilReady();
|
|
879
|
+
await act(async () => {
|
|
794
880
|
stdin.write(TerminalKeys.DOWN_ARROW); // Down
|
|
881
|
+
});
|
|
882
|
+
await waitUntilReady();
|
|
883
|
+
await act(async () => {
|
|
795
884
|
stdin.write(TerminalKeys.ENTER); // Enter
|
|
796
885
|
});
|
|
886
|
+
await waitUntilReady();
|
|
797
887
|
// The test verifies that all changes are preserved and the dialog still works
|
|
798
888
|
// This tests the fix for the bug where changing one setting would reset all pending changes
|
|
799
889
|
unmount();
|
|
@@ -801,28 +891,44 @@ describe('SettingsDialog', () => {
|
|
|
801
891
|
it('should maintain state consistency during complex interactions', async () => {
|
|
802
892
|
const settings = createMockSettings({ vimMode: true });
|
|
803
893
|
const onSelect = vi.fn();
|
|
804
|
-
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
894
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
895
|
+
await waitUntilReady();
|
|
805
896
|
// Multiple scope changes
|
|
806
|
-
act(() => {
|
|
897
|
+
await act(async () => {
|
|
807
898
|
stdin.write(TerminalKeys.TAB); // Tab to scope
|
|
899
|
+
});
|
|
900
|
+
await waitUntilReady();
|
|
901
|
+
await act(async () => {
|
|
808
902
|
stdin.write('2'); // Workspace
|
|
903
|
+
});
|
|
904
|
+
await waitUntilReady();
|
|
905
|
+
await act(async () => {
|
|
809
906
|
stdin.write(TerminalKeys.TAB); // Tab to settings
|
|
907
|
+
});
|
|
908
|
+
await waitUntilReady();
|
|
909
|
+
await act(async () => {
|
|
810
910
|
stdin.write(TerminalKeys.TAB); // Tab to scope
|
|
911
|
+
});
|
|
912
|
+
await waitUntilReady();
|
|
913
|
+
await act(async () => {
|
|
811
914
|
stdin.write('1'); // User
|
|
812
915
|
});
|
|
916
|
+
await waitUntilReady();
|
|
813
917
|
// Should maintain consistent state
|
|
814
918
|
unmount();
|
|
815
919
|
});
|
|
816
920
|
it('should handle restart workflow correctly', async () => {
|
|
817
921
|
const settings = createMockSettings();
|
|
818
922
|
const onRestartRequest = vi.fn();
|
|
819
|
-
const { stdin, unmount } = renderDialog(settings, vi.fn(), {
|
|
923
|
+
const { stdin, unmount, waitUntilReady } = renderDialog(settings, vi.fn(), {
|
|
820
924
|
onRestartRequest,
|
|
821
925
|
});
|
|
926
|
+
await waitUntilReady();
|
|
822
927
|
// This would test the restart workflow if we could trigger it
|
|
823
|
-
act(() => {
|
|
928
|
+
await act(async () => {
|
|
824
929
|
stdin.write('r'); // Try restart key
|
|
825
930
|
});
|
|
931
|
+
await waitUntilReady();
|
|
826
932
|
// Without restart prompt showing, this should have no effect
|
|
827
933
|
expect(onRestartRequest).not.toHaveBeenCalled();
|
|
828
934
|
unmount();
|
|
@@ -833,28 +939,32 @@ describe('SettingsDialog', () => {
|
|
|
833
939
|
vi.mocked(getSettingsSchema).mockReturnValue(TOOLS_SHELL_FAKE_SCHEMA);
|
|
834
940
|
const settings = createMockSettings();
|
|
835
941
|
const onRestartRequest = vi.fn();
|
|
836
|
-
const { stdin, lastFrame, unmount } = renderDialog(settings, vi.fn(), {
|
|
942
|
+
const { stdin, lastFrame, unmount, waitUntilReady } = renderDialog(settings, vi.fn(), {
|
|
837
943
|
onRestartRequest,
|
|
838
944
|
});
|
|
945
|
+
await waitUntilReady();
|
|
839
946
|
// Wait for initial render
|
|
840
947
|
await waitFor(() => expect(lastFrame()).toContain('Show Color'));
|
|
841
948
|
// Navigate to "Enable Interactive Shell" (second item in TOOLS_SHELL_FAKE_SCHEMA)
|
|
842
|
-
act(() => {
|
|
949
|
+
await act(async () => {
|
|
843
950
|
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
844
951
|
});
|
|
952
|
+
await waitUntilReady();
|
|
845
953
|
// Wait for navigation to complete
|
|
846
954
|
await waitFor(() => expect(lastFrame()).toContain('● Enable Interactive Shell'));
|
|
847
955
|
// Toggle it to trigger restart required
|
|
848
|
-
act(() => {
|
|
956
|
+
await act(async () => {
|
|
849
957
|
stdin.write(TerminalKeys.ENTER);
|
|
850
958
|
});
|
|
959
|
+
await waitUntilReady();
|
|
851
960
|
await waitFor(() => {
|
|
852
961
|
expect(lastFrame()).toContain('To see changes, Gemini CLI must be restarted');
|
|
853
962
|
});
|
|
854
963
|
// Press 'r' - it should call onRestartRequest, NOT be handled by search
|
|
855
|
-
act(() => {
|
|
964
|
+
await act(async () => {
|
|
856
965
|
stdin.write('r');
|
|
857
966
|
});
|
|
967
|
+
await waitUntilReady();
|
|
858
968
|
await waitFor(() => {
|
|
859
969
|
expect(onRestartRequest).toHaveBeenCalled();
|
|
860
970
|
});
|
|
@@ -863,17 +973,20 @@ describe('SettingsDialog', () => {
|
|
|
863
973
|
it('should hide search box when showRestartPrompt is true', async () => {
|
|
864
974
|
vi.mocked(getSettingsSchema).mockReturnValue(TOOLS_SHELL_FAKE_SCHEMA);
|
|
865
975
|
const settings = createMockSettings();
|
|
866
|
-
const { stdin, lastFrame, unmount } = renderDialog(settings, vi.fn());
|
|
976
|
+
const { stdin, lastFrame, unmount, waitUntilReady } = renderDialog(settings, vi.fn());
|
|
977
|
+
await waitUntilReady();
|
|
867
978
|
// Search box should be visible initially (searchPlaceholder)
|
|
868
979
|
expect(lastFrame()).toContain('Search to filter');
|
|
869
980
|
// Navigate to "Enable Interactive Shell" and toggle it
|
|
870
|
-
act(() => {
|
|
981
|
+
await act(async () => {
|
|
871
982
|
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
872
983
|
});
|
|
984
|
+
await waitUntilReady();
|
|
873
985
|
await waitFor(() => expect(lastFrame()).toContain('● Enable Interactive Shell'));
|
|
874
|
-
act(() => {
|
|
986
|
+
await act(async () => {
|
|
875
987
|
stdin.write(TerminalKeys.ENTER);
|
|
876
988
|
});
|
|
989
|
+
await waitUntilReady();
|
|
877
990
|
await waitFor(() => {
|
|
878
991
|
expect(lastFrame()).toContain('To see changes, Gemini CLI must be restarted');
|
|
879
992
|
});
|
|
@@ -884,33 +997,51 @@ describe('SettingsDialog', () => {
|
|
|
884
997
|
});
|
|
885
998
|
describe('String Settings Editing', () => {
|
|
886
999
|
it('should allow editing and committing a string setting', async () => {
|
|
887
|
-
let settings = createMockSettings({
|
|
1000
|
+
let settings = createMockSettings({
|
|
1001
|
+
'general.sessionCleanup.maxAge': 'initial',
|
|
1002
|
+
});
|
|
888
1003
|
const onSelect = vi.fn();
|
|
889
|
-
const { stdin, unmount, rerender } = render(_jsx(KeypressProvider, { children: _jsx(SettingsDialog, { settings: settings, onSelect: onSelect }) }));
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
1004
|
+
const { stdin, unmount, rerender, waitUntilReady } = render(_jsx(KeypressProvider, { children: _jsx(SettingsDialog, { settings: settings, onSelect: onSelect }) }));
|
|
1005
|
+
await waitUntilReady();
|
|
1006
|
+
// Search for 'chat history' to filter the list
|
|
1007
|
+
await act(async () => {
|
|
1008
|
+
stdin.write('chat history');
|
|
1009
|
+
});
|
|
1010
|
+
await waitUntilReady();
|
|
1011
|
+
// Press Down Arrow to focus the list
|
|
1012
|
+
await act(async () => {
|
|
1013
|
+
stdin.write(TerminalKeys.DOWN_ARROW);
|
|
895
1014
|
});
|
|
1015
|
+
await waitUntilReady();
|
|
896
1016
|
// Press Enter to start editing, type new value, and commit
|
|
897
|
-
act(() => {
|
|
1017
|
+
await act(async () => {
|
|
898
1018
|
stdin.write('\r'); // Start editing
|
|
1019
|
+
});
|
|
1020
|
+
await waitUntilReady();
|
|
1021
|
+
await act(async () => {
|
|
899
1022
|
stdin.write('new value');
|
|
1023
|
+
});
|
|
1024
|
+
await waitUntilReady();
|
|
1025
|
+
await act(async () => {
|
|
900
1026
|
stdin.write('\r'); // Commit
|
|
901
1027
|
});
|
|
1028
|
+
await waitUntilReady();
|
|
902
1029
|
settings = createMockSettings({
|
|
903
1030
|
user: {
|
|
904
|
-
settings: { '
|
|
905
|
-
originalSettings: { '
|
|
1031
|
+
settings: { 'general.sessionCleanup.maxAge': 'new value' },
|
|
1032
|
+
originalSettings: { 'general.sessionCleanup.maxAge': 'new value' },
|
|
906
1033
|
path: '',
|
|
907
1034
|
},
|
|
908
1035
|
});
|
|
909
|
-
|
|
1036
|
+
await act(async () => {
|
|
1037
|
+
rerender(_jsx(KeypressProvider, { children: _jsx(SettingsDialog, { settings: settings, onSelect: onSelect }) }));
|
|
1038
|
+
});
|
|
1039
|
+
await waitUntilReady();
|
|
910
1040
|
// Press Escape to exit
|
|
911
|
-
act(() => {
|
|
1041
|
+
await act(async () => {
|
|
912
1042
|
stdin.write('\u001B');
|
|
913
1043
|
});
|
|
1044
|
+
await waitUntilReady();
|
|
914
1045
|
await waitFor(() => {
|
|
915
1046
|
expect(onSelect).toHaveBeenCalledWith(undefined, 'User');
|
|
916
1047
|
});
|
|
@@ -921,16 +1052,18 @@ describe('SettingsDialog', () => {
|
|
|
921
1052
|
it('should display text entered in search', async () => {
|
|
922
1053
|
const settings = createMockSettings();
|
|
923
1054
|
const onSelect = vi.fn();
|
|
924
|
-
const { lastFrame, stdin, unmount } = renderDialog(settings, onSelect);
|
|
1055
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
1056
|
+
await waitUntilReady();
|
|
925
1057
|
// Wait for initial render and verify that search is not active
|
|
926
1058
|
await waitFor(() => {
|
|
927
1059
|
expect(lastFrame()).not.toContain('> Search:');
|
|
928
1060
|
});
|
|
929
1061
|
expect(lastFrame()).toContain('Search to filter');
|
|
930
1062
|
// Press '/' to enter search mode
|
|
931
|
-
act(() => {
|
|
1063
|
+
await act(async () => {
|
|
932
1064
|
stdin.write('/');
|
|
933
1065
|
});
|
|
1066
|
+
await waitUntilReady();
|
|
934
1067
|
await waitFor(() => {
|
|
935
1068
|
expect(lastFrame()).toContain('/');
|
|
936
1069
|
expect(lastFrame()).not.toContain('Search to filter');
|
|
@@ -940,10 +1073,12 @@ describe('SettingsDialog', () => {
|
|
|
940
1073
|
it('should show search query and filter settings as user types', async () => {
|
|
941
1074
|
const settings = createMockSettings();
|
|
942
1075
|
const onSelect = vi.fn();
|
|
943
|
-
const { lastFrame, stdin, unmount } = renderDialog(settings, onSelect);
|
|
944
|
-
|
|
1076
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
1077
|
+
await waitUntilReady();
|
|
1078
|
+
await act(async () => {
|
|
945
1079
|
stdin.write('yolo');
|
|
946
1080
|
});
|
|
1081
|
+
await waitUntilReady();
|
|
947
1082
|
await waitFor(() => {
|
|
948
1083
|
expect(lastFrame()).toContain('yolo');
|
|
949
1084
|
expect(lastFrame()).toContain('Disable YOLO Mode');
|
|
@@ -953,17 +1088,20 @@ describe('SettingsDialog', () => {
|
|
|
953
1088
|
it('should exit search settings when Escape is pressed', async () => {
|
|
954
1089
|
const settings = createMockSettings();
|
|
955
1090
|
const onSelect = vi.fn();
|
|
956
|
-
const { lastFrame, stdin, unmount } = renderDialog(settings, onSelect);
|
|
957
|
-
|
|
1091
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
1092
|
+
await waitUntilReady();
|
|
1093
|
+
await act(async () => {
|
|
958
1094
|
stdin.write('vim');
|
|
959
1095
|
});
|
|
1096
|
+
await waitUntilReady();
|
|
960
1097
|
await waitFor(() => {
|
|
961
1098
|
expect(lastFrame()).toContain('vim');
|
|
962
1099
|
});
|
|
963
1100
|
// Press Escape
|
|
964
|
-
act(() => {
|
|
1101
|
+
await act(async () => {
|
|
965
1102
|
stdin.write(TerminalKeys.ESCAPE);
|
|
966
1103
|
});
|
|
1104
|
+
await waitUntilReady();
|
|
967
1105
|
await waitFor(() => {
|
|
968
1106
|
// onSelect is called with (settingName, scope).
|
|
969
1107
|
// undefined settingName means "close dialog"
|
|
@@ -974,17 +1112,20 @@ describe('SettingsDialog', () => {
|
|
|
974
1112
|
it('should handle backspace to modify search query', async () => {
|
|
975
1113
|
const settings = createMockSettings();
|
|
976
1114
|
const onSelect = vi.fn();
|
|
977
|
-
const { lastFrame, stdin, unmount } = renderDialog(settings, onSelect);
|
|
978
|
-
|
|
1115
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
1116
|
+
await waitUntilReady();
|
|
1117
|
+
await act(async () => {
|
|
979
1118
|
stdin.write('vimm');
|
|
980
1119
|
});
|
|
1120
|
+
await waitUntilReady();
|
|
981
1121
|
await waitFor(() => {
|
|
982
1122
|
expect(lastFrame()).toContain('vimm');
|
|
983
1123
|
});
|
|
984
1124
|
// Press backspace
|
|
985
|
-
act(() => {
|
|
1125
|
+
await act(async () => {
|
|
986
1126
|
stdin.write(TerminalKeys.BACKSPACE);
|
|
987
1127
|
});
|
|
1128
|
+
await waitUntilReady();
|
|
988
1129
|
await waitFor(() => {
|
|
989
1130
|
expect(lastFrame()).toContain('vim');
|
|
990
1131
|
expect(lastFrame()).toContain('Vim Mode');
|
|
@@ -995,14 +1136,15 @@ describe('SettingsDialog', () => {
|
|
|
995
1136
|
it('should display nothing when search yields no results', async () => {
|
|
996
1137
|
const settings = createMockSettings();
|
|
997
1138
|
const onSelect = vi.fn();
|
|
998
|
-
const { lastFrame, stdin, unmount } = renderDialog(settings, onSelect);
|
|
1139
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = renderDialog(settings, onSelect);
|
|
1140
|
+
await waitUntilReady();
|
|
999
1141
|
// Type a search query that won't match any settings
|
|
1000
|
-
act(() => {
|
|
1142
|
+
await act(async () => {
|
|
1001
1143
|
stdin.write('nonexistentsetting');
|
|
1002
1144
|
});
|
|
1145
|
+
await waitUntilReady();
|
|
1003
1146
|
await waitFor(() => {
|
|
1004
1147
|
expect(lastFrame()).toContain('nonexistentsetting');
|
|
1005
|
-
expect(lastFrame()).toContain('');
|
|
1006
1148
|
expect(lastFrame()).not.toContain('Vim Mode'); // Should not contain any settings
|
|
1007
1149
|
expect(lastFrame()).not.toContain('Enable Auto Update'); // Should not contain any settings
|
|
1008
1150
|
});
|
|
@@ -1030,7 +1172,6 @@ describe('SettingsDialog', () => {
|
|
|
1030
1172
|
vimMode: true,
|
|
1031
1173
|
enableAutoUpdate: false,
|
|
1032
1174
|
debugKeystrokeLogging: true,
|
|
1033
|
-
enablePromptCompletion: true,
|
|
1034
1175
|
},
|
|
1035
1176
|
ui: {
|
|
1036
1177
|
hideWindowTitle: true,
|
|
@@ -1100,10 +1241,11 @@ describe('SettingsDialog', () => {
|
|
|
1100
1241
|
userSettings: {},
|
|
1101
1242
|
systemSettings: {},
|
|
1102
1243
|
workspaceSettings: {},
|
|
1103
|
-
stdinActions: (stdin) => {
|
|
1104
|
-
act(() => {
|
|
1244
|
+
stdinActions: async (stdin, waitUntilReady) => {
|
|
1245
|
+
await act(async () => {
|
|
1105
1246
|
stdin.write('\t');
|
|
1106
1247
|
});
|
|
1248
|
+
await waitUntilReady();
|
|
1107
1249
|
},
|
|
1108
1250
|
},
|
|
1109
1251
|
{
|
|
@@ -1172,7 +1314,6 @@ describe('SettingsDialog', () => {
|
|
|
1172
1314
|
vimMode: false,
|
|
1173
1315
|
enableAutoUpdate: true,
|
|
1174
1316
|
debugKeystrokeLogging: false,
|
|
1175
|
-
enablePromptCompletion: false,
|
|
1176
1317
|
},
|
|
1177
1318
|
ui: {
|
|
1178
1319
|
hideWindowTitle: false,
|
|
@@ -1211,7 +1352,7 @@ describe('SettingsDialog', () => {
|
|
|
1211
1352
|
workspaceSettings: {},
|
|
1212
1353
|
stdinActions: undefined,
|
|
1213
1354
|
},
|
|
1214
|
-
])('should render $name correctly', ({ userSettings, systemSettings, workspaceSettings, stdinActions }) => {
|
|
1355
|
+
])('should render $name correctly', async ({ userSettings, systemSettings, workspaceSettings, stdinActions, }) => {
|
|
1215
1356
|
const settings = createMockSettings({
|
|
1216
1357
|
user: {
|
|
1217
1358
|
settings: userSettings,
|
|
@@ -1230,11 +1371,13 @@ describe('SettingsDialog', () => {
|
|
|
1230
1371
|
},
|
|
1231
1372
|
});
|
|
1232
1373
|
const onSelect = vi.fn();
|
|
1233
|
-
const { lastFrame, stdin } = renderDialog(settings, onSelect);
|
|
1374
|
+
const { lastFrame, stdin, waitUntilReady, unmount } = renderDialog(settings, onSelect);
|
|
1375
|
+
await waitUntilReady();
|
|
1234
1376
|
if (stdinActions) {
|
|
1235
|
-
stdinActions(stdin);
|
|
1377
|
+
await stdinActions(stdin, waitUntilReady);
|
|
1236
1378
|
}
|
|
1237
1379
|
expect(lastFrame()).toMatchSnapshot();
|
|
1380
|
+
unmount();
|
|
1238
1381
|
});
|
|
1239
1382
|
});
|
|
1240
1383
|
});
|