@machina.ai/cell-cli 1.11.0-rc1 → 1.13.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +16 -10
- package/dist/src/commands/extensions/disable.d.ts +1 -1
- package/dist/src/commands/extensions/disable.js +15 -7
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/enable.d.ts +1 -1
- package/dist/src/commands/extensions/enable.js +15 -7
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/install.js +14 -3
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +39 -19
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.js +14 -3
- package/dist/src/commands/extensions/link.js.map +1 -1
- package/dist/src/commands/extensions/list.js +13 -4
- package/dist/src/commands/extensions/list.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.js +13 -2
- package/dist/src/commands/extensions/uninstall.js.map +1 -1
- package/dist/src/commands/extensions/update.js +18 -13
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/extensions/validate.d.ts +12 -0
- package/dist/src/commands/extensions/validate.js +83 -0
- package/dist/src/commands/extensions/validate.js.map +1 -0
- package/dist/src/commands/extensions/validate.test.js +93 -0
- package/dist/src/commands/extensions/validate.test.js.map +1 -0
- package/dist/src/commands/extensions.js +3 -0
- package/dist/src/commands/extensions.js.map +1 -1
- package/dist/src/commands/mcp/add.test.js +3 -0
- package/dist/src/commands/mcp/add.test.js.map +1 -1
- package/dist/src/commands/mcp/list.js +10 -3
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/mcp/list.test.js +37 -27
- package/dist/src/commands/mcp/list.test.js.map +1 -1
- package/dist/src/config/auth.js +0 -5
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.d.ts +6 -3
- package/dist/src/config/config.js +65 -80
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +235 -212
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager.d.ts +63 -0
- package/dist/src/config/extension-manager.js +450 -0
- package/dist/src/config/extension-manager.js.map +1 -0
- package/dist/src/config/extension.d.ts +4 -51
- package/dist/src/config/extension.js +1 -535
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extension.test.js +525 -201
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +38 -0
- package/dist/src/config/extensions/consent.js +123 -0
- package/dist/src/config/extensions/consent.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +1 -1
- package/dist/src/config/extensions/extensionEnablement.js +4 -3
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.test.js +10 -10
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.d.ts +15 -0
- package/dist/src/config/extensions/extensionSettings.js +113 -0
- package/dist/src/config/extensions/extensionSettings.js.map +1 -0
- package/dist/src/config/extensions/extensionSettings.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionSettings.test.js +254 -0
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +2 -2
- package/dist/src/config/extensions/github.js +5 -10
- package/dist/src/config/extensions/github.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +153 -167
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/extensions/github_fetch.d.ts +1 -1
- package/dist/src/config/extensions/github_fetch.js +13 -1
- package/dist/src/config/extensions/github_fetch.js.map +1 -1
- package/dist/src/config/extensions/github_fetch.test.d.ts +6 -0
- package/dist/src/config/extensions/github_fetch.test.js +169 -0
- package/dist/src/config/extensions/github_fetch.test.js.map +1 -0
- package/dist/src/config/extensions/storage.d.ts +14 -0
- package/dist/src/config/extensions/storage.js +32 -0
- package/dist/src/config/extensions/storage.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +4 -4
- package/dist/src/config/extensions/update.js +39 -39
- package/dist/src/config/extensions/update.js.map +1 -1
- package/dist/src/config/extensions/update.test.js +72 -74
- package/dist/src/config/extensions/update.test.js.map +1 -1
- package/dist/src/config/extensions/variableSchema.d.ts +0 -6
- package/dist/src/config/extensions/variableSchema.js.map +1 -1
- package/dist/src/config/extensions/variables.d.ts +4 -0
- package/dist/src/config/extensions/variables.js +6 -0
- package/dist/src/config/extensions/variables.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +3 -0
- package/dist/src/config/keyBindings.js +30 -8
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/keyBindings.test.js +17 -0
- package/dist/src/config/keyBindings.test.js.map +1 -1
- package/dist/src/config/policies/read-only.toml +56 -0
- package/dist/src/config/policies/write.toml +63 -0
- package/dist/src/config/policies/yolo.toml +31 -0
- package/dist/src/config/policy-engine.integration.test.js +41 -38
- package/dist/src/config/policy-engine.integration.test.js.map +1 -1
- package/dist/src/config/policy.d.ts +2 -2
- package/dist/src/config/policy.js +10 -148
- package/dist/src/config/policy.js.map +1 -1
- package/dist/src/config/sandboxConfig.d.ts +1 -1
- package/dist/src/config/sandboxConfig.js +6 -3
- package/dist/src/config/sandboxConfig.js.map +1 -1
- package/dist/src/config/settings.d.ts +2 -1
- package/dist/src/config/settings.js +58 -18
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +128 -69
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +170 -28
- package/dist/src/config/settingsSchema.js +418 -27
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +42 -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 +4 -2
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/core/initializer.js +2 -1
- package/dist/src/core/initializer.js.map +1 -1
- package/dist/src/gemini.d.ts +1 -1
- package/dist/src/gemini.js +46 -16
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +88 -30
- 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.d.ts +9 -1
- package/dist/src/nonInteractiveCli.js +114 -7
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +355 -112
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +4 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +22 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FeedbackService.js +2 -2
- package/dist/src/services/FeedbackService.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +2 -2
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +4 -2
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/test-utils/async.d.ts +9 -0
- package/dist/src/test-utils/async.js +29 -0
- package/dist/src/test-utils/async.js.map +1 -0
- package/dist/src/test-utils/createExtension.d.ts +3 -1
- package/dist/src/test-utils/createExtension.js +3 -3
- package/dist/src/test-utils/createExtension.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +16 -2
- package/dist/src/test-utils/render.js +66 -4
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/test-utils/render.test.d.ts +6 -0
- package/dist/src/test-utils/render.test.js +79 -0
- package/dist/src/test-utils/render.test.js.map +1 -0
- package/dist/src/ui/App.test.js +1 -1
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/AppContainer.js +181 -65
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +505 -147
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.js +1 -1
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.d.ts +14 -0
- package/dist/src/ui/auth/ApiAuthDialog.js +26 -0
- package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.js +91 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.js +7 -3
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/useAuth.d.ts +2 -0
- package/dist/src/ui/auth/useAuth.js +31 -2
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/colors.js +3 -0
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +1 -1
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +64 -11
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.test.js +72 -1
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +14 -14
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.test.js +4 -0
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +1 -1
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +3 -1
- package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/policiesCommand.d.ts +7 -0
- package/dist/src/ui/commands/policiesCommand.js +59 -0
- package/dist/src/ui/commands/policiesCommand.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/policiesCommand.test.js +83 -0
- package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.js +1 -1
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -1
- package/dist/src/ui/components/AsciiArt.d.ts +3 -3
- package/dist/src/ui/components/AsciiArt.js +3 -3
- package/dist/src/ui/components/Composer.js +1 -1
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/Composer.test.js +5 -2
- package/dist/src/ui/components/Composer.test.js.map +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.js +4 -6
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
- package/dist/src/ui/components/ConsentPrompt.test.js +18 -8
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +1 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +11 -6
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.js +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.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/FolderTrustDialog.test.js +2 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.js +4 -3
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Footer.test.js +83 -0
- package/dist/src/ui/components/Footer.test.js.map +1 -1
- package/dist/src/ui/components/Header.test.js +13 -5
- package/dist/src/ui/components/Header.test.js.map +1 -1
- package/dist/src/ui/components/Help.test.js +5 -4
- package/dist/src/ui/components/Help.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +27 -8
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +776 -727
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +2 -2
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +28 -15
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.js +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +2 -2
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -1
- package/dist/src/ui/components/MainContent.js +15 -4
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +1 -1
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +23 -13
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +38 -5
- package/dist/src/ui/components/Notifications.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/PrepareLabel.test.js +14 -8
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +14 -6
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -1
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +11 -6
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +32 -25
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +428 -532
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +2 -2
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.test.js +2 -2
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.js +25 -17
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/Todo.js +27 -5
- package/dist/src/ui/components/messages/Todo.js.map +1 -1
- package/dist/src/ui/components/messages/Todo.test.js +20 -8
- package/dist/src/ui/components/messages/Todo.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +29 -15
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/WarningMessage.js +2 -2
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +43 -22
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
- package/dist/src/ui/components/shared/TextInput.d.ts +15 -0
- package/dist/src/ui/components/shared/TextInput.js +38 -0
- package/dist/src/ui/components/shared/TextInput.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.test.d.ts +6 -0
- package/dist/src/ui/components/shared/TextInput.test.js +242 -0
- package/dist/src/ui/components/shared/TextInput.test.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +9 -2
- package/dist/src/ui/components/shared/text-buffer.js +51 -13
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +385 -202
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
- package/dist/src/ui/components/views/ChatList.test.js +7 -4
- package/dist/src/ui/components/views/ChatList.test.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.d.ts +7 -1
- package/dist/src/ui/components/views/ExtensionsList.js +9 -11
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.test.js +43 -22
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +23 -12
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +3 -2
- package/dist/src/ui/contexts/KeypressContext.js +610 -540
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +438 -718
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/MouseContext.d.ts +21 -0
- package/dist/src/ui/contexts/MouseContext.js +89 -0
- package/dist/src/ui/contexts/MouseContext.js.map +1 -0
- package/dist/src/ui/contexts/MouseContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/MouseContext.test.js +164 -0
- package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.test.js +35 -17
- package/dist/src/ui/contexts/SessionContext.test.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +2 -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 +31 -9
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +163 -64
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +64 -35
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +193 -165
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.test.js +16 -5
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +10 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +32 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.js +66 -64
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.js +26 -9
- package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js +40 -34
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +14 -5
- package/dist/src/ui/hooks/useExtensionUpdates.js +18 -13
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +49 -44
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -1
- package/dist/src/ui/hooks/useFlickerDetector.test.js +9 -5
- package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.test.js +25 -9
- package/dist/src/ui/hooks/useFocus.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +46 -22
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +56 -19
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +260 -411
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +4 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +46 -34
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.test.js +2 -1
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +40 -9
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -1
- package/dist/src/ui/hooks/useInputHistory.test.js +2 -1
- package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +2 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -1
- package/dist/src/ui/hooks/useKeypress.test.js +103 -114
- package/dist/src/ui/hooks/useKeypress.test.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +24 -6
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +10 -5
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -1
- package/dist/src/ui/hooks/useMessageQueue.test.js +62 -45
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -1
- package/dist/src/ui/hooks/useModelCommand.test.js +21 -11
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -1
- package/dist/src/ui/hooks/useMouse.d.ts +17 -0
- package/dist/src/ui/hooks/useMouse.js +27 -0
- package/dist/src/ui/hooks/useMouse.js.map +1 -0
- package/dist/src/ui/hooks/useMouse.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMouse.test.js +57 -0
- package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +2 -2
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.test.js +109 -106
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +26 -6
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +2 -2
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +13 -14
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +55 -48
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +8 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +59 -34
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +65 -0
- package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +2 -2
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.js +5 -4
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.test.js +272 -183
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.js +52 -20
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +18 -7
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +275 -137
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useTimer.test.js +43 -14
- package/dist/src/ui/hooks/useTimer.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +226 -242
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/vim.test.js +235 -355
- package/dist/src/ui/hooks/vim.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +30 -3
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/state/extensions.d.ts +1 -0
- package/dist/src/ui/state/extensions.js +1 -0
- package/dist/src/ui/state/extensions.js.map +1 -1
- package/dist/src/ui/themes/ansi-light.js +1 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +1 -0
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +2 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
- package/dist/src/ui/themes/ayu-light.js +2 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -1
- package/dist/src/ui/themes/ayu.js +2 -0
- package/dist/src/ui/themes/ayu.js.map +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +1 -0
- package/dist/src/ui/themes/color-utils.js +6 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -1
- package/dist/src/ui/themes/color-utils.test.js +13 -1
- package/dist/src/ui/themes/color-utils.test.js.map +1 -1
- package/dist/src/ui/themes/dracula.js +2 -0
- package/dist/src/ui/themes/dracula.js.map +1 -1
- package/dist/src/ui/themes/github-dark.js +2 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -1
- package/dist/src/ui/themes/github-light.js +2 -0
- package/dist/src/ui/themes/github-light.js.map +1 -1
- package/dist/src/ui/themes/googlecode.js +2 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +3 -0
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/semantic-tokens.d.ts +2 -0
- package/dist/src/ui/themes/semantic-tokens.js +6 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +2 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +3 -0
- package/dist/src/ui/themes/theme.js +14 -3
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/theme.test.js +67 -1
- package/dist/src/ui/themes/theme.test.js.map +1 -1
- package/dist/src/ui/themes/xcode.js +2 -0
- package/dist/src/ui/themes/xcode.js.map +1 -1
- package/dist/src/ui/types.d.ts +3 -1
- package/dist/src/ui/types.js +2 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +2 -1
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +11 -10
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +11 -9
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +2 -2
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/input.d.ts +17 -0
- package/dist/src/ui/utils/input.js +51 -0
- package/dist/src/ui/utils/input.js.map +1 -0
- package/dist/src/ui/utils/input.test.d.ts +6 -0
- package/dist/src/ui/utils/input.test.js +44 -0
- package/dist/src/ui/utils/input.test.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +13 -4
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/mouse.d.ts +31 -0
- package/dist/src/ui/utils/mouse.js +164 -0
- package/dist/src/ui/utils/mouse.js.map +1 -0
- package/dist/src/ui/utils/mouse.test.d.ts +6 -0
- package/dist/src/ui/utils/mouse.test.js +131 -0
- package/dist/src/ui/utils/mouse.test.js.map +1 -0
- package/dist/src/ui/utils/textOutput.d.ts +25 -0
- package/dist/src/ui/utils/textOutput.js +49 -0
- package/dist/src/ui/utils/textOutput.js.map +1 -0
- package/dist/src/ui/utils/textOutput.test.d.ts +6 -0
- package/dist/src/ui/utils/textOutput.test.js +79 -0
- package/dist/src/ui/utils/textOutput.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +7 -1
- package/dist/src/ui/utils/updateCheck.js +33 -29
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/ui/utils/updateCheck.test.js +24 -50
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -1
- package/dist/src/utils/commentJson.js +2 -2
- package/dist/src/utils/commentJson.js.map +1 -1
- package/dist/src/utils/commentJson.test.js +7 -6
- package/dist/src/utils/commentJson.test.js.map +1 -1
- package/dist/src/utils/envVarResolver.d.ts +2 -2
- package/dist/src/utils/envVarResolver.js +10 -7
- package/dist/src/utils/envVarResolver.js.map +1 -1
- package/dist/src/utils/events.d.ts +11 -2
- package/dist/src/utils/events.js +1 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.js +9 -3
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/sandbox.js +16 -18
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/version.js +6 -2
- package/dist/src/utils/version.js.map +1 -1
- package/dist/src/zed-integration/acp.js +2 -1
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +4 -4
- package/dist/src/zed-integration/zedIntegration.d.ts +2 -2
- package/dist/src/zed-integration/zedIntegration.js +12 -19
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -14
- package/dist/src/config/policy.test.js +0 -360
- package/dist/src/config/policy.test.js.map +0 -1
- package/dist/src/utils/package.d.ts +0 -12
- package/dist/src/utils/package.js +0 -24
- package/dist/src/utils/package.js.map +0 -1
- /package/dist/src/{config/policy.test.d.ts → commands/extensions/validate.test.d.ts} +0 -0
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
7
|
-
import {
|
|
7
|
+
import { act } from 'react';
|
|
8
|
+
import { renderHook } from '../../test-utils/render.js';
|
|
8
9
|
import { useReactToolScheduler, mapToDisplay, } from './useReactToolScheduler.js';
|
|
9
10
|
import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, ToolConfirmationOutcome, ApprovalMode, MockTool, } from '@google/gemini-cli-core';
|
|
10
11
|
import { ToolCallStatus } from '../types.js';
|
|
11
12
|
// Mocks
|
|
12
13
|
vi.mock('@google/gemini-cli-core', async () => {
|
|
13
14
|
const actual = await vi.importActual('@google/gemini-cli-core');
|
|
15
|
+
// Patch CoreToolScheduler to have cancelAll if it's missing in the test environment
|
|
16
|
+
if (actual.CoreToolScheduler &&
|
|
17
|
+
!actual.CoreToolScheduler.prototype.cancelAll) {
|
|
18
|
+
actual.CoreToolScheduler.prototype.cancelAll = vi.fn();
|
|
19
|
+
}
|
|
14
20
|
return {
|
|
15
21
|
...actual,
|
|
16
22
|
ToolRegistry: vi.fn(),
|
|
@@ -70,10 +76,8 @@ const mockToolRequiresConfirmation = new MockTool({
|
|
|
70
76
|
});
|
|
71
77
|
describe('useReactToolScheduler in YOLO Mode', () => {
|
|
72
78
|
let onComplete;
|
|
73
|
-
let setPendingHistoryItem;
|
|
74
79
|
beforeEach(() => {
|
|
75
80
|
onComplete = vi.fn();
|
|
76
|
-
setPendingHistoryItem = vi.fn();
|
|
77
81
|
mockToolRegistry.getTool.mockClear();
|
|
78
82
|
mockToolRequiresConfirmation.execute.mockClear();
|
|
79
83
|
mockToolRequiresConfirmation.shouldConfirmExecute.mockClear();
|
|
@@ -87,7 +91,7 @@ describe('useReactToolScheduler in YOLO Mode', () => {
|
|
|
87
91
|
// IMPORTANT: Disable YOLO mode after this test suite
|
|
88
92
|
mockConfig.getApprovalMode.mockReturnValue(ApprovalMode.DEFAULT);
|
|
89
93
|
});
|
|
90
|
-
const renderSchedulerInYoloMode = () => renderHook(() => useReactToolScheduler(onComplete, mockConfig,
|
|
94
|
+
const renderSchedulerInYoloMode = () => renderHook(() => useReactToolScheduler(onComplete, mockConfig, () => undefined, () => { }));
|
|
91
95
|
it('should skip confirmation and execute tool directly when yoloMode is true', async () => {
|
|
92
96
|
mockToolRegistry.getTool.mockReturnValue(mockToolRequiresConfirmation);
|
|
93
97
|
const expectedOutput = 'YOLO Confirmed output';
|
|
@@ -106,13 +110,13 @@ describe('useReactToolScheduler in YOLO Mode', () => {
|
|
|
106
110
|
schedule(request, new AbortController().signal);
|
|
107
111
|
});
|
|
108
112
|
await act(async () => {
|
|
109
|
-
await vi.
|
|
113
|
+
await vi.advanceTimersByTimeAsync(0); // Process validation
|
|
110
114
|
});
|
|
111
115
|
await act(async () => {
|
|
112
|
-
await vi.
|
|
116
|
+
await vi.advanceTimersByTimeAsync(0); // Process scheduling
|
|
113
117
|
});
|
|
114
118
|
await act(async () => {
|
|
115
|
-
await vi.
|
|
119
|
+
await vi.advanceTimersByTimeAsync(0); // Process execution
|
|
116
120
|
});
|
|
117
121
|
// Check that execute WAS called
|
|
118
122
|
expect(mockToolRequiresConfirmation.execute).toHaveBeenCalledWith(request.args);
|
|
@@ -135,49 +139,27 @@ describe('useReactToolScheduler in YOLO Mode', () => {
|
|
|
135
139
|
}),
|
|
136
140
|
}),
|
|
137
141
|
]);
|
|
138
|
-
// Ensure no confirmation UI was triggered (setPendingHistoryItem should not have been called with confirmation details)
|
|
139
|
-
const setPendingHistoryItemCalls = setPendingHistoryItem.mock.calls;
|
|
140
|
-
const confirmationCall = setPendingHistoryItemCalls.find((call) => {
|
|
141
|
-
const item = typeof call[0] === 'function' ? call[0]({}) : call[0];
|
|
142
|
-
return item?.tools?.[0]?.confirmationDetails;
|
|
143
|
-
});
|
|
144
|
-
expect(confirmationCall).toBeUndefined();
|
|
145
142
|
});
|
|
146
143
|
});
|
|
147
144
|
describe('useReactToolScheduler', () => {
|
|
148
|
-
// TODO(ntaylormullen): The following tests are skipped due to difficulties in
|
|
149
|
-
// reliably testing the asynchronous state updates and interactions with timers.
|
|
150
|
-
// These tests involve complex sequences of events, including confirmations,
|
|
151
|
-
// live output updates, and cancellations, which are challenging to assert
|
|
152
|
-
// correctly with the current testing setup. Further investigation is needed
|
|
153
|
-
// to find a robust way to test these scenarios.
|
|
154
145
|
let onComplete;
|
|
155
|
-
let setPendingHistoryItem;
|
|
156
146
|
let capturedOnConfirmForTest;
|
|
147
|
+
const advanceAndSettle = async () => {
|
|
148
|
+
await act(async () => {
|
|
149
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
const scheduleAndWaitForExecution = async (schedule, request) => {
|
|
153
|
+
act(() => {
|
|
154
|
+
schedule(request, new AbortController().signal);
|
|
155
|
+
});
|
|
156
|
+
await advanceAndSettle();
|
|
157
|
+
await advanceAndSettle();
|
|
158
|
+
await advanceAndSettle();
|
|
159
|
+
};
|
|
157
160
|
beforeEach(() => {
|
|
158
161
|
onComplete = vi.fn();
|
|
159
162
|
capturedOnConfirmForTest = undefined;
|
|
160
|
-
setPendingHistoryItem = vi.fn((updaterOrValue) => {
|
|
161
|
-
let pendingItem = null;
|
|
162
|
-
if (typeof updaterOrValue === 'function') {
|
|
163
|
-
// Loosen the type for prevState to allow for more flexible updates in tests
|
|
164
|
-
const prevState = {
|
|
165
|
-
type: 'tool_group', // Still default to tool_group for most cases
|
|
166
|
-
tools: [],
|
|
167
|
-
};
|
|
168
|
-
pendingItem = updaterOrValue(prevState); // Allow any for more flexibility
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
pendingItem = updaterOrValue;
|
|
172
|
-
}
|
|
173
|
-
// Capture onConfirm if it exists, regardless of the exact type of pendingItem
|
|
174
|
-
// This is a common pattern in these tests.
|
|
175
|
-
if (pendingItem?.tools?.[0]?.confirmationDetails
|
|
176
|
-
?.onConfirm) {
|
|
177
|
-
capturedOnConfirmForTest = pendingItem
|
|
178
|
-
.tools[0].confirmationDetails?.onConfirm;
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
163
|
mockToolRegistry.getTool.mockClear();
|
|
182
164
|
mockTool.execute.mockClear();
|
|
183
165
|
mockTool.shouldConfirmExecute.mockClear();
|
|
@@ -199,7 +181,7 @@ describe('useReactToolScheduler', () => {
|
|
|
199
181
|
vi.clearAllTimers();
|
|
200
182
|
vi.useRealTimers();
|
|
201
183
|
});
|
|
202
|
-
const renderScheduler = () => renderHook(() => useReactToolScheduler(onComplete, mockConfig,
|
|
184
|
+
const renderScheduler = () => renderHook(() => useReactToolScheduler(onComplete, mockConfig, () => undefined, () => { }));
|
|
203
185
|
it('initial state should be empty', () => {
|
|
204
186
|
const { result } = renderScheduler();
|
|
205
187
|
expect(result.current[0]).toEqual([]);
|
|
@@ -212,120 +194,81 @@ describe('useReactToolScheduler', () => {
|
|
|
212
194
|
});
|
|
213
195
|
mockTool.shouldConfirmExecute.mockResolvedValue(null);
|
|
214
196
|
const { result } = renderScheduler();
|
|
215
|
-
const schedule = result.current[1];
|
|
216
197
|
const request = {
|
|
217
198
|
callId: 'call1',
|
|
218
199
|
name: 'mockTool',
|
|
219
200
|
args: { param: 'value' },
|
|
220
201
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
await act(async () => {
|
|
225
|
-
await vi.runAllTimersAsync();
|
|
226
|
-
});
|
|
227
|
-
await act(async () => {
|
|
228
|
-
await vi.runAllTimersAsync();
|
|
229
|
-
});
|
|
230
|
-
await act(async () => {
|
|
231
|
-
await vi.runAllTimersAsync();
|
|
202
|
+
let completedToolCalls = [];
|
|
203
|
+
onComplete.mockImplementation((calls) => {
|
|
204
|
+
completedToolCalls = calls;
|
|
232
205
|
});
|
|
206
|
+
await scheduleAndWaitForExecution(result.current[1], request);
|
|
233
207
|
expect(mockTool.execute).toHaveBeenCalledWith(request.args);
|
|
234
|
-
expect(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
{
|
|
242
|
-
functionResponse: {
|
|
243
|
-
id: 'call1',
|
|
244
|
-
name: 'mockTool',
|
|
245
|
-
response: { output: 'Tool output' },
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
}),
|
|
250
|
-
}),
|
|
251
|
-
]);
|
|
252
|
-
expect(result.current[0]).toEqual([]);
|
|
208
|
+
expect(completedToolCalls).toHaveLength(1);
|
|
209
|
+
expect(completedToolCalls[0].status).toBe('success');
|
|
210
|
+
expect(completedToolCalls[0].request).toBe(request);
|
|
211
|
+
if (completedToolCalls[0].status === 'success' ||
|
|
212
|
+
completedToolCalls[0].status === 'error') {
|
|
213
|
+
expect(completedToolCalls[0].response).toMatchSnapshot();
|
|
214
|
+
}
|
|
253
215
|
});
|
|
254
|
-
it('should
|
|
255
|
-
mockToolRegistry.getTool.mockReturnValue(
|
|
216
|
+
it('should clear previous tool calls when scheduling new ones', async () => {
|
|
217
|
+
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
218
|
+
mockTool.execute.mockResolvedValue({
|
|
219
|
+
llmContent: 'Tool output',
|
|
220
|
+
returnDisplay: 'Formatted tool output',
|
|
221
|
+
});
|
|
256
222
|
const { result } = renderScheduler();
|
|
257
223
|
const schedule = result.current[1];
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
224
|
+
const setToolCallsForDisplay = result.current[3];
|
|
225
|
+
// Manually set a tool call in the display.
|
|
226
|
+
const oldToolCall = {
|
|
227
|
+
request: { callId: 'oldCall' },
|
|
228
|
+
status: 'success',
|
|
262
229
|
};
|
|
263
230
|
act(() => {
|
|
264
|
-
|
|
265
|
-
});
|
|
266
|
-
await act(async () => {
|
|
267
|
-
await vi.runAllTimersAsync();
|
|
231
|
+
setToolCallsForDisplay([oldToolCall]);
|
|
268
232
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
expect(onComplete).toHaveBeenCalledWith([
|
|
273
|
-
expect.objectContaining({
|
|
274
|
-
status: 'error',
|
|
275
|
-
request,
|
|
276
|
-
response: expect.objectContaining({
|
|
277
|
-
error: expect.objectContaining({
|
|
278
|
-
message: expect.stringMatching(/Tool "nonexistentTool" not found in registry/),
|
|
279
|
-
}),
|
|
280
|
-
}),
|
|
281
|
-
}),
|
|
282
|
-
]);
|
|
283
|
-
const errorMessage = onComplete.mock.calls[0][0][0].response.error.message;
|
|
284
|
-
expect(errorMessage).toContain('Did you mean one of:');
|
|
285
|
-
expect(errorMessage).toContain('"mockTool"');
|
|
286
|
-
expect(errorMessage).toContain('"anotherTool"');
|
|
287
|
-
expect(result.current[0]).toEqual([]);
|
|
288
|
-
});
|
|
289
|
-
it('should handle error during shouldConfirmExecute', async () => {
|
|
290
|
-
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
291
|
-
const confirmError = new Error('Confirmation check failed');
|
|
292
|
-
mockTool.shouldConfirmExecute.mockRejectedValue(confirmError);
|
|
293
|
-
const { result } = renderScheduler();
|
|
294
|
-
const schedule = result.current[1];
|
|
295
|
-
const request = {
|
|
296
|
-
callId: 'call1',
|
|
233
|
+
expect(result.current[0]).toEqual([oldToolCall]);
|
|
234
|
+
const newRequest = {
|
|
235
|
+
callId: 'newCall',
|
|
297
236
|
name: 'mockTool',
|
|
298
237
|
args: {},
|
|
299
238
|
};
|
|
300
239
|
act(() => {
|
|
301
|
-
schedule(
|
|
240
|
+
schedule(newRequest, new AbortController().signal);
|
|
302
241
|
});
|
|
242
|
+
// After scheduling, the old call should be gone,
|
|
243
|
+
// and the new one should be in the display in its initial state.
|
|
244
|
+
expect(result.current[0].length).toBe(1);
|
|
245
|
+
expect(result.current[0][0].request.callId).toBe('newCall');
|
|
246
|
+
expect(result.current[0][0].request.callId).not.toBe('oldCall');
|
|
247
|
+
// Let the new call finish.
|
|
303
248
|
await act(async () => {
|
|
304
|
-
await vi.
|
|
249
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
305
250
|
});
|
|
306
251
|
await act(async () => {
|
|
307
|
-
await vi.
|
|
252
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
308
253
|
});
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
response: expect.objectContaining({
|
|
314
|
-
error: confirmError,
|
|
315
|
-
}),
|
|
316
|
-
}),
|
|
317
|
-
]);
|
|
318
|
-
expect(result.current[0]).toEqual([]);
|
|
254
|
+
await act(async () => {
|
|
255
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
256
|
+
});
|
|
257
|
+
expect(onComplete).toHaveBeenCalled();
|
|
319
258
|
});
|
|
320
|
-
it('should
|
|
259
|
+
it('should cancel all running tool calls', async () => {
|
|
321
260
|
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
261
|
+
let resolveExecute = () => { };
|
|
262
|
+
const executePromise = new Promise((resolve) => {
|
|
263
|
+
resolveExecute = resolve;
|
|
264
|
+
});
|
|
265
|
+
mockTool.execute.mockReturnValue(executePromise);
|
|
322
266
|
mockTool.shouldConfirmExecute.mockResolvedValue(null);
|
|
323
|
-
const execError = new Error('Execution failed');
|
|
324
|
-
mockTool.execute.mockRejectedValue(execError);
|
|
325
267
|
const { result } = renderScheduler();
|
|
326
268
|
const schedule = result.current[1];
|
|
269
|
+
const cancelAllToolCalls = result.current[4];
|
|
327
270
|
const request = {
|
|
328
|
-
callId: '
|
|
271
|
+
callId: 'cancelCall',
|
|
329
272
|
name: 'mockTool',
|
|
330
273
|
args: {},
|
|
331
274
|
};
|
|
@@ -333,26 +276,97 @@ describe('useReactToolScheduler', () => {
|
|
|
333
276
|
schedule(request, new AbortController().signal);
|
|
334
277
|
});
|
|
335
278
|
await act(async () => {
|
|
336
|
-
await vi.
|
|
337
|
-
});
|
|
279
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
280
|
+
}); // validation
|
|
338
281
|
await act(async () => {
|
|
339
|
-
await vi.
|
|
282
|
+
await vi.advanceTimersByTimeAsync(0); // Process scheduling
|
|
283
|
+
});
|
|
284
|
+
// At this point, the tool is 'executing' and waiting on the promise.
|
|
285
|
+
expect(result.current[0][0].status).toBe('executing');
|
|
286
|
+
const cancelController = new AbortController();
|
|
287
|
+
act(() => {
|
|
288
|
+
cancelAllToolCalls(cancelController.signal);
|
|
340
289
|
});
|
|
341
290
|
await act(async () => {
|
|
342
|
-
await vi.
|
|
291
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
343
292
|
});
|
|
344
293
|
expect(onComplete).toHaveBeenCalledWith([
|
|
345
294
|
expect.objectContaining({
|
|
346
|
-
status: '
|
|
295
|
+
status: 'cancelled',
|
|
347
296
|
request,
|
|
348
|
-
response: expect.objectContaining({
|
|
349
|
-
error: execError,
|
|
350
|
-
}),
|
|
351
297
|
}),
|
|
352
298
|
]);
|
|
353
|
-
|
|
299
|
+
// Clean up the pending promise to avoid open handles.
|
|
300
|
+
await act(async () => {
|
|
301
|
+
resolveExecute({ llmContent: 'output', returnDisplay: 'display' });
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
it.each([
|
|
305
|
+
{
|
|
306
|
+
desc: 'tool not found',
|
|
307
|
+
setup: () => {
|
|
308
|
+
mockToolRegistry.getTool.mockReturnValue(undefined);
|
|
309
|
+
},
|
|
310
|
+
request: {
|
|
311
|
+
callId: 'call1',
|
|
312
|
+
name: 'nonexistentTool',
|
|
313
|
+
args: {},
|
|
314
|
+
},
|
|
315
|
+
expectedErrorContains: [
|
|
316
|
+
'Tool "nonexistentTool" not found in registry',
|
|
317
|
+
'Did you mean one of:',
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
desc: 'error during shouldConfirmExecute',
|
|
322
|
+
setup: () => {
|
|
323
|
+
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
324
|
+
const confirmError = new Error('Confirmation check failed');
|
|
325
|
+
mockTool.shouldConfirmExecute.mockRejectedValue(confirmError);
|
|
326
|
+
},
|
|
327
|
+
request: {
|
|
328
|
+
callId: 'call1',
|
|
329
|
+
name: 'mockTool',
|
|
330
|
+
args: {},
|
|
331
|
+
},
|
|
332
|
+
expectedError: new Error('Confirmation check failed'),
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
desc: 'error during execute',
|
|
336
|
+
setup: () => {
|
|
337
|
+
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
338
|
+
mockTool.shouldConfirmExecute.mockResolvedValue(null);
|
|
339
|
+
const execError = new Error('Execution failed');
|
|
340
|
+
mockTool.execute.mockRejectedValue(execError);
|
|
341
|
+
},
|
|
342
|
+
request: {
|
|
343
|
+
callId: 'call1',
|
|
344
|
+
name: 'mockTool',
|
|
345
|
+
args: {},
|
|
346
|
+
},
|
|
347
|
+
expectedError: new Error('Execution failed'),
|
|
348
|
+
},
|
|
349
|
+
])('should handle $desc', async ({ setup, request, expectedErrorContains, expectedError }) => {
|
|
350
|
+
setup();
|
|
351
|
+
const { result } = renderScheduler();
|
|
352
|
+
let completedToolCalls = [];
|
|
353
|
+
onComplete.mockImplementation((calls) => {
|
|
354
|
+
completedToolCalls = calls;
|
|
355
|
+
});
|
|
356
|
+
await scheduleAndWaitForExecution(result.current[1], request);
|
|
357
|
+
expect(completedToolCalls).toHaveLength(1);
|
|
358
|
+
expect(completedToolCalls[0].status).toBe('error');
|
|
359
|
+
expect(completedToolCalls[0].request).toBe(request);
|
|
360
|
+
if (expectedErrorContains) {
|
|
361
|
+
expectedErrorContains.forEach((errorText) => {
|
|
362
|
+
expect(completedToolCalls[0].response.error.message).toContain(errorText);
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
if (expectedError) {
|
|
366
|
+
expect(completedToolCalls[0].response.error.message).toBe(expectedError.message);
|
|
367
|
+
}
|
|
354
368
|
});
|
|
355
|
-
it
|
|
369
|
+
it('should handle tool requiring confirmation - approved', async () => {
|
|
356
370
|
mockToolRegistry.getTool.mockReturnValue(mockToolRequiresConfirmation);
|
|
357
371
|
const expectedOutput = 'Confirmed output';
|
|
358
372
|
mockToolRequiresConfirmation.execute.mockResolvedValue({
|
|
@@ -369,43 +383,28 @@ describe('useReactToolScheduler', () => {
|
|
|
369
383
|
act(() => {
|
|
370
384
|
schedule(request, new AbortController().signal);
|
|
371
385
|
});
|
|
372
|
-
await
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
386
|
+
await advanceAndSettle();
|
|
387
|
+
const waitingCall = result.current[0][0];
|
|
388
|
+
expect(waitingCall.status).toBe('awaiting_approval');
|
|
389
|
+
capturedOnConfirmForTest = waitingCall.confirmationDetails?.onConfirm;
|
|
376
390
|
expect(capturedOnConfirmForTest).toBeDefined();
|
|
377
391
|
await act(async () => {
|
|
378
392
|
await capturedOnConfirmForTest?.(ToolConfirmationOutcome.ProceedOnce);
|
|
379
393
|
});
|
|
380
|
-
await
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
await act(async () => {
|
|
384
|
-
await vi.runAllTimersAsync();
|
|
385
|
-
});
|
|
386
|
-
await act(async () => {
|
|
387
|
-
await vi.runAllTimersAsync();
|
|
388
|
-
});
|
|
394
|
+
await advanceAndSettle();
|
|
395
|
+
await advanceAndSettle();
|
|
396
|
+
await advanceAndSettle();
|
|
389
397
|
expect(mockOnUserConfirmForToolConfirmation).toHaveBeenCalledWith(ToolConfirmationOutcome.ProceedOnce);
|
|
390
398
|
expect(mockToolRequiresConfirmation.execute).toHaveBeenCalled();
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
expect.objectContaining({
|
|
399
|
-
functionResponse: expect.objectContaining({
|
|
400
|
-
response: { output: expectedOutput },
|
|
401
|
-
}),
|
|
402
|
-
}),
|
|
403
|
-
]),
|
|
404
|
-
}),
|
|
405
|
-
}),
|
|
406
|
-
]);
|
|
399
|
+
const completedCalls = onComplete.mock.calls[0][0];
|
|
400
|
+
expect(completedCalls[0].status).toBe('success');
|
|
401
|
+
expect(completedCalls[0].request).toBe(request);
|
|
402
|
+
if (completedCalls[0].status === 'success' ||
|
|
403
|
+
completedCalls[0].status === 'error') {
|
|
404
|
+
expect(completedCalls[0].response).toMatchSnapshot();
|
|
405
|
+
}
|
|
407
406
|
});
|
|
408
|
-
it
|
|
407
|
+
it('should handle tool requiring confirmation - cancelled by user', async () => {
|
|
409
408
|
mockToolRegistry.getTool.mockReturnValue(mockToolRequiresConfirmation);
|
|
410
409
|
const { result } = renderScheduler();
|
|
411
410
|
const schedule = result.current[1];
|
|
@@ -417,40 +416,27 @@ describe('useReactToolScheduler', () => {
|
|
|
417
416
|
act(() => {
|
|
418
417
|
schedule(request, new AbortController().signal);
|
|
419
418
|
});
|
|
420
|
-
await
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
419
|
+
await advanceAndSettle();
|
|
420
|
+
const waitingCall = result.current[0][0];
|
|
421
|
+
expect(waitingCall.status).toBe('awaiting_approval');
|
|
422
|
+
capturedOnConfirmForTest = waitingCall.confirmationDetails?.onConfirm;
|
|
424
423
|
expect(capturedOnConfirmForTest).toBeDefined();
|
|
425
424
|
await act(async () => {
|
|
426
425
|
await capturedOnConfirmForTest?.(ToolConfirmationOutcome.Cancel);
|
|
427
426
|
});
|
|
428
|
-
await
|
|
429
|
-
|
|
430
|
-
});
|
|
431
|
-
await act(async () => {
|
|
432
|
-
await vi.runAllTimersAsync();
|
|
433
|
-
});
|
|
427
|
+
await advanceAndSettle();
|
|
428
|
+
await advanceAndSettle();
|
|
434
429
|
expect(mockOnUserConfirmForToolConfirmation).toHaveBeenCalledWith(ToolConfirmationOutcome.Cancel);
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
response: expect.objectContaining({
|
|
444
|
-
error: `User did not allow tool call ${request.name}. Reason: User cancelled.`,
|
|
445
|
-
}),
|
|
446
|
-
}),
|
|
447
|
-
}),
|
|
448
|
-
]),
|
|
449
|
-
}),
|
|
450
|
-
}),
|
|
451
|
-
]);
|
|
430
|
+
const completedCalls = onComplete.mock.calls[0][0];
|
|
431
|
+
expect(completedCalls[0].status).toBe('cancelled');
|
|
432
|
+
expect(completedCalls[0].request).toBe(request);
|
|
433
|
+
if (completedCalls[0].status === 'success' ||
|
|
434
|
+
completedCalls[0].status === 'error' ||
|
|
435
|
+
completedCalls[0].status === 'cancelled') {
|
|
436
|
+
expect(completedCalls[0].response).toMatchSnapshot();
|
|
437
|
+
}
|
|
452
438
|
});
|
|
453
|
-
it
|
|
439
|
+
it('should handle live output updates', async () => {
|
|
454
440
|
mockToolRegistry.getTool.mockReturnValue(mockToolWithLiveOutput);
|
|
455
441
|
let liveUpdateFn;
|
|
456
442
|
let resolveExecutePromise;
|
|
@@ -463,60 +449,40 @@ describe('useReactToolScheduler', () => {
|
|
|
463
449
|
});
|
|
464
450
|
mockToolWithLiveOutput.shouldConfirmExecute.mockResolvedValue(null);
|
|
465
451
|
const { result } = renderScheduler();
|
|
466
|
-
const schedule = result.current[1];
|
|
467
452
|
const request = {
|
|
468
453
|
callId: 'liveCall',
|
|
469
454
|
name: 'mockToolWithLiveOutput',
|
|
470
455
|
args: {},
|
|
471
456
|
};
|
|
472
457
|
act(() => {
|
|
473
|
-
|
|
474
|
-
});
|
|
475
|
-
await act(async () => {
|
|
476
|
-
await vi.runAllTimersAsync();
|
|
458
|
+
result.current[1](request, new AbortController().signal);
|
|
477
459
|
});
|
|
460
|
+
await advanceAndSettle();
|
|
478
461
|
expect(liveUpdateFn).toBeDefined();
|
|
479
|
-
expect(
|
|
462
|
+
expect(result.current[0][0].status).toBe('executing');
|
|
480
463
|
await act(async () => {
|
|
481
464
|
liveUpdateFn?.('Live output 1');
|
|
482
465
|
});
|
|
483
|
-
await
|
|
484
|
-
await vi.runAllTimersAsync();
|
|
485
|
-
});
|
|
466
|
+
await advanceAndSettle();
|
|
486
467
|
await act(async () => {
|
|
487
468
|
liveUpdateFn?.('Live output 2');
|
|
488
469
|
});
|
|
489
|
-
await
|
|
490
|
-
await vi.runAllTimersAsync();
|
|
491
|
-
});
|
|
470
|
+
await advanceAndSettle();
|
|
492
471
|
act(() => {
|
|
493
472
|
resolveExecutePromise({
|
|
494
473
|
llmContent: 'Final output',
|
|
495
474
|
returnDisplay: 'Final display',
|
|
496
475
|
});
|
|
497
476
|
});
|
|
498
|
-
await
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
expect.
|
|
506
|
-
|
|
507
|
-
request,
|
|
508
|
-
response: expect.objectContaining({
|
|
509
|
-
resultDisplay: 'Final display',
|
|
510
|
-
responseParts: expect.arrayContaining([
|
|
511
|
-
expect.objectContaining({
|
|
512
|
-
functionResponse: expect.objectContaining({
|
|
513
|
-
response: { output: 'Final output' },
|
|
514
|
-
}),
|
|
515
|
-
}),
|
|
516
|
-
]),
|
|
517
|
-
}),
|
|
518
|
-
}),
|
|
519
|
-
]);
|
|
477
|
+
await advanceAndSettle();
|
|
478
|
+
await advanceAndSettle();
|
|
479
|
+
const completedCalls = onComplete.mock.calls[0][0];
|
|
480
|
+
expect(completedCalls[0].status).toBe('success');
|
|
481
|
+
expect(completedCalls[0].request).toBe(request);
|
|
482
|
+
if (completedCalls[0].status === 'success' ||
|
|
483
|
+
completedCalls[0].status === 'error') {
|
|
484
|
+
expect(completedCalls[0].response).toMatchSnapshot();
|
|
485
|
+
}
|
|
520
486
|
expect(result.current[0]).toEqual([]);
|
|
521
487
|
});
|
|
522
488
|
it('should schedule and execute multiple tool calls', async () => {
|
|
@@ -553,16 +519,16 @@ describe('useReactToolScheduler', () => {
|
|
|
553
519
|
schedule(requests, new AbortController().signal);
|
|
554
520
|
});
|
|
555
521
|
await act(async () => {
|
|
556
|
-
await vi.
|
|
522
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
557
523
|
});
|
|
558
524
|
await act(async () => {
|
|
559
|
-
await vi.
|
|
525
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
560
526
|
});
|
|
561
527
|
await act(async () => {
|
|
562
|
-
await vi.
|
|
528
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
563
529
|
});
|
|
564
530
|
await act(async () => {
|
|
565
|
-
await vi.
|
|
531
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
566
532
|
});
|
|
567
533
|
expect(onComplete).toHaveBeenCalledTimes(1);
|
|
568
534
|
const completedCalls = onComplete.mock.calls[0][0];
|
|
@@ -601,9 +567,10 @@ describe('useReactToolScheduler', () => {
|
|
|
601
567
|
],
|
|
602
568
|
}),
|
|
603
569
|
});
|
|
604
|
-
expect(
|
|
570
|
+
expect(completedCalls).toHaveLength(2);
|
|
571
|
+
expect(completedCalls.every((t) => t.status === 'success')).toBe(true);
|
|
605
572
|
});
|
|
606
|
-
it
|
|
573
|
+
it('should queue if scheduling while already running', async () => {
|
|
607
574
|
mockToolRegistry.getTool.mockReturnValue(mockTool);
|
|
608
575
|
const longExecutePromise = new Promise((resolve) => setTimeout(() => resolve({
|
|
609
576
|
llmContent: 'done',
|
|
@@ -627,14 +594,16 @@ describe('useReactToolScheduler', () => {
|
|
|
627
594
|
schedule(request1, new AbortController().signal);
|
|
628
595
|
});
|
|
629
596
|
await act(async () => {
|
|
630
|
-
await vi.
|
|
597
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
598
|
+
});
|
|
599
|
+
act(() => {
|
|
600
|
+
schedule(request2, new AbortController().signal);
|
|
631
601
|
});
|
|
632
|
-
expect(() => schedule(request2, new AbortController().signal)).toThrow('Cannot schedule tool calls while other tool calls are running');
|
|
633
602
|
await act(async () => {
|
|
634
603
|
await vi.advanceTimersByTimeAsync(50);
|
|
635
|
-
await vi.
|
|
604
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
636
605
|
await act(async () => {
|
|
637
|
-
await vi.
|
|
606
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
638
607
|
});
|
|
639
608
|
});
|
|
640
609
|
expect(onComplete).toHaveBeenCalledWith([
|
|
@@ -644,7 +613,22 @@ describe('useReactToolScheduler', () => {
|
|
|
644
613
|
response: expect.objectContaining({ resultDisplay: 'done display' }),
|
|
645
614
|
}),
|
|
646
615
|
]);
|
|
647
|
-
|
|
616
|
+
await act(async () => {
|
|
617
|
+
await vi.advanceTimersByTimeAsync(50);
|
|
618
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
619
|
+
await act(async () => {
|
|
620
|
+
await vi.advanceTimersByTimeAsync(0);
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
expect(onComplete).toHaveBeenCalledWith([
|
|
624
|
+
expect.objectContaining({
|
|
625
|
+
status: 'success',
|
|
626
|
+
request: request2,
|
|
627
|
+
response: expect.objectContaining({ resultDisplay: 'done display' }),
|
|
628
|
+
}),
|
|
629
|
+
]);
|
|
630
|
+
const toolCalls = result.current[0];
|
|
631
|
+
expect(toolCalls).toHaveLength(0);
|
|
648
632
|
});
|
|
649
633
|
});
|
|
650
634
|
describe('mapToDisplay', () => {
|