@machina.ai/cell-cli 1.20.2-rc1 → 1.25.0-rc3
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 +5 -4
- package/dist/src/commands/extensions/configure.d.ts +13 -0
- package/dist/src/commands/extensions/configure.js +131 -0
- package/dist/src/commands/extensions/configure.js.map +1 -0
- package/dist/src/commands/extensions/configure.test.d.ts +1 -0
- package/dist/src/commands/extensions/configure.test.js +197 -0
- package/dist/src/commands/extensions/configure.test.js.map +1 -0
- 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/install.js +7 -31
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +21 -3
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- 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/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 +14 -0
- package/dist/src/commands/extensions/utils.js +33 -0
- package/dist/src/commands/extensions/utils.js.map +1 -0
- package/dist/src/commands/extensions/validate.js +1 -1
- package/dist/src/commands/extensions/validate.js.map +1 -1
- package/dist/src/commands/extensions/validate.test.js +1 -1
- package/dist/src/commands/extensions/validate.test.js.map +1 -1
- 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 +24 -2
- package/dist/src/commands/mcp/add.test.js.map +1 -1
- package/dist/src/commands/mcp/list.js +7 -1
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/skills/disable.d.ts +14 -0
- package/dist/src/commands/skills/disable.js +45 -0
- package/dist/src/commands/skills/disable.js.map +1 -0
- package/dist/src/commands/skills/disable.test.d.ts +6 -0
- package/dist/src/commands/skills/disable.test.js +80 -0
- package/dist/src/commands/skills/disable.test.js.map +1 -0
- package/dist/src/commands/skills/enable.d.ts +12 -0
- package/dist/src/commands/skills/enable.js +35 -0
- package/dist/src/commands/skills/enable.js.map +1 -0
- package/dist/src/commands/skills/enable.test.d.ts +6 -0
- package/dist/src/commands/skills/enable.test.js +107 -0
- package/dist/src/commands/skills/enable.test.js.map +1 -0
- package/dist/src/commands/skills/install.d.ts +14 -0
- package/dist/src/commands/skills/install.js +61 -0
- package/dist/src/commands/skills/install.js.map +1 -0
- package/dist/src/commands/skills/install.test.d.ts +6 -0
- package/dist/src/commands/skills/install.test.js +57 -0
- package/dist/src/commands/skills/install.test.js.map +1 -0
- package/dist/src/commands/skills/list.d.ts +10 -0
- package/dist/src/commands/skills/list.js +60 -0
- package/dist/src/commands/skills/list.js.map +1 -0
- package/dist/src/commands/skills/list.test.d.ts +6 -0
- package/dist/src/commands/skills/list.test.js +136 -0
- package/dist/src/commands/skills/list.test.js.map +1 -0
- package/dist/src/commands/skills/uninstall.d.ts +13 -0
- package/dist/src/commands/skills/uninstall.js +56 -0
- package/dist/src/commands/skills/uninstall.js.map +1 -0
- package/dist/src/commands/skills/uninstall.test.d.ts +6 -0
- package/dist/src/commands/skills/uninstall.test.js +61 -0
- package/dist/src/commands/skills/uninstall.test.js.map +1 -0
- package/dist/src/commands/skills.d.ts +7 -0
- package/dist/src/commands/skills.js +30 -0
- package/dist/src/commands/skills.js.map +1 -0
- package/dist/src/commands/skills.test.d.ts +6 -0
- package/dist/src/commands/skills.test.js +49 -0
- package/dist/src/commands/skills.test.js.map +1 -0
- package/dist/src/config/config.d.ts +10 -3
- package/dist/src/config/config.js +101 -34
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +225 -16
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager-agents.test.d.ts +6 -0
- package/dist/src/config/extension-manager-agents.test.js +115 -0
- package/dist/src/config/extension-manager-agents.test.js.map +1 -0
- package/dist/src/config/extension-manager-scope.test.js +164 -0
- package/dist/src/config/extension-manager-scope.test.js.map +1 -0
- package/dist/src/config/extension-manager-skills.test.js +150 -0
- package/dist/src/config/extension-manager-skills.test.js.map +1 -0
- package/dist/src/config/extension-manager.d.ts +7 -1
- package/dist/src/config/extension-manager.js +202 -37
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +178 -13
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +5 -3
- package/dist/src/config/extensions/consent.js +33 -7
- package/dist/src/config/extensions/consent.js.map +1 -1
- package/dist/src/config/extensions/consent.test.js +114 -10
- package/dist/src/config/extensions/consent.test.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.d.ts +9 -1
- package/dist/src/config/extensions/extensionSettings.js +107 -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/extensionUpdates.test.js +231 -0
- package/dist/src/config/extensions/extensionUpdates.test.js.map +1 -0
- 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 +190 -2
- 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/extensions/storage.js +2 -2
- package/dist/src/config/extensions/storage.js.map +1 -1
- package/dist/src/config/extensions/update.js +1 -1
- package/dist/src/config/extensions/update.js.map +1 -1
- package/dist/src/config/extensions/update.test.js +8 -8
- package/dist/src/config/extensions/update.test.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +14 -2
- package/dist/src/config/keyBindings.js +89 -11
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/policy-engine.integration.test.js +13 -1
- package/dist/src/config/policy-engine.integration.test.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/config/settings-validation.test.d.ts +6 -0
- package/dist/src/config/settings-validation.test.js +370 -0
- package/dist/src/config/settings-validation.test.js.map +1 -0
- package/dist/src/config/settings.d.ts +9 -7
- package/dist/src/config/settings.js +138 -233
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +245 -571
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +459 -35
- package/dist/src/config/settingsSchema.js +541 -32
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +22 -4
- 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/config/settings_validation_warning.test.d.ts +6 -0
- package/dist/src/config/settings_validation_warning.test.js +123 -0
- package/dist/src/config/settings_validation_warning.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +1 -0
- package/dist/src/config/trustedFolders.js +18 -4
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +45 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/gemini.js +135 -69
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +85 -99
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/gemini_cleanup.test.js +7 -0
- package/dist/src/gemini_cleanup.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +3 -3
- package/dist/src/generated/git-commit.js +3 -3
- package/dist/src/nonInteractiveCli.js +59 -9
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +114 -21
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +66 -8
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +70 -12
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FeedbackService.js.map +1 -1
- package/dist/src/services/FileCommandLoader.js +6 -6
- package/dist/src/services/FileCommandLoader.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/services/prompt-processors/shellProcessor.js +13 -11
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.js +93 -61
- package/dist/src/services/prompt-processors/shellProcessor.test.js.map +1 -1
- package/dist/src/test-utils/render.js +5 -2
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.test.js +2 -2
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/AppContainer.js +200 -94
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +405 -69
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.test.js +18 -7
- package/dist/src/ui/IdeIntegrationNudge.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.d.ts +4 -1
- package/dist/src/ui/auth/AuthDialog.js +11 -4
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +19 -2
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthInProgress.test.js +16 -6
- package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.d.ts +10 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js +27 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js.map +1 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +68 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +1 -0
- 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 +3 -4
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +7 -10
- package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +79 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/agentsCommand.test.js +91 -0
- package/dist/src/ui/commands/agentsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.js +30 -3
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/authCommand.test.js +72 -4
- package/dist/src/ui/commands/authCommand.test.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +37 -6
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +86 -5
- package/dist/src/ui/commands/bugCommand.test.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +1 -2
- package/dist/src/ui/commands/chatCommand.js +52 -52
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.test.js +95 -69
- package/dist/src/ui/commands/chatCommand.test.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +22 -1
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +6 -0
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.js +1 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +27 -10
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.test.js +49 -11
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +194 -24
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.test.js +217 -27
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.js +1 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.test.js +1 -1
- package/dist/src/ui/commands/helpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/hooksCommand.d.ts +7 -0
- package/dist/src/ui/commands/hooksCommand.js +342 -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 +575 -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 +34 -16
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.test.js +43 -6
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +19 -33
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +112 -16
- package/dist/src/ui/commands/memoryCommand.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/skillsCommand.d.ts +7 -0
- package/dist/src/ui/commands/skillsCommand.js +235 -0
- package/dist/src/ui/commands/skillsCommand.js.map +1 -0
- package/dist/src/ui/commands/skillsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/skillsCommand.test.js +405 -0
- package/dist/src/ui/commands/skillsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.js +6 -10
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.test.js +20 -3
- 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/toolsCommand.js +2 -2
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.test.js +2 -2
- package/dist/src/ui/commands/toolsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +16 -38
- package/dist/src/ui/commands/types.js +1 -0
- 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/Composer.js +7 -7
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/Composer.test.js +23 -4
- package/dist/src/ui/components/Composer.test.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +12 -5
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +56 -25
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
- 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 +3 -3
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +2 -1
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +10 -2
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +20 -14
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +12 -2
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.js +6 -6
- 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/Help.js +1 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +4 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +21 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/HookStatusDisplay.d.ts +12 -0
- package/dist/src/ui/components/HookStatusDisplay.js +20 -0
- package/dist/src/ui/components/HookStatusDisplay.js.map +1 -0
- package/dist/src/ui/components/HookStatusDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HookStatusDisplay.test.js +51 -0
- package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +3 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +4 -3
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +77 -26
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +307 -7
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/LogoutConfirmationDialog.d.ts +15 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.js +37 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js +59 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.js +12 -10
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/MainContent.test.js +19 -9
- package/dist/src/ui/components/MainContent.test.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +122 -41
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +171 -148
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js +68 -14
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +62 -4
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +2 -2
- package/dist/src/ui/components/MultiFolderTrustDialog.js +3 -2
- package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +9 -9
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +5 -4
- package/dist/src/ui/components/Notifications.js.map +1 -1
- package/dist/src/ui/components/Notifications.test.js +1 -0
- package/dist/src/ui/components/Notifications.test.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.d.ts +1 -3
- package/dist/src/ui/components/ProQuotaDialog.js +16 -32
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +43 -29
- 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 +166 -77
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +118 -13
- 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/StatusDisplay.d.ts +11 -0
- package/dist/src/ui/components/StatusDisplay.js +40 -0
- package/dist/src/ui/components/StatusDisplay.js.map +1 -0
- package/dist/src/ui/components/StatusDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/StatusDisplay.test.js +144 -0
- package/dist/src/ui/components/StatusDisplay.test.js.map +1 -0
- package/dist/src/ui/components/StickyHeader.d.ts +2 -0
- package/dist/src/ui/components/StickyHeader.js +1 -1
- package/dist/src/ui/components/StickyHeader.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +7 -2
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/Table.d.ts +21 -0
- package/dist/src/ui/components/Table.js +7 -0
- package/dist/src/ui/components/Table.js.map +1 -0
- package/dist/src/ui/components/Table.test.d.ts +6 -0
- package/dist/src/ui/components/Table.test.js +53 -0
- package/dist/src/ui/components/Table.test.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.js +63 -17
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.test.js +66 -1
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +5 -13
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +26 -17
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.js +8 -5
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/Todo.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +55 -24
- 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/messages/ToolMessage.js +6 -2
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.js +22 -16
- package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +36 -18
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +134 -0
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -0
- 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/MaxSizedBox.d.ts +2 -38
- package/dist/src/ui/components/shared/MaxSizedBox.js +34 -418
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +48 -133
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +4 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +11 -10
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +40 -4
- package/dist/src/ui/components/shared/text-buffer.js +279 -102
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +247 -1
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js +3 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -1
- package/dist/src/ui/components/views/AgentsStatus.d.ts +13 -0
- package/dist/src/ui/components/views/AgentsStatus.js +23 -0
- package/dist/src/ui/components/views/AgentsStatus.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.js +3 -2
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.test.js +37 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
- package/dist/src/ui/components/views/HooksList.d.ts +24 -0
- package/dist/src/ui/components/views/HooksList.js +28 -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 +18 -3
- package/dist/src/ui/components/views/McpStatus.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +23 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
- package/dist/src/ui/components/views/SkillsList.d.ts +13 -0
- package/dist/src/ui/components/views/SkillsList.js +17 -0
- package/dist/src/ui/components/views/SkillsList.js.map +1 -0
- package/dist/src/ui/components/views/SkillsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/SkillsList.test.js +97 -0
- package/dist/src/ui/components/views/SkillsList.test.js.map +1 -0
- package/dist/src/ui/constants/tips.js +1 -5
- package/dist/src/ui/constants/tips.js.map +1 -1
- package/dist/src/ui/constants.d.ts +4 -3
- package/dist/src/ui/constants.js +5 -6
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -0
- package/dist/src/ui/contexts/KeypressContext.js +84 -6
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +136 -9
- 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/contexts/UIActionsContext.d.ts +3 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +5 -1
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/contexts/VimModeContext.js +1 -1
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +7 -6
- package/dist/src/ui/hooks/atCommandProcessor.js +156 -29
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +133 -35
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +183 -0
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +1 -0
- 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 +21 -7
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +2 -3
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +83 -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/useAtCompletion_agents.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js +85 -0
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +2 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +5 -4
- package/dist/src/ui/hooks/useAutoAcceptIndicator.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 +3 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +13 -8
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.js +88 -2
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.js +7 -7
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +20 -4
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +14 -19
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +31 -23
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -1
- package/dist/src/ui/hooks/useGeminiStream.js +102 -71
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +294 -10
- 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/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.test.js +16 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -1
- package/dist/src/ui/hooks/useHookDisplayState.d.ts +7 -0
- package/dist/src/ui/hooks/useHookDisplayState.js +83 -0
- package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.js +180 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.js.map +1 -0
- 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 +6 -4
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +2 -2
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +2 -2
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +2 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +7 -3
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +15 -4
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +10 -3
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
- package/dist/src/ui/hooks/usePhraseCycler.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 -2
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +19 -18
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +29 -23
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useRewind.d.ts +14 -0
- package/dist/src/ui/hooks/useRewind.js +31 -0
- package/dist/src/ui/hooks/useRewind.js.map +1 -0
- package/dist/src/ui/hooks/useRewind.test.d.ts +6 -0
- package/dist/src/ui/hooks/useRewind.test.js +100 -0
- package/dist/src/ui/hooks/useRewind.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.js +2 -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/useSessionBrowser.js +3 -3
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.js +4 -10
- package/dist/src/ui/hooks/useSessionBrowser.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 +5 -3
- 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 +29 -11
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +115 -5
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
- package/dist/src/{utils/version.d.ts → ui/hooks/useSnowfall.d.ts} +1 -1
- 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 +86 -53
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/vim.test.js +7 -0
- package/dist/src/ui/hooks/vim.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +79 -53
- package/dist/src/ui/keyMatchers.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/themes/ansi-light.js +1 -1
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +1 -1
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +1 -0
- package/dist/src/ui/themes/color-utils.js +13 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -1
- package/dist/src/ui/themes/color-utils.test.js +20 -1
- package/dist/src/ui/themes/color-utils.test.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +1 -1
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +5 -0
- package/dist/src/ui/themes/theme-manager.js +9 -3
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +7 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +12 -0
- package/dist/src/ui/themes/theme.js +34 -4
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/theme.test.js +23 -0
- package/dist/src/ui/themes/theme.test.js.map +1 -1
- package/dist/src/ui/types.d.ts +48 -5
- package/dist/src/ui/types.js +5 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +2 -2
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.test.js +1 -1
- package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js +1 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +2 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.d.ts +27 -2
- package/dist/src/ui/utils/clipboardUtils.js +148 -16
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.test.js +135 -13
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.windows.test.js +52 -0
- package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +1 -1
- package/dist/src/ui/utils/commandUtils.js +111 -1
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +200 -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/directoryUtils.d.ts +8 -0
- package/dist/src/ui/utils/directoryUtils.js +95 -3
- package/dist/src/ui/utils/directoryUtils.js.map +1 -1
- package/dist/src/ui/utils/directoryUtils.test.js +193 -3
- package/dist/src/ui/utils/directoryUtils.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.d.ts +3 -2
- package/dist/src/ui/utils/highlight.js +51 -37
- package/dist/src/ui/utils/highlight.js.map +1 -1
- package/dist/src/ui/utils/highlight.test.js +75 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -1
- package/dist/src/ui/utils/historyExportUtils.d.ts +21 -0
- package/dist/src/ui/utils/historyExportUtils.js +59 -0
- package/dist/src/ui/utils/historyExportUtils.js.map +1 -0
- package/dist/src/ui/utils/rewindFileOps.d.ts +47 -0
- package/dist/src/ui/utils/rewindFileOps.js +190 -0
- package/dist/src/ui/utils/rewindFileOps.js.map +1 -0
- package/dist/src/ui/utils/rewindFileOps.test.d.ts +6 -0
- package/dist/src/ui/utils/rewindFileOps.test.js +375 -0
- package/dist/src/ui/utils/rewindFileOps.test.js.map +1 -0
- package/dist/src/ui/utils/terminalCapabilityManager.d.ts +41 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js +209 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +6 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.js +221 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +1 -1
- package/dist/src/ui/utils/terminalSetup.js +21 -6
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.test.js +16 -2
- package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
- package/dist/src/ui/utils/textUtils.js +9 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/textUtils.test.js +12 -1
- package/dist/src/ui/utils/textUtils.test.js.map +1 -1
- package/dist/src/ui/utils/ui-sizing.js +1 -1
- package/dist/src/ui/utils/ui-sizing.js.map +1 -1
- package/dist/src/ui/utils/ui-sizing.test.js +2 -2
- package/dist/src/ui/utils/ui-sizing.test.js.map +1 -1
- package/dist/src/utils/activityLogger.d.ts +47 -0
- package/dist/src/utils/activityLogger.js +297 -0
- package/dist/src/utils/activityLogger.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +11 -0
- package/dist/src/utils/cleanup.js +36 -1
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/cleanup.test.js +21 -31
- package/dist/src/utils/cleanup.test.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 +13 -14
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.js +115 -39
- 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/processUtils.d.ts +1 -1
- package/dist/src/utils/processUtils.js +1 -1
- package/dist/src/utils/processUtils.js.map +1 -1
- package/dist/src/utils/readStdin.js +7 -0
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/readStdin.test.js +4 -0
- package/dist/src/utils/readStdin.test.js.map +1 -1
- package/dist/src/utils/readStdin_safety.test.d.ts +6 -0
- package/dist/src/utils/readStdin_safety.test.js +68 -0
- package/dist/src/utils/readStdin_safety.test.js.map +1 -0
- package/dist/src/utils/relaunch.js +3 -1
- package/dist/src/utils/relaunch.js.map +1 -1
- package/dist/src/utils/relaunch.test.js +13 -7
- package/dist/src/utils/relaunch.test.js.map +1 -1
- package/dist/src/utils/resolvePath.js +3 -3
- package/dist/src/utils/resolvePath.js.map +1 -1
- package/dist/src/utils/resolvePath.test.js +3 -0
- package/dist/src/utils/resolvePath.test.js.map +1 -1
- package/dist/src/utils/sandbox.js +27 -17
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/sandbox.test.js +17 -5
- package/dist/src/utils/sandbox.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/sessionCleanup.integration.test.js +2 -2
- package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -1
- package/dist/src/utils/sessionCleanup.js +16 -4
- package/dist/src/utils/sessionCleanup.js.map +1 -1
- package/dist/src/utils/sessionCleanup.test.js +18 -68
- package/dist/src/utils/sessionCleanup.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +22 -0
- package/dist/src/utils/sessionUtils.js +37 -5
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.js +3 -3
- package/dist/src/utils/sessionUtils.test.js.map +1 -1
- package/dist/src/utils/sessions.js +14 -12
- package/dist/src/utils/sessions.js.map +1 -1
- package/dist/src/utils/sessions.test.js +62 -39
- package/dist/src/utils/sessions.test.js.map +1 -1
- package/dist/src/utils/settingsUtils.js +0 -5
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/skillSettings.d.ts +33 -0
- package/dist/src/utils/skillSettings.js +101 -0
- package/dist/src/utils/skillSettings.js.map +1 -0
- package/dist/src/utils/skillUtils.d.ts +29 -0
- package/dist/src/utils/skillUtils.js +144 -0
- package/dist/src/utils/skillUtils.js.map +1 -0
- package/dist/src/utils/skillUtils.test.d.ts +6 -0
- package/dist/src/utils/skillUtils.test.js +57 -0
- package/dist/src/utils/skillUtils.test.js.map +1 -0
- package/dist/src/utils/terminalTheme.d.ts +15 -0
- package/dist/src/utils/terminalTheme.js +50 -0
- package/dist/src/utils/terminalTheme.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +2 -1
- package/dist/src/utils/userStartupWarnings.js +17 -7
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +37 -6
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- package/dist/src/utils/windowTitle.d.ts +13 -4
- package/dist/src/utils/windowTitle.js +65 -7
- package/dist/src/utils/windowTitle.js.map +1 -1
- package/dist/src/utils/windowTitle.test.js +183 -40
- package/dist/src/utils/windowTitle.test.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +1 -1
- package/dist/src/validateNonInterActiveAuth.js +1 -2
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +3 -4
- package/dist/src/zed-integration/fileSystemService.js +5 -10
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.test.js +11 -21
- package/dist/src/zed-integration/fileSystemService.test.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +5 -5
- package/dist/src/zed-integration/zedIntegration.js +54 -24
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.test.js +29 -18
- package/dist/src/zed-integration/zedIntegration.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
- package/dist/src/ui/hooks/useBracketedPaste.js +0 -31
- package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
- package/dist/src/ui/utils/bracketedPaste.d.ts +0 -7
- package/dist/src/ui/utils/bracketedPaste.js +0 -15
- package/dist/src/ui/utils/bracketedPaste.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -17
- package/dist/src/ui/utils/kittyProtocolDetector.js +0 -111
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.test.js +0 -113
- package/dist/src/ui/utils/kittyProtocolDetector.test.js.map +0 -1
- 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/zed-integration/acp.d.ts +0 -41
- package/dist/src/zed-integration/acp.js +0 -72
- package/dist/src/zed-integration/acp.js.map +0 -1
- package/dist/src/zed-integration/acp.test.js +0 -222
- package/dist/src/zed-integration/acp.test.js.map +0 -1
- package/dist/src/zed-integration/connection.d.ts +0 -28
- package/dist/src/zed-integration/connection.js +0 -163
- package/dist/src/zed-integration/connection.js.map +0 -1
- package/dist/src/zed-integration/connection.test.js +0 -175
- package/dist/src/zed-integration/connection.test.js.map +0 -1
- package/dist/src/zed-integration/schema.d.ts +0 -11792
- package/dist/src/zed-integration/schema.js +0 -311
- package/dist/src/zed-integration/schema.js.map +0 -1
- /package/dist/src/{ui/utils/kittyProtocolDetector.test.d.ts → commands/hooks/migrate.test.d.ts} +0 -0
- /package/dist/src/{utils/version.test.d.ts → config/extension-manager-scope.test.d.ts} +0 -0
- /package/dist/src/{zed-integration/acp.test.d.ts → config/extension-manager-skills.test.d.ts} +0 -0
- /package/dist/src/{zed-integration/connection.test.d.ts → config/extensions/extensionUpdates.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';
|
|
@@ -96,6 +105,7 @@ vi.mock('./contexts/SessionContext.js');
|
|
|
96
105
|
vi.mock('./components/shared/text-buffer.js');
|
|
97
106
|
vi.mock('./hooks/useLogger.js');
|
|
98
107
|
vi.mock('./hooks/useInputHistoryStore.js');
|
|
108
|
+
vi.mock('./hooks/useHookDisplayState.js');
|
|
99
109
|
// Mock external utilities
|
|
100
110
|
vi.mock('../utils/events.js');
|
|
101
111
|
vi.mock('../utils/handleAutoUpdate.js');
|
|
@@ -122,6 +132,7 @@ import { useTextBuffer } from './components/shared/text-buffer.js';
|
|
|
122
132
|
import { useLogger } from './hooks/useLogger.js';
|
|
123
133
|
import { useLoadingIndicator } from './hooks/useLoadingIndicator.js';
|
|
124
134
|
import { useInputHistoryStore } from './hooks/useInputHistoryStore.js';
|
|
135
|
+
import { useHookDisplayState } from './hooks/useHookDisplayState.js';
|
|
125
136
|
import { useKeypress } from './hooks/useKeypress.js';
|
|
126
137
|
import { measureElement } from 'ink';
|
|
127
138
|
import { useTerminalSize } from './hooks/useTerminalSize.js';
|
|
@@ -160,18 +171,13 @@ describe('AppContainer State Management', () => {
|
|
|
160
171
|
const mockedUseLoadingIndicator = useLoadingIndicator;
|
|
161
172
|
const mockedUseKeypress = useKeypress;
|
|
162
173
|
const mockedUseInputHistoryStore = useInputHistoryStore;
|
|
174
|
+
const mockedUseHookDisplayState = useHookDisplayState;
|
|
163
175
|
beforeEach(() => {
|
|
164
176
|
vi.clearAllMocks();
|
|
177
|
+
mockIdeClient.getInstance.mockReturnValue(new Promise(() => { }));
|
|
165
178
|
// Initialize mock stdout for terminal title tests
|
|
166
179
|
mocks.mockStdout.write.mockClear();
|
|
167
|
-
// Mock computeWindowTitle function to centralize title logic testing
|
|
168
|
-
vi.mock('../utils/windowTitle.js', async () => ({
|
|
169
|
-
computeWindowTitle: vi.fn((folderName) =>
|
|
170
|
-
// Default behavior: return "Gemini - {folderName}" unless CLI_TITLE is set
|
|
171
|
-
process.env['CLI_TITLE'] || `Gemini - ${folderName}`),
|
|
172
|
-
}));
|
|
173
180
|
capturedUIState = null;
|
|
174
|
-
capturedUIActions = null;
|
|
175
181
|
// **Provide a default return value for EVERY mocked hook.**
|
|
176
182
|
mockedUseQuotaAndFallback.mockReturnValue({
|
|
177
183
|
proQuotaRequest: null,
|
|
@@ -270,7 +276,7 @@ describe('AppContainer State Management', () => {
|
|
|
270
276
|
// Add other properties if AppContainer uses them
|
|
271
277
|
});
|
|
272
278
|
mockedUseLogger.mockReturnValue({
|
|
273
|
-
getPreviousUserMessages: vi.fn().
|
|
279
|
+
getPreviousUserMessages: vi.fn().mockResolvedValue([]),
|
|
274
280
|
});
|
|
275
281
|
mockedUseInputHistoryStore.mockReturnValue({
|
|
276
282
|
inputHistory: [],
|
|
@@ -281,10 +287,13 @@ describe('AppContainer State Management', () => {
|
|
|
281
287
|
elapsedTime: '0.0s',
|
|
282
288
|
currentLoadingPhrase: '',
|
|
283
289
|
});
|
|
290
|
+
mockedUseHookDisplayState.mockReturnValue([]);
|
|
284
291
|
// Mock Config
|
|
285
292
|
mockConfig = makeFakeConfig();
|
|
286
293
|
// Mock config's getTargetDir to return consistent workspace directory
|
|
287
294
|
vi.spyOn(mockConfig, 'getTargetDir').mockReturnValue('/test/workspace');
|
|
295
|
+
vi.spyOn(mockConfig, 'initialize').mockResolvedValue(undefined);
|
|
296
|
+
vi.spyOn(mockConfig, 'getDebugMode').mockReturnValue(false);
|
|
288
297
|
mockExtensionManager = vi.mockObject({
|
|
289
298
|
getExtensions: vi.fn().mockReturnValue([]),
|
|
290
299
|
setRequestConsent: vi.fn(),
|
|
@@ -317,16 +326,25 @@ describe('AppContainer State Management', () => {
|
|
|
317
326
|
});
|
|
318
327
|
afterEach(() => {
|
|
319
328
|
cleanup();
|
|
329
|
+
vi.restoreAllMocks();
|
|
320
330
|
});
|
|
321
331
|
describe('Basic Rendering', () => {
|
|
322
332
|
it('renders without crashing with minimal props', async () => {
|
|
323
|
-
|
|
333
|
+
let unmount;
|
|
334
|
+
await act(async () => {
|
|
335
|
+
const result = renderAppContainer();
|
|
336
|
+
unmount = result.unmount;
|
|
337
|
+
});
|
|
324
338
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
325
339
|
unmount();
|
|
326
340
|
});
|
|
327
341
|
it('renders with startup warnings', async () => {
|
|
328
342
|
const startupWarnings = ['Warning 1', 'Warning 2'];
|
|
329
|
-
|
|
343
|
+
let unmount;
|
|
344
|
+
await act(async () => {
|
|
345
|
+
const result = renderAppContainer({ startupWarnings });
|
|
346
|
+
unmount = result.unmount;
|
|
347
|
+
});
|
|
330
348
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
331
349
|
unmount();
|
|
332
350
|
});
|
|
@@ -337,8 +355,12 @@ describe('AppContainer State Management', () => {
|
|
|
337
355
|
...mockInitResult,
|
|
338
356
|
themeError: 'Failed to load theme',
|
|
339
357
|
};
|
|
340
|
-
|
|
341
|
-
|
|
358
|
+
let unmount;
|
|
359
|
+
await act(async () => {
|
|
360
|
+
const result = renderAppContainer({
|
|
361
|
+
initResult: initResultWithError,
|
|
362
|
+
});
|
|
363
|
+
unmount = result.unmount;
|
|
342
364
|
});
|
|
343
365
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
344
366
|
unmount();
|
|
@@ -353,23 +375,39 @@ describe('AppContainer State Management', () => {
|
|
|
353
375
|
});
|
|
354
376
|
describe('Context Providers', () => {
|
|
355
377
|
it('provides AppContext with correct values', async () => {
|
|
356
|
-
|
|
378
|
+
let unmount;
|
|
379
|
+
await act(async () => {
|
|
380
|
+
const result = renderAppContainer({ version: '2.0.0' });
|
|
381
|
+
unmount = result.unmount;
|
|
382
|
+
});
|
|
357
383
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
358
384
|
// Should render and unmount cleanly
|
|
359
385
|
expect(() => unmount()).not.toThrow();
|
|
360
386
|
});
|
|
361
387
|
it('provides UIStateContext with state management', async () => {
|
|
362
|
-
|
|
388
|
+
let unmount;
|
|
389
|
+
await act(async () => {
|
|
390
|
+
const result = renderAppContainer();
|
|
391
|
+
unmount = result.unmount;
|
|
392
|
+
});
|
|
363
393
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
364
394
|
unmount();
|
|
365
395
|
});
|
|
366
396
|
it('provides UIActionsContext with action handlers', async () => {
|
|
367
|
-
|
|
397
|
+
let unmount;
|
|
398
|
+
await act(async () => {
|
|
399
|
+
const result = renderAppContainer();
|
|
400
|
+
unmount = result.unmount;
|
|
401
|
+
});
|
|
368
402
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
369
403
|
unmount();
|
|
370
404
|
});
|
|
371
405
|
it('provides ConfigContext with config object', async () => {
|
|
372
|
-
|
|
406
|
+
let unmount;
|
|
407
|
+
await act(async () => {
|
|
408
|
+
const result = renderAppContainer();
|
|
409
|
+
unmount = result.unmount;
|
|
410
|
+
});
|
|
373
411
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
374
412
|
unmount();
|
|
375
413
|
});
|
|
@@ -384,7 +422,11 @@ describe('AppContainer State Management', () => {
|
|
|
384
422
|
showMemoryUsage: false,
|
|
385
423
|
},
|
|
386
424
|
};
|
|
387
|
-
|
|
425
|
+
let unmount;
|
|
426
|
+
await act(async () => {
|
|
427
|
+
const result = renderAppContainer({ settings: settingsAllHidden });
|
|
428
|
+
unmount = result.unmount;
|
|
429
|
+
});
|
|
388
430
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
389
431
|
unmount();
|
|
390
432
|
});
|
|
@@ -397,14 +439,22 @@ describe('AppContainer State Management', () => {
|
|
|
397
439
|
showMemoryUsage: true,
|
|
398
440
|
},
|
|
399
441
|
};
|
|
400
|
-
|
|
442
|
+
let unmount;
|
|
443
|
+
await act(async () => {
|
|
444
|
+
const result = renderAppContainer({ settings: settingsWithMemory });
|
|
445
|
+
unmount = result.unmount;
|
|
446
|
+
});
|
|
401
447
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
402
448
|
unmount();
|
|
403
449
|
});
|
|
404
450
|
});
|
|
405
451
|
describe('Version Handling', () => {
|
|
406
452
|
it.each(['1.0.0', '2.1.3-beta', '3.0.0-nightly'])('handles version format: %s', async (version) => {
|
|
407
|
-
|
|
453
|
+
let unmount;
|
|
454
|
+
await act(async () => {
|
|
455
|
+
const result = renderAppContainer({ version });
|
|
456
|
+
unmount = result.unmount;
|
|
457
|
+
});
|
|
408
458
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
409
459
|
unmount();
|
|
410
460
|
});
|
|
@@ -423,7 +473,11 @@ describe('AppContainer State Management', () => {
|
|
|
423
473
|
const undefinedSettings = {
|
|
424
474
|
merged: {},
|
|
425
475
|
};
|
|
426
|
-
|
|
476
|
+
let unmount;
|
|
477
|
+
await act(async () => {
|
|
478
|
+
const result = renderAppContainer({ settings: undefinedSettings });
|
|
479
|
+
unmount = result.unmount;
|
|
480
|
+
});
|
|
427
481
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
428
482
|
unmount();
|
|
429
483
|
});
|
|
@@ -719,7 +773,11 @@ describe('AppContainer State Management', () => {
|
|
|
719
773
|
describe('Quota and Fallback Integration', () => {
|
|
720
774
|
it('passes a null proQuotaRequest to UIStateContext by default', async () => {
|
|
721
775
|
// The default mock from beforeEach already sets proQuotaRequest to null
|
|
722
|
-
|
|
776
|
+
let unmount;
|
|
777
|
+
await act(async () => {
|
|
778
|
+
const result = renderAppContainer();
|
|
779
|
+
unmount = result.unmount;
|
|
780
|
+
});
|
|
723
781
|
await waitFor(() => {
|
|
724
782
|
// Assert that the context value is as expected
|
|
725
783
|
expect(capturedUIState.proQuotaRequest).toBeNull();
|
|
@@ -738,7 +796,11 @@ describe('AppContainer State Management', () => {
|
|
|
738
796
|
handleProQuotaChoice: vi.fn(),
|
|
739
797
|
});
|
|
740
798
|
// Act: Render the container
|
|
741
|
-
|
|
799
|
+
let unmount;
|
|
800
|
+
await act(async () => {
|
|
801
|
+
const result = renderAppContainer();
|
|
802
|
+
unmount = result.unmount;
|
|
803
|
+
});
|
|
742
804
|
await waitFor(() => {
|
|
743
805
|
// Assert: The mock request is correctly passed through the context
|
|
744
806
|
expect(capturedUIState.proQuotaRequest).toEqual(mockRequest);
|
|
@@ -753,7 +815,11 @@ describe('AppContainer State Management', () => {
|
|
|
753
815
|
handleProQuotaChoice: mockHandler,
|
|
754
816
|
});
|
|
755
817
|
// Act: Render the container
|
|
756
|
-
|
|
818
|
+
let unmount;
|
|
819
|
+
await act(async () => {
|
|
820
|
+
const result = renderAppContainer();
|
|
821
|
+
unmount = result.unmount;
|
|
822
|
+
});
|
|
757
823
|
await waitFor(() => {
|
|
758
824
|
// Assert: The action in the context is the mock handler we provided
|
|
759
825
|
expect(capturedUIActions.handleProQuotaChoice).toBe(mockHandler);
|
|
@@ -776,7 +842,7 @@ describe('AppContainer State Management', () => {
|
|
|
776
842
|
const { stdout } = useStdout();
|
|
777
843
|
expect(stdout).toBe(mocks.mockStdout);
|
|
778
844
|
});
|
|
779
|
-
it('should
|
|
845
|
+
it('should update terminal title with Working… when showStatusInTitle is false', () => {
|
|
780
846
|
// Arrange: Set up mock settings with showStatusInTitle disabled
|
|
781
847
|
const mockSettingsWithShowStatusFalse = {
|
|
782
848
|
...mockSettings,
|
|
@@ -789,13 +855,55 @@ describe('AppContainer State Management', () => {
|
|
|
789
855
|
},
|
|
790
856
|
},
|
|
791
857
|
};
|
|
858
|
+
// Mock the streaming state as Active
|
|
859
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
860
|
+
streamingState: 'responding',
|
|
861
|
+
submitQuery: vi.fn(),
|
|
862
|
+
initError: null,
|
|
863
|
+
pendingHistoryItems: [],
|
|
864
|
+
thought: { subject: 'Some thought' },
|
|
865
|
+
cancelOngoingRequest: vi.fn(),
|
|
866
|
+
});
|
|
792
867
|
// Act: Render the container
|
|
793
868
|
const { unmount } = renderAppContainer({
|
|
794
869
|
settings: mockSettingsWithShowStatusFalse,
|
|
795
870
|
});
|
|
796
|
-
// Assert: Check that
|
|
797
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
798
|
-
expect(titleWrites).toHaveLength(
|
|
871
|
+
// Assert: Check that title was updated with "Working…"
|
|
872
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
873
|
+
expect(titleWrites).toHaveLength(1);
|
|
874
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${'✦ Working… (workspace)'.padEnd(80, ' ')}\x07`);
|
|
875
|
+
unmount();
|
|
876
|
+
});
|
|
877
|
+
it('should use legacy terminal title when dynamicWindowTitle is false', () => {
|
|
878
|
+
// Arrange: Set up mock settings with dynamicWindowTitle disabled
|
|
879
|
+
const mockSettingsWithDynamicTitleFalse = {
|
|
880
|
+
...mockSettings,
|
|
881
|
+
merged: {
|
|
882
|
+
...mockSettings.merged,
|
|
883
|
+
ui: {
|
|
884
|
+
...mockSettings.merged.ui,
|
|
885
|
+
dynamicWindowTitle: false,
|
|
886
|
+
hideWindowTitle: false,
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
};
|
|
890
|
+
// Mock the streaming state
|
|
891
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
892
|
+
streamingState: 'responding',
|
|
893
|
+
submitQuery: vi.fn(),
|
|
894
|
+
initError: null,
|
|
895
|
+
pendingHistoryItems: [],
|
|
896
|
+
thought: { subject: 'Some thought' },
|
|
897
|
+
cancelOngoingRequest: vi.fn(),
|
|
898
|
+
});
|
|
899
|
+
// Act: Render the container
|
|
900
|
+
const { unmount } = renderAppContainer({
|
|
901
|
+
settings: mockSettingsWithDynamicTitleFalse,
|
|
902
|
+
});
|
|
903
|
+
// Assert: Check that legacy title was used
|
|
904
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
905
|
+
expect(titleWrites).toHaveLength(1);
|
|
906
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${'Cell CLI (workspace)'.padEnd(80, ' ')}\x07`);
|
|
799
907
|
unmount();
|
|
800
908
|
});
|
|
801
909
|
it('should not update terminal title when hideWindowTitle is true', () => {
|
|
@@ -816,7 +924,7 @@ describe('AppContainer State Management', () => {
|
|
|
816
924
|
settings: mockSettingsWithHideTitleTrue,
|
|
817
925
|
});
|
|
818
926
|
// Assert: Check that no title-related writes occurred
|
|
819
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
927
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
820
928
|
expect(titleWrites).toHaveLength(0);
|
|
821
929
|
unmount();
|
|
822
930
|
});
|
|
@@ -847,10 +955,10 @@ describe('AppContainer State Management', () => {
|
|
|
847
955
|
const { unmount } = renderAppContainer({
|
|
848
956
|
settings: mockSettingsWithTitleEnabled,
|
|
849
957
|
});
|
|
850
|
-
// Assert: Check that title was updated with thought subject
|
|
851
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
958
|
+
// Assert: Check that title was updated with thought subject and suffix
|
|
959
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
852
960
|
expect(titleWrites).toHaveLength(1);
|
|
853
|
-
expect(titleWrites[0][0]).toBe(`\x1b]
|
|
961
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${`✦ ${thoughtSubject} (workspace)`.padEnd(80, ' ')}\x07`);
|
|
854
962
|
unmount();
|
|
855
963
|
});
|
|
856
964
|
it('should update terminal title with default text when in Idle state and no thought subject', () => {
|
|
@@ -880,12 +988,12 @@ describe('AppContainer State Management', () => {
|
|
|
880
988
|
settings: mockSettingsWithTitleEnabled,
|
|
881
989
|
});
|
|
882
990
|
// Assert: Check that title was updated with default Idle text
|
|
883
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
991
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
884
992
|
expect(titleWrites).toHaveLength(1);
|
|
885
|
-
expect(titleWrites[0][0]).toBe(`\x1b]
|
|
993
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${'◇ Ready (workspace)'.padEnd(80, ' ')}\x07`);
|
|
886
994
|
unmount();
|
|
887
995
|
});
|
|
888
|
-
it('should update terminal title when in WaitingForConfirmation state with thought subject', () => {
|
|
996
|
+
it('should update terminal title when in WaitingForConfirmation state with thought subject', async () => {
|
|
889
997
|
// Arrange: Set up mock settings with showStatusInTitle enabled
|
|
890
998
|
const mockSettingsWithTitleEnabled = {
|
|
891
999
|
...mockSettings,
|
|
@@ -901,7 +1009,7 @@ describe('AppContainer State Management', () => {
|
|
|
901
1009
|
// Mock the streaming state and thought
|
|
902
1010
|
const thoughtSubject = 'Confirm tool execution';
|
|
903
1011
|
mockedUseGeminiStream.mockReturnValue({
|
|
904
|
-
streamingState: '
|
|
1012
|
+
streamingState: 'waiting_for_confirmation',
|
|
905
1013
|
submitQuery: vi.fn(),
|
|
906
1014
|
initError: null,
|
|
907
1015
|
pendingHistoryItems: [],
|
|
@@ -909,15 +1017,146 @@ describe('AppContainer State Management', () => {
|
|
|
909
1017
|
cancelOngoingRequest: vi.fn(),
|
|
910
1018
|
});
|
|
911
1019
|
// Act: Render the container
|
|
912
|
-
|
|
913
|
-
|
|
1020
|
+
let unmount;
|
|
1021
|
+
await act(async () => {
|
|
1022
|
+
const result = renderAppContainer({
|
|
1023
|
+
settings: mockSettingsWithTitleEnabled,
|
|
1024
|
+
});
|
|
1025
|
+
unmount = result.unmount;
|
|
914
1026
|
});
|
|
915
1027
|
// Assert: Check that title was updated with confirmation text
|
|
916
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
1028
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
917
1029
|
expect(titleWrites).toHaveLength(1);
|
|
918
|
-
expect(titleWrites[0][0]).toBe(`\x1b]
|
|
1030
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${'✋ Action Required (workspace)'.padEnd(80, ' ')}\x07`);
|
|
919
1031
|
unmount();
|
|
920
1032
|
});
|
|
1033
|
+
describe('Shell Focus Action Required', () => {
|
|
1034
|
+
beforeEach(() => {
|
|
1035
|
+
vi.useFakeTimers();
|
|
1036
|
+
});
|
|
1037
|
+
afterEach(() => {
|
|
1038
|
+
vi.useRealTimers();
|
|
1039
|
+
});
|
|
1040
|
+
it('should show Action Required in title after a delay when shell is awaiting focus', async () => {
|
|
1041
|
+
const startTime = 1000000;
|
|
1042
|
+
vi.setSystemTime(startTime);
|
|
1043
|
+
// Arrange: Set up mock settings with showStatusInTitle enabled
|
|
1044
|
+
const mockSettingsWithTitleEnabled = {
|
|
1045
|
+
...mockSettings,
|
|
1046
|
+
merged: {
|
|
1047
|
+
...mockSettings.merged,
|
|
1048
|
+
ui: {
|
|
1049
|
+
...mockSettings.merged.ui,
|
|
1050
|
+
showStatusInTitle: true,
|
|
1051
|
+
hideWindowTitle: false,
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
};
|
|
1055
|
+
// Mock an active shell pty but not focused
|
|
1056
|
+
mockedUseGeminiStream.mockReturnValue({
|
|
1057
|
+
streamingState: 'responding',
|
|
1058
|
+
submitQuery: vi.fn(),
|
|
1059
|
+
initError: null,
|
|
1060
|
+
pendingHistoryItems: [],
|
|
1061
|
+
thought: { subject: 'Executing shell command' },
|
|
1062
|
+
cancelOngoingRequest: vi.fn(),
|
|
1063
|
+
activePtyId: 'pty-1',
|
|
1064
|
+
lastOutputTime: 0,
|
|
1065
|
+
});
|
|
1066
|
+
vi.spyOn(mockConfig, 'isInteractive').mockReturnValue(true);
|
|
1067
|
+
vi.spyOn(mockConfig, 'isInteractiveShellEnabled').mockReturnValue(true);
|
|
1068
|
+
// Act: Render the container (embeddedShellFocused is false by default in state)
|
|
1069
|
+
const { unmount } = renderAppContainer({
|
|
1070
|
+
settings: mockSettingsWithTitleEnabled,
|
|
1071
|
+
});
|
|
1072
|
+
// Initially it should show the working status
|
|
1073
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
1074
|
+
expect(titleWrites[titleWrites.length - 1][0]).toContain('✦ Executing shell command');
|
|
1075
|
+
// Fast-forward time by 40 seconds
|
|
1076
|
+
await act(async () => {
|
|
1077
|
+
await vi.advanceTimersByTimeAsync(40000);
|
|
1078
|
+
});
|
|
1079
|
+
// Now it should show Action Required
|
|
1080
|
+
const titleWritesDelayed = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
1081
|
+
const lastTitle = titleWritesDelayed[titleWritesDelayed.length - 1][0];
|
|
1082
|
+
expect(lastTitle).toContain('✋ Action Required');
|
|
1083
|
+
unmount();
|
|
1084
|
+
});
|
|
1085
|
+
it('should NOT show Action Required in title if shell is streaming output', async () => {
|
|
1086
|
+
const startTime = 1000000;
|
|
1087
|
+
vi.setSystemTime(startTime);
|
|
1088
|
+
// Arrange: Set up mock settings with showStatusInTitle enabled
|
|
1089
|
+
const mockSettingsWithTitleEnabled = {
|
|
1090
|
+
...mockSettings,
|
|
1091
|
+
merged: {
|
|
1092
|
+
...mockSettings.merged,
|
|
1093
|
+
ui: {
|
|
1094
|
+
...mockSettings.merged.ui,
|
|
1095
|
+
showStatusInTitle: true,
|
|
1096
|
+
hideWindowTitle: false,
|
|
1097
|
+
},
|
|
1098
|
+
},
|
|
1099
|
+
};
|
|
1100
|
+
// Mock an active shell pty but not focused
|
|
1101
|
+
let lastOutputTime = 1000;
|
|
1102
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
1103
|
+
streamingState: 'responding',
|
|
1104
|
+
submitQuery: vi.fn(),
|
|
1105
|
+
initError: null,
|
|
1106
|
+
pendingHistoryItems: [],
|
|
1107
|
+
thought: { subject: 'Executing shell command' },
|
|
1108
|
+
cancelOngoingRequest: vi.fn(),
|
|
1109
|
+
activePtyId: 'pty-1',
|
|
1110
|
+
lastOutputTime,
|
|
1111
|
+
}));
|
|
1112
|
+
vi.spyOn(mockConfig, 'isInteractive').mockReturnValue(true);
|
|
1113
|
+
vi.spyOn(mockConfig, 'isInteractiveShellEnabled').mockReturnValue(true);
|
|
1114
|
+
// Act: Render the container
|
|
1115
|
+
const { unmount, rerender } = renderAppContainer({
|
|
1116
|
+
settings: mockSettingsWithTitleEnabled,
|
|
1117
|
+
});
|
|
1118
|
+
// Fast-forward time by 20 seconds
|
|
1119
|
+
await act(async () => {
|
|
1120
|
+
await vi.advanceTimersByTimeAsync(20000);
|
|
1121
|
+
});
|
|
1122
|
+
// Update lastOutputTime to simulate new output
|
|
1123
|
+
lastOutputTime = 21000;
|
|
1124
|
+
mockedUseGeminiStream.mockImplementation(() => ({
|
|
1125
|
+
streamingState: 'responding',
|
|
1126
|
+
submitQuery: vi.fn(),
|
|
1127
|
+
initError: null,
|
|
1128
|
+
pendingHistoryItems: [],
|
|
1129
|
+
thought: { subject: 'Executing shell command' },
|
|
1130
|
+
cancelOngoingRequest: vi.fn(),
|
|
1131
|
+
activePtyId: 'pty-1',
|
|
1132
|
+
lastOutputTime,
|
|
1133
|
+
}));
|
|
1134
|
+
// Rerender to propagate the new lastOutputTime
|
|
1135
|
+
await act(async () => {
|
|
1136
|
+
rerender(getAppContainer({ settings: mockSettingsWithTitleEnabled }));
|
|
1137
|
+
});
|
|
1138
|
+
// Fast-forward time by another 20 seconds
|
|
1139
|
+
// Total time elapsed: 40s.
|
|
1140
|
+
// Time since last output: 20s.
|
|
1141
|
+
// It should NOT show Action Required yet.
|
|
1142
|
+
await act(async () => {
|
|
1143
|
+
await vi.advanceTimersByTimeAsync(20000);
|
|
1144
|
+
});
|
|
1145
|
+
const titleWritesAfterOutput = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
1146
|
+
const lastTitle = titleWritesAfterOutput[titleWritesAfterOutput.length - 1][0];
|
|
1147
|
+
expect(lastTitle).not.toContain('✋ Action Required');
|
|
1148
|
+
expect(lastTitle).toContain('✦ Executing shell command');
|
|
1149
|
+
// Fast-forward another 40 seconds (Total 60s since last output)
|
|
1150
|
+
await act(async () => {
|
|
1151
|
+
await vi.advanceTimersByTimeAsync(40000);
|
|
1152
|
+
});
|
|
1153
|
+
// Now it SHOULD show Action Required
|
|
1154
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
1155
|
+
const lastTitleFinal = titleWrites[titleWrites.length - 1][0];
|
|
1156
|
+
expect(lastTitleFinal).toContain('✋ Action Required');
|
|
1157
|
+
unmount();
|
|
1158
|
+
});
|
|
1159
|
+
});
|
|
921
1160
|
it('should pad title to exactly 80 characters', () => {
|
|
922
1161
|
// Arrange: Set up mock settings with showStatusInTitle enabled
|
|
923
1162
|
const mockSettingsWithTitleEnabled = {
|
|
@@ -946,14 +1185,12 @@ describe('AppContainer State Management', () => {
|
|
|
946
1185
|
settings: mockSettingsWithTitleEnabled,
|
|
947
1186
|
});
|
|
948
1187
|
// Assert: Check that title is padded to exactly 80 characters
|
|
949
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
1188
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
950
1189
|
expect(titleWrites).toHaveLength(1);
|
|
951
1190
|
const calledWith = titleWrites[0][0];
|
|
952
|
-
const expectedTitle = shortTitle
|
|
953
|
-
|
|
954
|
-
expect(calledWith).
|
|
955
|
-
expect(calledWith).toContain('\x07');
|
|
956
|
-
expect(calledWith).toBe('\x1b]2;' + expectedTitle + '\x07');
|
|
1191
|
+
const expectedTitle = `✦ ${shortTitle} (workspace)`.padEnd(80, ' ');
|
|
1192
|
+
const expectedEscapeSequence = `\x1b]0;${expectedTitle}\x07`;
|
|
1193
|
+
expect(calledWith).toBe(expectedEscapeSequence);
|
|
957
1194
|
unmount();
|
|
958
1195
|
});
|
|
959
1196
|
it('should use correct ANSI escape code format', () => {
|
|
@@ -984,30 +1221,30 @@ describe('AppContainer State Management', () => {
|
|
|
984
1221
|
settings: mockSettingsWithTitleEnabled,
|
|
985
1222
|
});
|
|
986
1223
|
// Assert: Check that the correct ANSI escape sequence is used
|
|
987
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
1224
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
988
1225
|
expect(titleWrites).toHaveLength(1);
|
|
989
|
-
const expectedEscapeSequence = `\x1b]
|
|
1226
|
+
const expectedEscapeSequence = `\x1b]0;${`✦ ${title} (workspace)`.padEnd(80, ' ')}\x07`;
|
|
990
1227
|
expect(titleWrites[0][0]).toBe(expectedEscapeSequence);
|
|
991
1228
|
unmount();
|
|
992
1229
|
});
|
|
993
1230
|
it('should use CLI_TITLE environment variable when set', () => {
|
|
994
|
-
// Arrange: Set up mock settings with showStatusInTitle
|
|
995
|
-
const
|
|
1231
|
+
// Arrange: Set up mock settings with showStatusInTitle disabled (so it shows suffix)
|
|
1232
|
+
const mockSettingsWithTitleDisabled = {
|
|
996
1233
|
...mockSettings,
|
|
997
1234
|
merged: {
|
|
998
1235
|
...mockSettings.merged,
|
|
999
1236
|
ui: {
|
|
1000
1237
|
...mockSettings.merged.ui,
|
|
1001
|
-
showStatusInTitle:
|
|
1238
|
+
showStatusInTitle: false,
|
|
1002
1239
|
hideWindowTitle: false,
|
|
1003
1240
|
},
|
|
1004
1241
|
},
|
|
1005
1242
|
};
|
|
1006
1243
|
// Mock CLI_TITLE environment variable
|
|
1007
1244
|
vi.stubEnv('CLI_TITLE', 'Custom Gemini Title');
|
|
1008
|
-
// Mock the streaming state
|
|
1245
|
+
// Mock the streaming state
|
|
1009
1246
|
mockedUseGeminiStream.mockReturnValue({
|
|
1010
|
-
streamingState: '
|
|
1247
|
+
streamingState: 'responding',
|
|
1011
1248
|
submitQuery: vi.fn(),
|
|
1012
1249
|
initError: null,
|
|
1013
1250
|
pendingHistoryItems: [],
|
|
@@ -1016,12 +1253,12 @@ describe('AppContainer State Management', () => {
|
|
|
1016
1253
|
});
|
|
1017
1254
|
// Act: Render the container
|
|
1018
1255
|
const { unmount } = renderAppContainer({
|
|
1019
|
-
settings:
|
|
1256
|
+
settings: mockSettingsWithTitleDisabled,
|
|
1020
1257
|
});
|
|
1021
1258
|
// Assert: Check that title was updated with CLI_TITLE value
|
|
1022
|
-
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]
|
|
1259
|
+
const titleWrites = mocks.mockStdout.write.mock.calls.filter((call) => call[0].includes('\x1b]0;'));
|
|
1023
1260
|
expect(titleWrites).toHaveLength(1);
|
|
1024
|
-
expect(titleWrites[0][0]).toBe(`\x1b]
|
|
1261
|
+
expect(titleWrites[0][0]).toBe(`\x1b]0;${'✦ Working… (Custom Gemini Title)'.padEnd(80, ' ')}\x07`);
|
|
1025
1262
|
unmount();
|
|
1026
1263
|
});
|
|
1027
1264
|
});
|
|
@@ -1031,6 +1268,7 @@ describe('AppContainer State Management', () => {
|
|
|
1031
1268
|
});
|
|
1032
1269
|
afterEach(() => {
|
|
1033
1270
|
vi.useRealTimers();
|
|
1271
|
+
vi.restoreAllMocks();
|
|
1034
1272
|
});
|
|
1035
1273
|
it('should set and clear the queue error message after a timeout', async () => {
|
|
1036
1274
|
const { rerender, unmount } = renderAppContainer();
|
|
@@ -1099,7 +1337,11 @@ describe('AppContainer State Management', () => {
|
|
|
1099
1337
|
cancelOngoingRequest: vi.fn(),
|
|
1100
1338
|
activePtyId: 'some-id',
|
|
1101
1339
|
});
|
|
1102
|
-
|
|
1340
|
+
let unmount;
|
|
1341
|
+
await act(async () => {
|
|
1342
|
+
const result = renderAppContainer();
|
|
1343
|
+
unmount = result.unmount;
|
|
1344
|
+
});
|
|
1103
1345
|
await waitFor(() => expect(resizePtySpy).toHaveBeenCalled());
|
|
1104
1346
|
const lastCall = resizePtySpy.mock.calls[resizePtySpy.mock.calls.length - 1];
|
|
1105
1347
|
// Check the height argument specifically
|
|
@@ -1170,6 +1412,7 @@ describe('AppContainer State Management', () => {
|
|
|
1170
1412
|
});
|
|
1171
1413
|
afterEach(() => {
|
|
1172
1414
|
vi.useRealTimers();
|
|
1415
|
+
vi.restoreAllMocks();
|
|
1173
1416
|
});
|
|
1174
1417
|
describe('CTRL+C', () => {
|
|
1175
1418
|
it('should cancel ongoing request on first press', async () => {
|
|
@@ -1270,6 +1513,7 @@ describe('AppContainer State Management', () => {
|
|
|
1270
1513
|
});
|
|
1271
1514
|
afterEach(() => {
|
|
1272
1515
|
vi.useRealTimers();
|
|
1516
|
+
vi.restoreAllMocks();
|
|
1273
1517
|
});
|
|
1274
1518
|
describe.each([
|
|
1275
1519
|
{
|
|
@@ -1383,7 +1627,11 @@ describe('AppContainer State Management', () => {
|
|
|
1383
1627
|
openModelDialog: vi.fn(),
|
|
1384
1628
|
closeModelDialog: vi.fn(),
|
|
1385
1629
|
});
|
|
1386
|
-
|
|
1630
|
+
let unmount;
|
|
1631
|
+
await act(async () => {
|
|
1632
|
+
const result = renderAppContainer();
|
|
1633
|
+
unmount = result.unmount;
|
|
1634
|
+
});
|
|
1387
1635
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1388
1636
|
expect(capturedUIState.isModelDialogOpen).toBe(true);
|
|
1389
1637
|
unmount();
|
|
@@ -1395,7 +1643,11 @@ describe('AppContainer State Management', () => {
|
|
|
1395
1643
|
openModelDialog: vi.fn(),
|
|
1396
1644
|
closeModelDialog: mockCloseModelDialog,
|
|
1397
1645
|
});
|
|
1398
|
-
|
|
1646
|
+
let unmount;
|
|
1647
|
+
await act(async () => {
|
|
1648
|
+
const result = renderAppContainer();
|
|
1649
|
+
unmount = result.unmount;
|
|
1650
|
+
});
|
|
1399
1651
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1400
1652
|
// Verify that the actions are correctly passed through context
|
|
1401
1653
|
act(() => {
|
|
@@ -1407,20 +1659,32 @@ describe('AppContainer State Management', () => {
|
|
|
1407
1659
|
});
|
|
1408
1660
|
describe('CoreEvents Integration', () => {
|
|
1409
1661
|
it('subscribes to UserFeedback and drains backlog on mount', async () => {
|
|
1410
|
-
|
|
1662
|
+
let unmount;
|
|
1663
|
+
await act(async () => {
|
|
1664
|
+
const result = renderAppContainer();
|
|
1665
|
+
unmount = result.unmount;
|
|
1666
|
+
});
|
|
1411
1667
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1412
1668
|
expect(mockCoreEvents.on).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
|
|
1413
1669
|
expect(mockCoreEvents.drainBacklogs).toHaveBeenCalledTimes(1);
|
|
1414
1670
|
unmount();
|
|
1415
1671
|
});
|
|
1416
1672
|
it('unsubscribes from UserFeedback on unmount', async () => {
|
|
1417
|
-
|
|
1673
|
+
let unmount;
|
|
1674
|
+
await act(async () => {
|
|
1675
|
+
const result = renderAppContainer();
|
|
1676
|
+
unmount = result.unmount;
|
|
1677
|
+
});
|
|
1418
1678
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1419
1679
|
unmount();
|
|
1420
1680
|
expect(mockCoreEvents.off).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
|
|
1421
1681
|
});
|
|
1422
1682
|
it('adds history item when UserFeedback event is received', async () => {
|
|
1423
|
-
|
|
1683
|
+
let unmount;
|
|
1684
|
+
await act(async () => {
|
|
1685
|
+
const result = renderAppContainer();
|
|
1686
|
+
unmount = result.unmount;
|
|
1687
|
+
});
|
|
1424
1688
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1425
1689
|
// Get the registered handler
|
|
1426
1690
|
const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.UserFeedback)?.[1];
|
|
@@ -1442,7 +1706,11 @@ describe('AppContainer State Management', () => {
|
|
|
1442
1706
|
it('updates currentModel when ModelChanged event is received', async () => {
|
|
1443
1707
|
// Arrange: Mock initial model
|
|
1444
1708
|
vi.spyOn(mockConfig, 'getModel').mockReturnValue('initial-model');
|
|
1445
|
-
|
|
1709
|
+
let unmount;
|
|
1710
|
+
await act(async () => {
|
|
1711
|
+
const result = renderAppContainer();
|
|
1712
|
+
unmount = result.unmount;
|
|
1713
|
+
});
|
|
1446
1714
|
await waitFor(() => {
|
|
1447
1715
|
expect(capturedUIState?.currentModel).toBe('initial-model');
|
|
1448
1716
|
});
|
|
@@ -1450,11 +1718,27 @@ describe('AppContainer State Management', () => {
|
|
|
1450
1718
|
const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.ModelChanged)?.[1];
|
|
1451
1719
|
expect(handler).toBeDefined();
|
|
1452
1720
|
// Act: Simulate ModelChanged event
|
|
1721
|
+
// Update config mock to return new model since the handler reads from config
|
|
1722
|
+
vi.spyOn(mockConfig, 'getModel').mockReturnValue('new-model');
|
|
1453
1723
|
act(() => {
|
|
1454
1724
|
handler({ model: 'new-model' });
|
|
1455
1725
|
});
|
|
1456
1726
|
// Assert: Verify model is updated
|
|
1457
|
-
|
|
1727
|
+
await waitFor(() => {
|
|
1728
|
+
expect(capturedUIState.currentModel).toBe('new-model');
|
|
1729
|
+
});
|
|
1730
|
+
unmount();
|
|
1731
|
+
});
|
|
1732
|
+
it('provides activeHooks from useHookDisplayState', async () => {
|
|
1733
|
+
const mockHooks = [{ name: 'hook1', eventName: 'event1' }];
|
|
1734
|
+
mockedUseHookDisplayState.mockReturnValue(mockHooks);
|
|
1735
|
+
let unmount;
|
|
1736
|
+
await act(async () => {
|
|
1737
|
+
const result = renderAppContainer();
|
|
1738
|
+
unmount = result.unmount;
|
|
1739
|
+
});
|
|
1740
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1741
|
+
expect(capturedUIState.activeHooks).toEqual(mockHooks);
|
|
1458
1742
|
unmount();
|
|
1459
1743
|
});
|
|
1460
1744
|
});
|
|
@@ -1475,7 +1759,11 @@ describe('AppContainer State Management', () => {
|
|
|
1475
1759
|
activePtyId: 'some-pty-id', // Make sure activePtyId is set
|
|
1476
1760
|
});
|
|
1477
1761
|
// The main assertion is that the render does not throw.
|
|
1478
|
-
|
|
1762
|
+
let unmount;
|
|
1763
|
+
await act(async () => {
|
|
1764
|
+
const result = renderAppContainer();
|
|
1765
|
+
unmount = result.unmount;
|
|
1766
|
+
});
|
|
1479
1767
|
await waitFor(() => expect(resizePtySpy).toHaveBeenCalled());
|
|
1480
1768
|
unmount();
|
|
1481
1769
|
});
|
|
@@ -1487,7 +1775,11 @@ describe('AppContainer State Management', () => {
|
|
|
1487
1775
|
authType: AuthType.USE_GEMINI,
|
|
1488
1776
|
apiKey: 'fake-key',
|
|
1489
1777
|
});
|
|
1490
|
-
|
|
1778
|
+
let unmount;
|
|
1779
|
+
await act(async () => {
|
|
1780
|
+
const result = renderAppContainer();
|
|
1781
|
+
unmount = result.unmount;
|
|
1782
|
+
});
|
|
1491
1783
|
await waitFor(() => {
|
|
1492
1784
|
expect(capturedUIState.bannerData.defaultText).toBeDefined();
|
|
1493
1785
|
unmount();
|
|
@@ -1509,7 +1801,11 @@ describe('AppContainer State Management', () => {
|
|
|
1509
1801
|
});
|
|
1510
1802
|
});
|
|
1511
1803
|
it('clears the prompt when onCancelSubmit is called with shouldRestorePrompt=false', async () => {
|
|
1512
|
-
|
|
1804
|
+
let unmount;
|
|
1805
|
+
await act(async () => {
|
|
1806
|
+
const result = renderAppContainer();
|
|
1807
|
+
unmount = result.unmount;
|
|
1808
|
+
});
|
|
1513
1809
|
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1514
1810
|
const { onCancelSubmit } = extractUseGeminiStreamArgs(mockedUseGeminiStream.mock.lastCall);
|
|
1515
1811
|
act(() => {
|
|
@@ -1525,13 +1821,19 @@ describe('AppContainer State Management', () => {
|
|
|
1525
1821
|
addInput: vi.fn(),
|
|
1526
1822
|
initializeFromLogger: vi.fn(),
|
|
1527
1823
|
});
|
|
1528
|
-
|
|
1824
|
+
let unmount;
|
|
1825
|
+
await act(async () => {
|
|
1826
|
+
const result = renderAppContainer();
|
|
1827
|
+
unmount = result.unmount;
|
|
1828
|
+
});
|
|
1529
1829
|
await waitFor(() => expect(capturedUIState.userMessages).toContain('previous message'));
|
|
1530
1830
|
const { onCancelSubmit } = extractUseGeminiStreamArgs(mockedUseGeminiStream.mock.lastCall);
|
|
1531
1831
|
await act(async () => {
|
|
1532
1832
|
onCancelSubmit(true);
|
|
1533
1833
|
});
|
|
1534
|
-
|
|
1834
|
+
await waitFor(() => {
|
|
1835
|
+
expect(mockSetText).toHaveBeenCalledWith('previous message');
|
|
1836
|
+
});
|
|
1535
1837
|
unmount();
|
|
1536
1838
|
});
|
|
1537
1839
|
it('input history is independent from conversation history (survives /clear)', async () => {
|
|
@@ -1543,7 +1845,13 @@ describe('AppContainer State Management', () => {
|
|
|
1543
1845
|
addInput: mockAddInput,
|
|
1544
1846
|
initializeFromLogger: vi.fn(),
|
|
1545
1847
|
});
|
|
1546
|
-
|
|
1848
|
+
let rerender;
|
|
1849
|
+
let unmount;
|
|
1850
|
+
await act(async () => {
|
|
1851
|
+
const result = renderAppContainer();
|
|
1852
|
+
rerender = result.rerender;
|
|
1853
|
+
unmount = result.unmount;
|
|
1854
|
+
});
|
|
1547
1855
|
// Verify userMessages is populated from inputHistory
|
|
1548
1856
|
await waitFor(() => expect(capturedUIState.userMessages).toContain('first prompt'));
|
|
1549
1857
|
expect(capturedUIState.userMessages).toContain('second prompt');
|
|
@@ -1556,6 +1864,10 @@ describe('AppContainer State Management', () => {
|
|
|
1556
1864
|
clearItems: mockClearItems,
|
|
1557
1865
|
loadHistory: vi.fn(),
|
|
1558
1866
|
});
|
|
1867
|
+
await act(async () => {
|
|
1868
|
+
// Rerender to apply the new mock.
|
|
1869
|
+
rerender(getAppContainer());
|
|
1870
|
+
});
|
|
1559
1871
|
// Verify that userMessages still contains the input history
|
|
1560
1872
|
// (it should not be affected by clearing conversation history)
|
|
1561
1873
|
expect(capturedUIState.userMessages).toContain('first prompt');
|
|
@@ -1563,5 +1875,29 @@ describe('AppContainer State Management', () => {
|
|
|
1563
1875
|
unmount();
|
|
1564
1876
|
});
|
|
1565
1877
|
});
|
|
1878
|
+
describe('Regression Tests', () => {
|
|
1879
|
+
it('does not refresh static on startup if banner text is empty', async () => {
|
|
1880
|
+
// Mock banner text to be empty strings
|
|
1881
|
+
vi.spyOn(mockConfig, 'getBannerTextNoCapacityIssues').mockResolvedValue('');
|
|
1882
|
+
vi.spyOn(mockConfig, 'getBannerTextCapacityIssues').mockResolvedValue('');
|
|
1883
|
+
// Clear previous calls
|
|
1884
|
+
mocks.mockStdout.write.mockClear();
|
|
1885
|
+
let compUnmount = () => { };
|
|
1886
|
+
await act(async () => {
|
|
1887
|
+
const { unmount } = renderAppContainer();
|
|
1888
|
+
compUnmount = unmount;
|
|
1889
|
+
});
|
|
1890
|
+
// Allow async effects to run
|
|
1891
|
+
await waitFor(() => expect(capturedUIState).toBeTruthy());
|
|
1892
|
+
// Wait for fetchBannerTexts to complete
|
|
1893
|
+
await act(async () => {
|
|
1894
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
1895
|
+
});
|
|
1896
|
+
// Check that clearTerminal was NOT written to stdout
|
|
1897
|
+
const clearTerminalCalls = mocks.mockStdout.write.mock.calls.filter((call) => call[0] === ansiEscapes.clearTerminal);
|
|
1898
|
+
expect(clearTerminalCalls).toHaveLength(0);
|
|
1899
|
+
compUnmount();
|
|
1900
|
+
});
|
|
1901
|
+
});
|
|
1566
1902
|
});
|
|
1567
1903
|
//# sourceMappingURL=AppContainer.test.js.map
|