@machina.ai/cell-cli 1.16.0-rc1 → 1.18.4-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 +8 -6
- package/dist/index.js.map +1 -1
- package/dist/package.json +8 -7
- package/dist/src/commands/extensions/disable.js +2 -0
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/disable.test.d.ts +6 -0
- package/dist/src/commands/extensions/disable.test.js +169 -0
- package/dist/src/commands/extensions/disable.test.js.map +1 -0
- package/dist/src/commands/extensions/enable.js +2 -0
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/enable.test.d.ts +6 -0
- package/dist/src/commands/extensions/enable.test.js +150 -0
- package/dist/src/commands/extensions/enable.test.js.map +1 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.d.ts +6 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js +111 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +1 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.ts +143 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +1 -1
- package/dist/src/commands/extensions/install.js +2 -0
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +3 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.js +2 -0
- package/dist/src/commands/extensions/link.js.map +1 -1
- package/dist/src/commands/extensions/link.test.d.ts +6 -0
- package/dist/src/commands/extensions/link.test.js +131 -0
- package/dist/src/commands/extensions/link.test.js.map +1 -0
- package/dist/src/commands/extensions/list.js +2 -0
- package/dist/src/commands/extensions/list.js.map +1 -1
- package/dist/src/commands/extensions/list.test.d.ts +6 -0
- package/dist/src/commands/extensions/list.test.js +112 -0
- package/dist/src/commands/extensions/list.test.js.map +1 -0
- package/dist/src/commands/extensions/new.js +2 -0
- package/dist/src/commands/extensions/new.js.map +1 -1
- package/dist/src/commands/extensions/new.test.js +3 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.d.ts +1 -1
- package/dist/src/commands/extensions/uninstall.js +26 -9
- package/dist/src/commands/extensions/uninstall.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.test.js +190 -9
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/update.js +2 -0
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/extensions/update.test.d.ts +6 -0
- package/dist/src/commands/extensions/update.test.js +170 -0
- package/dist/src/commands/extensions/update.test.js.map +1 -0
- package/dist/src/commands/extensions/validate.js +2 -0
- package/dist/src/commands/extensions/validate.js.map +1 -1
- package/dist/src/commands/extensions/validate.test.js +3 -0
- 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/mcp/add.js +2 -0
- package/dist/src/commands/mcp/add.js.map +1 -1
- package/dist/src/commands/mcp/add.test.js +11 -3
- package/dist/src/commands/mcp/add.test.js.map +1 -1
- package/dist/src/commands/mcp/list.js +2 -0
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/mcp/list.test.js +4 -6
- package/dist/src/commands/mcp/list.test.js.map +1 -1
- package/dist/src/commands/mcp/remove.js +2 -0
- package/dist/src/commands/mcp/remove.js.map +1 -1
- package/dist/src/commands/mcp/remove.test.js +26 -12
- package/dist/src/commands/mcp/remove.test.js.map +1 -1
- package/dist/src/commands/mcp.js +2 -0
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/mcp.test.js +1 -0
- package/dist/src/commands/mcp.test.js.map +1 -1
- package/dist/src/commands/utils.d.ts +6 -0
- package/dist/src/commands/utils.js +11 -0
- package/dist/src/commands/utils.js.map +1 -0
- package/dist/src/config/config.d.ts +2 -1
- package/dist/src/config/config.js +36 -23
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +69 -12
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension.test.js +131 -125
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +1 -1
- package/dist/src/config/keyBindings.js +4 -4
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +12 -3
- package/dist/src/config/settingsSchema.js +13 -4
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +1 -1
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +1 -1
- package/dist/src/config/trustedFolders.js +24 -17
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/gemini.d.ts +2 -1
- package/dist/src/gemini.js +73 -15
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +56 -15
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/nonInteractiveCli.js +4 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +2 -2
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/services/CommandService.test.js +3 -2
- package/dist/src/services/CommandService.test.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +5 -3
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +29 -1
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +26 -2
- package/dist/src/test-utils/render.js +76 -3
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/AppContainer.js +112 -42
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +181 -103
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.js +17 -10
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +7 -4
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.js +8 -1
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +4 -0
- package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +12 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +5 -0
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.d.ts +0 -1
- package/dist/src/ui/commands/directoryCommand.js +104 -43
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.test.js +91 -2
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +1 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +3 -0
- package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/permissionsCommand.js +62 -5
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
- package/dist/src/ui/commands/permissionsCommand.test.js +60 -4
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.d.ts +1 -0
- package/dist/src/ui/commands/setupGithubCommand.js +82 -45
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js +35 -5
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +7 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +1 -0
- package/dist/src/ui/components/AboutBox.js +1 -1
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AppHeader.js +3 -22
- package/dist/src/ui/components/AppHeader.js.map +1 -1
- package/dist/src/ui/components/AppHeader.test.js +10 -4
- 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 +16 -15
- package/dist/src/ui/components/AsciiArt.js.map +1 -1
- package/dist/src/ui/components/Banner.d.ts +4 -2
- package/dist/src/ui/components/Banner.js +18 -4
- package/dist/src/ui/components/Banner.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.d.ts +1 -0
- package/dist/src/ui/components/DebugProfiler.js +23 -34
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.test.js +1 -0
- package/dist/src/ui/components/DebugProfiler.test.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +7 -2
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/GradientRegression.test.js +22 -1
- package/dist/src/ui/components/GradientRegression.test.js.map +1 -1
- package/dist/src/ui/components/Header.test.js +27 -2
- package/dist/src/ui/components/Header.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +2 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +29 -35
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +104 -24
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +6 -1
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +2 -2
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +23 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.js +90 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +161 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +5 -2
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +12 -7
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +2 -2
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +2 -2
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +3 -1
- package/dist/src/ui/components/SettingsDialog.js +4 -1
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/ThemedGradient.js +2 -1
- package/dist/src/ui/components/ThemedGradient.js.map +1 -1
- package/dist/src/ui/components/messages/ModelMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ModelMessage.js +5 -0
- package/dist/src/ui/components/messages/ModelMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ShellToolMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/ShellToolMessage.js +76 -0
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +123 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +19 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +6 -4
- package/dist/src/ui/components/messages/ToolMessage.js +15 -102
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +13 -5
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +13 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.js +54 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/ToolShared.d.ts +23 -0
- package/dist/src/ui/components/messages/ToolShared.js +40 -0
- package/dist/src/ui/components/messages/ToolShared.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
- package/dist/src/ui/components/shared/text-buffer.js +7 -1
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/constants/tips.d.ts +6 -0
- package/dist/src/ui/constants/tips.js +168 -0
- package/dist/src/ui/constants/tips.js.map +1 -0
- package/dist/src/ui/constants/wittyPhrases.d.ts +6 -0
- package/dist/src/ui/constants/wittyPhrases.js +137 -0
- package/dist/src/ui/constants/wittyPhrases.js.map +1 -0
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +21 -11
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +29 -10
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +3 -0
- package/dist/src/ui/contexts/UIActionsContext.js +1 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +4 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +11 -5
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +4 -3
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +5 -3
- package/dist/src/ui/hooks/slashCommandProcessor.js +14 -5
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAlternateBuffer.js +1 -1
- package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -1
- package/dist/src/ui/hooks/useBanner.d.ts +14 -0
- package/dist/src/ui/hooks/useBanner.js +48 -0
- package/dist/src/ui/hooks/useBanner.js.map +1 -0
- package/dist/src/ui/hooks/useBanner.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBanner.test.js +92 -0
- package/dist/src/ui/hooks/useBanner.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +3 -2
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.js +5 -5
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +26 -1
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.js +37 -5
- package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.d.ts +2 -2
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +11 -1
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +22 -0
- 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 +69 -12
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +20 -21
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.d.ts +5 -2
- package/dist/src/ui/hooks/useHistoryManager.js +39 -3
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
- package/dist/src/ui/hooks/useInactivityTimer.d.ts +14 -0
- package/dist/src/ui/hooks/useInactivityTimer.js +30 -0
- package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +8 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +119 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +151 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +4 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +1 -2
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +21 -9
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useMouseClick.d.ts +12 -0
- package/dist/src/ui/hooks/useMouseClick.js +28 -0
- package/dist/src/ui/hooks/useMouseClick.js.map +1 -0
- package/dist/src/ui/hooks/useMouseClick.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMouseClick.test.js +59 -0
- package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +2 -2
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +44 -7
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +191 -89
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +4 -3
- package/dist/src/ui/hooks/usePhraseCycler.js +54 -305
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.test.js +109 -30
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +9 -3
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +25 -3
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js +4 -8
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +1 -8
- package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +18 -12
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.js +13 -4
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.js +37 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.js +1 -1
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
- package/dist/src/ui/hooks/useSessionResume.test.js +4 -4
- package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.d.ts +2 -2
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +2 -2
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +2 -2
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.js +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -1
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +2 -1
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
- package/dist/src/ui/types.d.ts +7 -1
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js +6 -9
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.js +3 -86
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +21 -273
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/directoryUtils.d.ts +6 -0
- package/dist/src/ui/utils/directoryUtils.js +21 -0
- package/dist/src/ui/utils/directoryUtils.js.map +1 -0
- package/dist/src/ui/utils/directoryUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/directoryUtils.test.js +52 -0
- package/dist/src/ui/utils/directoryUtils.test.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +6 -2
- package/dist/src/ui/utils/kittyProtocolDetector.js +47 -43
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/mouse.d.ts +2 -2
- package/dist/src/ui/utils/mouse.js +2 -11
- package/dist/src/ui/utils/mouse.js.map +1 -1
- package/dist/src/utils/cleanup.d.ts +2 -0
- package/dist/src/utils/cleanup.js +16 -0
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/errors.js +10 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/events.d.ts +0 -2
- package/dist/src/utils/events.js +0 -1
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/installationInfo.test.js +8 -9
- package/dist/src/utils/installationInfo.test.js.map +1 -1
- package/dist/src/utils/persistentState.d.ts +1 -1
- package/dist/src/utils/sessionCleanup.test.js +4 -2
- package/dist/src/utils/sessionCleanup.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +5 -0
- package/dist/src/utils/sessionUtils.js +6 -1
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessions.test.d.ts +6 -0
- package/dist/src/utils/sessions.test.js +516 -0
- package/dist/src/utils/sessions.test.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.js +2 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/acp.d.ts +2 -24
- package/dist/src/zed-integration/acp.js +2 -156
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/acp.test.d.ts +6 -0
- package/dist/src/zed-integration/acp.test.js +227 -0
- package/dist/src/zed-integration/acp.test.js.map +1 -0
- package/dist/src/zed-integration/connection.d.ts +28 -0
- package/dist/src/zed-integration/connection.js +163 -0
- package/dist/src/zed-integration/connection.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +69 -13
- package/dist/src/zed-integration/schema.js +6 -5
- package/dist/src/zed-integration/schema.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +0 -7
- package/dist/src/zed-integration/zedIntegration.js +9 -21
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
|
@@ -16,6 +16,7 @@ import { useShellHistory } from '../hooks/useShellHistory.js';
|
|
|
16
16
|
import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
|
|
17
17
|
import { useInputHistory } from '../hooks/useInputHistory.js';
|
|
18
18
|
import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
|
|
19
|
+
import clipboardy from 'clipboardy';
|
|
19
20
|
import * as clipboardUtils from '../utils/clipboardUtils.js';
|
|
20
21
|
import { useKittyKeyboardProtocol } from '../hooks/useKittyKeyboardProtocol.js';
|
|
21
22
|
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
@@ -26,6 +27,7 @@ vi.mock('../hooks/useShellHistory.js');
|
|
|
26
27
|
vi.mock('../hooks/useCommandCompletion.js');
|
|
27
28
|
vi.mock('../hooks/useInputHistory.js');
|
|
28
29
|
vi.mock('../hooks/useReverseSearchCompletion.js');
|
|
30
|
+
vi.mock('clipboardy');
|
|
29
31
|
vi.mock('../utils/clipboardUtils.js');
|
|
30
32
|
vi.mock('../hooks/useKittyKeyboardProtocol.js');
|
|
31
33
|
const mockSlashCommands = [
|
|
@@ -88,6 +90,10 @@ describe('InputPrompt', () => {
|
|
|
88
90
|
const mockedUseInputHistory = vi.mocked(useInputHistory);
|
|
89
91
|
const mockedUseReverseSearchCompletion = vi.mocked(useReverseSearchCompletion);
|
|
90
92
|
const mockedUseKittyKeyboardProtocol = vi.mocked(useKittyKeyboardProtocol);
|
|
93
|
+
const mockSetEmbeddedShellFocused = vi.fn();
|
|
94
|
+
const uiActions = {
|
|
95
|
+
setEmbeddedShellFocused: mockSetEmbeddedShellFocused,
|
|
96
|
+
};
|
|
91
97
|
beforeEach(() => {
|
|
92
98
|
vi.resetAllMocks();
|
|
93
99
|
mockCommandContext = createMockCommandContext();
|
|
@@ -129,6 +135,7 @@ describe('InputPrompt', () => {
|
|
|
129
135
|
deleteWordLeft: vi.fn(),
|
|
130
136
|
deleteWordRight: vi.fn(),
|
|
131
137
|
visualToLogicalMap: [[0, 0]],
|
|
138
|
+
getOffset: vi.fn().mockReturnValue(0),
|
|
132
139
|
};
|
|
133
140
|
mockShellHistory = {
|
|
134
141
|
history: [],
|
|
@@ -180,7 +187,6 @@ describe('InputPrompt', () => {
|
|
|
180
187
|
};
|
|
181
188
|
mockedUseReverseSearchCompletion.mockReturnValue(mockReverseSearchCompletion);
|
|
182
189
|
mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
183
|
-
supported: false,
|
|
184
190
|
enabled: false,
|
|
185
191
|
checking: false,
|
|
186
192
|
});
|
|
@@ -212,7 +218,9 @@ describe('InputPrompt', () => {
|
|
|
212
218
|
});
|
|
213
219
|
it('should call shellHistory.getPreviousCommand on up arrow in shell mode', async () => {
|
|
214
220
|
props.shellModeActive = true;
|
|
215
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
221
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
222
|
+
uiActions,
|
|
223
|
+
});
|
|
216
224
|
await act(async () => {
|
|
217
225
|
stdin.write('\u001B[A');
|
|
218
226
|
});
|
|
@@ -221,7 +229,9 @@ describe('InputPrompt', () => {
|
|
|
221
229
|
});
|
|
222
230
|
it('should call shellHistory.getNextCommand on down arrow in shell mode', async () => {
|
|
223
231
|
props.shellModeActive = true;
|
|
224
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
232
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
233
|
+
uiActions,
|
|
234
|
+
});
|
|
225
235
|
await act(async () => {
|
|
226
236
|
stdin.write('\u001B[B');
|
|
227
237
|
await waitFor(() => expect(mockShellHistory.getNextCommand).toHaveBeenCalled());
|
|
@@ -231,7 +241,9 @@ describe('InputPrompt', () => {
|
|
|
231
241
|
it('should set the buffer text when a shell history command is retrieved', async () => {
|
|
232
242
|
props.shellModeActive = true;
|
|
233
243
|
vi.mocked(mockShellHistory.getPreviousCommand).mockReturnValue('previous command');
|
|
234
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
244
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
245
|
+
uiActions,
|
|
246
|
+
});
|
|
235
247
|
await act(async () => {
|
|
236
248
|
stdin.write('\u001B[A');
|
|
237
249
|
});
|
|
@@ -244,7 +256,9 @@ describe('InputPrompt', () => {
|
|
|
244
256
|
it('should call shellHistory.addCommandToHistory on submit in shell mode', async () => {
|
|
245
257
|
props.shellModeActive = true;
|
|
246
258
|
props.buffer.setText('ls -l');
|
|
247
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
259
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
260
|
+
uiActions,
|
|
261
|
+
});
|
|
248
262
|
await act(async () => {
|
|
249
263
|
stdin.write('\r');
|
|
250
264
|
});
|
|
@@ -256,7 +270,9 @@ describe('InputPrompt', () => {
|
|
|
256
270
|
});
|
|
257
271
|
it('should NOT call shell history methods when not in shell mode', async () => {
|
|
258
272
|
props.buffer.setText('some text');
|
|
259
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
273
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
274
|
+
uiActions,
|
|
275
|
+
});
|
|
260
276
|
await act(async () => {
|
|
261
277
|
stdin.write('\u001B[A'); // Up arrow
|
|
262
278
|
});
|
|
@@ -284,7 +300,9 @@ describe('InputPrompt', () => {
|
|
|
284
300
|
],
|
|
285
301
|
});
|
|
286
302
|
props.buffer.setText('/mem');
|
|
287
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
303
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
304
|
+
uiActions,
|
|
305
|
+
});
|
|
288
306
|
// Test up arrow
|
|
289
307
|
await act(async () => {
|
|
290
308
|
stdin.write('\u001B[A'); // Up arrow
|
|
@@ -307,7 +325,9 @@ describe('InputPrompt', () => {
|
|
|
307
325
|
],
|
|
308
326
|
});
|
|
309
327
|
props.buffer.setText('/mem');
|
|
310
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
328
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
329
|
+
uiActions,
|
|
330
|
+
});
|
|
311
331
|
// Test down arrow
|
|
312
332
|
await act(async () => {
|
|
313
333
|
stdin.write('\u001B[B'); // Down arrow
|
|
@@ -326,7 +346,9 @@ describe('InputPrompt', () => {
|
|
|
326
346
|
showSuggestions: false,
|
|
327
347
|
});
|
|
328
348
|
props.buffer.setText('some text');
|
|
329
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
349
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
350
|
+
uiActions,
|
|
351
|
+
});
|
|
330
352
|
await act(async () => {
|
|
331
353
|
stdin.write('\u001B[A'); // Up arrow
|
|
332
354
|
});
|
|
@@ -402,6 +424,7 @@ describe('InputPrompt', () => {
|
|
|
402
424
|
// Set initial text and cursor position
|
|
403
425
|
mockBuffer.text = 'Hello world';
|
|
404
426
|
mockBuffer.cursor = [0, 5]; // Cursor after "Hello"
|
|
427
|
+
vi.mocked(mockBuffer.getOffset).mockReturnValue(5);
|
|
405
428
|
mockBuffer.lines = ['Hello world'];
|
|
406
429
|
mockBuffer.replaceRangeByOffset = vi.fn();
|
|
407
430
|
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
@@ -437,6 +460,22 @@ describe('InputPrompt', () => {
|
|
|
437
460
|
unmount();
|
|
438
461
|
});
|
|
439
462
|
});
|
|
463
|
+
describe('clipboard text paste', () => {
|
|
464
|
+
it('should insert text from clipboard on Ctrl+V', async () => {
|
|
465
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
|
|
466
|
+
vi.mocked(clipboardy.read).mockResolvedValue('pasted text');
|
|
467
|
+
vi.mocked(mockBuffer.replaceRangeByOffset).mockClear();
|
|
468
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
469
|
+
await act(async () => {
|
|
470
|
+
stdin.write('\x16'); // Ctrl+V
|
|
471
|
+
});
|
|
472
|
+
await waitFor(() => {
|
|
473
|
+
expect(clipboardy.read).toHaveBeenCalled();
|
|
474
|
+
expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalledWith(expect.any(Number), expect.any(Number), 'pasted text');
|
|
475
|
+
});
|
|
476
|
+
unmount();
|
|
477
|
+
});
|
|
478
|
+
});
|
|
440
479
|
it.each([
|
|
441
480
|
{
|
|
442
481
|
name: 'should complete a partial parent command',
|
|
@@ -476,7 +515,9 @@ describe('InputPrompt', () => {
|
|
|
476
515
|
activeSuggestionIndex: activeIndex,
|
|
477
516
|
});
|
|
478
517
|
props.buffer.setText(bufferText);
|
|
479
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
518
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
519
|
+
uiActions,
|
|
520
|
+
});
|
|
480
521
|
await act(async () => stdin.write('\t'));
|
|
481
522
|
await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(activeIndex));
|
|
482
523
|
unmount();
|
|
@@ -489,7 +530,9 @@ describe('InputPrompt', () => {
|
|
|
489
530
|
activeSuggestionIndex: 0,
|
|
490
531
|
});
|
|
491
532
|
props.buffer.setText('/mem');
|
|
492
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
533
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
534
|
+
uiActions,
|
|
535
|
+
});
|
|
493
536
|
await act(async () => {
|
|
494
537
|
stdin.write('\r');
|
|
495
538
|
});
|
|
@@ -516,7 +559,9 @@ describe('InputPrompt', () => {
|
|
|
516
559
|
activeSuggestionIndex: 0,
|
|
517
560
|
});
|
|
518
561
|
props.buffer.setText('/?');
|
|
519
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
562
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
563
|
+
uiActions,
|
|
564
|
+
});
|
|
520
565
|
await act(async () => {
|
|
521
566
|
stdin.write('\t'); // Press Tab for autocomplete
|
|
522
567
|
});
|
|
@@ -525,7 +570,9 @@ describe('InputPrompt', () => {
|
|
|
525
570
|
});
|
|
526
571
|
it('should not submit on Enter when the buffer is empty or only contains whitespace', async () => {
|
|
527
572
|
props.buffer.setText(' '); // Set buffer to whitespace
|
|
528
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
573
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
574
|
+
uiActions,
|
|
575
|
+
});
|
|
529
576
|
await act(async () => {
|
|
530
577
|
stdin.write('\r'); // Press Enter
|
|
531
578
|
});
|
|
@@ -541,7 +588,9 @@ describe('InputPrompt', () => {
|
|
|
541
588
|
isPerfectMatch: true,
|
|
542
589
|
});
|
|
543
590
|
props.buffer.setText('/clear');
|
|
544
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
591
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
592
|
+
uiActions,
|
|
593
|
+
});
|
|
545
594
|
await act(async () => {
|
|
546
595
|
stdin.write('\r');
|
|
547
596
|
});
|
|
@@ -555,7 +604,9 @@ describe('InputPrompt', () => {
|
|
|
555
604
|
isPerfectMatch: false, // Added explicit isPerfectMatch false
|
|
556
605
|
});
|
|
557
606
|
props.buffer.setText('/clear');
|
|
558
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
607
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
608
|
+
uiActions,
|
|
609
|
+
});
|
|
559
610
|
await act(async () => {
|
|
560
611
|
stdin.write('\r');
|
|
561
612
|
});
|
|
@@ -570,7 +621,9 @@ describe('InputPrompt', () => {
|
|
|
570
621
|
activeSuggestionIndex: 0,
|
|
571
622
|
});
|
|
572
623
|
props.buffer.setText('@src/components/');
|
|
573
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
624
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
625
|
+
uiActions,
|
|
626
|
+
});
|
|
574
627
|
await act(async () => {
|
|
575
628
|
stdin.write('\r');
|
|
576
629
|
});
|
|
@@ -583,7 +636,9 @@ describe('InputPrompt', () => {
|
|
|
583
636
|
mockBuffer.text = 'first line\\';
|
|
584
637
|
mockBuffer.cursor = [0, 11];
|
|
585
638
|
mockBuffer.lines = ['first line\\'];
|
|
586
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
639
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
640
|
+
uiActions,
|
|
641
|
+
});
|
|
587
642
|
await act(async () => {
|
|
588
643
|
stdin.write('\r');
|
|
589
644
|
});
|
|
@@ -598,7 +653,9 @@ describe('InputPrompt', () => {
|
|
|
598
653
|
await act(async () => {
|
|
599
654
|
props.buffer.setText('some text to clear');
|
|
600
655
|
});
|
|
601
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
656
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
657
|
+
uiActions,
|
|
658
|
+
});
|
|
602
659
|
await act(async () => {
|
|
603
660
|
stdin.write('\x03'); // Ctrl+C character
|
|
604
661
|
});
|
|
@@ -611,7 +668,9 @@ describe('InputPrompt', () => {
|
|
|
611
668
|
});
|
|
612
669
|
it('should NOT clear the buffer on Ctrl+C if it is empty', async () => {
|
|
613
670
|
props.buffer.text = '';
|
|
614
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
671
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
672
|
+
uiActions,
|
|
673
|
+
});
|
|
615
674
|
await act(async () => {
|
|
616
675
|
stdin.write('\x03'); // Ctrl+C character
|
|
617
676
|
});
|
|
@@ -621,7 +680,9 @@ describe('InputPrompt', () => {
|
|
|
621
680
|
unmount();
|
|
622
681
|
});
|
|
623
682
|
it('should call setBannerVisible(false) when clear screen key is pressed', async () => {
|
|
624
|
-
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
683
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
684
|
+
uiActions,
|
|
685
|
+
});
|
|
625
686
|
await act(async () => {
|
|
626
687
|
stdin.write('\x0C'); // Ctrl+L
|
|
627
688
|
});
|
|
@@ -721,7 +782,9 @@ describe('InputPrompt', () => {
|
|
|
721
782
|
? [{ label: 'suggestion', value: 'suggestion' }]
|
|
722
783
|
: [],
|
|
723
784
|
});
|
|
724
|
-
const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props })
|
|
785
|
+
const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
786
|
+
uiActions,
|
|
787
|
+
});
|
|
725
788
|
await waitFor(() => {
|
|
726
789
|
expect(mockedUseCommandCompletion).toHaveBeenCalledWith(mockBuffer, ['/test/project/src'], path.join('test', 'project', 'src'), mockSlashCommands, mockCommandContext, false, false, expect.any(Object));
|
|
727
790
|
});
|
|
@@ -982,7 +1045,6 @@ describe('InputPrompt', () => {
|
|
|
982
1045
|
beforeEach(() => {
|
|
983
1046
|
vi.useFakeTimers();
|
|
984
1047
|
mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
985
|
-
supported: false,
|
|
986
1048
|
enabled: false,
|
|
987
1049
|
checking: false,
|
|
988
1050
|
});
|
|
@@ -1047,7 +1109,6 @@ describe('InputPrompt', () => {
|
|
|
1047
1109
|
{
|
|
1048
1110
|
name: 'kitty',
|
|
1049
1111
|
setup: () => mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
1050
|
-
supported: true,
|
|
1051
1112
|
enabled: true,
|
|
1052
1113
|
checking: false,
|
|
1053
1114
|
}),
|
|
@@ -1540,7 +1601,7 @@ describe('InputPrompt', () => {
|
|
|
1540
1601
|
];
|
|
1541
1602
|
props.buffer.visualCursor = [0, 11];
|
|
1542
1603
|
props.buffer.visualScrollRow = 0;
|
|
1543
|
-
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true });
|
|
1604
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
|
|
1544
1605
|
// Wait for initial render
|
|
1545
1606
|
await waitFor(() => {
|
|
1546
1607
|
expect(stdout.lastFrame()).toContain('hello world');
|
|
@@ -1555,6 +1616,25 @@ describe('InputPrompt', () => {
|
|
|
1555
1616
|
});
|
|
1556
1617
|
unmount();
|
|
1557
1618
|
});
|
|
1619
|
+
it('should unfocus embedded shell on click', async () => {
|
|
1620
|
+
props.buffer.text = 'hello';
|
|
1621
|
+
props.buffer.lines = ['hello'];
|
|
1622
|
+
props.buffer.viewportVisualLines = ['hello'];
|
|
1623
|
+
props.buffer.visualToLogicalMap = [[0, 0]];
|
|
1624
|
+
props.isEmbeddedShellFocused = true;
|
|
1625
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
|
|
1626
|
+
await waitFor(() => {
|
|
1627
|
+
expect(stdout.lastFrame()).toContain('hello');
|
|
1628
|
+
});
|
|
1629
|
+
await act(async () => {
|
|
1630
|
+
// Click somewhere in the prompt
|
|
1631
|
+
stdin.write(`\x1b[<0;5;2M`);
|
|
1632
|
+
});
|
|
1633
|
+
await waitFor(() => {
|
|
1634
|
+
expect(mockSetEmbeddedShellFocused).toHaveBeenCalledWith(false);
|
|
1635
|
+
});
|
|
1636
|
+
unmount();
|
|
1637
|
+
});
|
|
1558
1638
|
});
|
|
1559
1639
|
describe('queued message editing', () => {
|
|
1560
1640
|
it('should load all queued messages when up arrow is pressed with empty input', async () => {
|