@machina.ai/cell-cli 1.20.2-rc1 → 1.22.5-rc1
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/dist/package.json +3 -3
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/disable.test.js.map +1 -1
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/enable.test.js.map +1 -1
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js +1 -1
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +1 -1
- package/dist/src/commands/extensions/examples/mcp-server/example.test.ts +4 -12
- package/dist/src/commands/extensions/link.test.js.map +1 -1
- package/dist/src/commands/extensions/list.test.js +0 -1
- package/dist/src/commands/extensions/list.test.js.map +1 -1
- package/dist/src/commands/extensions/settings.d.ts +7 -0
- package/dist/src/commands/extensions/settings.js +111 -0
- package/dist/src/commands/extensions/settings.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/update.test.js.map +1 -1
- package/dist/src/commands/extensions/utils.d.ts +13 -0
- package/dist/src/commands/extensions/utils.js +29 -0
- package/dist/src/commands/extensions/utils.js.map +1 -0
- package/dist/src/commands/extensions.js +2 -0
- package/dist/src/commands/extensions.js.map +1 -1
- package/dist/src/commands/hooks/migrate.d.ts +11 -0
- package/dist/src/commands/hooks/migrate.js +206 -0
- package/dist/src/commands/hooks/migrate.js.map +1 -0
- package/dist/src/commands/hooks/migrate.test.js +389 -0
- package/dist/src/commands/hooks/migrate.test.js.map +1 -0
- package/dist/src/commands/hooks.d.ts +7 -0
- package/dist/src/commands/hooks.js +22 -0
- package/dist/src/commands/hooks.js.map +1 -0
- package/dist/src/commands/mcp/add.js +4 -2
- package/dist/src/commands/mcp/add.js.map +1 -1
- package/dist/src/commands/mcp/add.test.js +23 -1
- package/dist/src/commands/mcp/add.test.js.map +1 -1
- package/dist/src/config/config.js +12 -5
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +9 -11
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager.d.ts +1 -0
- package/dist/src/config/extension-manager.js +51 -9
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +87 -4
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +1 -1
- package/dist/src/config/extensions/consent.js +7 -4
- package/dist/src/config/extensions/consent.js.map +1 -1
- package/dist/src/config/extensions/consent.test.js +17 -7
- package/dist/src/config/extensions/consent.test.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.d.ts +6 -0
- package/dist/src/config/extensions/extensionSettings.js +87 -17
- package/dist/src/config/extensions/extensionSettings.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +189 -54
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
- package/dist/src/config/extensions/github.d.ts +4 -1
- package/dist/src/config/extensions/github.js +33 -7
- package/dist/src/config/extensions/github.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +188 -0
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/extensions/github_fetch.js.map +1 -1
- package/dist/src/config/settings-validation.d.ts +23 -0
- package/dist/src/config/settings-validation.js +249 -0
- package/dist/src/config/settings-validation.js.map +1 -0
- package/dist/src/{utils/version.d.ts → config/settings-validation.test.d.ts} +1 -1
- package/dist/src/config/settings-validation.test.js +322 -0
- package/dist/src/config/settings-validation.test.js.map +1 -0
- package/dist/src/config/settings.js +30 -2
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +27 -4
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +178 -5
- package/dist/src/config/settingsSchema.js +216 -4
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +10 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/settings_repro.test.d.ts +6 -0
- package/dist/src/config/settings_repro.test.js +162 -0
- package/dist/src/config/settings_repro.test.js.map +1 -0
- package/dist/src/gemini.js +38 -4
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +14 -5
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/gemini_cleanup.test.js +1 -0
- 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/nonInteractiveCli.js +6 -9
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +20 -10
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +2 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +4 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FeedbackService.js.map +1 -1
- package/dist/src/services/FileCommandLoader.test.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +1 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +40 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/test-utils/render.js +1 -0
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/AppContainer.js +59 -34
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +175 -28
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.js +36 -3
- package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.js +26 -2
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.js +3 -2
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +2 -2
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/useAuth.js +9 -4
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/auth/useAuth.test.js +2 -2
- package/dist/src/ui/auth/useAuth.test.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.js +2 -3
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +3 -6
- package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +2 -3
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +3 -3
- package/dist/src/ui/commands/bugCommand.test.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +4 -4
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.test.js +16 -16
- package/dist/src/ui/commands/chatCommand.test.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +18 -1
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +2 -0
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.test.js +2 -0
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +1 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/hooksCommand.d.ts +7 -0
- package/dist/src/ui/commands/hooksCommand.js +207 -0
- package/dist/src/ui/commands/hooksCommand.js.map +1 -0
- package/dist/src/ui/commands/hooksCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/hooksCommand.test.js +396 -0
- package/dist/src/ui/commands/hooksCommand.test.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.test.js.map +1 -1
- package/dist/src/ui/commands/initCommand.js +10 -50
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.test.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +27 -9
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.test.js +29 -0
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.js +10 -5
- package/dist/src/ui/commands/modelCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.test.js +12 -1
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -1
- package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
- package/dist/src/ui/commands/restoreCommand.js +38 -33
- package/dist/src/ui/commands/restoreCommand.js.map +1 -1
- package/dist/src/ui/commands/restoreCommand.test.js +6 -6
- package/dist/src/ui/commands/restoreCommand.test.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.js +2 -6
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.test.js +17 -0
- package/dist/src/ui/commands/statsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +2 -37
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AnsiOutput.js +1 -1
- package/dist/src/ui/components/AnsiOutput.js.map +1 -1
- package/dist/src/ui/components/AppHeader.test.js +8 -0
- package/dist/src/ui/components/AppHeader.test.js.map +1 -1
- package/dist/src/ui/components/AsciiArt.d.ts +6 -6
- package/dist/src/ui/components/AsciiArt.js +6 -6
- package/dist/src/ui/components/DetailedMessagesDisplay.js +3 -3
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js +2 -12
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +1 -1
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +7 -0
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +1 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/Footer.js +2 -2
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +3 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -1
- package/dist/src/ui/components/Header.js +3 -1
- package/dist/src/ui/components/Header.js.map +1 -1
- package/dist/src/ui/components/Header.test.js +3 -1
- package/dist/src/ui/components/Header.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +2 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.js +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +23 -2
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +135 -0
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +116 -39
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +157 -148
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js +3 -3
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +9 -2
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.js +1 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +2 -0
- package/dist/src/ui/components/Notifications.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +14 -12
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +20 -21
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -1
- package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SessionBrowser.js +2 -0
- package/dist/src/ui/components/SessionBrowser.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +135 -66
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +98 -10
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +4 -4
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +4 -4
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.js +66 -21
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +44 -7
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/Todo.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +54 -19
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +40 -4
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +45 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +46 -39
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +100 -0
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
- package/dist/src/ui/components/views/HooksList.d.ts +22 -0
- package/dist/src/ui/components/views/HooksList.js +23 -0
- package/dist/src/ui/components/views/HooksList.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +2 -1
- package/dist/src/ui/components/views/McpStatus.js +13 -3
- package/dist/src/ui/components/views/McpStatus.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +13 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
- package/dist/src/ui/constants/tips.js +0 -1
- package/dist/src/ui/constants/tips.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +6 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +1 -0
- package/dist/src/ui/contexts/SessionContext.js +2 -1
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.test.js +3 -0
- package/dist/src/ui/contexts/SessionContext.test.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +7 -6
- package/dist/src/ui/hooks/atCommandProcessor.js +141 -28
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +124 -32
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +2 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +3 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +52 -2
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.test.js +21 -0
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +2 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.js +2 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +19 -56
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +4 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +3 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.js +2 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +2 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +5 -16
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +3 -9
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +1 -0
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +20 -21
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +7 -7
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.test.js +2 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.js +1 -0
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.js +2 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +2 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +3 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSnowfall.d.ts +6 -0
- package/dist/src/ui/hooks/useSnowfall.js +126 -0
- package/dist/src/ui/hooks/useSnowfall.js.map +1 -0
- package/dist/src/ui/hooks/useSnowfall.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSnowfall.test.js +88 -0
- package/dist/src/ui/hooks/useSnowfall.test.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +14 -4
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/types.d.ts +26 -2
- package/dist/src/ui/types.js +1 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.d.ts +25 -0
- package/dist/src/ui/utils/clipboardUtils.js +98 -12
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.test.js +123 -1
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +1 -1
- package/dist/src/ui/utils/commandUtils.js +108 -1
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +163 -6
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/computeStats.js +2 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -1
- package/dist/src/ui/utils/computeStats.test.js +9 -0
- package/dist/src/ui/utils/computeStats.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.js +5 -1
- package/dist/src/ui/utils/highlight.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.test.js +5 -0
- package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
- package/dist/src/utils/cleanup.d.ts +6 -0
- package/dist/src/utils/cleanup.js +19 -1
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/deepMerge.js +7 -2
- package/dist/src/utils/deepMerge.js.map +1 -1
- package/dist/src/utils/deepMerge.test.js +58 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -1
- package/dist/src/utils/envVarResolver.js.map +1 -1
- package/dist/src/utils/envVarResolver.test.js.map +1 -1
- package/dist/src/utils/errors.js +4 -4
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.js +20 -2
- package/dist/src/utils/errors.test.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.d.ts +1 -1
- package/dist/src/utils/handleAutoUpdate.js +7 -10
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.test.js +12 -10
- package/dist/src/utils/handleAutoUpdate.test.js.map +1 -1
- package/dist/src/utils/installationInfo.js +1 -1
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/installationInfo.test.js +1 -1
- package/dist/src/utils/installationInfo.test.js.map +1 -1
- package/dist/src/utils/sandboxUtils.js +3 -2
- package/dist/src/utils/sandboxUtils.js.map +1 -1
- package/dist/src/utils/sandboxUtils.test.js +3 -0
- package/dist/src/utils/sandboxUtils.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +2 -0
- package/dist/src/utils/sessionUtils.js +5 -1
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessions.js +6 -4
- package/dist/src/utils/sessions.js.map +1 -1
- package/dist/src/utils/sessions.test.js +26 -0
- package/dist/src/utils/sessions.test.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/acp.test.js +8 -16
- package/dist/src/zed-integration/acp.test.js.map +1 -1
- package/dist/src/zed-integration/connection.js +2 -0
- package/dist/src/zed-integration/connection.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +0 -1
- package/dist/src/zed-integration/fileSystemService.js +0 -3
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.test.js +0 -8
- package/dist/src/zed-integration/fileSystemService.test.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.js +13 -4
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/src/utils/version.js +0 -15
- package/dist/src/utils/version.js.map +0 -1
- package/dist/src/utils/version.test.js +0 -39
- package/dist/src/utils/version.test.js.map +0 -1
- /package/dist/src/{utils/version.test.d.ts → commands/hooks/migrate.test.d.ts} +0 -0
|
@@ -42,8 +42,17 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
|
|
42
42
|
})),
|
|
43
43
|
enableMouseEvents: vi.fn(),
|
|
44
44
|
disableMouseEvents: vi.fn(),
|
|
45
|
+
FileDiscoveryService: vi.fn().mockImplementation(() => ({
|
|
46
|
+
initialize: vi.fn(),
|
|
47
|
+
})),
|
|
48
|
+
startupProfiler: {
|
|
49
|
+
flush: vi.fn(),
|
|
50
|
+
start: vi.fn(),
|
|
51
|
+
end: vi.fn(),
|
|
52
|
+
},
|
|
45
53
|
};
|
|
46
54
|
});
|
|
55
|
+
import ansiEscapes from 'ansi-escapes';
|
|
47
56
|
import { useQuotaAndFallback } from './hooks/useQuotaAndFallback.js';
|
|
48
57
|
import { UIStateContext } from './contexts/UIStateContext.js';
|
|
49
58
|
import { UIActionsContext, } from './contexts/UIActionsContext.js';
|
|
@@ -270,7 +279,7 @@ describe('AppContainer State Management', () => {
|
|
|
270
279
|
// Add other properties if AppContainer uses them
|
|
271
280
|
});
|
|
272
281
|
mockedUseLogger.mockReturnValue({
|
|
273
|
-
getPreviousUserMessages: vi.fn().
|
|
282
|
+
getPreviousUserMessages: vi.fn().mockResolvedValue([]),
|
|
274
283
|
});
|
|
275
284
|
mockedUseInputHistoryStore.mockReturnValue({
|
|
276
285
|
inputHistory: [],
|
|
@@ -285,6 +294,8 @@ describe('AppContainer State Management', () => {
|
|
|
285
294
|
mockConfig = makeFakeConfig();
|
|
286
295
|
// Mock config's getTargetDir to return consistent workspace directory
|
|
287
296
|
vi.spyOn(mockConfig, 'getTargetDir').mockReturnValue('/test/workspace');
|
|
297
|
+
vi.spyOn(mockConfig, 'initialize').mockResolvedValue(undefined);
|
|
298
|
+
vi.spyOn(mockConfig, 'getDebugMode').mockReturnValue(false);
|
|
288
299
|
mockExtensionManager = vi.mockObject({
|
|
289
300
|
getExtensions: vi.fn().mockReturnValue([]),
|
|
290
301
|
setRequestConsent: vi.fn(),
|
|
@@ -320,13 +331,21 @@ describe('AppContainer State Management', () => {
|
|
|
320
331
|
});
|
|
321
332
|
describe('Basic Rendering', () => {
|
|
322
333
|
it('renders without crashing with minimal props', async () => {
|
|
323
|
-
|
|
334
|
+
let unmount;
|
|
335
|
+
await act(async () => {
|
|
336
|
+
const result = renderAppContainer();
|
|
337
|
+
unmount = result.unmount;
|
|
338
|
+
});
|
|
324
339
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
325
340
|
unmount();
|
|
326
341
|
});
|
|
327
342
|
it('renders with startup warnings', async () => {
|
|
328
343
|
const startupWarnings = ['Warning 1', 'Warning 2'];
|
|
329
|
-
|
|
344
|
+
let unmount;
|
|
345
|
+
await act(async () => {
|
|
346
|
+
const result = renderAppContainer({ startupWarnings });
|
|
347
|
+
unmount = result.unmount;
|
|
348
|
+
});
|
|
330
349
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
331
350
|
unmount();
|
|
332
351
|
});
|
|
@@ -337,8 +356,12 @@ describe('AppContainer State Management', () => {
|
|
|
337
356
|
...mockInitResult,
|
|
338
357
|
themeError: 'Failed to load theme',
|
|
339
358
|
};
|
|
340
|
-
|
|
341
|
-
|
|
359
|
+
let unmount;
|
|
360
|
+
await act(async () => {
|
|
361
|
+
const result = renderAppContainer({
|
|
362
|
+
initResult: initResultWithError,
|
|
363
|
+
});
|
|
364
|
+
unmount = result.unmount;
|
|
342
365
|
});
|
|
343
366
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
344
367
|
unmount();
|
|
@@ -353,23 +376,39 @@ describe('AppContainer State Management', () => {
|
|
|
353
376
|
});
|
|
354
377
|
describe('Context Providers', () => {
|
|
355
378
|
it('provides AppContext with correct values', async () => {
|
|
356
|
-
|
|
379
|
+
let unmount;
|
|
380
|
+
await act(async () => {
|
|
381
|
+
const result = renderAppContainer({ version: '2.0.0' });
|
|
382
|
+
unmount = result.unmount;
|
|
383
|
+
});
|
|
357
384
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
358
385
|
// Should render and unmount cleanly
|
|
359
386
|
expect(() => unmount()).not.toThrow();
|
|
360
387
|
});
|
|
361
388
|
it('provides UIStateContext with state management', async () => {
|
|
362
|
-
|
|
389
|
+
let unmount;
|
|
390
|
+
await act(async () => {
|
|
391
|
+
const result = renderAppContainer();
|
|
392
|
+
unmount = result.unmount;
|
|
393
|
+
});
|
|
363
394
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
364
395
|
unmount();
|
|
365
396
|
});
|
|
366
397
|
it('provides UIActionsContext with action handlers', async () => {
|
|
367
|
-
|
|
398
|
+
let unmount;
|
|
399
|
+
await act(async () => {
|
|
400
|
+
const result = renderAppContainer();
|
|
401
|
+
unmount = result.unmount;
|
|
402
|
+
});
|
|
368
403
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
369
404
|
unmount();
|
|
370
405
|
});
|
|
371
406
|
it('provides ConfigContext with config object', async () => {
|
|
372
|
-
|
|
407
|
+
let unmount;
|
|
408
|
+
await act(async () => {
|
|
409
|
+
const result = renderAppContainer();
|
|
410
|
+
unmount = result.unmount;
|
|
411
|
+
});
|
|
373
412
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
374
413
|
unmount();
|
|
375
414
|
});
|
|
@@ -384,7 +423,11 @@ describe('AppContainer State Management', () => {
|
|
|
384
423
|
showMemoryUsage: false,
|
|
385
424
|
},
|
|
386
425
|
};
|
|
387
|
-
|
|
426
|
+
let unmount;
|
|
427
|
+
await act(async () => {
|
|
428
|
+
const result = renderAppContainer({ settings: settingsAllHidden });
|
|
429
|
+
unmount = result.unmount;
|
|
430
|
+
});
|
|
388
431
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
389
432
|
unmount();
|
|
390
433
|
});
|
|
@@ -397,14 +440,22 @@ describe('AppContainer State Management', () => {
|
|
|
397
440
|
showMemoryUsage: true,
|
|
398
441
|
},
|
|
399
442
|
};
|
|
400
|
-
|
|
443
|
+
let unmount;
|
|
444
|
+
await act(async () => {
|
|
445
|
+
const result = renderAppContainer({ settings: settingsWithMemory });
|
|
446
|
+
unmount = result.unmount;
|
|
447
|
+
});
|
|
401
448
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
402
449
|
unmount();
|
|
403
450
|
});
|
|
404
451
|
});
|
|
405
452
|
describe('Version Handling', () => {
|
|
406
453
|
it.each(['1.0.0', '2.1.3-beta', '3.0.0-nightly'])('handles version format: %s', async (version) => {
|
|
407
|
-
|
|
454
|
+
let unmount;
|
|
455
|
+
await act(async () => {
|
|
456
|
+
const result = renderAppContainer({ version });
|
|
457
|
+
unmount = result.unmount;
|
|
458
|
+
});
|
|
408
459
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
409
460
|
unmount();
|
|
410
461
|
});
|
|
@@ -423,7 +474,11 @@ describe('AppContainer State Management', () => {
|
|
|
423
474
|
const undefinedSettings = {
|
|
424
475
|
merged: {},
|
|
425
476
|
};
|
|
426
|
-
|
|
477
|
+
let unmount;
|
|
478
|
+
await act(async () => {
|
|
479
|
+
const result = renderAppContainer({ settings: undefinedSettings });
|
|
480
|
+
unmount = result.unmount;
|
|
481
|
+
});
|
|
427
482
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
428
483
|
unmount();
|
|
429
484
|
});
|
|
@@ -719,7 +774,11 @@ describe('AppContainer State Management', () => {
|
|
|
719
774
|
describe('Quota and Fallback Integration', () => {
|
|
720
775
|
it('passes a null proQuotaRequest to UIStateContext by default', async () => {
|
|
721
776
|
// The default mock from beforeEach already sets proQuotaRequest to null
|
|
722
|
-
|
|
777
|
+
let unmount;
|
|
778
|
+
await act(async () => {
|
|
779
|
+
const result = renderAppContainer();
|
|
780
|
+
unmount = result.unmount;
|
|
781
|
+
});
|
|
723
782
|
await waitFor(() => {
|
|
724
783
|
// Assert that the context value is as expected
|
|
725
784
|
expect(capturedUIState.proQuotaRequest).toBeNull();
|
|
@@ -738,7 +797,11 @@ describe('AppContainer State Management', () => {
|
|
|
738
797
|
handleProQuotaChoice: vi.fn(),
|
|
739
798
|
});
|
|
740
799
|
// Act: Render the container
|
|
741
|
-
|
|
800
|
+
let unmount;
|
|
801
|
+
await act(async () => {
|
|
802
|
+
const result = renderAppContainer();
|
|
803
|
+
unmount = result.unmount;
|
|
804
|
+
});
|
|
742
805
|
await waitFor(() => {
|
|
743
806
|
// Assert: The mock request is correctly passed through the context
|
|
744
807
|
expect(capturedUIState.proQuotaRequest).toEqual(mockRequest);
|
|
@@ -753,7 +816,11 @@ describe('AppContainer State Management', () => {
|
|
|
753
816
|
handleProQuotaChoice: mockHandler,
|
|
754
817
|
});
|
|
755
818
|
// Act: Render the container
|
|
756
|
-
|
|
819
|
+
let unmount;
|
|
820
|
+
await act(async () => {
|
|
821
|
+
const result = renderAppContainer();
|
|
822
|
+
unmount = result.unmount;
|
|
823
|
+
});
|
|
757
824
|
await waitFor(() => {
|
|
758
825
|
// Assert: The action in the context is the mock handler we provided
|
|
759
826
|
expect(capturedUIActions.handleProQuotaChoice).toBe(mockHandler);
|
|
@@ -1099,7 +1166,11 @@ describe('AppContainer State Management', () => {
|
|
|
1099
1166
|
cancelOngoingRequest: vi.fn(),
|
|
1100
1167
|
activePtyId: 'some-id',
|
|
1101
1168
|
});
|
|
1102
|
-
|
|
1169
|
+
let unmount;
|
|
1170
|
+
await act(async () => {
|
|
1171
|
+
const result = renderAppContainer();
|
|
1172
|
+
unmount = result.unmount;
|
|
1173
|
+
});
|
|
1103
1174
|
await waitFor(() => expect(resizePtySpy).toHaveBeenCalled());
|
|
1104
1175
|
const lastCall = resizePtySpy.mock.calls[resizePtySpy.mock.calls.length - 1];
|
|
1105
1176
|
// Check the height argument specifically
|
|
@@ -1383,7 +1454,11 @@ describe('AppContainer State Management', () => {
|
|
|
1383
1454
|
openModelDialog: vi.fn(),
|
|
1384
1455
|
closeModelDialog: vi.fn(),
|
|
1385
1456
|
});
|
|
1386
|
-
|
|
1457
|
+
let unmount;
|
|
1458
|
+
await act(async () => {
|
|
1459
|
+
const result = renderAppContainer();
|
|
1460
|
+
unmount = result.unmount;
|
|
1461
|
+
});
|
|
1387
1462
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1388
1463
|
expect(capturedUIState.isModelDialogOpen).toBe(true);
|
|
1389
1464
|
unmount();
|
|
@@ -1395,7 +1470,11 @@ describe('AppContainer State Management', () => {
|
|
|
1395
1470
|
openModelDialog: vi.fn(),
|
|
1396
1471
|
closeModelDialog: mockCloseModelDialog,
|
|
1397
1472
|
});
|
|
1398
|
-
|
|
1473
|
+
let unmount;
|
|
1474
|
+
await act(async () => {
|
|
1475
|
+
const result = renderAppContainer();
|
|
1476
|
+
unmount = result.unmount;
|
|
1477
|
+
});
|
|
1399
1478
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1400
1479
|
// Verify that the actions are correctly passed through context
|
|
1401
1480
|
act(() => {
|
|
@@ -1407,20 +1486,32 @@ describe('AppContainer State Management', () => {
|
|
|
1407
1486
|
});
|
|
1408
1487
|
describe('CoreEvents Integration', () => {
|
|
1409
1488
|
it('subscribes to UserFeedback and drains backlog on mount', async () => {
|
|
1410
|
-
|
|
1489
|
+
let unmount;
|
|
1490
|
+
await act(async () => {
|
|
1491
|
+
const result = renderAppContainer();
|
|
1492
|
+
unmount = result.unmount;
|
|
1493
|
+
});
|
|
1411
1494
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1412
1495
|
expect(mockCoreEvents.on).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
|
|
1413
1496
|
expect(mockCoreEvents.drainBacklogs).toHaveBeenCalledTimes(1);
|
|
1414
1497
|
unmount();
|
|
1415
1498
|
});
|
|
1416
1499
|
it('unsubscribes from UserFeedback on unmount', async () => {
|
|
1417
|
-
|
|
1500
|
+
let unmount;
|
|
1501
|
+
await act(async () => {
|
|
1502
|
+
const result = renderAppContainer();
|
|
1503
|
+
unmount = result.unmount;
|
|
1504
|
+
});
|
|
1418
1505
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1419
1506
|
unmount();
|
|
1420
1507
|
expect(mockCoreEvents.off).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
|
|
1421
1508
|
});
|
|
1422
1509
|
it('adds history item when UserFeedback event is received', async () => {
|
|
1423
|
-
|
|
1510
|
+
let unmount;
|
|
1511
|
+
await act(async () => {
|
|
1512
|
+
const result = renderAppContainer();
|
|
1513
|
+
unmount = result.unmount;
|
|
1514
|
+
});
|
|
1424
1515
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1425
1516
|
// Get the registered handler
|
|
1426
1517
|
const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.UserFeedback)?.[1];
|
|
@@ -1442,7 +1533,11 @@ describe('AppContainer State Management', () => {
|
|
|
1442
1533
|
it('updates currentModel when ModelChanged event is received', async () => {
|
|
1443
1534
|
// Arrange: Mock initial model
|
|
1444
1535
|
vi.spyOn(mockConfig, 'getModel').mockReturnValue('initial-model');
|
|
1445
|
-
|
|
1536
|
+
let unmount;
|
|
1537
|
+
await act(async () => {
|
|
1538
|
+
const result = renderAppContainer();
|
|
1539
|
+
unmount = result.unmount;
|
|
1540
|
+
});
|
|
1446
1541
|
await waitFor(() => {
|
|
1447
1542
|
expect(capturedUIState?.currentModel).toBe('initial-model');
|
|
1448
1543
|
});
|
|
@@ -1450,6 +1545,8 @@ describe('AppContainer State Management', () => {
|
|
|
1450
1545
|
const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.ModelChanged)?.[1];
|
|
1451
1546
|
expect(handler).toBeDefined();
|
|
1452
1547
|
// Act: Simulate ModelChanged event
|
|
1548
|
+
// Update config mock to return new model since the handler reads from config
|
|
1549
|
+
vi.spyOn(mockConfig, 'getModel').mockReturnValue('new-model');
|
|
1453
1550
|
act(() => {
|
|
1454
1551
|
handler({ model: 'new-model' });
|
|
1455
1552
|
});
|
|
@@ -1475,7 +1572,11 @@ describe('AppContainer State Management', () => {
|
|
|
1475
1572
|
activePtyId: 'some-pty-id', // Make sure activePtyId is set
|
|
1476
1573
|
});
|
|
1477
1574
|
// The main assertion is that the render does not throw.
|
|
1478
|
-
|
|
1575
|
+
let unmount;
|
|
1576
|
+
await act(async () => {
|
|
1577
|
+
const result = renderAppContainer();
|
|
1578
|
+
unmount = result.unmount;
|
|
1579
|
+
});
|
|
1479
1580
|
await waitFor(() => expect(resizePtySpy).toHaveBeenCalled());
|
|
1480
1581
|
unmount();
|
|
1481
1582
|
});
|
|
@@ -1487,7 +1588,11 @@ describe('AppContainer State Management', () => {
|
|
|
1487
1588
|
authType: AuthType.USE_GEMINI,
|
|
1488
1589
|
apiKey: 'fake-key',
|
|
1489
1590
|
});
|
|
1490
|
-
|
|
1591
|
+
let unmount;
|
|
1592
|
+
await act(async () => {
|
|
1593
|
+
const result = renderAppContainer();
|
|
1594
|
+
unmount = result.unmount;
|
|
1595
|
+
});
|
|
1491
1596
|
await waitFor(() => {
|
|
1492
1597
|
expect(capturedUIState.bannerData.defaultText).toBeDefined();
|
|
1493
1598
|
unmount();
|
|
@@ -1509,7 +1614,11 @@ describe('AppContainer State Management', () => {
|
|
|
1509
1614
|
});
|
|
1510
1615
|
});
|
|
1511
1616
|
it('clears the prompt when onCancelSubmit is called with shouldRestorePrompt=false', async () => {
|
|
1512
|
-
|
|
1617
|
+
let unmount;
|
|
1618
|
+
await act(async () => {
|
|
1619
|
+
const result = renderAppContainer();
|
|
1620
|
+
unmount = result.unmount;
|
|
1621
|
+
});
|
|
1513
1622
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1514
1623
|
const { onCancelSubmit } = extractUseGeminiStreamArgs(mockedUseGeminiStream.mock.lastCall);
|
|
1515
1624
|
act(() => {
|
|
@@ -1525,7 +1634,11 @@ describe('AppContainer State Management', () => {
|
|
|
1525
1634
|
addInput: vi.fn(),
|
|
1526
1635
|
initializeFromLogger: vi.fn(),
|
|
1527
1636
|
});
|
|
1528
|
-
|
|
1637
|
+
let unmount;
|
|
1638
|
+
await act(async () => {
|
|
1639
|
+
const result = renderAppContainer();
|
|
1640
|
+
unmount = result.unmount;
|
|
1641
|
+
});
|
|
1529
1642
|
await waitFor(() => expect(capturedUIState.userMessages).toContain('previous message'));
|
|
1530
1643
|
const { onCancelSubmit } = extractUseGeminiStreamArgs(mockedUseGeminiStream.mock.lastCall);
|
|
1531
1644
|
await act(async () => {
|
|
@@ -1543,7 +1656,13 @@ describe('AppContainer State Management', () => {
|
|
|
1543
1656
|
addInput: mockAddInput,
|
|
1544
1657
|
initializeFromLogger: vi.fn(),
|
|
1545
1658
|
});
|
|
1546
|
-
|
|
1659
|
+
let rerender;
|
|
1660
|
+
let unmount;
|
|
1661
|
+
await act(async () => {
|
|
1662
|
+
const result = renderAppContainer();
|
|
1663
|
+
rerender = result.rerender;
|
|
1664
|
+
unmount = result.unmount;
|
|
1665
|
+
});
|
|
1547
1666
|
// Verify userMessages is populated from inputHistory
|
|
1548
1667
|
await waitFor(() => expect(capturedUIState.userMessages).toContain('first prompt'));
|
|
1549
1668
|
expect(capturedUIState.userMessages).toContain('second prompt');
|
|
@@ -1556,6 +1675,10 @@ describe('AppContainer State Management', () => {
|
|
|
1556
1675
|
clearItems: mockClearItems,
|
|
1557
1676
|
loadHistory: vi.fn(),
|
|
1558
1677
|
});
|
|
1678
|
+
await act(async () => {
|
|
1679
|
+
// Rerender to apply the new mock.
|
|
1680
|
+
rerender(getAppContainer());
|
|
1681
|
+
});
|
|
1559
1682
|
// Verify that userMessages still contains the input history
|
|
1560
1683
|
// (it should not be affected by clearing conversation history)
|
|
1561
1684
|
expect(capturedUIState.userMessages).toContain('first prompt');
|
|
@@ -1563,5 +1686,29 @@ describe('AppContainer State Management', () => {
|
|
|
1563
1686
|
unmount();
|
|
1564
1687
|
});
|
|
1565
1688
|
});
|
|
1689
|
+
describe('Regression Tests', () => {
|
|
1690
|
+
it('does not refresh static on startup if banner text is empty', async () => {
|
|
1691
|
+
// Mock banner text to be empty strings
|
|
1692
|
+
vi.spyOn(mockConfig, 'getBannerTextNoCapacityIssues').mockResolvedValue('');
|
|
1693
|
+
vi.spyOn(mockConfig, 'getBannerTextCapacityIssues').mockResolvedValue('');
|
|
1694
|
+
// Clear previous calls
|
|
1695
|
+
mocks.mockStdout.write.mockClear();
|
|
1696
|
+
let compUnmount = () => { };
|
|
1697
|
+
await act(async () => {
|
|
1698
|
+
const { unmount } = renderAppContainer();
|
|
1699
|
+
compUnmount = unmount;
|
|
1700
|
+
});
|
|
1701
|
+
// Allow async effects to run
|
|
1702
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1703
|
+
// Wait for fetchBannerTexts to complete
|
|
1704
|
+
await act(async () => {
|
|
1705
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
1706
|
+
});
|
|
1707
|
+
// Check that clearTerminal was NOT written to stdout
|
|
1708
|
+
const clearTerminalCalls = mocks.mockStdout.write.mock.calls.filter((call) => call[0] === ansiEscapes.clearTerminal);
|
|
1709
|
+
expect(clearTerminalCalls).toHaveLength(0);
|
|
1710
|
+
compUnmount();
|
|
1711
|
+
});
|
|
1712
|
+
});
|
|
1566
1713
|
});
|
|
1567
1714
|
//# sourceMappingURL=AppContainer.test.js.map
|