@machina.ai/cell-cli 1.41.1-rc2 → 1.45.1-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/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/package.json +4 -4
- package/dist/src/acp/README.md +81 -0
- package/dist/src/acp/{commandHandler.d.ts → acpCommandHandler.d.ts} +1 -1
- package/dist/src/acp/{commandHandler.js → acpCommandHandler.js} +2 -2
- package/dist/src/acp/acpCommandHandler.js.map +1 -0
- package/dist/src/acp/{commandHandler.test.js → acpCommandHandler.test.js} +4 -5
- package/dist/src/acp/acpCommandHandler.test.js.map +1 -0
- package/dist/src/acp/acpErrors.d.ts +1 -1
- package/dist/src/acp/acpErrors.js +1 -1
- package/dist/src/acp/acpErrors.test.d.ts +1 -1
- package/dist/src/acp/acpErrors.test.js +1 -1
- package/dist/src/acp/{fileSystemService.d.ts → acpFileSystemService.d.ts} +1 -1
- package/dist/src/acp/{fileSystemService.js → acpFileSystemService.js} +7 -4
- package/dist/src/acp/acpFileSystemService.js.map +1 -0
- package/dist/src/acp/{fileSystemService.test.js → acpFileSystemService.test.js} +3 -3
- package/dist/src/acp/acpFileSystemService.test.js.map +1 -0
- package/dist/src/acp/acpResume.test.d.ts +1 -1
- package/dist/src/acp/acpResume.test.js +12 -7
- package/dist/src/acp/acpResume.test.js.map +1 -1
- package/dist/src/acp/acpRpcDispatcher.d.ts +28 -0
- package/dist/src/acp/acpRpcDispatcher.js +177 -0
- package/dist/src/acp/acpRpcDispatcher.js.map +1 -0
- package/dist/src/acp/acpRpcDispatcher.test.d.ts +6 -0
- package/dist/src/acp/acpRpcDispatcher.test.js +238 -0
- package/dist/src/acp/acpRpcDispatcher.test.js.map +1 -0
- package/dist/src/acp/acpSession.d.ts +36 -0
- package/dist/src/acp/{acpClient.js → acpSession.js} +333 -781
- package/dist/src/acp/acpSession.js.map +1 -0
- package/dist/src/acp/acpSession.test.d.ts +6 -0
- package/dist/src/acp/acpSession.test.js +739 -0
- package/dist/src/acp/acpSession.test.js.map +1 -0
- package/dist/src/acp/acpSessionManager.d.ts +30 -0
- package/dist/src/acp/acpSessionManager.js +206 -0
- package/dist/src/acp/acpSessionManager.js.map +1 -0
- package/dist/src/acp/acpSessionManager.test.d.ts +6 -0
- package/dist/src/acp/acpSessionManager.test.js +283 -0
- package/dist/src/acp/acpSessionManager.test.js.map +1 -0
- package/dist/src/acp/acpStdioTransport.d.ts +9 -0
- package/dist/src/acp/acpStdioTransport.js +23 -0
- package/dist/src/acp/acpStdioTransport.js.map +1 -0
- package/dist/src/acp/acpUtils.d.ts +56 -0
- package/dist/src/acp/acpUtils.js +288 -0
- package/dist/src/acp/acpUtils.js.map +1 -0
- package/dist/src/acp/commands/commandRegistry.d.ts +1 -1
- package/dist/src/acp/commands/commandRegistry.js +1 -1
- package/dist/src/acp/commands/extensions.d.ts +1 -1
- package/dist/src/acp/commands/extensions.js +1 -1
- package/dist/src/acp/commands/extensions.test.d.ts +6 -0
- package/dist/src/acp/commands/extensions.test.js +70 -0
- package/dist/src/acp/commands/extensions.test.js.map +1 -0
- package/dist/src/acp/commands/init.d.ts +1 -1
- package/dist/src/acp/commands/init.js +1 -1
- package/dist/src/acp/commands/memory.d.ts +3 -8
- package/dist/src/acp/commands/memory.js +18 -47
- package/dist/src/acp/commands/memory.js.map +1 -1
- package/dist/src/acp/commands/restore.d.ts +1 -1
- package/dist/src/acp/commands/restore.js +1 -1
- package/dist/src/acp/commands/restore.test.js +7 -13
- package/dist/src/acp/commands/restore.test.js.map +1 -1
- package/dist/src/acp/commands/types.d.ts +1 -1
- package/dist/src/acp/commands/types.js +1 -1
- package/dist/src/commands/extensions/configure.test.js +6 -2
- package/dist/src/commands/extensions/configure.test.js.map +1 -1
- package/dist/src/commands/extensions/utils.d.ts +1 -1
- package/dist/src/commands/extensions/utils.js +1 -2
- package/dist/src/commands/extensions/utils.js.map +1 -1
- package/dist/src/commands/mcp/list.js +19 -5
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/mcp/list.test.js +285 -100
- package/dist/src/commands/mcp/list.test.js.map +1 -1
- package/dist/src/config/auth.d.ts +1 -1
- package/dist/src/config/auth.js +4 -3
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/auth.test.js +11 -4
- package/dist/src/config/auth.test.js.map +1 -1
- package/dist/src/config/config.d.ts +4 -0
- package/dist/src/config/config.js +65 -47
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +25 -106
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager-agents.test.js +2 -0
- package/dist/src/config/extension-manager-agents.test.js.map +1 -1
- package/dist/src/config/extension-manager-hydration.test.js +2 -0
- package/dist/src/config/extension-manager-hydration.test.js.map +1 -1
- package/dist/src/config/extension-manager-scope.test.js +4 -2
- package/dist/src/config/extension-manager-scope.test.js.map +1 -1
- package/dist/src/config/extension-manager-themes.spec.js +2 -0
- package/dist/src/config/extension-manager-themes.spec.js.map +1 -1
- package/dist/src/config/extension-manager.d.ts +2 -2
- package/dist/src/config/extension-manager.js +2 -1
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extensionRegistryClient.js +0 -1
- package/dist/src/config/extensionRegistryClient.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +1 -1
- package/dist/src/config/extensions/consent.js +5 -4
- package/dist/src/config/extensions/consent.js.map +1 -1
- package/dist/src/config/extensions/consent.test.js +22 -0
- package/dist/src/config/extensions/consent.test.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.js +4 -2
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.d.ts +3 -3
- package/dist/src/config/extensions/extensionSettings.js +7 -3
- package/dist/src/config/extensions/extensionSettings.js.map +1 -1
- package/dist/src/config/extensions/variables.js +1 -3
- package/dist/src/config/extensions/variables.js.map +1 -1
- package/dist/src/config/footerItems.d.ts +4 -0
- package/dist/src/config/footerItems.js +6 -0
- package/dist/src/config/footerItems.js.map +1 -1
- package/dist/src/config/footerItems.test.js +1 -0
- package/dist/src/config/footerItems.test.js.map +1 -1
- package/dist/src/config/mcp/mcpServerEnablement.js +1 -1
- package/dist/src/config/mcp/mcpServerEnablement.js.map +1 -1
- package/dist/src/config/mutual-exclusivity.test.js +33 -0
- package/dist/src/config/mutual-exclusivity.test.js.map +1 -0
- package/dist/src/config/settings-env-isolation.test.d.ts +6 -0
- package/dist/src/config/settings-env-isolation.test.js +188 -0
- package/dist/src/config/settings-env-isolation.test.js.map +1 -0
- package/dist/src/config/settings.d.ts +15 -1
- package/dist/src/config/settings.js +85 -10
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +167 -0
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +56 -25
- package/dist/src/config/settingsSchema.js +66 -27
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +8 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/skipExtensions.test.d.ts +6 -0
- package/dist/src/config/skipExtensions.test.js +49 -0
- package/dist/src/config/skipExtensions.test.js.map +1 -0
- package/dist/src/config/workspace-policy-cli.test.js +0 -5
- package/dist/src/config/workspace-policy-cli.test.js.map +1 -1
- package/dist/src/gemini.d.ts +2 -2
- package/dist/src/gemini.js +108 -30
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +147 -16
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/gemini_cleanup.test.js +1 -1
- 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/interactiveCli.js +1 -1
- package/dist/src/interactiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +56 -6
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +253 -18
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/nonInteractiveCliAgentSession.d.ts +7 -0
- package/dist/src/nonInteractiveCliAgentSession.js +22 -3
- package/dist/src/nonInteractiveCliAgentSession.js.map +1 -1
- package/dist/src/nonInteractiveCliAgentSession.test.js +200 -20
- package/dist/src/nonInteractiveCliAgentSession.test.js.map +1 -1
- package/dist/src/output-redirection.test.d.ts +6 -0
- package/dist/src/output-redirection.test.js +77 -0
- package/dist/src/output-redirection.test.js.map +1 -0
- package/dist/src/patches/http-proxy-agent.d.ts +6 -0
- package/dist/src/patches/http-proxy-agent.js +8 -0
- package/dist/src/patches/http-proxy-agent.js.map +1 -0
- package/dist/src/patches/https-proxy-agent.d.ts +6 -0
- package/dist/src/patches/https-proxy-agent.js +8 -0
- package/dist/src/patches/https-proxy-agent.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.js +5 -1
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +6 -1
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +21 -0
- package/dist/src/services/FileCommandLoader.js +58 -6
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/FileCommandLoader.test.js +27 -1
- package/dist/src/services/FileCommandLoader.test.js.map +1 -1
- package/dist/src/test-utils/mockCommandContext.js +6 -1
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/test-utils/mockConfig.js +0 -3
- package/dist/src/test-utils/mockConfig.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/test-utils/settings.d.ts +1 -0
- package/dist/src/test-utils/settings.js.map +1 -1
- package/dist/src/ui/AppContainer.js +60 -73
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +101 -1
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.js +6 -3
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +33 -10
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/LoginRestartDialog.d.ts +13 -0
- package/dist/src/ui/auth/{LoginWithGoogleRestartDialog.js → LoginRestartDialog.js} +7 -6
- package/dist/src/ui/auth/LoginRestartDialog.js.map +1 -0
- package/dist/src/ui/auth/LoginRestartDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/{LoginWithGoogleRestartDialog.test.js → LoginRestartDialog.test.js} +13 -8
- package/dist/src/ui/auth/LoginRestartDialog.test.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +1 -1
- package/dist/src/ui/auth/useAuth.js +2 -2
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/auth/useAuth.test.js +10 -10
- package/dist/src/ui/auth/useAuth.test.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.js +19 -2
- package/dist/src/ui/commands/agentsCommand.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.test.js +34 -3
- package/dist/src/ui/commands/agentsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +36 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +106 -1
- package/dist/src/ui/commands/bugCommand.test.js.map +1 -1
- package/dist/src/ui/commands/bugMemoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugMemoryCommand.js +62 -0
- package/dist/src/ui/commands/bugMemoryCommand.js.map +1 -0
- package/dist/src/ui/commands/bugMemoryCommand.test.js +100 -0
- package/dist/src/ui/commands/bugMemoryCommand.test.js.map +1 -0
- package/dist/src/ui/commands/commandsCommand.js +52 -4
- package/dist/src/ui/commands/commandsCommand.js.map +1 -1
- package/dist/src/ui/commands/commandsCommand.test.js +75 -2
- package/dist/src/ui/commands/commandsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.js +28 -26
- package/dist/src/ui/commands/compressCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.test.js +5 -0
- package/dist/src/ui/commands/compressCommand.test.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +2 -2
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.test.js +1 -0
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/exportSessionCommand.d.ts +7 -0
- package/dist/src/ui/commands/exportSessionCommand.js +74 -0
- package/dist/src/ui/commands/exportSessionCommand.js.map +1 -0
- package/dist/src/ui/commands/exportSessionCommand.test.js +100 -0
- package/dist/src/ui/commands/exportSessionCommand.test.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.js +1 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.test.js +4 -0
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.d.ts +2 -1
- package/dist/src/ui/commands/memoryCommand.js +110 -117
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +18 -71
- package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/quitCommand.js +3 -1
- package/dist/src/ui/commands/quitCommand.js.map +1 -1
- package/dist/src/ui/commands/quitCommand.test.js +46 -1
- package/dist/src/ui/commands/quitCommand.test.js.map +1 -1
- package/dist/src/ui/commands/rewindCommand.js.map +1 -1
- package/dist/src/ui/commands/skillsCommand.js +1 -1
- package/dist/src/ui/commands/skillsCommand.js.map +1 -1
- package/dist/src/ui/commands/skillsCommand.test.js +19 -0
- package/dist/src/ui/commands/skillsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +3 -1
- package/dist/src/ui/commands/types.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/AskUserDialog.js +3 -1
- package/dist/src/ui/components/AskUserDialog.js.map +1 -1
- package/dist/src/ui/components/AskUserDialog.test.js +43 -0
- package/dist/src/ui/components/AskUserDialog.test.js.map +1 -1
- package/dist/src/ui/components/Composer.js +1 -1
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +4 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +3 -6
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/Footer.js +6 -0
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/FooterConfigDialog.js +1 -0
- package/dist/src/ui/components/FooterConfigDialog.js.map +1 -1
- package/dist/src/ui/components/FooterConfigDialog.test.js +1 -1
- package/dist/src/ui/components/FooterConfigDialog.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +3 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +15 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/{SkillInboxDialog.d.ts → InboxDialog.d.ts} +3 -2
- package/dist/src/ui/components/InboxDialog.js +756 -0
- package/dist/src/ui/components/InboxDialog.js.map +1 -0
- package/dist/src/ui/components/InboxDialog.test.d.ts +6 -0
- package/dist/src/ui/components/InboxDialog.test.js +824 -0
- package/dist/src/ui/components/InboxDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +3 -0
- package/dist/src/ui/components/InputPrompt.js +35 -17
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +95 -46
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/ListeningIndicator.d.ts +10 -0
- package/dist/src/ui/components/ListeningIndicator.js +30 -0
- package/dist/src/ui/components/ListeningIndicator.js.map +1 -0
- package/dist/src/ui/components/MainContent.test.js +23 -3
- package/dist/src/ui/components/MainContent.test.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +32 -37
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +30 -27
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +41 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SessionBrowser.js +7 -0
- package/dist/src/ui/components/SessionBrowser.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js +9 -4
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +12 -23
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +37 -17
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +83 -1
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +2 -2
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +24 -0
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.constants.d.ts +26 -0
- package/dist/src/ui/components/ThemeDialog.constants.js +27 -0
- package/dist/src/ui/components/ThemeDialog.constants.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.js +5 -15
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ToolConfirmationQueue.test.js +1 -1
- package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +1 -1
- package/dist/src/ui/components/VoiceModelDialog.js +7 -2
- package/dist/src/ui/components/VoiceModelDialog.js.map +1 -1
- package/dist/src/ui/components/VoiceModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/VoiceModelDialog.test.js +68 -0
- package/dist/src/ui/components/VoiceModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.js +15 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.test.js +31 -0
- package/dist/src/ui/components/messages/ExportSessionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ShellToolMessage.js +6 -2
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +33 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/SubagentGroupDisplay.js +13 -13
- package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js +5 -5
- package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js +4 -3
- package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/SubagentProgressDisplay.d.ts +1 -1
- package/dist/src/ui/components/messages/SubagentProgressDisplay.js +7 -6
- package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js +10 -9
- package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +3 -9
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +60 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupDisplay.d.ts +13 -0
- package/dist/src/ui/components/messages/ToolGroupDisplay.js +78 -0
- package/dist/src/ui/components/messages/ToolGroupDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupDisplay.test.js +210 -0
- package/dist/src/ui/components/messages/ToolGroupDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +4 -2
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +28 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js +3 -3
- package/dist/src/ui/components/messages/ToolGroupMessageRegression.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/ToolShared.d.ts +1 -0
- package/dist/src/ui/components/messages/ToolShared.js +5 -3
- package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
- package/dist/src/ui/components/messages/ToolShared.test.js +18 -1
- package/dist/src/ui/components/messages/ToolShared.test.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.d.ts +6 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.js +8 -8
- package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/shared/performance.test.js +9 -0
- package/dist/src/ui/components/shared/performance.test.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +22 -5
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +211 -0
- package/dist/src/ui/components/shared/text-buffer.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/UIActionsContext.d.ts +1 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +2 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +78 -69
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +128 -18
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +13 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +85 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAgentStream.d.ts +2 -2
- package/dist/src/ui/hooks/useAgentStream.js +63 -30
- package/dist/src/ui/hooks/useAgentStream.js.map +1 -1
- package/dist/src/ui/hooks/useAgentStream.test.js +1 -1
- package/dist/src/ui/hooks/useAgentStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +0 -2
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
- package/dist/src/ui/hooks/useGeminiStream.js +48 -29
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +44 -82
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +29 -16
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +102 -51
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +2 -2
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +2 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useMessageQueue.d.ts +2 -1
- package/dist/src/ui/hooks/useMessageQueue.js +3 -1
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
- package/dist/src/ui/hooks/useMessageQueue.test.js +38 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.d.ts +3 -3
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.js +44 -38
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.d.ts +3 -3
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.test.js +6 -4
- package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -1
- package/dist/src/ui/hooks/useSuspend.d.ts +1 -3
- package/dist/src/ui/hooks/useSuspend.js +3 -17
- package/dist/src/ui/hooks/useSuspend.js.map +1 -1
- package/dist/src/ui/hooks/useSuspend.test.js +0 -14
- package/dist/src/ui/hooks/useSuspend.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +6 -6
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useVoiceMode.js +25 -19
- package/dist/src/ui/hooks/useVoiceMode.js.map +1 -1
- package/dist/src/ui/hooks/vim-passthrough.test.js +10 -0
- package/dist/src/ui/hooks/vim-passthrough.test.js.map +1 -1
- package/dist/src/ui/hooks/vim.js +8 -0
- package/dist/src/ui/hooks/vim.js.map +1 -1
- package/dist/src/ui/hooks/vim.test.js +61 -0
- package/dist/src/ui/hooks/vim.test.js.map +1 -1
- package/dist/src/ui/key/keyBindings.d.ts +2 -0
- package/dist/src/ui/key/keyBindings.js +26 -9
- package/dist/src/ui/key/keyBindings.js.map +1 -1
- package/dist/src/ui/key/keyBindings.test.js +24 -0
- package/dist/src/ui/key/keyBindings.test.js.map +1 -1
- package/dist/src/ui/key/keyMatchers.test.js +26 -5
- package/dist/src/ui/key/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.js +0 -2
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/types.d.ts +23 -2
- package/dist/src/ui/types.js +3 -2
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +6 -6
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.test.js +10 -0
- package/dist/src/ui/utils/TableRenderer.test.js.map +1 -1
- package/dist/src/ui/utils/directoryUtils.test.js +0 -5
- package/dist/src/ui/utils/directoryUtils.test.js.map +1 -1
- package/dist/src/ui/utils/editorUtils.d.ts +2 -1
- package/dist/src/ui/utils/editorUtils.js +75 -28
- package/dist/src/ui/utils/editorUtils.js.map +1 -1
- package/dist/src/ui/utils/latexToUnicode.d.ts +21 -0
- package/dist/src/ui/utils/latexToUnicode.js +538 -0
- package/dist/src/ui/utils/latexToUnicode.js.map +1 -0
- package/dist/src/ui/utils/latexToUnicode.test.d.ts +6 -0
- package/dist/src/ui/utils/latexToUnicode.test.js +222 -0
- package/dist/src/ui/utils/latexToUnicode.test.js.map +1 -0
- package/dist/src/ui/utils/markdownParsingUtils.d.ts +1 -5
- package/dist/src/ui/utils/markdownParsingUtils.js +36 -1
- package/dist/src/ui/utils/markdownParsingUtils.js.map +1 -1
- package/dist/src/ui/utils/markdownParsingUtils.test.js +35 -0
- package/dist/src/ui/utils/markdownParsingUtils.test.js.map +1 -1
- package/dist/src/ui/utils/memorySnapshot.d.ts +19 -0
- package/dist/src/ui/utils/memorySnapshot.js +28 -0
- package/dist/src/ui/utils/memorySnapshot.js.map +1 -0
- package/dist/src/ui/utils/memorySnapshot.test.d.ts +6 -0
- package/dist/src/ui/utils/memorySnapshot.test.js +62 -0
- package/dist/src/ui/utils/memorySnapshot.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.js +11 -2
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/ui/utils/updateCheck.test.js +73 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -1
- package/dist/src/utils/commands.d.ts +1 -1
- package/dist/src/utils/commands.js +1 -1
- package/dist/src/utils/commands.test.js +14 -14
- package/dist/src/utils/commands.test.js.map +1 -1
- package/dist/src/utils/envVarResolver.js +10 -7
- package/dist/src/utils/envVarResolver.js.map +1 -1
- package/dist/src/utils/gitUtils.js +1 -2
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.d.ts +1 -1
- package/dist/src/utils/handleAutoUpdate.js +15 -3
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.test.js +45 -16
- package/dist/src/utils/handleAutoUpdate.test.js.map +1 -1
- package/dist/src/utils/installationInfo.d.ts +1 -0
- package/dist/src/utils/installationInfo.js +16 -1
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/installationInfo.test.js +16 -0
- package/dist/src/utils/installationInfo.test.js.map +1 -1
- package/dist/src/utils/jsonoutput.js +0 -2
- package/dist/src/utils/jsonoutput.js.map +1 -1
- package/dist/src/utils/processUtils.d.ts +28 -0
- package/dist/src/utils/processUtils.js +71 -0
- package/dist/src/utils/processUtils.js.map +1 -1
- package/dist/src/utils/processUtils.test.js +122 -1
- package/dist/src/utils/processUtils.test.js.map +1 -1
- package/dist/src/utils/readStdin.js +22 -4
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/readStdin.test.js +32 -0
- package/dist/src/utils/readStdin.test.js.map +1 -1
- package/dist/src/utils/relaunch.js +6 -13
- package/dist/src/utils/relaunch.js.map +1 -1
- package/dist/src/utils/relaunch.test.js +82 -86
- package/dist/src/utils/relaunch.test.js.map +1 -1
- package/dist/src/utils/sandbox.js +34 -24
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/sandbox.test.js +108 -9
- package/dist/src/utils/sandbox.test.js.map +1 -1
- package/dist/src/utils/sandboxUtils.js +12 -7
- package/dist/src/utils/sandboxUtils.js.map +1 -1
- package/dist/src/utils/sandboxUtils.test.js +68 -0
- package/dist/src/utils/sandboxUtils.test.js.map +1 -1
- package/dist/src/utils/sessionCleanup.js +49 -14
- package/dist/src/utils/sessionCleanup.js.map +1 -1
- package/dist/src/utils/sessionCleanup.test.js +63 -0
- package/dist/src/utils/sessionCleanup.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.js +22 -7
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.js +99 -0
- package/dist/src/utils/sessionUtils.test.js.map +1 -1
- package/dist/src/utils/sessions.js +2 -4
- package/dist/src/utils/sessions.js.map +1 -1
- package/dist/src/utils/sessions.test.js +9 -12
- package/dist/src/utils/sessions.test.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.js +4 -3
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +40 -3
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.js +1 -1
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/src/acp/acpClient.d.ts +0 -56
- package/dist/src/acp/acpClient.js.map +0 -1
- package/dist/src/acp/acpClient.test.js +0 -1816
- package/dist/src/acp/acpClient.test.js.map +0 -1
- package/dist/src/acp/commandHandler.js.map +0 -1
- package/dist/src/acp/commandHandler.test.js.map +0 -1
- package/dist/src/acp/fileSystemService.js.map +0 -1
- package/dist/src/acp/fileSystemService.test.js.map +0 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.d.ts +0 -12
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js.map +0 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +0 -1
- package/dist/src/ui/components/SkillInboxDialog.js +0 -420
- package/dist/src/ui/components/SkillInboxDialog.js.map +0 -1
- package/dist/src/ui/components/SkillInboxDialog.test.js +0 -467
- package/dist/src/ui/components/SkillInboxDialog.test.js.map +0 -1
- /package/dist/src/acp/{commandHandler.test.d.ts → acpCommandHandler.test.d.ts} +0 -0
- /package/dist/src/{ui/components/SkillInboxDialog.test.d.ts → acp/acpFileSystemService.test.d.ts} +0 -0
- /package/dist/src/{acp/acpClient.test.d.ts → config/mutual-exclusivity.test.d.ts} +0 -0
- /package/dist/src/{acp/fileSystemService.test.d.ts → ui/commands/bugMemoryCommand.test.d.ts} +0 -0
- /package/dist/src/ui/{auth/LoginWithGoogleRestartDialog.test.d.ts → commands/exportSessionCommand.test.d.ts} +0 -0
|
@@ -0,0 +1,824 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { act } from 'react';
|
|
8
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
9
|
+
import { dismissInboxSkill, dismissInboxMemoryPatch, listInboxSkills, listInboxPatches, listInboxMemoryPatches, moveInboxSkill, applyInboxPatch, dismissInboxPatch, applyInboxMemoryPatch, isProjectSkillPatchTarget, } from '@google/gemini-cli-core';
|
|
10
|
+
import { waitFor } from '../../test-utils/async.js';
|
|
11
|
+
import { renderWithProviders } from '../../test-utils/render.js';
|
|
12
|
+
import { createMockSettings } from '../../test-utils/settings.js';
|
|
13
|
+
import { InboxDialog } from './InboxDialog.js';
|
|
14
|
+
const altBufferSettings = createMockSettings({
|
|
15
|
+
ui: { useAlternateBuffer: true },
|
|
16
|
+
});
|
|
17
|
+
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
|
18
|
+
const original = await importOriginal();
|
|
19
|
+
return {
|
|
20
|
+
...original,
|
|
21
|
+
dismissInboxSkill: vi.fn(),
|
|
22
|
+
dismissInboxMemoryPatch: vi.fn(),
|
|
23
|
+
listInboxSkills: vi.fn(),
|
|
24
|
+
listInboxPatches: vi.fn(),
|
|
25
|
+
listInboxMemoryPatches: vi.fn(),
|
|
26
|
+
moveInboxSkill: vi.fn(),
|
|
27
|
+
applyInboxPatch: vi.fn(),
|
|
28
|
+
dismissInboxPatch: vi.fn(),
|
|
29
|
+
applyInboxMemoryPatch: vi.fn(),
|
|
30
|
+
isProjectSkillPatchTarget: vi.fn(),
|
|
31
|
+
getErrorMessage: vi.fn((error) => error instanceof Error ? error.message : String(error)),
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const mockListInboxSkills = vi.mocked(listInboxSkills);
|
|
35
|
+
const mockListInboxPatches = vi.mocked(listInboxPatches);
|
|
36
|
+
const mockListInboxMemoryPatches = vi.mocked(listInboxMemoryPatches);
|
|
37
|
+
const mockMoveInboxSkill = vi.mocked(moveInboxSkill);
|
|
38
|
+
const mockDismissInboxSkill = vi.mocked(dismissInboxSkill);
|
|
39
|
+
const mockApplyInboxPatch = vi.mocked(applyInboxPatch);
|
|
40
|
+
const mockDismissInboxPatch = vi.mocked(dismissInboxPatch);
|
|
41
|
+
const mockApplyInboxMemoryPatch = vi.mocked(applyInboxMemoryPatch);
|
|
42
|
+
const mockDismissInboxMemoryPatch = vi.mocked(dismissInboxMemoryPatch);
|
|
43
|
+
const mockIsProjectSkillPatchTarget = vi.mocked(isProjectSkillPatchTarget);
|
|
44
|
+
const inboxSkill = {
|
|
45
|
+
dirName: 'inbox-skill',
|
|
46
|
+
name: 'Inbox Skill',
|
|
47
|
+
description: 'A test skill',
|
|
48
|
+
content: '---\nname: Inbox Skill\ndescription: A test skill\n---\n\n## Procedure\n1. Do the thing\n',
|
|
49
|
+
extractedAt: '2025-01-15T10:00:00Z',
|
|
50
|
+
};
|
|
51
|
+
const inboxPatch = {
|
|
52
|
+
fileName: 'update-docs.patch',
|
|
53
|
+
name: 'update-docs',
|
|
54
|
+
entries: [
|
|
55
|
+
{
|
|
56
|
+
targetPath: '/home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
57
|
+
diffContent: [
|
|
58
|
+
'--- /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
59
|
+
'+++ /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
60
|
+
'@@ -1,3 +1,4 @@',
|
|
61
|
+
' line1',
|
|
62
|
+
' line2',
|
|
63
|
+
'+line2.5',
|
|
64
|
+
' line3',
|
|
65
|
+
].join('\n'),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
extractedAt: '2025-01-20T14:00:00Z',
|
|
69
|
+
};
|
|
70
|
+
const inboxMemoryPatch = {
|
|
71
|
+
kind: 'private',
|
|
72
|
+
relativePath: 'private',
|
|
73
|
+
name: 'Private memory',
|
|
74
|
+
sourceFiles: ['update-memory.patch'],
|
|
75
|
+
entries: [
|
|
76
|
+
{
|
|
77
|
+
targetPath: '/home/user/.cell-cli/tmp/project/memory/MEMORY.md',
|
|
78
|
+
isNewFile: false,
|
|
79
|
+
diffContent: [
|
|
80
|
+
'--- /home/user/.cell-cli/tmp/project/memory/MEMORY.md',
|
|
81
|
+
'+++ /home/user/.cell-cli/tmp/project/memory/MEMORY.md',
|
|
82
|
+
'@@ -1,1 +1,1 @@',
|
|
83
|
+
'-old',
|
|
84
|
+
'+use focused tests',
|
|
85
|
+
].join('\n'),
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
extractedAt: '2025-01-21T10:00:00Z',
|
|
89
|
+
};
|
|
90
|
+
const workspacePatch = {
|
|
91
|
+
fileName: 'workspace-update.patch',
|
|
92
|
+
name: 'workspace-update',
|
|
93
|
+
entries: [
|
|
94
|
+
{
|
|
95
|
+
targetPath: '/repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
96
|
+
diffContent: [
|
|
97
|
+
'--- /repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
98
|
+
'+++ /repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
99
|
+
'@@ -1,1 +1,2 @@',
|
|
100
|
+
' line1',
|
|
101
|
+
'+line2',
|
|
102
|
+
].join('\n'),
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
const multiSectionPatch = {
|
|
107
|
+
fileName: 'multi-section.patch',
|
|
108
|
+
name: 'multi-section',
|
|
109
|
+
entries: [
|
|
110
|
+
{
|
|
111
|
+
targetPath: '/home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
112
|
+
diffContent: [
|
|
113
|
+
'--- /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
114
|
+
'+++ /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
115
|
+
'@@ -1,1 +1,2 @@',
|
|
116
|
+
' line1',
|
|
117
|
+
'+line2',
|
|
118
|
+
].join('\n'),
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
targetPath: '/home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
122
|
+
diffContent: [
|
|
123
|
+
'--- /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
124
|
+
'+++ /home/user/.cell-cli/skills/docs-writer/SKILL.md',
|
|
125
|
+
'@@ -3,1 +4,2 @@',
|
|
126
|
+
' line3',
|
|
127
|
+
'+line4',
|
|
128
|
+
].join('\n'),
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
};
|
|
132
|
+
const windowsGlobalPatch = {
|
|
133
|
+
fileName: 'windows-update.patch',
|
|
134
|
+
name: 'windows-update',
|
|
135
|
+
entries: [
|
|
136
|
+
{
|
|
137
|
+
targetPath: 'C:\\Users\\sandy\\.cell-cli\\skills\\docs-writer\\SKILL.md',
|
|
138
|
+
diffContent: [
|
|
139
|
+
'--- C:\\Users\\sandy\\.cell-cli\\skills\\docs-writer\\SKILL.md',
|
|
140
|
+
'+++ C:\\Users\\sandy\\.cell-cli\\skills\\docs-writer\\SKILL.md',
|
|
141
|
+
'@@ -1,1 +1,2 @@',
|
|
142
|
+
' line1',
|
|
143
|
+
'+line2',
|
|
144
|
+
].join('\n'),
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
};
|
|
148
|
+
describe('InboxDialog', () => {
|
|
149
|
+
beforeEach(() => {
|
|
150
|
+
vi.clearAllMocks();
|
|
151
|
+
mockListInboxSkills.mockResolvedValue([inboxSkill]);
|
|
152
|
+
mockListInboxPatches.mockResolvedValue([]);
|
|
153
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
154
|
+
mockMoveInboxSkill.mockResolvedValue({
|
|
155
|
+
success: true,
|
|
156
|
+
message: 'Moved "inbox-skill" to ~/.cell-cli/skills.',
|
|
157
|
+
});
|
|
158
|
+
mockDismissInboxSkill.mockResolvedValue({
|
|
159
|
+
success: true,
|
|
160
|
+
message: 'Dismissed "inbox-skill" from inbox.',
|
|
161
|
+
});
|
|
162
|
+
mockApplyInboxPatch.mockResolvedValue({
|
|
163
|
+
success: true,
|
|
164
|
+
message: 'Applied patch to 1 file.',
|
|
165
|
+
});
|
|
166
|
+
mockDismissInboxPatch.mockResolvedValue({
|
|
167
|
+
success: true,
|
|
168
|
+
message: 'Dismissed "update-docs.patch" from inbox.',
|
|
169
|
+
});
|
|
170
|
+
mockApplyInboxMemoryPatch.mockResolvedValue({
|
|
171
|
+
success: true,
|
|
172
|
+
message: 'Applied memory patch to 1 file.',
|
|
173
|
+
});
|
|
174
|
+
mockDismissInboxMemoryPatch.mockResolvedValue({
|
|
175
|
+
success: true,
|
|
176
|
+
message: 'Dismissed 1 private memory patch from inbox.',
|
|
177
|
+
});
|
|
178
|
+
mockIsProjectSkillPatchTarget.mockImplementation(async (targetPath, config) => {
|
|
179
|
+
const projectSkillsDir = config.storage
|
|
180
|
+
?.getProjectSkillsDir?.()
|
|
181
|
+
?.replaceAll('\\', '/')
|
|
182
|
+
?.replace(/\/+$/, '');
|
|
183
|
+
return projectSkillsDir
|
|
184
|
+
? targetPath.replaceAll('\\', '/').startsWith(projectSkillsDir)
|
|
185
|
+
: false;
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
afterEach(() => {
|
|
189
|
+
vi.unstubAllEnvs();
|
|
190
|
+
});
|
|
191
|
+
it('reviews and applies memory patches', async () => {
|
|
192
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
193
|
+
mockListInboxMemoryPatches.mockResolvedValue([inboxMemoryPatch]);
|
|
194
|
+
const config = {
|
|
195
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
196
|
+
};
|
|
197
|
+
const onReloadMemory = vi.fn().mockResolvedValue(undefined);
|
|
198
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn(), onReloadMemory: onReloadMemory })));
|
|
199
|
+
await waitFor(() => {
|
|
200
|
+
expect(lastFrame()).toContain('Private memory');
|
|
201
|
+
});
|
|
202
|
+
await act(async () => {
|
|
203
|
+
stdin.write('\r');
|
|
204
|
+
await waitUntilReady();
|
|
205
|
+
});
|
|
206
|
+
await waitFor(() => {
|
|
207
|
+
const frame = lastFrame() ?? '';
|
|
208
|
+
expect(frame).toContain('Review');
|
|
209
|
+
expect(frame).toMatch(/source patch/);
|
|
210
|
+
});
|
|
211
|
+
// Memory patches default to Dismiss as the highlighted action so a stray
|
|
212
|
+
// Enter cannot apply durable changes. Arrow-down to reach Apply, then
|
|
213
|
+
// press Enter to confirm.
|
|
214
|
+
await act(async () => {
|
|
215
|
+
stdin.write('\u001B[B'); // arrow down → Apply
|
|
216
|
+
await waitUntilReady();
|
|
217
|
+
});
|
|
218
|
+
await act(async () => {
|
|
219
|
+
stdin.write('\r');
|
|
220
|
+
await waitUntilReady();
|
|
221
|
+
});
|
|
222
|
+
await waitFor(() => {
|
|
223
|
+
// Aggregate apply: relativePath equals the kind name.
|
|
224
|
+
expect(mockApplyInboxMemoryPatch).toHaveBeenCalledWith(config, 'private', 'private');
|
|
225
|
+
expect(onReloadMemory).toHaveBeenCalled();
|
|
226
|
+
});
|
|
227
|
+
unmount();
|
|
228
|
+
});
|
|
229
|
+
it('disables the project destination when the workspace is untrusted', async () => {
|
|
230
|
+
const config = {
|
|
231
|
+
isTrustedFolder: vi.fn().mockReturnValue(false),
|
|
232
|
+
};
|
|
233
|
+
const onReloadSkills = vi.fn().mockResolvedValue(undefined);
|
|
234
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: onReloadSkills })));
|
|
235
|
+
await waitFor(() => {
|
|
236
|
+
expect(lastFrame()).toContain('Inbox Skill');
|
|
237
|
+
});
|
|
238
|
+
// Select skill → lands on preview
|
|
239
|
+
await act(async () => {
|
|
240
|
+
stdin.write('\r');
|
|
241
|
+
await waitUntilReady();
|
|
242
|
+
});
|
|
243
|
+
await waitFor(() => {
|
|
244
|
+
expect(lastFrame()).toContain('Review new skill');
|
|
245
|
+
});
|
|
246
|
+
// Select "Move" → lands on destination chooser
|
|
247
|
+
await act(async () => {
|
|
248
|
+
stdin.write('\r');
|
|
249
|
+
await waitUntilReady();
|
|
250
|
+
});
|
|
251
|
+
await waitFor(() => {
|
|
252
|
+
const frame = lastFrame();
|
|
253
|
+
expect(frame).toContain('Project');
|
|
254
|
+
expect(frame).toContain('unavailable until this workspace is trusted');
|
|
255
|
+
});
|
|
256
|
+
unmount();
|
|
257
|
+
});
|
|
258
|
+
it('shows inline feedback when moving a skill throws', async () => {
|
|
259
|
+
mockMoveInboxSkill.mockRejectedValue(new Error('permission denied'));
|
|
260
|
+
const config = {
|
|
261
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
262
|
+
};
|
|
263
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
264
|
+
await waitFor(() => {
|
|
265
|
+
expect(lastFrame()).toContain('Inbox Skill');
|
|
266
|
+
});
|
|
267
|
+
// Select skill → preview
|
|
268
|
+
await act(async () => {
|
|
269
|
+
stdin.write('\r');
|
|
270
|
+
await waitUntilReady();
|
|
271
|
+
});
|
|
272
|
+
// Select "Move" → destination chooser
|
|
273
|
+
await act(async () => {
|
|
274
|
+
stdin.write('\r');
|
|
275
|
+
await waitUntilReady();
|
|
276
|
+
});
|
|
277
|
+
// Select "Global" → triggers move
|
|
278
|
+
await act(async () => {
|
|
279
|
+
stdin.write('\r');
|
|
280
|
+
await waitUntilReady();
|
|
281
|
+
});
|
|
282
|
+
await waitFor(() => {
|
|
283
|
+
const frame = lastFrame();
|
|
284
|
+
expect(frame).toContain('Move "Inbox Skill"');
|
|
285
|
+
expect(frame).toContain('Failed to install skill: permission denied');
|
|
286
|
+
});
|
|
287
|
+
unmount();
|
|
288
|
+
});
|
|
289
|
+
it('shows inline feedback when reloading skills fails after a move', async () => {
|
|
290
|
+
const config = {
|
|
291
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
292
|
+
};
|
|
293
|
+
const onReloadSkills = vi
|
|
294
|
+
.fn()
|
|
295
|
+
.mockRejectedValue(new Error('reload hook failed'));
|
|
296
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: onReloadSkills })));
|
|
297
|
+
await waitFor(() => {
|
|
298
|
+
expect(lastFrame()).toContain('Inbox Skill');
|
|
299
|
+
});
|
|
300
|
+
// Select skill → preview
|
|
301
|
+
await act(async () => {
|
|
302
|
+
stdin.write('\r');
|
|
303
|
+
await waitUntilReady();
|
|
304
|
+
});
|
|
305
|
+
// Select "Move" → destination chooser
|
|
306
|
+
await act(async () => {
|
|
307
|
+
stdin.write('\r');
|
|
308
|
+
await waitUntilReady();
|
|
309
|
+
});
|
|
310
|
+
// Select "Global" → triggers move
|
|
311
|
+
await act(async () => {
|
|
312
|
+
stdin.write('\r');
|
|
313
|
+
await waitUntilReady();
|
|
314
|
+
});
|
|
315
|
+
await waitFor(() => {
|
|
316
|
+
expect(lastFrame()).toContain('Moved "inbox-skill" to ~/.cell-cli/skills. Failed to reload skills: reload hook failed');
|
|
317
|
+
});
|
|
318
|
+
expect(onReloadSkills).toHaveBeenCalledTimes(1);
|
|
319
|
+
unmount();
|
|
320
|
+
});
|
|
321
|
+
it('preserves the highlighted row after Esc-ing back from a sub-phase', async () => {
|
|
322
|
+
// Reproduces the bug where pressing Esc from the apply dialog re-rendered
|
|
323
|
+
// the list with focus jumped back to row 0 instead of staying on the row
|
|
324
|
+
// the user was on.
|
|
325
|
+
const secondSkill = {
|
|
326
|
+
...inboxSkill,
|
|
327
|
+
dirName: 'second-skill',
|
|
328
|
+
name: 'Second Skill',
|
|
329
|
+
};
|
|
330
|
+
mockListInboxSkills.mockResolvedValue([inboxSkill, secondSkill]);
|
|
331
|
+
const config = {
|
|
332
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
333
|
+
};
|
|
334
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
335
|
+
await waitFor(() => {
|
|
336
|
+
const frame = lastFrame();
|
|
337
|
+
expect(frame).toContain('Inbox Skill');
|
|
338
|
+
expect(frame).toContain('Second Skill');
|
|
339
|
+
});
|
|
340
|
+
// Arrow down to the second row.
|
|
341
|
+
await act(async () => {
|
|
342
|
+
stdin.write('\x1b[B');
|
|
343
|
+
await waitUntilReady();
|
|
344
|
+
});
|
|
345
|
+
// Enter the second row's preview.
|
|
346
|
+
await act(async () => {
|
|
347
|
+
stdin.write('\r');
|
|
348
|
+
await waitUntilReady();
|
|
349
|
+
});
|
|
350
|
+
await waitFor(() => {
|
|
351
|
+
const frame = lastFrame();
|
|
352
|
+
expect(frame).toContain('Review new skill');
|
|
353
|
+
expect(frame).toContain('Second Skill');
|
|
354
|
+
});
|
|
355
|
+
// Esc back to list.
|
|
356
|
+
await act(async () => {
|
|
357
|
+
stdin.write('\x1b');
|
|
358
|
+
await waitUntilReady();
|
|
359
|
+
});
|
|
360
|
+
await waitFor(() => {
|
|
361
|
+
const frame = lastFrame();
|
|
362
|
+
expect(frame).toContain('Inbox Skill');
|
|
363
|
+
expect(frame).toContain('Second Skill');
|
|
364
|
+
});
|
|
365
|
+
// Re-enter (no arrow keys this time). The active row must still be the
|
|
366
|
+
// SECOND skill, not the first — which is what the bug reproduced before.
|
|
367
|
+
await act(async () => {
|
|
368
|
+
stdin.write('\r');
|
|
369
|
+
await waitUntilReady();
|
|
370
|
+
});
|
|
371
|
+
await waitFor(() => {
|
|
372
|
+
const frame = lastFrame();
|
|
373
|
+
expect(frame).toContain('Review new skill');
|
|
374
|
+
// The preview header echoes the highlighted skill's name.
|
|
375
|
+
expect(frame).toContain('Second Skill');
|
|
376
|
+
});
|
|
377
|
+
unmount();
|
|
378
|
+
});
|
|
379
|
+
describe('patch support', () => {
|
|
380
|
+
it('shows patches alongside skills with section headers', async () => {
|
|
381
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
382
|
+
const config = {
|
|
383
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
384
|
+
storage: {
|
|
385
|
+
getProjectSkillsDir: vi
|
|
386
|
+
.fn()
|
|
387
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
const { lastFrame, unmount } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
391
|
+
await waitFor(() => {
|
|
392
|
+
const frame = lastFrame();
|
|
393
|
+
expect(frame).toContain('New Skills');
|
|
394
|
+
expect(frame).toContain('Inbox Skill');
|
|
395
|
+
expect(frame).toContain('Skill Updates');
|
|
396
|
+
expect(frame).toContain('update-docs');
|
|
397
|
+
});
|
|
398
|
+
unmount();
|
|
399
|
+
});
|
|
400
|
+
it('shows diff preview when a patch is selected', async () => {
|
|
401
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
402
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
403
|
+
const config = {
|
|
404
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
405
|
+
storage: {
|
|
406
|
+
getProjectSkillsDir: vi
|
|
407
|
+
.fn()
|
|
408
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
409
|
+
},
|
|
410
|
+
};
|
|
411
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
412
|
+
await waitFor(() => {
|
|
413
|
+
expect(lastFrame()).toContain('update-docs');
|
|
414
|
+
});
|
|
415
|
+
// Select the patch
|
|
416
|
+
await act(async () => {
|
|
417
|
+
stdin.write('\r');
|
|
418
|
+
await waitUntilReady();
|
|
419
|
+
});
|
|
420
|
+
await waitFor(() => {
|
|
421
|
+
const frame = lastFrame();
|
|
422
|
+
expect(frame).toContain('Review changes before applying');
|
|
423
|
+
expect(frame).toContain('Apply');
|
|
424
|
+
expect(frame).toContain('Dismiss');
|
|
425
|
+
});
|
|
426
|
+
unmount();
|
|
427
|
+
});
|
|
428
|
+
it('applies a patch when Apply is selected', async () => {
|
|
429
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
430
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
431
|
+
const config = {
|
|
432
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
433
|
+
storage: {
|
|
434
|
+
getProjectSkillsDir: vi
|
|
435
|
+
.fn()
|
|
436
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
437
|
+
},
|
|
438
|
+
};
|
|
439
|
+
const onReloadSkills = vi.fn().mockResolvedValue(undefined);
|
|
440
|
+
const { stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: onReloadSkills })));
|
|
441
|
+
await waitFor(() => {
|
|
442
|
+
expect(mockListInboxPatches).toHaveBeenCalled();
|
|
443
|
+
});
|
|
444
|
+
// Select the patch
|
|
445
|
+
await act(async () => {
|
|
446
|
+
stdin.write('\r');
|
|
447
|
+
await waitUntilReady();
|
|
448
|
+
});
|
|
449
|
+
// Select "Apply"
|
|
450
|
+
await act(async () => {
|
|
451
|
+
stdin.write('\r');
|
|
452
|
+
await waitUntilReady();
|
|
453
|
+
});
|
|
454
|
+
await waitFor(() => {
|
|
455
|
+
expect(mockApplyInboxPatch).toHaveBeenCalledWith(config, 'update-docs.patch');
|
|
456
|
+
});
|
|
457
|
+
expect(onReloadSkills).toHaveBeenCalled();
|
|
458
|
+
unmount();
|
|
459
|
+
});
|
|
460
|
+
it('disables Apply for workspace patches in an untrusted workspace', async () => {
|
|
461
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
462
|
+
mockListInboxPatches.mockResolvedValue([workspacePatch]);
|
|
463
|
+
const config = {
|
|
464
|
+
isTrustedFolder: vi.fn().mockReturnValue(false),
|
|
465
|
+
storage: {
|
|
466
|
+
getProjectSkillsDir: vi
|
|
467
|
+
.fn()
|
|
468
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
469
|
+
},
|
|
470
|
+
};
|
|
471
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
472
|
+
await waitFor(() => {
|
|
473
|
+
expect(lastFrame()).toContain('workspace-update');
|
|
474
|
+
});
|
|
475
|
+
await act(async () => {
|
|
476
|
+
stdin.write('\r');
|
|
477
|
+
await waitUntilReady();
|
|
478
|
+
});
|
|
479
|
+
await waitFor(() => {
|
|
480
|
+
const frame = lastFrame();
|
|
481
|
+
expect(frame).toContain('Apply');
|
|
482
|
+
expect(frame).toContain('.cell-cli/skills — unavailable until this workspace is trusted');
|
|
483
|
+
});
|
|
484
|
+
expect(mockApplyInboxPatch).not.toHaveBeenCalled();
|
|
485
|
+
unmount();
|
|
486
|
+
});
|
|
487
|
+
it('uses canonical project-scope checks before enabling Apply', async () => {
|
|
488
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
489
|
+
mockListInboxPatches.mockResolvedValue([workspacePatch]);
|
|
490
|
+
mockIsProjectSkillPatchTarget.mockResolvedValue(true);
|
|
491
|
+
const config = {
|
|
492
|
+
isTrustedFolder: vi.fn().mockReturnValue(false),
|
|
493
|
+
storage: {
|
|
494
|
+
getProjectSkillsDir: vi
|
|
495
|
+
.fn()
|
|
496
|
+
.mockReturnValue('/symlinked/workspace/.cell-cli/skills'),
|
|
497
|
+
},
|
|
498
|
+
};
|
|
499
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
500
|
+
await waitFor(() => {
|
|
501
|
+
expect(lastFrame()).toContain('workspace-update');
|
|
502
|
+
});
|
|
503
|
+
await act(async () => {
|
|
504
|
+
stdin.write('\r');
|
|
505
|
+
await waitUntilReady();
|
|
506
|
+
});
|
|
507
|
+
await waitFor(() => {
|
|
508
|
+
expect(lastFrame()).toContain('.cell-cli/skills — unavailable until this workspace is trusted');
|
|
509
|
+
});
|
|
510
|
+
expect(mockIsProjectSkillPatchTarget).toHaveBeenCalledWith('/repo/.cell-cli/skills/docs-writer/SKILL.md', config);
|
|
511
|
+
expect(mockApplyInboxPatch).not.toHaveBeenCalled();
|
|
512
|
+
unmount();
|
|
513
|
+
});
|
|
514
|
+
it('dismisses a patch when Dismiss is selected', async () => {
|
|
515
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
516
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
517
|
+
const config = {
|
|
518
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
519
|
+
storage: {
|
|
520
|
+
getProjectSkillsDir: vi
|
|
521
|
+
.fn()
|
|
522
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
const onReloadSkills = vi.fn().mockResolvedValue(undefined);
|
|
526
|
+
const { stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: onReloadSkills })));
|
|
527
|
+
await waitFor(() => {
|
|
528
|
+
expect(mockListInboxPatches).toHaveBeenCalled();
|
|
529
|
+
});
|
|
530
|
+
// Select the patch
|
|
531
|
+
await act(async () => {
|
|
532
|
+
stdin.write('\r');
|
|
533
|
+
await waitUntilReady();
|
|
534
|
+
});
|
|
535
|
+
// Move down to "Dismiss" and select
|
|
536
|
+
await act(async () => {
|
|
537
|
+
stdin.write('\x1b[B');
|
|
538
|
+
await waitUntilReady();
|
|
539
|
+
});
|
|
540
|
+
await act(async () => {
|
|
541
|
+
stdin.write('\r');
|
|
542
|
+
await waitUntilReady();
|
|
543
|
+
});
|
|
544
|
+
await waitFor(() => {
|
|
545
|
+
expect(mockDismissInboxPatch).toHaveBeenCalledWith(config, 'update-docs.patch');
|
|
546
|
+
});
|
|
547
|
+
expect(onReloadSkills).not.toHaveBeenCalled();
|
|
548
|
+
unmount();
|
|
549
|
+
});
|
|
550
|
+
it('shows Windows patch entries with a basename and origin tag', async () => {
|
|
551
|
+
vi.stubEnv('USERPROFILE', 'C:\\Users\\sandy');
|
|
552
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
553
|
+
mockListInboxPatches.mockResolvedValue([windowsGlobalPatch]);
|
|
554
|
+
const config = {
|
|
555
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
556
|
+
storage: {
|
|
557
|
+
getProjectSkillsDir: vi
|
|
558
|
+
.fn()
|
|
559
|
+
.mockReturnValue('C:\\repo\\.cell-cli\\skills'),
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
const { lastFrame, unmount } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
563
|
+
await waitFor(() => {
|
|
564
|
+
const frame = lastFrame();
|
|
565
|
+
expect(frame).toContain('[Global]');
|
|
566
|
+
expect(frame).toContain('SKILL.md');
|
|
567
|
+
expect(frame).not.toContain('C:\\Users\\sandy\\.cell-cli\\skills');
|
|
568
|
+
});
|
|
569
|
+
unmount();
|
|
570
|
+
});
|
|
571
|
+
it('renders multi-section patches without duplicate React keys', async () => {
|
|
572
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
573
|
+
mockListInboxPatches.mockResolvedValue([multiSectionPatch]);
|
|
574
|
+
const consoleErrorSpy = vi
|
|
575
|
+
.spyOn(console, 'error')
|
|
576
|
+
.mockImplementation(() => { });
|
|
577
|
+
const config = {
|
|
578
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
579
|
+
storage: {
|
|
580
|
+
getProjectSkillsDir: vi
|
|
581
|
+
.fn()
|
|
582
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
583
|
+
},
|
|
584
|
+
};
|
|
585
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
586
|
+
await waitFor(() => {
|
|
587
|
+
expect(lastFrame()).toContain('multi-section');
|
|
588
|
+
});
|
|
589
|
+
await act(async () => {
|
|
590
|
+
stdin.write('\r');
|
|
591
|
+
await waitUntilReady();
|
|
592
|
+
});
|
|
593
|
+
await waitFor(() => {
|
|
594
|
+
expect(lastFrame()).toContain('Review changes before applying');
|
|
595
|
+
});
|
|
596
|
+
expect(consoleErrorSpy).not.toHaveBeenCalledWith(expect.stringContaining('Encountered two children with the same key'));
|
|
597
|
+
consoleErrorSpy.mockRestore();
|
|
598
|
+
unmount();
|
|
599
|
+
});
|
|
600
|
+
const tallPatch = {
|
|
601
|
+
fileName: 'tall.patch',
|
|
602
|
+
name: 'tall-patch',
|
|
603
|
+
entries: [
|
|
604
|
+
{
|
|
605
|
+
targetPath: '/repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
606
|
+
diffContent: [
|
|
607
|
+
'--- /repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
608
|
+
'+++ /repo/.cell-cli/skills/docs-writer/SKILL.md',
|
|
609
|
+
'@@ -1,4 +1,8 @@',
|
|
610
|
+
' line1',
|
|
611
|
+
' line2',
|
|
612
|
+
'+added-1',
|
|
613
|
+
'+added-2',
|
|
614
|
+
'+added-3',
|
|
615
|
+
'+added-4',
|
|
616
|
+
' line3',
|
|
617
|
+
' line4',
|
|
618
|
+
].join('\n'),
|
|
619
|
+
},
|
|
620
|
+
],
|
|
621
|
+
};
|
|
622
|
+
it('alt-buffer: renders a bounded ScrollableList viewport for tall patches', async () => {
|
|
623
|
+
// Alt-buffer mode has no terminal scrollback, so the dialog must
|
|
624
|
+
// scroll inside itself. ScrollableList renders a `█` thumb when
|
|
625
|
+
// content exceeds viewport height — the regression signal that the
|
|
626
|
+
// diff is bounded and off-screen content is reachable via PgUp/PgDn.
|
|
627
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
628
|
+
mockListInboxPatches.mockResolvedValue([tallPatch]);
|
|
629
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
630
|
+
const config = {
|
|
631
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
632
|
+
storage: {
|
|
633
|
+
getProjectSkillsDir: vi
|
|
634
|
+
.fn()
|
|
635
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
636
|
+
},
|
|
637
|
+
};
|
|
638
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), {
|
|
639
|
+
settings: altBufferSettings,
|
|
640
|
+
uiState: { terminalHeight: 18 },
|
|
641
|
+
}));
|
|
642
|
+
await waitFor(() => {
|
|
643
|
+
expect(lastFrame()).toContain('tall-patch');
|
|
644
|
+
});
|
|
645
|
+
await act(async () => {
|
|
646
|
+
stdin.write('\r');
|
|
647
|
+
await waitUntilReady();
|
|
648
|
+
});
|
|
649
|
+
await waitFor(() => {
|
|
650
|
+
const frame = lastFrame() ?? '';
|
|
651
|
+
expect(frame).toContain('Apply');
|
|
652
|
+
expect(frame).toContain('Dismiss');
|
|
653
|
+
expect(frame).toContain('█');
|
|
654
|
+
});
|
|
655
|
+
unmount();
|
|
656
|
+
});
|
|
657
|
+
it('alt-buffer: surfaces PgUp/PgDn in the patch-preview footer', async () => {
|
|
658
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
659
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
660
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
661
|
+
const config = {
|
|
662
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
663
|
+
storage: {
|
|
664
|
+
getProjectSkillsDir: vi
|
|
665
|
+
.fn()
|
|
666
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
667
|
+
},
|
|
668
|
+
};
|
|
669
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), { settings: altBufferSettings }));
|
|
670
|
+
await waitFor(() => {
|
|
671
|
+
expect(lastFrame()).toContain('update-docs');
|
|
672
|
+
});
|
|
673
|
+
await act(async () => {
|
|
674
|
+
stdin.write('\r');
|
|
675
|
+
await waitUntilReady();
|
|
676
|
+
});
|
|
677
|
+
await waitFor(() => {
|
|
678
|
+
expect(lastFrame()).toContain('PgUp/PgDn to scroll');
|
|
679
|
+
});
|
|
680
|
+
unmount();
|
|
681
|
+
});
|
|
682
|
+
it('non-alt-buffer: clips the diff via DiffRenderer with a "lines hidden" hint', async () => {
|
|
683
|
+
// Non-alt-buffer mode uses the codebase's standard bounded
|
|
684
|
+
// DiffRenderer + ShowMoreLines + Ctrl+O pattern (matches
|
|
685
|
+
// FolderTrustDialog/ThemeDialog). MaxSizedBox emits a
|
|
686
|
+
// "... first/last N line(s) hidden ..." hint when it clips, which
|
|
687
|
+
// is the regression signal that the diff is bounded.
|
|
688
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
689
|
+
mockListInboxPatches.mockResolvedValue([tallPatch]);
|
|
690
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
691
|
+
const config = {
|
|
692
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
693
|
+
storage: {
|
|
694
|
+
getProjectSkillsDir: vi
|
|
695
|
+
.fn()
|
|
696
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
697
|
+
},
|
|
698
|
+
};
|
|
699
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), { uiState: { terminalHeight: 18, constrainHeight: true } }));
|
|
700
|
+
await waitFor(() => {
|
|
701
|
+
expect(lastFrame()).toContain('tall-patch');
|
|
702
|
+
});
|
|
703
|
+
await act(async () => {
|
|
704
|
+
stdin.write('\r');
|
|
705
|
+
await waitUntilReady();
|
|
706
|
+
});
|
|
707
|
+
await waitFor(() => {
|
|
708
|
+
expect(lastFrame() ?? '').toMatch(/lines? hidden/);
|
|
709
|
+
});
|
|
710
|
+
unmount();
|
|
711
|
+
});
|
|
712
|
+
it('non-alt-buffer: surfaces Ctrl+O inline (not in the footer) when the diff overflows', async () => {
|
|
713
|
+
// In non-alt-buffer mode the Ctrl+O affordance is rendered inline
|
|
714
|
+
// by ShowMoreLines above the footer when the diff is clipped. The
|
|
715
|
+
// footer itself stays clean (no PgUp/PgDn or Ctrl+O text) since
|
|
716
|
+
// duplicating the hint there would be noisy.
|
|
717
|
+
mockListInboxSkills.mockResolvedValue([]);
|
|
718
|
+
mockListInboxPatches.mockResolvedValue([tallPatch]);
|
|
719
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
720
|
+
const config = {
|
|
721
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
722
|
+
storage: {
|
|
723
|
+
getProjectSkillsDir: vi
|
|
724
|
+
.fn()
|
|
725
|
+
.mockReturnValue('/repo/.cell-cli/skills'),
|
|
726
|
+
},
|
|
727
|
+
};
|
|
728
|
+
const { lastFrame, stdin, unmount, waitUntilReady } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), { uiState: { terminalHeight: 18, constrainHeight: true } }));
|
|
729
|
+
await waitFor(() => {
|
|
730
|
+
expect(lastFrame()).toContain('tall-patch');
|
|
731
|
+
});
|
|
732
|
+
await act(async () => {
|
|
733
|
+
stdin.write('\r');
|
|
734
|
+
await waitUntilReady();
|
|
735
|
+
});
|
|
736
|
+
await waitFor(() => {
|
|
737
|
+
const frame = lastFrame() ?? '';
|
|
738
|
+
expect(frame).toContain('Ctrl+O');
|
|
739
|
+
expect(frame).not.toContain('PgUp/PgDn to scroll');
|
|
740
|
+
});
|
|
741
|
+
unmount();
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
it('renders each list row as exactly two lines even with long descriptions', async () => {
|
|
745
|
+
// Reproduces the production bug: with the previous renderer, long
|
|
746
|
+
// descriptions wrapped onto multiple lines (and the date sibling was
|
|
747
|
+
// interleaved into the wrap), making each item 3-5 rows tall and
|
|
748
|
+
// breaking the listMaxItemsToShow budget. The fix uses height={2}
|
|
749
|
+
// and wrap="truncate-end" on every list row.
|
|
750
|
+
const longDescription = 'This is an extremely long description that would absolutely wrap to ' +
|
|
751
|
+
'multiple lines if rendered without truncation, which used to push the ' +
|
|
752
|
+
'list-phase footer off the bottom of the alternate buffer in production.';
|
|
753
|
+
mockListInboxSkills.mockResolvedValue([
|
|
754
|
+
{
|
|
755
|
+
dirName: 'long-skill',
|
|
756
|
+
name: 'long-skill',
|
|
757
|
+
description: longDescription,
|
|
758
|
+
content: '---\nname: x\ndescription: y\n---\n',
|
|
759
|
+
},
|
|
760
|
+
]);
|
|
761
|
+
mockListInboxPatches.mockResolvedValue([]);
|
|
762
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
763
|
+
const config = {
|
|
764
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
765
|
+
};
|
|
766
|
+
const { lastFrame, unmount } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) })));
|
|
767
|
+
await waitFor(() => {
|
|
768
|
+
expect(lastFrame()).toContain('long-skill');
|
|
769
|
+
});
|
|
770
|
+
const frame = lastFrame() ?? '';
|
|
771
|
+
expect(frame).not.toContain('production');
|
|
772
|
+
expect(frame).toContain('extremely long description');
|
|
773
|
+
unmount();
|
|
774
|
+
});
|
|
775
|
+
it('keeps the list-phase footer on screen with many long-description skills', async () => {
|
|
776
|
+
const longDesc = 'A very long description that would wrap across multiple lines if not ' +
|
|
777
|
+
'truncated, which was causing the dialog body to overflow the bottom ' +
|
|
778
|
+
'of the alternate buffer';
|
|
779
|
+
const manySkills = Array.from({ length: 8 }, (_, i) => ({
|
|
780
|
+
dirName: `skill-${i}`,
|
|
781
|
+
name: `skill-${i}`,
|
|
782
|
+
description: `${longDesc} (#${i})`,
|
|
783
|
+
content: '---\nname: x\ndescription: y\n---\n',
|
|
784
|
+
}));
|
|
785
|
+
mockListInboxSkills.mockResolvedValue(manySkills);
|
|
786
|
+
mockListInboxPatches.mockResolvedValue([]);
|
|
787
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
788
|
+
const config = {
|
|
789
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
790
|
+
};
|
|
791
|
+
const { lastFrame, unmount } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), { uiState: { terminalHeight: 28 } }));
|
|
792
|
+
await waitFor(() => {
|
|
793
|
+
const frame = lastFrame() ?? '';
|
|
794
|
+
expect(frame).toContain('Memory Inbox');
|
|
795
|
+
expect(frame).toContain('Esc to close');
|
|
796
|
+
});
|
|
797
|
+
unmount();
|
|
798
|
+
});
|
|
799
|
+
it('keeps the list-phase footer on screen on short terminals', async () => {
|
|
800
|
+
const manySkills = Array.from({ length: 12 }, (_, i) => ({
|
|
801
|
+
dirName: `skill-${i}`,
|
|
802
|
+
name: `Skill ${i}`,
|
|
803
|
+
description: `Description ${i}`,
|
|
804
|
+
content: '---\nname: Skill\ndescription: Skill\n---\n',
|
|
805
|
+
}));
|
|
806
|
+
mockListInboxSkills.mockResolvedValue(manySkills);
|
|
807
|
+
mockListInboxPatches.mockResolvedValue([inboxPatch]);
|
|
808
|
+
mockListInboxMemoryPatches.mockResolvedValue([]);
|
|
809
|
+
const config = {
|
|
810
|
+
isTrustedFolder: vi.fn().mockReturnValue(true),
|
|
811
|
+
storage: {
|
|
812
|
+
getProjectSkillsDir: vi.fn().mockReturnValue('/repo/.cell-cli/skills'),
|
|
813
|
+
},
|
|
814
|
+
};
|
|
815
|
+
const { lastFrame, unmount } = await act(async () => renderWithProviders(_jsx(InboxDialog, { config: config, onClose: vi.fn(), onReloadSkills: vi.fn().mockResolvedValue(undefined) }), { uiState: { terminalHeight: 18 } }));
|
|
816
|
+
await waitFor(() => {
|
|
817
|
+
const frame = lastFrame() ?? '';
|
|
818
|
+
expect(frame).toContain('Memory Inbox');
|
|
819
|
+
expect(frame).toContain('Esc to close');
|
|
820
|
+
});
|
|
821
|
+
unmount();
|
|
822
|
+
});
|
|
823
|
+
});
|
|
824
|
+
//# sourceMappingURL=InboxDialog.test.js.map
|