@elizaos/app-core 2.0.0-alpha.37
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/.turbo/turbo-build.log +2 -0
- package/LICENSE +21 -0
- package/dist/App.d.ts +5 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +198 -0
- package/dist/actions/character.d.ts +27 -0
- package/dist/actions/character.d.ts.map +1 -0
- package/dist/actions/character.js +97 -0
- package/dist/actions/chat-helpers.d.ts +47 -0
- package/dist/actions/chat-helpers.d.ts.map +1 -0
- package/dist/actions/chat-helpers.js +79 -0
- package/dist/actions/cloud.d.ts +17 -0
- package/dist/actions/cloud.d.ts.map +1 -0
- package/dist/actions/cloud.js +43 -0
- package/dist/actions/index.d.ts +12 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +11 -0
- package/dist/actions/lifecycle.d.ts +43 -0
- package/dist/actions/lifecycle.d.ts.map +1 -0
- package/dist/actions/lifecycle.js +118 -0
- package/dist/actions/onboarding.d.ts +12 -0
- package/dist/actions/onboarding.d.ts.map +1 -0
- package/dist/actions/onboarding.js +28 -0
- package/dist/actions/triggers.d.ts +23 -0
- package/dist/actions/triggers.d.ts.map +1 -0
- package/dist/actions/triggers.js +148 -0
- package/dist/api/client.d.ts +2823 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +2392 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +1 -0
- package/dist/autonomy/index.d.ts +48 -0
- package/dist/autonomy/index.d.ts.map +1 -0
- package/dist/autonomy/index.js +330 -0
- package/dist/bridge/capacitor-bridge.d.ts +153 -0
- package/dist/bridge/capacitor-bridge.d.ts.map +1 -0
- package/dist/bridge/capacitor-bridge.js +193 -0
- package/dist/bridge/electrobun-rpc.d.ts +19 -0
- package/dist/bridge/electrobun-rpc.d.ts.map +1 -0
- package/dist/bridge/electrobun-rpc.js +27 -0
- package/dist/bridge/electrobun-runtime.d.ts +3 -0
- package/dist/bridge/electrobun-runtime.d.ts.map +1 -0
- package/dist/bridge/electrobun-runtime.js +17 -0
- package/dist/bridge/index.d.ts +6 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +5 -0
- package/dist/bridge/native-plugins.d.ts +82 -0
- package/dist/bridge/native-plugins.d.ts.map +1 -0
- package/dist/bridge/native-plugins.js +39 -0
- package/dist/bridge/plugin-bridge.d.ts +116 -0
- package/dist/bridge/plugin-bridge.d.ts.map +1 -0
- package/dist/bridge/plugin-bridge.js +203 -0
- package/dist/bridge/storage-bridge.d.ts +39 -0
- package/dist/bridge/storage-bridge.d.ts.map +1 -0
- package/dist/bridge/storage-bridge.js +135 -0
- package/dist/chat/index.d.ts +57 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +161 -0
- package/dist/coding/index.d.ts +25 -0
- package/dist/coding/index.d.ts.map +1 -0
- package/dist/coding/index.js +25 -0
- package/dist/components/AdvancedPageView.d.ts +17 -0
- package/dist/components/AdvancedPageView.d.ts.map +1 -0
- package/dist/components/AdvancedPageView.js +137 -0
- package/dist/components/AgentActivityBox.d.ts +7 -0
- package/dist/components/AgentActivityBox.d.ts.map +1 -0
- package/dist/components/AgentActivityBox.js +25 -0
- package/dist/components/ApiKeyConfig.d.ts +26 -0
- package/dist/components/ApiKeyConfig.d.ts.map +1 -0
- package/dist/components/ApiKeyConfig.js +121 -0
- package/dist/components/AppsPageView.d.ts +7 -0
- package/dist/components/AppsPageView.d.ts.map +1 -0
- package/dist/components/AppsPageView.js +31 -0
- package/dist/components/AppsView.d.ts +8 -0
- package/dist/components/AppsView.d.ts.map +1 -0
- package/dist/components/AppsView.js +149 -0
- package/dist/components/AvatarLoader.d.ts +9 -0
- package/dist/components/AvatarLoader.d.ts.map +1 -0
- package/dist/components/AvatarLoader.js +45 -0
- package/dist/components/AvatarSelector.d.ts +23 -0
- package/dist/components/AvatarSelector.d.ts.map +1 -0
- package/dist/components/AvatarSelector.js +105 -0
- package/dist/components/BscTradePanel.d.ts +22 -0
- package/dist/components/BscTradePanel.d.ts.map +1 -0
- package/dist/components/BscTradePanel.js +221 -0
- package/dist/components/BugReportModal.d.ts +2 -0
- package/dist/components/BugReportModal.d.ts.map +1 -0
- package/dist/components/BugReportModal.js +218 -0
- package/dist/components/CharacterView.d.ts +8 -0
- package/dist/components/CharacterView.d.ts.map +1 -0
- package/dist/components/CharacterView.js +703 -0
- package/dist/components/ChatAvatar.d.ts +8 -0
- package/dist/components/ChatAvatar.d.ts.map +1 -0
- package/dist/components/ChatAvatar.js +89 -0
- package/dist/components/ChatComposer.d.ts +37 -0
- package/dist/components/ChatComposer.d.ts.map +1 -0
- package/dist/components/ChatComposer.js +136 -0
- package/dist/components/ChatMessage.d.ts +24 -0
- package/dist/components/ChatMessage.d.ts.map +1 -0
- package/dist/components/ChatMessage.js +167 -0
- package/dist/components/ChatModalView.d.ts +10 -0
- package/dist/components/ChatModalView.d.ts.map +1 -0
- package/dist/components/ChatModalView.js +57 -0
- package/dist/components/ChatView.d.ts +14 -0
- package/dist/components/ChatView.d.ts.map +1 -0
- package/dist/components/ChatView.js +511 -0
- package/dist/components/CloudSourceControls.d.ts +13 -0
- package/dist/components/CloudSourceControls.d.ts.map +1 -0
- package/dist/components/CloudSourceControls.js +14 -0
- package/dist/components/CodingAgentSettingsSection.d.ts +2 -0
- package/dist/components/CodingAgentSettingsSection.d.ts.map +1 -0
- package/dist/components/CodingAgentSettingsSection.js +268 -0
- package/dist/components/CommandPalette.d.ts +2 -0
- package/dist/components/CommandPalette.d.ts.map +1 -0
- package/dist/components/CommandPalette.js +181 -0
- package/dist/components/CompanionSceneHost.d.ts +15 -0
- package/dist/components/CompanionSceneHost.d.ts.map +1 -0
- package/dist/components/CompanionSceneHost.js +343 -0
- package/dist/components/CompanionShell.d.ts +17 -0
- package/dist/components/CompanionShell.d.ts.map +1 -0
- package/dist/components/CompanionShell.js +15 -0
- package/dist/components/CompanionView.d.ts +2 -0
- package/dist/components/CompanionView.d.ts.map +1 -0
- package/dist/components/CompanionView.js +22 -0
- package/dist/components/ConfigPageView.d.ts +11 -0
- package/dist/components/ConfigPageView.d.ts.map +1 -0
- package/dist/components/ConfigPageView.js +275 -0
- package/dist/components/ConfigSaveFooter.d.ts +8 -0
- package/dist/components/ConfigSaveFooter.d.ts.map +1 -0
- package/dist/components/ConfigSaveFooter.js +10 -0
- package/dist/components/ConfirmModal.d.ts +61 -0
- package/dist/components/ConfirmModal.d.ts.map +1 -0
- package/dist/components/ConfirmModal.js +164 -0
- package/dist/components/ConnectionFailedBanner.d.ts +6 -0
- package/dist/components/ConnectionFailedBanner.d.ts.map +1 -0
- package/dist/components/ConnectionFailedBanner.js +22 -0
- package/dist/components/ConnectorsPageView.d.ts +7 -0
- package/dist/components/ConnectorsPageView.d.ts.map +1 -0
- package/dist/components/ConnectorsPageView.js +8 -0
- package/dist/components/ConversationsSidebar.d.ts +9 -0
- package/dist/components/ConversationsSidebar.d.ts.map +1 -0
- package/dist/components/ConversationsSidebar.js +116 -0
- package/dist/components/CustomActionEditor.d.ts +10 -0
- package/dist/components/CustomActionEditor.d.ts.map +1 -0
- package/dist/components/CustomActionEditor.js +578 -0
- package/dist/components/CustomActionsPanel.d.ts +9 -0
- package/dist/components/CustomActionsPanel.d.ts.map +1 -0
- package/dist/components/CustomActionsPanel.js +107 -0
- package/dist/components/CustomActionsView.d.ts +2 -0
- package/dist/components/CustomActionsView.d.ts.map +1 -0
- package/dist/components/CustomActionsView.js +134 -0
- package/dist/components/DatabasePageView.d.ts +5 -0
- package/dist/components/DatabasePageView.d.ts.map +1 -0
- package/dist/components/DatabasePageView.js +28 -0
- package/dist/components/DatabaseView.d.ts +9 -0
- package/dist/components/DatabaseView.d.ts.map +1 -0
- package/dist/components/DatabaseView.js +311 -0
- package/dist/components/ElizaCloudDashboard.d.ts +2 -0
- package/dist/components/ElizaCloudDashboard.d.ts.map +1 -0
- package/dist/components/ElizaCloudDashboard.js +657 -0
- package/dist/components/EmotePicker.d.ts +2 -0
- package/dist/components/EmotePicker.d.ts.map +1 -0
- package/dist/components/EmotePicker.js +343 -0
- package/dist/components/ErrorBoundary.d.ts +22 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +31 -0
- package/dist/components/FineTuningView.d.ts +2 -0
- package/dist/components/FineTuningView.d.ts.map +1 -0
- package/dist/components/FineTuningView.js +433 -0
- package/dist/components/GameView.d.ts +11 -0
- package/dist/components/GameView.d.ts.map +1 -0
- package/dist/components/GameView.js +295 -0
- package/dist/components/GameViewOverlay.d.ts +8 -0
- package/dist/components/GameViewOverlay.d.ts.map +1 -0
- package/dist/components/GameViewOverlay.js +70 -0
- package/dist/components/GlobalEmoteOverlay.d.ts +2 -0
- package/dist/components/GlobalEmoteOverlay.d.ts.map +1 -0
- package/dist/components/GlobalEmoteOverlay.js +112 -0
- package/dist/components/Header.d.ts +8 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/Header.js +121 -0
- package/dist/components/HeartbeatsView.d.ts +2 -0
- package/dist/components/HeartbeatsView.d.ts.map +1 -0
- package/dist/components/HeartbeatsView.js +378 -0
- package/dist/components/InventoryView.d.ts +10 -0
- package/dist/components/InventoryView.d.ts.map +1 -0
- package/dist/components/InventoryView.js +162 -0
- package/dist/components/KnowledgeView.d.ts +20 -0
- package/dist/components/KnowledgeView.d.ts.map +1 -0
- package/dist/components/KnowledgeView.js +480 -0
- package/dist/components/LanguageDropdown.d.ts +30 -0
- package/dist/components/LanguageDropdown.d.ts.map +1 -0
- package/dist/components/LanguageDropdown.js +98 -0
- package/dist/components/LifoMonitorPanel.d.ts +21 -0
- package/dist/components/LifoMonitorPanel.d.ts.map +1 -0
- package/dist/components/LifoMonitorPanel.js +24 -0
- package/dist/components/LifoSandboxView.d.ts +5 -0
- package/dist/components/LifoSandboxView.d.ts.map +1 -0
- package/dist/components/LifoSandboxView.js +333 -0
- package/dist/components/LoadingScreen.d.ts +13 -0
- package/dist/components/LoadingScreen.d.ts.map +1 -0
- package/dist/components/LoadingScreen.js +39 -0
- package/dist/components/LogsPageView.d.ts +2 -0
- package/dist/components/LogsPageView.d.ts.map +1 -0
- package/dist/components/LogsPageView.js +7 -0
- package/dist/components/LogsView.d.ts +5 -0
- package/dist/components/LogsView.d.ts.map +1 -0
- package/dist/components/LogsView.js +71 -0
- package/dist/components/MediaGalleryView.d.ts +9 -0
- package/dist/components/MediaGalleryView.d.ts.map +1 -0
- package/dist/components/MediaGalleryView.js +236 -0
- package/dist/components/MediaSettingsSection.d.ts +11 -0
- package/dist/components/MediaSettingsSection.d.ts.map +1 -0
- package/dist/components/MediaSettingsSection.js +329 -0
- package/dist/components/MessageContent.d.ts +51 -0
- package/dist/components/MessageContent.d.ts.map +1 -0
- package/dist/components/MessageContent.js +553 -0
- package/dist/components/OnboardingWizard.d.ts +2 -0
- package/dist/components/OnboardingWizard.d.ts.map +1 -0
- package/dist/components/OnboardingWizard.js +59 -0
- package/dist/components/PairingView.d.ts +5 -0
- package/dist/components/PairingView.d.ts.map +1 -0
- package/dist/components/PairingView.js +28 -0
- package/dist/components/PermissionsSection.d.ts +20 -0
- package/dist/components/PermissionsSection.d.ts.map +1 -0
- package/dist/components/PermissionsSection.js +368 -0
- package/dist/components/PluginsPageView.d.ts +5 -0
- package/dist/components/PluginsPageView.d.ts.map +1 -0
- package/dist/components/PluginsPageView.js +8 -0
- package/dist/components/PluginsView.d.ts +21 -0
- package/dist/components/PluginsView.d.ts.map +1 -0
- package/dist/components/PluginsView.js +1531 -0
- package/dist/components/ProviderSwitcher.d.ts +42 -0
- package/dist/components/ProviderSwitcher.d.ts.map +1 -0
- package/dist/components/ProviderSwitcher.js +480 -0
- package/dist/components/RestartBanner.d.ts +2 -0
- package/dist/components/RestartBanner.d.ts.map +1 -0
- package/dist/components/RestartBanner.js +36 -0
- package/dist/components/RuntimeView.d.ts +10 -0
- package/dist/components/RuntimeView.d.ts.map +1 -0
- package/dist/components/RuntimeView.js +165 -0
- package/dist/components/SaveCommandModal.d.ts +12 -0
- package/dist/components/SaveCommandModal.d.ts.map +1 -0
- package/dist/components/SaveCommandModal.js +84 -0
- package/dist/components/SecretsView.d.ts +9 -0
- package/dist/components/SecretsView.d.ts.map +1 -0
- package/dist/components/SecretsView.js +249 -0
- package/dist/components/SettingsView.d.ts +9 -0
- package/dist/components/SettingsView.d.ts.map +1 -0
- package/dist/components/SettingsView.js +230 -0
- package/dist/components/ShellOverlays.d.ts +8 -0
- package/dist/components/ShellOverlays.d.ts.map +1 -0
- package/dist/components/ShellOverlays.js +10 -0
- package/dist/components/ShortcutsOverlay.d.ts +2 -0
- package/dist/components/ShortcutsOverlay.d.ts.map +1 -0
- package/dist/components/ShortcutsOverlay.js +79 -0
- package/dist/components/SkillsView.d.ts +11 -0
- package/dist/components/SkillsView.d.ts.map +1 -0
- package/dist/components/SkillsView.js +358 -0
- package/dist/components/StartupFailureView.d.ts +8 -0
- package/dist/components/StartupFailureView.d.ts.map +1 -0
- package/dist/components/StartupFailureView.js +15 -0
- package/dist/components/StreamView.d.ts +16 -0
- package/dist/components/StreamView.d.ts.map +1 -0
- package/dist/components/StreamView.js +300 -0
- package/dist/components/StripeEmbeddedCheckout.d.ts +24 -0
- package/dist/components/StripeEmbeddedCheckout.d.ts.map +1 -0
- package/dist/components/StripeEmbeddedCheckout.js +101 -0
- package/dist/components/SubscriptionStatus.d.ts +22 -0
- package/dist/components/SubscriptionStatus.d.ts.map +1 -0
- package/dist/components/SubscriptionStatus.js +301 -0
- package/dist/components/SystemWarningBanner.d.ts +6 -0
- package/dist/components/SystemWarningBanner.d.ts.map +1 -0
- package/dist/components/SystemWarningBanner.js +46 -0
- package/dist/components/ThemeToggle.d.ts +21 -0
- package/dist/components/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ThemeToggle.js +24 -0
- package/dist/components/TrajectoriesView.d.ts +12 -0
- package/dist/components/TrajectoriesView.d.ts.map +1 -0
- package/dist/components/TrajectoriesView.js +183 -0
- package/dist/components/TrajectoryDetailView.d.ts +13 -0
- package/dist/components/TrajectoryDetailView.d.ts.map +1 -0
- package/dist/components/TrajectoryDetailView.js +112 -0
- package/dist/components/TriggersView.d.ts +2 -0
- package/dist/components/TriggersView.d.ts.map +1 -0
- package/dist/components/TriggersView.js +1 -0
- package/dist/components/VectorBrowserView.d.ts +10 -0
- package/dist/components/VectorBrowserView.d.ts.map +1 -0
- package/dist/components/VectorBrowserView.js +997 -0
- package/dist/components/VoiceConfigView.d.ts +11 -0
- package/dist/components/VoiceConfigView.d.ts.map +1 -0
- package/dist/components/VoiceConfigView.js +329 -0
- package/dist/components/VrmStage.d.ts +21 -0
- package/dist/components/VrmStage.d.ts.map +1 -0
- package/dist/components/VrmStage.js +252 -0
- package/dist/components/WhatsAppQrOverlay.d.ts +8 -0
- package/dist/components/WhatsAppQrOverlay.d.ts.map +1 -0
- package/dist/components/WhatsAppQrOverlay.js +63 -0
- package/dist/components/apps/AppDetailPane.d.ts +15 -0
- package/dist/components/apps/AppDetailPane.d.ts.map +1 -0
- package/dist/components/apps/AppDetailPane.js +13 -0
- package/dist/components/apps/AppsCatalogGrid.d.ts +20 -0
- package/dist/components/apps/AppsCatalogGrid.d.ts.map +1 -0
- package/dist/components/apps/AppsCatalogGrid.js +18 -0
- package/dist/components/apps/extensions/HyperscapeAppDetailPanel.d.ts +3 -0
- package/dist/components/apps/extensions/HyperscapeAppDetailPanel.d.ts.map +1 -0
- package/dist/components/apps/extensions/HyperscapeAppDetailPanel.js +253 -0
- package/dist/components/apps/extensions/registry.d.ts +4 -0
- package/dist/components/apps/extensions/registry.d.ts.map +1 -0
- package/dist/components/apps/extensions/registry.js +10 -0
- package/dist/components/apps/extensions/types.d.ts +7 -0
- package/dist/components/apps/extensions/types.d.ts.map +1 -0
- package/dist/components/apps/extensions/types.js +1 -0
- package/dist/components/apps/helpers.d.ts +7 -0
- package/dist/components/apps/helpers.d.ts.map +1 -0
- package/dist/components/apps/helpers.js +46 -0
- package/dist/components/avatar/VrmAnimationLoader.d.ts +30 -0
- package/dist/components/avatar/VrmAnimationLoader.d.ts.map +1 -0
- package/dist/components/avatar/VrmAnimationLoader.js +99 -0
- package/dist/components/avatar/VrmBlinkController.d.ts +37 -0
- package/dist/components/avatar/VrmBlinkController.d.ts.map +1 -0
- package/dist/components/avatar/VrmBlinkController.js +98 -0
- package/dist/components/avatar/VrmCameraManager.d.ts +57 -0
- package/dist/components/avatar/VrmCameraManager.d.ts.map +1 -0
- package/dist/components/avatar/VrmCameraManager.js +277 -0
- package/dist/components/avatar/VrmEngine.d.ts +229 -0
- package/dist/components/avatar/VrmEngine.d.ts.map +1 -0
- package/dist/components/avatar/VrmEngine.js +1950 -0
- package/dist/components/avatar/VrmFootShadow.d.ts +18 -0
- package/dist/components/avatar/VrmFootShadow.d.ts.map +1 -0
- package/dist/components/avatar/VrmFootShadow.js +83 -0
- package/dist/components/avatar/VrmViewer.d.ts +45 -0
- package/dist/components/avatar/VrmViewer.d.ts.map +1 -0
- package/dist/components/avatar/VrmViewer.js +341 -0
- package/dist/components/avatar/mixamoVRMRigMap.d.ts +3 -0
- package/dist/components/avatar/mixamoVRMRigMap.d.ts.map +1 -0
- package/dist/components/avatar/mixamoVRMRigMap.js +56 -0
- package/dist/components/avatar/retargetMixamoFbxToVrm.d.ts +9 -0
- package/dist/components/avatar/retargetMixamoFbxToVrm.d.ts.map +1 -0
- package/dist/components/avatar/retargetMixamoFbxToVrm.js +88 -0
- package/dist/components/avatar/retargetMixamoGltfToVrm.d.ts +11 -0
- package/dist/components/avatar/retargetMixamoGltfToVrm.d.ts.map +1 -0
- package/dist/components/avatar/retargetMixamoGltfToVrm.js +80 -0
- package/dist/components/chainConfig.d.ts +84 -0
- package/dist/components/chainConfig.d.ts.map +1 -0
- package/dist/components/chainConfig.js +268 -0
- package/dist/components/companion/CompanionHeader.d.ts +15 -0
- package/dist/components/companion/CompanionHeader.d.ts.map +1 -0
- package/dist/components/companion/CompanionHeader.js +7 -0
- package/dist/components/companion/CompanionSceneHost.d.ts +2 -0
- package/dist/components/companion/CompanionSceneHost.d.ts.map +1 -0
- package/dist/components/companion/CompanionSceneHost.js +1 -0
- package/dist/components/companion/VrmStage.d.ts +3 -0
- package/dist/components/companion/VrmStage.d.ts.map +1 -0
- package/dist/components/companion/VrmStage.js +1 -0
- package/dist/components/companion/walletUtils.d.ts +95 -0
- package/dist/components/companion/walletUtils.d.ts.map +1 -0
- package/dist/components/companion/walletUtils.js +167 -0
- package/dist/components/companion-shell-styles.d.ts +38 -0
- package/dist/components/companion-shell-styles.d.ts.map +1 -0
- package/dist/components/companion-shell-styles.js +248 -0
- package/dist/components/confirm-delete-control.d.ts +16 -0
- package/dist/components/confirm-delete-control.d.ts.map +1 -0
- package/dist/components/confirm-delete-control.js +12 -0
- package/dist/components/conversations/ConversationListItem.d.ts +31 -0
- package/dist/components/conversations/ConversationListItem.d.ts.map +1 -0
- package/dist/components/conversations/ConversationListItem.js +52 -0
- package/dist/components/conversations/conversation-utils.d.ts +9 -0
- package/dist/components/conversations/conversation-utils.d.ts.map +1 -0
- package/dist/components/conversations/conversation-utils.js +138 -0
- package/dist/components/format.d.ts +54 -0
- package/dist/components/format.d.ts.map +1 -0
- package/dist/components/format.js +82 -0
- package/dist/components/index.d.ts +93 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +92 -0
- package/dist/components/inventory/CopyableAddress.d.ts +8 -0
- package/dist/components/inventory/CopyableAddress.d.ts.map +1 -0
- package/dist/components/inventory/CopyableAddress.js +18 -0
- package/dist/components/inventory/InventoryToolbar.d.ts +25 -0
- package/dist/components/inventory/InventoryToolbar.d.ts.map +1 -0
- package/dist/components/inventory/InventoryToolbar.js +28 -0
- package/dist/components/inventory/NftGrid.d.ts +13 -0
- package/dist/components/inventory/NftGrid.d.ts.map +1 -0
- package/dist/components/inventory/NftGrid.js +29 -0
- package/dist/components/inventory/TokenLogo.d.ts +12 -0
- package/dist/components/inventory/TokenLogo.d.ts.map +1 -0
- package/dist/components/inventory/TokenLogo.js +33 -0
- package/dist/components/inventory/TokensTable.d.ts +24 -0
- package/dist/components/inventory/TokensTable.d.ts.map +1 -0
- package/dist/components/inventory/TokensTable.js +26 -0
- package/dist/components/inventory/constants.d.ts +52 -0
- package/dist/components/inventory/constants.d.ts.map +1 -0
- package/dist/components/inventory/constants.js +121 -0
- package/dist/components/inventory/index.d.ts +9 -0
- package/dist/components/inventory/index.d.ts.map +1 -0
- package/dist/components/inventory/index.js +8 -0
- package/dist/components/inventory/media-url.d.ts +6 -0
- package/dist/components/inventory/media-url.d.ts.map +1 -0
- package/dist/components/inventory/media-url.js +28 -0
- package/dist/components/inventory/useInventoryData.d.ts +53 -0
- package/dist/components/inventory/useInventoryData.d.ts.map +1 -0
- package/dist/components/inventory/useInventoryData.js +332 -0
- package/dist/components/knowledge-upload-image.d.ts +27 -0
- package/dist/components/knowledge-upload-image.d.ts.map +1 -0
- package/dist/components/knowledge-upload-image.js +146 -0
- package/dist/components/labels.d.ts +6 -0
- package/dist/components/labels.d.ts.map +1 -0
- package/dist/components/labels.js +40 -0
- package/dist/components/onboarding/ActivateStep.d.ts +2 -0
- package/dist/components/onboarding/ActivateStep.d.ts.map +1 -0
- package/dist/components/onboarding/ActivateStep.js +6 -0
- package/dist/components/onboarding/ConnectionStep.d.ts +2 -0
- package/dist/components/onboarding/ConnectionStep.d.ts.map +1 -0
- package/dist/components/onboarding/ConnectionStep.js +552 -0
- package/dist/components/onboarding/OnboardingPanel.d.ts +9 -0
- package/dist/components/onboarding/OnboardingPanel.d.ts.map +1 -0
- package/dist/components/onboarding/OnboardingPanel.js +24 -0
- package/dist/components/onboarding/OnboardingStepNav.d.ts +2 -0
- package/dist/components/onboarding/OnboardingStepNav.d.ts.map +1 -0
- package/dist/components/onboarding/OnboardingStepNav.js +14 -0
- package/dist/components/onboarding/PermissionsStep.d.ts +2 -0
- package/dist/components/onboarding/PermissionsStep.d.ts.map +1 -0
- package/dist/components/onboarding/PermissionsStep.js +7 -0
- package/dist/components/onboarding/RpcStep.d.ts +2 -0
- package/dist/components/onboarding/RpcStep.d.ts.map +1 -0
- package/dist/components/onboarding/RpcStep.js +125 -0
- package/dist/components/onboarding/WakeUpStep.d.ts +2 -0
- package/dist/components/onboarding/WakeUpStep.d.ts.map +1 -0
- package/dist/components/onboarding/WakeUpStep.js +82 -0
- package/dist/components/permissions/PermissionIcon.d.ts +4 -0
- package/dist/components/permissions/PermissionIcon.d.ts.map +1 -0
- package/dist/components/permissions/PermissionIcon.js +12 -0
- package/dist/components/permissions/StreamingPermissions.d.ts +20 -0
- package/dist/components/permissions/StreamingPermissions.d.ts.map +1 -0
- package/dist/components/permissions/StreamingPermissions.js +173 -0
- package/dist/components/plugins/showcase-data.d.ts +7 -0
- package/dist/components/plugins/showcase-data.d.ts.map +1 -0
- package/dist/components/plugins/showcase-data.js +464 -0
- package/dist/components/shared/ShellHeaderControls.d.ts +27 -0
- package/dist/components/shared/ShellHeaderControls.d.ts.map +1 -0
- package/dist/components/shared/ShellHeaderControls.js +60 -0
- package/dist/components/skeletons.d.ts +17 -0
- package/dist/components/skeletons.d.ts.map +1 -0
- package/dist/components/skeletons.js +22 -0
- package/dist/components/stream/ActivityFeed.d.ts +5 -0
- package/dist/components/stream/ActivityFeed.d.ts.map +1 -0
- package/dist/components/stream/ActivityFeed.js +57 -0
- package/dist/components/stream/AvatarPip.d.ts +5 -0
- package/dist/components/stream/AvatarPip.d.ts.map +1 -0
- package/dist/components/stream/AvatarPip.js +6 -0
- package/dist/components/stream/ChatContent.d.ts +6 -0
- package/dist/components/stream/ChatContent.d.ts.map +1 -0
- package/dist/components/stream/ChatContent.js +69 -0
- package/dist/components/stream/ChatTicker.d.ts +5 -0
- package/dist/components/stream/ChatTicker.d.ts.map +1 -0
- package/dist/components/stream/ChatTicker.js +34 -0
- package/dist/components/stream/IdleContent.d.ts +5 -0
- package/dist/components/stream/IdleContent.d.ts.map +1 -0
- package/dist/components/stream/IdleContent.js +17 -0
- package/dist/components/stream/StatusBar.d.ts +36 -0
- package/dist/components/stream/StatusBar.d.ts.map +1 -0
- package/dist/components/stream/StatusBar.js +140 -0
- package/dist/components/stream/StreamSettings.d.ts +33 -0
- package/dist/components/stream/StreamSettings.d.ts.map +1 -0
- package/dist/components/stream/StreamSettings.js +99 -0
- package/dist/components/stream/StreamTerminal.d.ts +2 -0
- package/dist/components/stream/StreamTerminal.d.ts.map +1 -0
- package/dist/components/stream/StreamTerminal.js +52 -0
- package/dist/components/stream/StreamVoiceConfig.d.ts +10 -0
- package/dist/components/stream/StreamVoiceConfig.d.ts.map +1 -0
- package/dist/components/stream/StreamVoiceConfig.js +88 -0
- package/dist/components/stream/helpers.d.ts +32 -0
- package/dist/components/stream/helpers.d.ts.map +1 -0
- package/dist/components/stream/helpers.js +110 -0
- package/dist/components/stream/overlays/OverlayLayer.d.ts +20 -0
- package/dist/components/stream/overlays/OverlayLayer.d.ts.map +1 -0
- package/dist/components/stream/overlays/OverlayLayer.js +24 -0
- package/dist/components/stream/overlays/built-in/ActionTickerWidget.d.ts +8 -0
- package/dist/components/stream/overlays/built-in/ActionTickerWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/ActionTickerWidget.js +44 -0
- package/dist/components/stream/overlays/built-in/AlertPopupWidget.d.ts +7 -0
- package/dist/components/stream/overlays/built-in/AlertPopupWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/AlertPopupWidget.js +62 -0
- package/dist/components/stream/overlays/built-in/BrandingWidget.d.ts +7 -0
- package/dist/components/stream/overlays/built-in/BrandingWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/BrandingWidget.js +36 -0
- package/dist/components/stream/overlays/built-in/CustomHtmlWidget.d.ts +26 -0
- package/dist/components/stream/overlays/built-in/CustomHtmlWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/CustomHtmlWidget.js +78 -0
- package/dist/components/stream/overlays/built-in/PeonGlassWidget.d.ts +11 -0
- package/dist/components/stream/overlays/built-in/PeonGlassWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/PeonGlassWidget.js +188 -0
- package/dist/components/stream/overlays/built-in/PeonHudWidget.d.ts +10 -0
- package/dist/components/stream/overlays/built-in/PeonHudWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/PeonHudWidget.js +168 -0
- package/dist/components/stream/overlays/built-in/PeonSakuraWidget.d.ts +11 -0
- package/dist/components/stream/overlays/built-in/PeonSakuraWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/PeonSakuraWidget.js +213 -0
- package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts +8 -0
- package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.js +59 -0
- package/dist/components/stream/overlays/built-in/ViewerCountWidget.d.ts +7 -0
- package/dist/components/stream/overlays/built-in/ViewerCountWidget.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/ViewerCountWidget.js +34 -0
- package/dist/components/stream/overlays/built-in/index.d.ts +13 -0
- package/dist/components/stream/overlays/built-in/index.d.ts.map +1 -0
- package/dist/components/stream/overlays/built-in/index.js +12 -0
- package/dist/components/stream/overlays/registry.d.ts +11 -0
- package/dist/components/stream/overlays/registry.d.ts.map +1 -0
- package/dist/components/stream/overlays/registry.js +16 -0
- package/dist/components/stream/overlays/types.d.ts +67 -0
- package/dist/components/stream/overlays/types.d.ts.map +1 -0
- package/dist/components/stream/overlays/types.js +7 -0
- package/dist/components/stream/overlays/useOverlayLayout.d.ts +27 -0
- package/dist/components/stream/overlays/useOverlayLayout.d.ts.map +1 -0
- package/dist/components/stream/overlays/useOverlayLayout.js +162 -0
- package/dist/components/trajectory-format.d.ts +6 -0
- package/dist/components/trajectory-format.d.ts.map +1 -0
- package/dist/components/trajectory-format.js +43 -0
- package/dist/components/ui-badges.d.ts +23 -0
- package/dist/components/ui-badges.d.ts.map +1 -0
- package/dist/components/ui-badges.js +38 -0
- package/dist/components/ui-switch.d.ts +14 -0
- package/dist/components/ui-switch.d.ts.map +1 -0
- package/dist/components/ui-switch.js +15 -0
- package/dist/components/vector-browser-three.d.ts +4 -0
- package/dist/components/vector-browser-three.d.ts.map +1 -0
- package/dist/components/vector-browser-three.js +19 -0
- package/dist/config/config-catalog.d.ts +376 -0
- package/dist/config/config-catalog.d.ts.map +1 -0
- package/dist/config/config-catalog.js +724 -0
- package/dist/config/config-field.d.ts +68 -0
- package/dist/config/config-field.d.ts.map +1 -0
- package/dist/config/config-field.js +821 -0
- package/dist/config/config-renderer.d.ts +176 -0
- package/dist/config/config-renderer.d.ts.map +1 -0
- package/dist/config/config-renderer.js +403 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +4 -0
- package/dist/config/ui-renderer.d.ts +26 -0
- package/dist/config/ui-renderer.d.ts.map +1 -0
- package/dist/config/ui-renderer.js +815 -0
- package/dist/config/ui-spec.d.ts +164 -0
- package/dist/config/ui-spec.d.ts.map +1 -0
- package/dist/config/ui-spec.js +13 -0
- package/dist/events/index.d.ts +42 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +41 -0
- package/dist/hooks/index.d.ts +14 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +13 -0
- package/dist/hooks/useBugReport.d.ts +14 -0
- package/dist/hooks/useBugReport.d.ts.map +1 -0
- package/dist/hooks/useBugReport.js +18 -0
- package/dist/hooks/useCanvasWindow.d.ts +38 -0
- package/dist/hooks/useCanvasWindow.d.ts.map +1 -0
- package/dist/hooks/useCanvasWindow.js +273 -0
- package/dist/hooks/useChatAvatarVoice.d.ts +10 -0
- package/dist/hooks/useChatAvatarVoice.d.ts.map +1 -0
- package/dist/hooks/useChatAvatarVoice.js +71 -0
- package/dist/hooks/useContextMenu.d.ts +17 -0
- package/dist/hooks/useContextMenu.d.ts.map +1 -0
- package/dist/hooks/useContextMenu.js +100 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +17 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +67 -0
- package/dist/hooks/useLifoSync.d.ts +18 -0
- package/dist/hooks/useLifoSync.d.ts.map +1 -0
- package/dist/hooks/useLifoSync.js +113 -0
- package/dist/hooks/useMemoryMonitor.d.ts +87 -0
- package/dist/hooks/useMemoryMonitor.d.ts.map +1 -0
- package/dist/hooks/useMemoryMonitor.js +210 -0
- package/dist/hooks/useRenderGuard.d.ts +17 -0
- package/dist/hooks/useRenderGuard.d.ts.map +1 -0
- package/dist/hooks/useRenderGuard.js +36 -0
- package/dist/hooks/useRetakeCapture.d.ts +12 -0
- package/dist/hooks/useRetakeCapture.d.ts.map +1 -0
- package/dist/hooks/useRetakeCapture.js +59 -0
- package/dist/hooks/useStreamPopoutNavigation.d.ts +3 -0
- package/dist/hooks/useStreamPopoutNavigation.d.ts.map +1 -0
- package/dist/hooks/useStreamPopoutNavigation.js +17 -0
- package/dist/hooks/useTimeout.d.ts +11 -0
- package/dist/hooks/useTimeout.d.ts.map +1 -0
- package/dist/hooks/useTimeout.js +32 -0
- package/dist/hooks/useVoiceChat.d.ts +129 -0
- package/dist/hooks/useVoiceChat.d.ts.map +1 -0
- package/dist/hooks/useVoiceChat.js +1071 -0
- package/dist/hooks/useWhatsAppPairing.d.ts +11 -0
- package/dist/hooks/useWhatsAppPairing.d.ts.map +1 -0
- package/dist/hooks/useWhatsAppPairing.js +95 -0
- package/dist/i18n/index.d.ts +7 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +53 -0
- package/dist/i18n/locales/en.json +1196 -0
- package/dist/i18n/locales/es.json +1196 -0
- package/dist/i18n/locales/ko.json +1196 -0
- package/dist/i18n/locales/pt.json +1196 -0
- package/dist/i18n/locales/zh-CN.json +1196 -0
- package/dist/i18n/messages.d.ts +6 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +14 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/navigation/index.d.ts +27 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +230 -0
- package/dist/package.json +161 -0
- package/dist/platform/browser-launch.d.ts +2 -0
- package/dist/platform/browser-launch.d.ts.map +1 -0
- package/dist/platform/browser-launch.js +109 -0
- package/dist/platform/index.d.ts +64 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +155 -0
- package/dist/platform/init.d.ts +40 -0
- package/dist/platform/init.d.ts.map +1 -0
- package/dist/platform/init.js +158 -0
- package/dist/providers/index.d.ts +13 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +72 -0
- package/dist/state/AppContext.d.ts +11 -0
- package/dist/state/AppContext.d.ts.map +1 -0
- package/dist/state/AppContext.js +4496 -0
- package/dist/state/index.d.ts +7 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +6 -0
- package/dist/state/internal.d.ts +6 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +5 -0
- package/dist/state/parsers.d.ts +26 -0
- package/dist/state/parsers.d.ts.map +1 -0
- package/dist/state/parsers.js +255 -0
- package/dist/state/persistence.d.ts +36 -0
- package/dist/state/persistence.d.ts.map +1 -0
- package/dist/state/persistence.js +254 -0
- package/dist/state/types.d.ts +402 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +70 -0
- package/dist/state/ui-preferences.d.ts +3 -0
- package/dist/state/ui-preferences.d.ts.map +1 -0
- package/dist/state/ui-preferences.js +1 -0
- package/dist/state/useApp.d.ts +4 -0
- package/dist/state/useApp.d.ts.map +1 -0
- package/dist/state/useApp.js +22 -0
- package/dist/state/vrm.d.ts +19 -0
- package/dist/state/vrm.d.ts.map +1 -0
- package/dist/state/vrm.js +65 -0
- package/dist/stories/AppMockProvider.d.ts +15 -0
- package/dist/stories/AppMockProvider.d.ts.map +1 -0
- package/dist/stories/AppMockProvider.js +14 -0
- package/dist/styles/anime.css +6324 -0
- package/dist/styles/base.css +196 -0
- package/dist/styles/onboarding-game.css +716 -0
- package/dist/styles/styles.css +2085 -0
- package/dist/styles/xterm.css +241 -0
- package/dist/types/index.d.ts +657 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/asset-url.d.ts +26 -0
- package/dist/utils/asset-url.d.ts.map +1 -0
- package/dist/utils/asset-url.js +99 -0
- package/dist/utils/assistant-text.d.ts +2 -0
- package/dist/utils/assistant-text.d.ts.map +1 -0
- package/dist/utils/assistant-text.js +161 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +38 -0
- package/dist/utils/desktop-dialogs.d.ts +19 -0
- package/dist/utils/desktop-dialogs.d.ts.map +1 -0
- package/dist/utils/desktop-dialogs.js +50 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/number-parsing.d.ts +44 -0
- package/dist/utils/number-parsing.d.ts.map +1 -0
- package/dist/utils/number-parsing.js +56 -0
- package/dist/utils/openExternalUrl.d.ts +2 -0
- package/dist/utils/openExternalUrl.d.ts.map +1 -0
- package/dist/utils/openExternalUrl.js +17 -0
- package/dist/utils/spoken-text.d.ts +2 -0
- package/dist/utils/spoken-text.d.ts.map +1 -0
- package/dist/utils/spoken-text.js +56 -0
- package/dist/utils/streaming-text.d.ts +3 -0
- package/dist/utils/streaming-text.d.ts.map +1 -0
- package/dist/utils/streaming-text.js +87 -0
- package/dist/voice/index.d.ts +2 -0
- package/dist/voice/index.d.ts.map +1 -0
- package/dist/voice/index.js +1 -0
- package/dist/voice/types.d.ts +25 -0
- package/dist/voice/types.d.ts.map +1 -0
- package/dist/voice/types.js +166 -0
- package/package.json +86 -0
- package/src/App.tsx +469 -0
- package/src/actions/character.ts +113 -0
- package/src/actions/chat-helpers.ts +100 -0
- package/src/actions/cloud.ts +59 -0
- package/src/actions/index.ts +12 -0
- package/src/actions/lifecycle.ts +175 -0
- package/src/actions/onboarding.ts +46 -0
- package/src/actions/triggers.ts +190 -0
- package/src/ambient.d.ts +16 -0
- package/src/api/client.ts +5616 -0
- package/src/api/index.ts +1 -0
- package/src/autonomy/index.ts +477 -0
- package/src/bridge/capacitor-bridge.ts +295 -0
- package/src/bridge/electrobun-rpc.ts +58 -0
- package/src/bridge/electrobun-runtime.ts +28 -0
- package/src/bridge/index.ts +5 -0
- package/src/bridge/native-plugins.ts +134 -0
- package/src/bridge/plugin-bridge.ts +352 -0
- package/src/bridge/storage-bridge.ts +162 -0
- package/src/chat/index.ts +251 -0
- package/src/coding/index.ts +43 -0
- package/src/components/AdvancedPageView.tsx +362 -0
- package/src/components/AgentActivityBox.tsx +49 -0
- package/src/components/ApiKeyConfig.tsx +224 -0
- package/src/components/AppsPageView.tsx +52 -0
- package/src/components/AppsView.tsx +293 -0
- package/src/components/AvatarLoader.tsx +86 -0
- package/src/components/AvatarSelector.tsx +223 -0
- package/src/components/BscTradePanel.tsx +549 -0
- package/src/components/BugReportModal.tsx +499 -0
- package/src/components/CharacterView.tsx +1623 -0
- package/src/components/ChatAvatar.test.ts +96 -0
- package/src/components/ChatAvatar.tsx +147 -0
- package/src/components/ChatComposer.tsx +330 -0
- package/src/components/ChatMessage.tsx +448 -0
- package/src/components/ChatModalView.test.tsx +118 -0
- package/src/components/ChatModalView.tsx +125 -0
- package/src/components/ChatView.tsx +999 -0
- package/src/components/CloudSourceControls.tsx +80 -0
- package/src/components/CodingAgentSettingsSection.tsx +536 -0
- package/src/components/CommandPalette.tsx +284 -0
- package/src/components/CompanionSceneHost.tsx +498 -0
- package/src/components/CompanionShell.tsx +31 -0
- package/src/components/CompanionView.tsx +109 -0
- package/src/components/ConfigPageView.tsx +722 -0
- package/src/components/ConfigSaveFooter.tsx +41 -0
- package/src/components/ConfirmModal.tsx +379 -0
- package/src/components/ConnectionFailedBanner.tsx +91 -0
- package/src/components/ConnectorsPageView.tsx +13 -0
- package/src/components/ConversationsSidebar.tsx +279 -0
- package/src/components/CustomActionEditor.tsx +1125 -0
- package/src/components/CustomActionsPanel.tsx +288 -0
- package/src/components/CustomActionsView.tsx +322 -0
- package/src/components/DatabasePageView.tsx +55 -0
- package/src/components/DatabaseView.tsx +814 -0
- package/src/components/ElizaCloudDashboard.tsx +1696 -0
- package/src/components/EmotePicker.tsx +529 -0
- package/src/components/ErrorBoundary.tsx +76 -0
- package/src/components/FineTuningView.tsx +1080 -0
- package/src/components/GameView.tsx +551 -0
- package/src/components/GameViewOverlay.tsx +133 -0
- package/src/components/GlobalEmoteOverlay.tsx +152 -0
- package/src/components/Header.test.tsx +413 -0
- package/src/components/Header.tsx +400 -0
- package/src/components/HeartbeatsView.tsx +1002 -0
- package/src/components/InventoryView.tsx +372 -0
- package/src/components/KnowledgeView.tsx +1128 -0
- package/src/components/LanguageDropdown.tsx +187 -0
- package/src/components/LifoMonitorPanel.tsx +196 -0
- package/src/components/LifoSandboxView.tsx +499 -0
- package/src/components/LoadingScreen.tsx +77 -0
- package/src/components/LogsPageView.tsx +17 -0
- package/src/components/LogsView.tsx +239 -0
- package/src/components/MediaGalleryView.tsx +432 -0
- package/src/components/MediaSettingsSection.tsx +893 -0
- package/src/components/MessageContent.tsx +815 -0
- package/src/components/OnboardingWizard.test.tsx +107 -0
- package/src/components/OnboardingWizard.tsx +186 -0
- package/src/components/PairingView.tsx +110 -0
- package/src/components/PermissionsSection.tsx +818 -0
- package/src/components/PluginsPageView.tsx +9 -0
- package/src/components/PluginsView.tsx +3152 -0
- package/src/components/ProviderSwitcher.tsx +874 -0
- package/src/components/RestartBanner.tsx +76 -0
- package/src/components/RuntimeView.tsx +460 -0
- package/src/components/SaveCommandModal.tsx +211 -0
- package/src/components/SecretsView.tsx +569 -0
- package/src/components/SettingsView.tsx +825 -0
- package/src/components/ShellOverlays.tsx +41 -0
- package/src/components/ShortcutsOverlay.tsx +155 -0
- package/src/components/SkillsView.tsx +1435 -0
- package/src/components/StartupFailureView.tsx +63 -0
- package/src/components/StreamView.tsx +483 -0
- package/src/components/StripeEmbeddedCheckout.tsx +155 -0
- package/src/components/SubscriptionStatus.tsx +634 -0
- package/src/components/SystemWarningBanner.tsx +71 -0
- package/src/components/ThemeToggle.tsx +100 -0
- package/src/components/TrajectoriesView.tsx +526 -0
- package/src/components/TrajectoryDetailView.tsx +426 -0
- package/src/components/TriggersView.tsx +1 -0
- package/src/components/VectorBrowserView.tsx +1633 -0
- package/src/components/VoiceConfigView.tsx +674 -0
- package/src/components/VrmStage.test.ts +219 -0
- package/src/components/VrmStage.tsx +432 -0
- package/src/components/WhatsAppQrOverlay.tsx +230 -0
- package/src/components/__tests__/chainConfig.test.ts +220 -0
- package/src/components/apps/AppDetailPane.tsx +242 -0
- package/src/components/apps/AppsCatalogGrid.tsx +137 -0
- package/src/components/apps/extensions/HyperscapeAppDetailPanel.tsx +577 -0
- package/src/components/apps/extensions/registry.ts +16 -0
- package/src/components/apps/extensions/types.ts +9 -0
- package/src/components/apps/helpers.ts +44 -0
- package/src/components/avatar/VrmAnimationLoader.test.ts +164 -0
- package/src/components/avatar/VrmAnimationLoader.ts +151 -0
- package/src/components/avatar/VrmBlinkController.ts +118 -0
- package/src/components/avatar/VrmCameraManager.ts +407 -0
- package/src/components/avatar/VrmEngine.ts +2678 -0
- package/src/components/avatar/VrmFootShadow.ts +96 -0
- package/src/components/avatar/VrmViewer.tsx +421 -0
- package/src/components/avatar/__tests__/VrmCameraManager.test.ts +168 -0
- package/src/components/avatar/__tests__/VrmEngine.test.ts +1574 -0
- package/src/components/avatar/mixamoVRMRigMap.ts +62 -0
- package/src/components/avatar/retargetMixamoFbxToVrm.ts +144 -0
- package/src/components/avatar/retargetMixamoGltfToVrm.ts +119 -0
- package/src/components/chainConfig.ts +380 -0
- package/src/components/companion/CompanionHeader.tsx +47 -0
- package/src/components/companion/CompanionSceneHost.tsx +5 -0
- package/src/components/companion/VrmStage.tsx +2 -0
- package/src/components/companion/__tests__/walletUtils.test.ts +742 -0
- package/src/components/companion/walletUtils.ts +290 -0
- package/src/components/companion-shell-styles.test.ts +146 -0
- package/src/components/companion-shell-styles.ts +270 -0
- package/src/components/confirm-delete-control.tsx +69 -0
- package/src/components/conversations/ConversationListItem.tsx +185 -0
- package/src/components/conversations/conversation-utils.ts +151 -0
- package/src/components/format.ts +131 -0
- package/src/components/index.ts +92 -0
- package/src/components/inventory/CopyableAddress.tsx +41 -0
- package/src/components/inventory/InventoryToolbar.tsx +142 -0
- package/src/components/inventory/NftGrid.tsx +99 -0
- package/src/components/inventory/TokenLogo.tsx +71 -0
- package/src/components/inventory/TokensTable.tsx +216 -0
- package/src/components/inventory/constants.ts +170 -0
- package/src/components/inventory/index.ts +29 -0
- package/src/components/inventory/media-url.test.ts +38 -0
- package/src/components/inventory/media-url.ts +36 -0
- package/src/components/inventory/useInventoryData.ts +460 -0
- package/src/components/knowledge-upload-image.ts +215 -0
- package/src/components/labels.ts +46 -0
- package/src/components/onboarding/ActivateStep.tsx +30 -0
- package/src/components/onboarding/ConnectionStep.tsx +1530 -0
- package/src/components/onboarding/OnboardingPanel.tsx +39 -0
- package/src/components/onboarding/OnboardingStepNav.tsx +31 -0
- package/src/components/onboarding/PermissionsStep.tsx +20 -0
- package/src/components/onboarding/RpcStep.tsx +402 -0
- package/src/components/onboarding/WakeUpStep.tsx +184 -0
- package/src/components/permissions/PermissionIcon.tsx +25 -0
- package/src/components/permissions/StreamingPermissions.tsx +376 -0
- package/src/components/plugins/showcase-data.ts +481 -0
- package/src/components/shared/ShellHeaderControls.tsx +193 -0
- package/src/components/skeletons.tsx +88 -0
- package/src/components/stream/ActivityFeed.tsx +113 -0
- package/src/components/stream/AvatarPip.tsx +10 -0
- package/src/components/stream/ChatContent.tsx +126 -0
- package/src/components/stream/ChatTicker.tsx +55 -0
- package/src/components/stream/IdleContent.tsx +73 -0
- package/src/components/stream/StatusBar.tsx +469 -0
- package/src/components/stream/StreamSettings.tsx +506 -0
- package/src/components/stream/StreamTerminal.tsx +94 -0
- package/src/components/stream/StreamVoiceConfig.tsx +160 -0
- package/src/components/stream/helpers.ts +134 -0
- package/src/components/stream/overlays/OverlayLayer.tsx +75 -0
- package/src/components/stream/overlays/built-in/ActionTickerWidget.tsx +64 -0
- package/src/components/stream/overlays/built-in/AlertPopupWidget.tsx +87 -0
- package/src/components/stream/overlays/built-in/BrandingWidget.tsx +51 -0
- package/src/components/stream/overlays/built-in/CustomHtmlWidget.tsx +105 -0
- package/src/components/stream/overlays/built-in/PeonGlassWidget.tsx +265 -0
- package/src/components/stream/overlays/built-in/PeonHudWidget.tsx +247 -0
- package/src/components/stream/overlays/built-in/PeonSakuraWidget.tsx +278 -0
- package/src/components/stream/overlays/built-in/ThoughtBubbleWidget.tsx +77 -0
- package/src/components/stream/overlays/built-in/ViewerCountWidget.tsx +46 -0
- package/src/components/stream/overlays/built-in/index.ts +13 -0
- package/src/components/stream/overlays/registry.ts +22 -0
- package/src/components/stream/overlays/types.ts +90 -0
- package/src/components/stream/overlays/useOverlayLayout.ts +218 -0
- package/src/components/trajectory-format.ts +50 -0
- package/src/components/ui-badges.tsx +109 -0
- package/src/components/ui-switch.tsx +57 -0
- package/src/components/vector-browser-three.ts +27 -0
- package/src/config/config-catalog.ts +1092 -0
- package/src/config/config-field.tsx +1900 -0
- package/src/config/config-renderer.tsx +730 -0
- package/src/config/index.ts +11 -0
- package/src/config/ui-renderer.tsx +1751 -0
- package/src/config/ui-spec.ts +256 -0
- package/src/events/index.ts +89 -0
- package/src/hooks/index.ts +13 -0
- package/src/hooks/useBugReport.tsx +43 -0
- package/src/hooks/useCanvasWindow.ts +372 -0
- package/src/hooks/useChatAvatarVoice.ts +111 -0
- package/src/hooks/useContextMenu.ts +127 -0
- package/src/hooks/useKeyboardShortcuts.ts +86 -0
- package/src/hooks/useLifoSync.ts +143 -0
- package/src/hooks/useMemoryMonitor.ts +335 -0
- package/src/hooks/useRenderGuard.ts +43 -0
- package/src/hooks/useRetakeCapture.ts +67 -0
- package/src/hooks/useStreamPopoutNavigation.ts +27 -0
- package/src/hooks/useTimeout.ts +37 -0
- package/src/hooks/useVoiceChat.ts +1443 -0
- package/src/hooks/useWhatsAppPairing.ts +123 -0
- package/src/i18n/index.ts +76 -0
- package/src/i18n/locales/en.json +1196 -0
- package/src/i18n/locales/es.json +1196 -0
- package/src/i18n/locales/ko.json +1196 -0
- package/src/i18n/locales/pt.json +1196 -0
- package/src/i18n/locales/zh-CN.json +1196 -0
- package/src/i18n/messages.ts +21 -0
- package/src/index.ts +6 -0
- package/src/navigation/index.ts +282 -0
- package/src/navigation.test.ts +189 -0
- package/src/platform/browser-launch.test.ts +94 -0
- package/src/platform/browser-launch.ts +149 -0
- package/src/platform/index.ts +261 -0
- package/src/platform/init.ts +236 -0
- package/src/providers/index.ts +82 -0
- package/src/state/AppContext.tsx +5737 -0
- package/src/state/index.ts +6 -0
- package/src/state/internal.ts +77 -0
- package/src/state/parsers.test.ts +124 -0
- package/src/state/parsers.ts +309 -0
- package/src/state/persistence.ts +278 -0
- package/src/state/types.ts +694 -0
- package/src/state/ui-preferences.ts +3 -0
- package/src/state/useApp.ts +23 -0
- package/src/state/vrm.ts +76 -0
- package/src/stories/AppMockProvider.tsx +32 -0
- package/src/stories/ChatEmptyState.stories.tsx +27 -0
- package/src/stories/ChatMessage.stories.tsx +115 -0
- package/src/stories/CompanionHeader.stories.tsx +74 -0
- package/src/stories/CompanionView.stories.tsx +33 -0
- package/src/stories/ConversationListItem.stories.tsx +102 -0
- package/src/stories/TypingIndicator.stories.tsx +28 -0
- package/src/styles/anime.css +6324 -0
- package/src/styles/base.css +196 -0
- package/src/styles/onboarding-game.css +716 -0
- package/src/styles/styles.css +2085 -0
- package/src/styles/xterm.css +241 -0
- package/src/types/index.ts +715 -0
- package/src/types/react-test-renderer.d.ts +45 -0
- package/src/utils/asset-url.ts +110 -0
- package/src/utils/assistant-text.ts +172 -0
- package/src/utils/clipboard.ts +41 -0
- package/src/utils/desktop-dialogs.ts +80 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/number-parsing.ts +125 -0
- package/src/utils/openExternalUrl.ts +20 -0
- package/src/utils/spoken-text.ts +65 -0
- package/src/utils/streaming-text.ts +120 -0
- package/src/voice/index.ts +1 -0
- package/src/voice/types.ts +197 -0
- package/test/app/AppContext.pty-sessions.test.tsx +143 -0
- package/test/app/MessageContent.test.tsx +326 -0
- package/test/app/PermissionsOnboarding.test.tsx +216 -0
- package/test/app/PermissionsSection.test.tsx +186 -0
- package/test/app/advanced-trajectory-fine-tuning.e2e.test.ts +397 -0
- package/test/app/agent-activity-box.test.tsx +132 -0
- package/test/app/agent-transfer-lock.test.ts +274 -0
- package/test/app/api-client-electron-fallback.test.ts +139 -0
- package/test/app/api-client-timeout.test.ts +75 -0
- package/test/app/api-client-ws.test.ts +98 -0
- package/test/app/api-client.ws-max-reconnect.test.ts +139 -0
- package/test/app/api-client.ws-reconnect.test.ts +157 -0
- package/test/app/app-context-autonomy-events.test.ts +478 -0
- package/test/app/apps-page-view.test.ts +114 -0
- package/test/app/apps-view.test.ts +769 -0
- package/test/app/autonomous-workflows.e2e.test.ts +765 -0
- package/test/app/autonomy-events.test.ts +150 -0
- package/test/app/avatar-selector.test.tsx +52 -0
- package/test/app/bsc-trade-panel.test.tsx +134 -0
- package/test/app/bug-report-modal.test.tsx +353 -0
- package/test/app/character-customization.e2e.test.ts +1168 -0
- package/test/app/chat-advanced-features.e2e.test.ts +706 -0
- package/test/app/chat-composer.test.tsx +181 -0
- package/test/app/chat-language-header.test.ts +64 -0
- package/test/app/chat-message.test.tsx +222 -0
- package/test/app/chat-modal-view.test.tsx +191 -0
- package/test/app/chat-routine-filter.test.ts +96 -0
- package/test/app/chat-send-lock.test.ts +1302 -0
- package/test/app/chat-stream-api-client.test.tsx +390 -0
- package/test/app/chat-view-game-modal.test.tsx +661 -0
- package/test/app/chat-view.test.tsx +877 -0
- package/test/app/cloud-api.e2e.test.ts +258 -0
- package/test/app/cloud-login-flow.e2e.test.ts +494 -0
- package/test/app/cloud-login-lock.test.ts +411 -0
- package/test/app/command-palette.test.tsx +184 -0
- package/test/app/command-registry.test.ts +75 -0
- package/test/app/companion-greeting-wave.test.tsx +443 -0
- package/test/app/companion-stale-conversation.test.tsx +424 -0
- package/test/app/companion-view.test.tsx +686 -0
- package/test/app/confirm-delete-control.test.ts +79 -0
- package/test/app/confirm-modal.test.tsx +219 -0
- package/test/app/connectors-ui.e2e.test.ts +508 -0
- package/test/app/conversations-sidebar-game-modal.test.tsx +260 -0
- package/test/app/conversations-sidebar.test.tsx +160 -0
- package/test/app/custom-actions-smoke.test.ts +387 -0
- package/test/app/custom-avatar-api-client.test.ts +207 -0
- package/test/app/desktop-utils.test.ts +145 -0
- package/test/app/electrobun-rpc-bridge.test.ts +83 -0
- package/test/app/events.test.ts +88 -0
- package/test/app/export-import-flows.e2e.test.ts +700 -0
- package/test/app/fine-tuning-view.test.ts +471 -0
- package/test/app/game-view-auth-session.test.tsx +186 -0
- package/test/app/game-view.test.ts +444 -0
- package/test/app/global-emote-overlay.test.tsx +106 -0
- package/test/app/header-status.test.tsx +149 -0
- package/test/app/i18n.test.ts +152 -0
- package/test/app/inventory-bsc-view.test.ts +908 -0
- package/test/app/knowledge-ui.e2e.test.ts +762 -0
- package/test/app/knowledge-upload-helpers.test.ts +124 -0
- package/test/app/lifecycle-lock.test.ts +267 -0
- package/test/app/lifo-popout-utils.test.ts +208 -0
- package/test/app/lifo-safe-endpoint.test.ts +34 -0
- package/test/app/loading-screen.test.tsx +45 -0
- package/test/app/memory-monitor.test.ts +332 -0
- package/test/app/navigation.test.tsx +29 -0
- package/test/app/onboarding-finish-lock.test.ts +500 -0
- package/test/app/onboarding-language.test.tsx +161 -0
- package/test/app/onboarding-steps.test.tsx +371 -0
- package/test/app/open-external-url.test.ts +65 -0
- package/test/app/pages-navigation-smoke.e2e.test.ts +633 -0
- package/test/app/pairing-lock.test.ts +260 -0
- package/test/app/pairing-view.test.tsx +74 -0
- package/test/app/permissions-section.test.ts +432 -0
- package/test/app/plugin-bridge.test.ts +109 -0
- package/test/app/plugins-ui.e2e.test.ts +605 -0
- package/test/app/plugins-view-game-modal.test.tsx +650 -0
- package/test/app/plugins-view-toggle-restart.test.ts +129 -0
- package/test/app/provider-dropdown-default.test.tsx +164 -0
- package/test/app/restart-banner.test.tsx +197 -0
- package/test/app/retake-capture.test.ts +84 -0
- package/test/app/sandbox-api-client.test.ts +108 -0
- package/test/app/save-command-modal.test.tsx +109 -0
- package/test/app/secrets-view.test.tsx +92 -0
- package/test/app/settings-control-styles.test.tsx +142 -0
- package/test/app/settings-reset.e2e.test.ts +728 -0
- package/test/app/settings-sections.e2e.test.ts +614 -0
- package/test/app/shared-format.test.ts +44 -0
- package/test/app/shared-switch.test.ts +69 -0
- package/test/app/shell-mode-switching.e2e.test.ts +829 -0
- package/test/app/shell-mode-tab-memory.test.tsx +283 -0
- package/test/app/shell-overlays.test.tsx +50 -0
- package/test/app/shortcuts-overlay.test.tsx +111 -0
- package/test/app/sse-interruption.test.ts +122 -0
- package/test/app/startup-asset-missing.e2e.test.ts +126 -0
- package/test/app/startup-backend-missing.e2e.test.ts +118 -0
- package/test/app/startup-chat.e2e.test.ts +305 -0
- package/test/app/startup-conversation-restore.test.tsx +344 -0
- package/test/app/startup-failure-view.test.tsx +103 -0
- package/test/app/startup-onboarding.e2e.test.ts +612 -0
- package/test/app/startup-timeout.test.tsx +80 -0
- package/test/app/startup-token-401.e2e.test.ts +103 -0
- package/test/app/stream-helpers.test.ts +46 -0
- package/test/app/stream-popout-navigation.test.tsx +41 -0
- package/test/app/stream-status-bar.test.tsx +89 -0
- package/test/app/theme-toggle.test.tsx +33 -0
- package/test/app/training-api-client.test.ts +128 -0
- package/test/app/trajectories-view.test.tsx +220 -0
- package/test/app/triggers-api-client.test.ts +77 -0
- package/test/app/triggers-navigation.test.ts +118 -0
- package/test/app/triggers-view.e2e.test.ts +674 -0
- package/test/app/update-channel-lock.test.ts +259 -0
- package/test/app/vector-browser.async-cleanup.test.tsx +367 -0
- package/test/app/vector-browser.e2e.test.ts +653 -0
- package/test/app/vrm-stage.test.tsx +351 -0
- package/test/app/vrm-viewer.test.tsx +298 -0
- package/test/app/wallet-api-save-lock.test.ts +277 -0
- package/test/app/wallet-hooks.test.ts +405 -0
- package/test/app/wallet-ui-flows.e2e.test.ts +556 -0
- package/test/avatar/asset-url.test.ts +90 -0
- package/test/avatar/avatar-selector.test.ts +173 -0
- package/test/avatar/mixamo-vrm-rig-map.test.ts +111 -0
- package/test/avatar/voice-chat-streaming-text.test.ts +96 -0
- package/test/avatar/voice-chat.test.ts +391 -0
- package/test/ui/command-palette-commands.test.ts +57 -0
- package/test/ui/ui-renderer.test.ts +39 -0
- package/tsconfig.build.json +19 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TestRenderer, { act } from "react-test-renderer";
|
|
3
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
|
|
5
|
+
const { mockUseApp } = vi.hoisted(() => ({
|
|
6
|
+
mockUseApp: vi.fn(),
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
vi.mock("@elizaos/app-core/state", () => ({
|
|
10
|
+
useApp: () => mockUseApp(),
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
import { InventoryView } from "../../src/components/InventoryView";
|
|
14
|
+
|
|
15
|
+
function createWalletBalances(
|
|
16
|
+
bnbBalance = "0.006",
|
|
17
|
+
bscError: string | null = null,
|
|
18
|
+
) {
|
|
19
|
+
return {
|
|
20
|
+
evm: {
|
|
21
|
+
address: "0x1111111111111111111111111111111111111111",
|
|
22
|
+
chains: [
|
|
23
|
+
{
|
|
24
|
+
chain: "BSC",
|
|
25
|
+
chainId: 56,
|
|
26
|
+
nativeBalance: bnbBalance,
|
|
27
|
+
nativeSymbol: "BNB",
|
|
28
|
+
nativeValueUsd: "4.20",
|
|
29
|
+
tokens: [
|
|
30
|
+
{
|
|
31
|
+
symbol: "CAKE",
|
|
32
|
+
name: "PancakeSwap",
|
|
33
|
+
contractAddress: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
|
34
|
+
balance: "12.3",
|
|
35
|
+
decimals: 18,
|
|
36
|
+
valueUsd: "31.20",
|
|
37
|
+
logoUrl: "",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
error: bscError,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
chain: "Ethereum",
|
|
44
|
+
chainId: 1,
|
|
45
|
+
nativeBalance: "0.15",
|
|
46
|
+
nativeSymbol: "ETH",
|
|
47
|
+
nativeValueUsd: "460.00",
|
|
48
|
+
tokens: [],
|
|
49
|
+
error: null,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
solana: {
|
|
54
|
+
address: "So11111111111111111111111111111111111111112",
|
|
55
|
+
solBalance: "1.0",
|
|
56
|
+
solValueUsd: "100.00",
|
|
57
|
+
tokens: [],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function createEmptyWalletBalances() {
|
|
63
|
+
return {
|
|
64
|
+
evm: {
|
|
65
|
+
address: "0x1111111111111111111111111111111111111111",
|
|
66
|
+
chains: [
|
|
67
|
+
{
|
|
68
|
+
chain: "BSC",
|
|
69
|
+
chainId: 56,
|
|
70
|
+
nativeBalance: "0",
|
|
71
|
+
nativeSymbol: "BNB",
|
|
72
|
+
nativeValueUsd: "0",
|
|
73
|
+
tokens: [],
|
|
74
|
+
error: null,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
chain: "Ethereum",
|
|
78
|
+
chainId: 1,
|
|
79
|
+
nativeBalance: "0",
|
|
80
|
+
nativeSymbol: "ETH",
|
|
81
|
+
nativeValueUsd: "0",
|
|
82
|
+
tokens: [],
|
|
83
|
+
error: null,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
solana: {
|
|
88
|
+
address: "So11111111111111111111111111111111111111112",
|
|
89
|
+
solBalance: "0",
|
|
90
|
+
solValueUsd: "0",
|
|
91
|
+
tokens: [],
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function createWalletConfig() {
|
|
97
|
+
return {
|
|
98
|
+
alchemyKeySet: true,
|
|
99
|
+
infuraKeySet: false,
|
|
100
|
+
ankrKeySet: true,
|
|
101
|
+
nodeRealBscRpcSet: true,
|
|
102
|
+
quickNodeBscRpcSet: true,
|
|
103
|
+
managedBscRpcReady: true,
|
|
104
|
+
cloudManagedAccess: true,
|
|
105
|
+
evmBalanceReady: true,
|
|
106
|
+
ethereumBalanceReady: true,
|
|
107
|
+
baseBalanceReady: true,
|
|
108
|
+
bscBalanceReady: true,
|
|
109
|
+
avalancheBalanceReady: true,
|
|
110
|
+
solanaBalanceReady: true,
|
|
111
|
+
heliusKeySet: false,
|
|
112
|
+
birdeyeKeySet: false,
|
|
113
|
+
evmChains: ["Ethereum", "Base", "BSC"],
|
|
114
|
+
evmAddress: "0x1111111111111111111111111111111111111111",
|
|
115
|
+
solanaAddress: "So11111111111111111111111111111111111111112",
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function createPreflight(ok = true) {
|
|
120
|
+
return {
|
|
121
|
+
ok,
|
|
122
|
+
walletAddress: "0x1111111111111111111111111111111111111111",
|
|
123
|
+
rpcUrlHost: "bsc-mainnet.nodereal.io",
|
|
124
|
+
chainId: 56,
|
|
125
|
+
bnbBalance: "0.1",
|
|
126
|
+
minGasBnb: "0.005",
|
|
127
|
+
checks: {
|
|
128
|
+
walletReady: true,
|
|
129
|
+
rpcReady: true,
|
|
130
|
+
chainReady: true,
|
|
131
|
+
gasReady: true,
|
|
132
|
+
tokenAddressValid: true,
|
|
133
|
+
},
|
|
134
|
+
reasons: [] as string[],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function createQuote(side: "buy" | "sell" = "buy") {
|
|
139
|
+
const isBuy = side === "buy";
|
|
140
|
+
return {
|
|
141
|
+
ok: true,
|
|
142
|
+
side,
|
|
143
|
+
routerAddress: "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
144
|
+
wrappedNativeAddress: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
145
|
+
tokenAddress: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
|
146
|
+
slippageBps: 500,
|
|
147
|
+
route: isBuy
|
|
148
|
+
? [
|
|
149
|
+
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
150
|
+
"0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
|
151
|
+
]
|
|
152
|
+
: [
|
|
153
|
+
"0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
|
154
|
+
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
155
|
+
],
|
|
156
|
+
quoteIn: isBuy
|
|
157
|
+
? { symbol: "BNB", amount: "0.1", amountWei: "100000000000000000" }
|
|
158
|
+
: { symbol: "CAKE", amount: "1.0", amountWei: "1000000000000000000" },
|
|
159
|
+
quoteOut: isBuy
|
|
160
|
+
? { symbol: "CAKE", amount: "2.5", amountWei: "2500000000000000000" }
|
|
161
|
+
: { symbol: "BNB", amount: "0.03", amountWei: "30000000000000000" },
|
|
162
|
+
minReceive: isBuy
|
|
163
|
+
? { symbol: "CAKE", amount: "2.375", amountWei: "2375000000000000000" }
|
|
164
|
+
: { symbol: "BNB", amount: "0.0285", amountWei: "28500000000000000" },
|
|
165
|
+
price: "25.0000",
|
|
166
|
+
preflight: createPreflight(true),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function createExecuteResult(
|
|
171
|
+
executed = true,
|
|
172
|
+
options?: {
|
|
173
|
+
side?: "buy" | "sell";
|
|
174
|
+
requiresApproval?: boolean;
|
|
175
|
+
executionStatus?: "success" | "pending";
|
|
176
|
+
},
|
|
177
|
+
) {
|
|
178
|
+
const side = options?.side ?? "buy";
|
|
179
|
+
const requiresApproval = options?.requiresApproval ?? false;
|
|
180
|
+
const executionStatus = options?.executionStatus ?? "success";
|
|
181
|
+
return {
|
|
182
|
+
ok: true,
|
|
183
|
+
side,
|
|
184
|
+
mode: executed ? ("local-key" as const) : ("user-sign" as const),
|
|
185
|
+
quote: createQuote(side),
|
|
186
|
+
executed,
|
|
187
|
+
requiresUserSignature: !executed,
|
|
188
|
+
unsignedTx: {
|
|
189
|
+
chainId: 56,
|
|
190
|
+
from: "0x1111111111111111111111111111111111111111",
|
|
191
|
+
to: "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
192
|
+
data: "0x1234",
|
|
193
|
+
valueWei: "100000000000000000",
|
|
194
|
+
deadline: Math.floor(Date.now() / 1000) + 600,
|
|
195
|
+
explorerUrl: "https://bscscan.com",
|
|
196
|
+
},
|
|
197
|
+
unsignedApprovalTx:
|
|
198
|
+
!executed && side === "sell" && requiresApproval
|
|
199
|
+
? {
|
|
200
|
+
chainId: 56,
|
|
201
|
+
from: "0x1111111111111111111111111111111111111111",
|
|
202
|
+
to: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
|
203
|
+
data: "0xabcd",
|
|
204
|
+
valueWei: "0",
|
|
205
|
+
explorerUrl: "https://bscscan.com",
|
|
206
|
+
spender: "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
207
|
+
amountWei: "1000000000000000000",
|
|
208
|
+
}
|
|
209
|
+
: undefined,
|
|
210
|
+
requiresApproval:
|
|
211
|
+
!executed && side === "sell" ? requiresApproval : undefined,
|
|
212
|
+
execution: executed
|
|
213
|
+
? {
|
|
214
|
+
hash: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
215
|
+
nonce: 12,
|
|
216
|
+
gasLimit: "220000",
|
|
217
|
+
valueWei: "100000000000000000",
|
|
218
|
+
explorerUrl:
|
|
219
|
+
"https://bscscan.com/tx/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
220
|
+
blockNumber: 51_234_567,
|
|
221
|
+
status: executionStatus,
|
|
222
|
+
}
|
|
223
|
+
: undefined,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function createContext(
|
|
228
|
+
overrides?: Partial<{
|
|
229
|
+
inventoryView: "tokens" | "nfts";
|
|
230
|
+
inventorySort: "chain" | "symbol" | "value";
|
|
231
|
+
inventoryChainFocus: "bsc" | "all";
|
|
232
|
+
walletBalances: ReturnType<typeof createWalletBalances> | null;
|
|
233
|
+
walletConfig: ReturnType<typeof createWalletConfig> | null;
|
|
234
|
+
elizaCloudConnected: boolean;
|
|
235
|
+
walletError: string | null;
|
|
236
|
+
t: (key: string) => string;
|
|
237
|
+
}>,
|
|
238
|
+
) {
|
|
239
|
+
const ctx: Record<string, unknown> = {
|
|
240
|
+
walletConfig: createWalletConfig(),
|
|
241
|
+
walletAddresses: {
|
|
242
|
+
evmAddress: "0x1111111111111111111111111111111111111111",
|
|
243
|
+
solanaAddress: "So11111111111111111111111111111111111111112",
|
|
244
|
+
},
|
|
245
|
+
walletBalances: createWalletBalances(),
|
|
246
|
+
walletNfts: { evm: [], solana: null },
|
|
247
|
+
walletLoading: false,
|
|
248
|
+
walletNftsLoading: false,
|
|
249
|
+
inventoryView: "tokens",
|
|
250
|
+
inventorySort: "value",
|
|
251
|
+
inventoryChainFocus: "all",
|
|
252
|
+
inventoryCollapseOtherEvm: true,
|
|
253
|
+
inventoryCollapseSolana: true,
|
|
254
|
+
walletError: null,
|
|
255
|
+
elizaCloudConnected: true,
|
|
256
|
+
loadBalances: vi.fn(async () => {}),
|
|
257
|
+
loadNfts: vi.fn(async () => {}),
|
|
258
|
+
getBscTradePreflight: vi.fn(async () => createPreflight(true)),
|
|
259
|
+
getBscTradeQuote: vi.fn(async (request?: { side?: "buy" | "sell" }) =>
|
|
260
|
+
createQuote(request?.side ?? "buy"),
|
|
261
|
+
),
|
|
262
|
+
executeBscTrade: vi.fn(async () => createExecuteResult(true)),
|
|
263
|
+
getBscTradeTxStatus: vi.fn(async () => ({
|
|
264
|
+
ok: true,
|
|
265
|
+
hash: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
266
|
+
status: "success" as const,
|
|
267
|
+
explorerUrl:
|
|
268
|
+
"https://bscscan.com/tx/0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
269
|
+
chainId: 56,
|
|
270
|
+
blockNumber: 51_234_567,
|
|
271
|
+
confirmations: 7,
|
|
272
|
+
nonce: 12,
|
|
273
|
+
gasUsed: "180000",
|
|
274
|
+
effectiveGasPriceWei: "3000000000",
|
|
275
|
+
})),
|
|
276
|
+
setTab: vi.fn(),
|
|
277
|
+
setActionNotice: vi.fn(),
|
|
278
|
+
copyToClipboard: vi.fn(async () => {}),
|
|
279
|
+
uiLanguage: "en",
|
|
280
|
+
t: (k: string) => k,
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
if (overrides) {
|
|
284
|
+
Object.assign(ctx, overrides);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
ctx.setState = vi.fn((key: string, value: unknown) => {
|
|
288
|
+
ctx[key] = value;
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
return ctx;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function text(node: TestRenderer.ReactTestInstance): string {
|
|
295
|
+
return node.children
|
|
296
|
+
.map((child) => (typeof child === "string" ? child : text(child)))
|
|
297
|
+
.join("");
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
async function flushAsync() {
|
|
301
|
+
await Promise.resolve();
|
|
302
|
+
await Promise.resolve();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
beforeEach(() => {
|
|
306
|
+
try {
|
|
307
|
+
localStorage.removeItem("wt_tracked_bsc_tokens");
|
|
308
|
+
} catch {
|
|
309
|
+
// ignore in non-browser test runtime
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
describe("InventoryView unified wallets", () => {
|
|
314
|
+
it("defaults to a unified all-chains wallet view", async () => {
|
|
315
|
+
const ctx = createContext();
|
|
316
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
317
|
+
|
|
318
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
319
|
+
await act(async () => {
|
|
320
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
const content = text(tree?.root);
|
|
324
|
+
expect(content).not.toContain("wallet.portfolio");
|
|
325
|
+
expect(content).not.toContain("All Chains");
|
|
326
|
+
expect(content).toContain("wallet.tokens");
|
|
327
|
+
expect(content).toContain("wallet.nfts");
|
|
328
|
+
expect(content).toContain("wallet.all");
|
|
329
|
+
expect(content).toContain("tokenstable.nativeGasEthereum");
|
|
330
|
+
expect(content).toContain("tokenstable.nativeGasSolana");
|
|
331
|
+
expect(
|
|
332
|
+
tree?.root.findAll(
|
|
333
|
+
(node) =>
|
|
334
|
+
node.type === "button" &&
|
|
335
|
+
node.props["data-testid"] === "wallet-token-preflight",
|
|
336
|
+
),
|
|
337
|
+
).toHaveLength(0);
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
it("shows no balances when every chain is empty", async () => {
|
|
341
|
+
const ctx = createContext({
|
|
342
|
+
walletBalances: createEmptyWalletBalances(),
|
|
343
|
+
t: (key: string) =>
|
|
344
|
+
key === "wallet.noTokensFound"
|
|
345
|
+
? "No tokens yet. Send your agent some tokens!"
|
|
346
|
+
: key === "wallet.emptyTokensCta"
|
|
347
|
+
? "Use the wallet addresses below to fund this agent."
|
|
348
|
+
: key === "wallet.copyEvmAddress"
|
|
349
|
+
? "Copy EVM address"
|
|
350
|
+
: key === "wallet.copySolanaAddress"
|
|
351
|
+
? "Copy Solana address"
|
|
352
|
+
: key,
|
|
353
|
+
});
|
|
354
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
355
|
+
|
|
356
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
357
|
+
await act(async () => {
|
|
358
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
const content = text(tree?.root);
|
|
362
|
+
expect(content).toContain("No tokens yet. Send your agent some tokens!");
|
|
363
|
+
expect(content).toContain("Copy EVM address");
|
|
364
|
+
expect(content).toContain("Copy Solana address");
|
|
365
|
+
expect(content).not.toContain("tokenstable.nativeGasEthereum");
|
|
366
|
+
expect(content).not.toContain("tokenstable.nativeGasSolana");
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
it("switches focus with chain controls", async () => {
|
|
370
|
+
const ctx = createContext();
|
|
371
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
372
|
+
|
|
373
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
374
|
+
await act(async () => {
|
|
375
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
const chainSelect = tree?.root.findAll(
|
|
379
|
+
(node) =>
|
|
380
|
+
node.type === "select" &&
|
|
381
|
+
node.props["data-testid"] === "wallet-chain-select",
|
|
382
|
+
)[0];
|
|
383
|
+
expect(chainSelect).toBeDefined();
|
|
384
|
+
|
|
385
|
+
await act(async () => {
|
|
386
|
+
chainSelect.props.onChange({ target: { value: "bsc" } });
|
|
387
|
+
});
|
|
388
|
+
expect(ctx.setState).toHaveBeenCalledWith("inventoryChainFocus", "bsc");
|
|
389
|
+
|
|
390
|
+
await act(async () => {
|
|
391
|
+
tree?.update(React.createElement(InventoryView));
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
const content = text(tree?.root);
|
|
395
|
+
expect(content).not.toContain("All Chains");
|
|
396
|
+
expect(content).not.toContain("Ethereum native");
|
|
397
|
+
expect(
|
|
398
|
+
tree?.root.findAll(
|
|
399
|
+
(node) =>
|
|
400
|
+
node.type === "button" &&
|
|
401
|
+
node.props["data-testid"] === "wallet-token-preflight",
|
|
402
|
+
),
|
|
403
|
+
).toHaveLength(1);
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
it("applies BNB gas readiness threshold at 0.005", async () => {
|
|
407
|
+
const lowCtx = createContext({
|
|
408
|
+
inventoryChainFocus: "bsc",
|
|
409
|
+
walletBalances: createWalletBalances("0.0049"),
|
|
410
|
+
});
|
|
411
|
+
mockUseApp.mockImplementation(() => lowCtx);
|
|
412
|
+
|
|
413
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
414
|
+
await act(async () => {
|
|
415
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
416
|
+
});
|
|
417
|
+
let content = text(tree?.root);
|
|
418
|
+
expect(content).toContain("Trade Not Ready");
|
|
419
|
+
|
|
420
|
+
const readyCtx = createContext({
|
|
421
|
+
inventoryChainFocus: "bsc",
|
|
422
|
+
walletBalances: createWalletBalances("0.005"),
|
|
423
|
+
});
|
|
424
|
+
mockUseApp.mockImplementation(() => readyCtx);
|
|
425
|
+
await act(async () => {
|
|
426
|
+
tree?.update(React.createElement(InventoryView));
|
|
427
|
+
});
|
|
428
|
+
content = text(tree?.root);
|
|
429
|
+
expect(content).toContain("Trade Ready");
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
it("renders BSC chain errors and token preflight/quote actions", async () => {
|
|
433
|
+
const errorCtx = createContext({
|
|
434
|
+
inventoryChainFocus: "bsc",
|
|
435
|
+
walletBalances: createWalletBalances("0.006", "BSC RPC timeout"),
|
|
436
|
+
});
|
|
437
|
+
mockUseApp.mockImplementation(() => errorCtx);
|
|
438
|
+
|
|
439
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
440
|
+
await act(async () => {
|
|
441
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
const content = text(tree?.root);
|
|
445
|
+
expect(content).toContain("BSC: BSC RPC timeout");
|
|
446
|
+
|
|
447
|
+
const normalCtx = createContext({
|
|
448
|
+
inventoryChainFocus: "bsc",
|
|
449
|
+
walletBalances: createWalletBalances("0.006", null),
|
|
450
|
+
});
|
|
451
|
+
mockUseApp.mockImplementation(() => normalCtx);
|
|
452
|
+
await act(async () => {
|
|
453
|
+
tree?.update(React.createElement(InventoryView));
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
const preflightButton = tree?.root.findAll(
|
|
457
|
+
(node) =>
|
|
458
|
+
node.type === "button" &&
|
|
459
|
+
node.props["data-testid"] === "wallet-token-preflight",
|
|
460
|
+
)[0];
|
|
461
|
+
const tokenInput = tree?.root.findAll(
|
|
462
|
+
(node) =>
|
|
463
|
+
node.type === "input" &&
|
|
464
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
465
|
+
)[0];
|
|
466
|
+
const quoteButton = tree?.root.findAll(
|
|
467
|
+
(node) =>
|
|
468
|
+
node.type === "button" &&
|
|
469
|
+
node.props["data-testid"] === "wallet-token-quote",
|
|
470
|
+
)[0];
|
|
471
|
+
expect(preflightButton).toBeDefined();
|
|
472
|
+
expect(tokenInput).toBeDefined();
|
|
473
|
+
expect(quoteButton).toBeDefined();
|
|
474
|
+
|
|
475
|
+
await act(async () => {
|
|
476
|
+
tokenInput.props.onChange({
|
|
477
|
+
target: { value: "0x1234567890abcdef1234567890abcdef12345678" },
|
|
478
|
+
});
|
|
479
|
+
await flushAsync();
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
await act(async () => {
|
|
483
|
+
preflightButton.props.onClick();
|
|
484
|
+
quoteButton.props.onClick();
|
|
485
|
+
await flushAsync();
|
|
486
|
+
});
|
|
487
|
+
expect(normalCtx.getBscTradePreflight).toHaveBeenCalled();
|
|
488
|
+
expect(normalCtx.getBscTradeQuote).toHaveBeenCalled();
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
it("keeps the all-chains view free of BSC-only RPC warnings", async () => {
|
|
492
|
+
const balances = createWalletBalances("0.006", null);
|
|
493
|
+
balances.evm.chains = balances.evm.chains.filter(
|
|
494
|
+
(chain) => chain.chain !== "BSC",
|
|
495
|
+
);
|
|
496
|
+
const ctx = createContext({
|
|
497
|
+
elizaCloudConnected: false,
|
|
498
|
+
walletBalances: balances,
|
|
499
|
+
walletConfig: {
|
|
500
|
+
...createWalletConfig(),
|
|
501
|
+
ankrKeySet: false,
|
|
502
|
+
managedBscRpcReady: false,
|
|
503
|
+
bscBalanceReady: false,
|
|
504
|
+
},
|
|
505
|
+
});
|
|
506
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
507
|
+
|
|
508
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
509
|
+
await act(async () => {
|
|
510
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
const content = text(tree?.root);
|
|
514
|
+
expect(content).not.toContain("portfolioheader.ConnectViaElizaCl");
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
it("shows managed RPC setup guidance when BSC is focused and unavailable", async () => {
|
|
518
|
+
const balances = createWalletBalances("0.006", null);
|
|
519
|
+
balances.evm.chains = balances.evm.chains.filter(
|
|
520
|
+
(chain) => chain.chain !== "BSC",
|
|
521
|
+
);
|
|
522
|
+
const ctx = createContext({
|
|
523
|
+
inventoryChainFocus: "bsc",
|
|
524
|
+
elizaCloudConnected: false,
|
|
525
|
+
walletBalances: balances,
|
|
526
|
+
walletConfig: {
|
|
527
|
+
...createWalletConfig(),
|
|
528
|
+
alchemyKeySet: false,
|
|
529
|
+
ankrKeySet: false,
|
|
530
|
+
infuraKeySet: false,
|
|
531
|
+
nodeRealBscRpcSet: false,
|
|
532
|
+
quickNodeBscRpcSet: false,
|
|
533
|
+
managedBscRpcReady: false,
|
|
534
|
+
cloudManagedAccess: false,
|
|
535
|
+
bscBalanceReady: false,
|
|
536
|
+
},
|
|
537
|
+
});
|
|
538
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
539
|
+
|
|
540
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
541
|
+
await act(async () => {
|
|
542
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
543
|
+
});
|
|
544
|
+
|
|
545
|
+
const content = text(tree?.root);
|
|
546
|
+
expect(content).toContain("portfolioheader.ConnectViaElizaCl");
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
it("supports quick trade input and preset actions", async () => {
|
|
550
|
+
const ctx = createContext({
|
|
551
|
+
inventoryChainFocus: "bsc",
|
|
552
|
+
walletBalances: createWalletBalances("0.006", null),
|
|
553
|
+
});
|
|
554
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
555
|
+
|
|
556
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
557
|
+
await act(async () => {
|
|
558
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
const tokenInput = tree?.root.findAll(
|
|
562
|
+
(node) =>
|
|
563
|
+
node.type === "input" &&
|
|
564
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
565
|
+
)[0];
|
|
566
|
+
expect(tokenInput).toBeDefined();
|
|
567
|
+
|
|
568
|
+
await act(async () => {
|
|
569
|
+
tokenInput.props.onChange({
|
|
570
|
+
target: { value: "0x1234567890abcdef1234567890abcdef12345678" },
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
const amountPreset = tree?.root.findAll(
|
|
575
|
+
(node) =>
|
|
576
|
+
node.type === "button" &&
|
|
577
|
+
node.props["data-testid"] === "wallet-quick-amount-0.2",
|
|
578
|
+
)[0];
|
|
579
|
+
const quickBuy = tree?.root.findAll(
|
|
580
|
+
(node) =>
|
|
581
|
+
node.type === "button" &&
|
|
582
|
+
node.props["data-testid"] === "wallet-quick-buy",
|
|
583
|
+
)[0];
|
|
584
|
+
const quickSell = tree?.root.findAll(
|
|
585
|
+
(node) =>
|
|
586
|
+
node.type === "button" &&
|
|
587
|
+
node.props["data-testid"] === "wallet-quick-sell",
|
|
588
|
+
)[0];
|
|
589
|
+
expect(amountPreset).toBeDefined();
|
|
590
|
+
expect(quickBuy).toBeDefined();
|
|
591
|
+
expect(quickSell).toBeDefined();
|
|
592
|
+
|
|
593
|
+
await act(async () => {
|
|
594
|
+
amountPreset.props.onClick();
|
|
595
|
+
quickBuy.props.onClick();
|
|
596
|
+
await flushAsync();
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
expect(ctx.getBscTradeQuote).toHaveBeenCalled();
|
|
600
|
+
const content = text(tree?.root);
|
|
601
|
+
expect(content).toContain("bsctradepanel.LatestQuote");
|
|
602
|
+
|
|
603
|
+
await act(async () => {
|
|
604
|
+
quickSell.props.onClick();
|
|
605
|
+
await flushAsync();
|
|
606
|
+
});
|
|
607
|
+
expect(ctx.getBscTradeQuote).toHaveBeenCalledWith(
|
|
608
|
+
expect.objectContaining({ side: "sell" }),
|
|
609
|
+
);
|
|
610
|
+
});
|
|
611
|
+
|
|
612
|
+
it("supports manually adding a token contract to wallet rows", async () => {
|
|
613
|
+
const ctx = createContext({
|
|
614
|
+
inventoryChainFocus: "bsc",
|
|
615
|
+
walletBalances: createWalletBalances("0.006", null),
|
|
616
|
+
});
|
|
617
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
618
|
+
|
|
619
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
620
|
+
await act(async () => {
|
|
621
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
const tokenInput = tree?.root.findAll(
|
|
625
|
+
(node) =>
|
|
626
|
+
node.type === "input" &&
|
|
627
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
628
|
+
)[0];
|
|
629
|
+
const addButton = tree?.root.findAll(
|
|
630
|
+
(node) =>
|
|
631
|
+
node.type === "button" &&
|
|
632
|
+
node.props["data-testid"] === "wallet-quick-add-token",
|
|
633
|
+
)[0];
|
|
634
|
+
expect(addButton).toBeDefined();
|
|
635
|
+
|
|
636
|
+
await act(async () => {
|
|
637
|
+
tokenInput.props.onChange({
|
|
638
|
+
target: { value: "0x1111111111111111111111111111111111111112" },
|
|
639
|
+
});
|
|
640
|
+
await flushAsync();
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
const addButtonUpdated = tree?.root.findAll(
|
|
644
|
+
(node) =>
|
|
645
|
+
node.type === "button" &&
|
|
646
|
+
node.props["data-testid"] === "wallet-quick-add-token",
|
|
647
|
+
)[0];
|
|
648
|
+
|
|
649
|
+
await act(async () => {
|
|
650
|
+
addButtonUpdated.props.onClick();
|
|
651
|
+
await flushAsync();
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
expect(ctx.setActionNotice).toHaveBeenCalledWith(
|
|
655
|
+
"Token added to watchlist.",
|
|
656
|
+
"success",
|
|
657
|
+
2600,
|
|
658
|
+
);
|
|
659
|
+
expect(text(tree?.root)).toContain("TKN-1111");
|
|
660
|
+
|
|
661
|
+
const untrackButton = tree?.root.findAll(
|
|
662
|
+
(node) =>
|
|
663
|
+
node.type === "button" &&
|
|
664
|
+
node.props["data-testid"] === "wallet-token-untrack",
|
|
665
|
+
)[0];
|
|
666
|
+
expect(untrackButton).toBeDefined();
|
|
667
|
+
|
|
668
|
+
await act(async () => {
|
|
669
|
+
untrackButton.props.onClick();
|
|
670
|
+
await flushAsync();
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
expect(text(tree?.root)).not.toContain("TKN-1111");
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
it("executes latest quote via inline confirmation", async () => {
|
|
677
|
+
const ctx = createContext({
|
|
678
|
+
inventoryChainFocus: "bsc",
|
|
679
|
+
walletBalances: createWalletBalances("0.02", null),
|
|
680
|
+
});
|
|
681
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
682
|
+
|
|
683
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
684
|
+
await act(async () => {
|
|
685
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
const tokenInput = tree?.root.findAll(
|
|
689
|
+
(node) =>
|
|
690
|
+
node.type === "input" &&
|
|
691
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
692
|
+
)[0];
|
|
693
|
+
await act(async () => {
|
|
694
|
+
tokenInput.props.onChange({
|
|
695
|
+
target: { value: "0x1234567890abcdef1234567890abcdef12345678" },
|
|
696
|
+
});
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
const quickBuy = tree?.root.findAll(
|
|
700
|
+
(node) =>
|
|
701
|
+
node.type === "button" &&
|
|
702
|
+
node.props["data-testid"] === "wallet-quick-buy",
|
|
703
|
+
)[0];
|
|
704
|
+
await act(async () => {
|
|
705
|
+
quickBuy.props.onClick();
|
|
706
|
+
await flushAsync();
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
// Click Execute Trade to show inline confirmation
|
|
710
|
+
const executeButton = tree?.root.findAll(
|
|
711
|
+
(node) =>
|
|
712
|
+
node.type === "button" &&
|
|
713
|
+
node.props["data-testid"] === "wallet-quote-execute",
|
|
714
|
+
)[0];
|
|
715
|
+
await act(async () => {
|
|
716
|
+
executeButton.props.onClick();
|
|
717
|
+
await flushAsync();
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
const confirmButton = tree?.root.findAll(
|
|
721
|
+
(node) =>
|
|
722
|
+
node.type === "button" &&
|
|
723
|
+
node.props["data-testid"] === "wallet-quote-confirm",
|
|
724
|
+
)[0];
|
|
725
|
+
expect(confirmButton).toBeDefined();
|
|
726
|
+
const cancelButton = tree?.root.findAll(
|
|
727
|
+
(node) =>
|
|
728
|
+
node.type === "button" &&
|
|
729
|
+
node.props["data-testid"] === "wallet-quote-cancel",
|
|
730
|
+
)[0];
|
|
731
|
+
expect(cancelButton).toBeDefined();
|
|
732
|
+
|
|
733
|
+
// Click the Confirm button
|
|
734
|
+
await act(async () => {
|
|
735
|
+
confirmButton.props.onClick();
|
|
736
|
+
await flushAsync();
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
expect(ctx.executeBscTrade).toHaveBeenCalledTimes(1);
|
|
740
|
+
expect(text(tree?.root)).toContain("bsctradepanel.ViewTx 0xaaaaaaaa");
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
it("shows two-step notice for sell in user-sign mode", async () => {
|
|
744
|
+
const ctx = createContext({
|
|
745
|
+
inventoryChainFocus: "bsc",
|
|
746
|
+
walletBalances: createWalletBalances("0.02", null),
|
|
747
|
+
});
|
|
748
|
+
ctx.executeBscTrade = vi.fn(async () =>
|
|
749
|
+
createExecuteResult(false, { side: "sell", requiresApproval: true }),
|
|
750
|
+
);
|
|
751
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
752
|
+
|
|
753
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
754
|
+
await act(async () => {
|
|
755
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
const tokenInput = tree?.root.findAll(
|
|
759
|
+
(node) =>
|
|
760
|
+
node.type === "input" &&
|
|
761
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
762
|
+
)[0];
|
|
763
|
+
await act(async () => {
|
|
764
|
+
tokenInput.props.onChange({
|
|
765
|
+
target: { value: "0x1234567890abcdef1234567890abcdef12345678" },
|
|
766
|
+
});
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
const quickSell = tree?.root.findAll(
|
|
770
|
+
(node) =>
|
|
771
|
+
node.type === "button" &&
|
|
772
|
+
node.props["data-testid"] === "wallet-quick-sell",
|
|
773
|
+
)[0];
|
|
774
|
+
await act(async () => {
|
|
775
|
+
quickSell.props.onClick();
|
|
776
|
+
await flushAsync();
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
// Click Execute Trade to show inline confirmation
|
|
780
|
+
const executeButton = tree?.root.findAll(
|
|
781
|
+
(node) =>
|
|
782
|
+
node.type === "button" &&
|
|
783
|
+
node.props["data-testid"] === "wallet-quote-execute",
|
|
784
|
+
)[0];
|
|
785
|
+
await act(async () => {
|
|
786
|
+
executeButton.props.onClick();
|
|
787
|
+
await flushAsync();
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
// Click the Confirm button
|
|
791
|
+
const confirmButton = tree?.root.findAll(
|
|
792
|
+
(node) =>
|
|
793
|
+
node.type === "button" &&
|
|
794
|
+
node.props["data-testid"] === "wallet-quote-confirm",
|
|
795
|
+
)[0];
|
|
796
|
+
expect(confirmButton).toBeDefined();
|
|
797
|
+
await act(async () => {
|
|
798
|
+
confirmButton.props.onClick();
|
|
799
|
+
await flushAsync();
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
expect(ctx.executeBscTrade).toHaveBeenCalledWith(
|
|
803
|
+
expect.objectContaining({ side: "sell" }),
|
|
804
|
+
);
|
|
805
|
+
expect(ctx.setActionNotice).toHaveBeenCalledWith(
|
|
806
|
+
expect.stringContaining("Sign swap transaction"),
|
|
807
|
+
"info",
|
|
808
|
+
4600,
|
|
809
|
+
);
|
|
810
|
+
|
|
811
|
+
const approveCopy = tree?.root.findAll(
|
|
812
|
+
(node) =>
|
|
813
|
+
node.type === "button" &&
|
|
814
|
+
node.props["data-testid"] === "wallet-copy-approve-tx",
|
|
815
|
+
)[0];
|
|
816
|
+
const swapCopy = tree?.root.findAll(
|
|
817
|
+
(node) =>
|
|
818
|
+
node.type === "button" &&
|
|
819
|
+
node.props["data-testid"] === "wallet-copy-swap-tx",
|
|
820
|
+
)[0];
|
|
821
|
+
expect(approveCopy).toBeDefined();
|
|
822
|
+
expect(swapCopy).toBeDefined();
|
|
823
|
+
|
|
824
|
+
await act(async () => {
|
|
825
|
+
approveCopy.props.onClick();
|
|
826
|
+
swapCopy.props.onClick();
|
|
827
|
+
await flushAsync();
|
|
828
|
+
});
|
|
829
|
+
expect(ctx.copyToClipboard).toHaveBeenCalledTimes(2);
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
it("refreshes pending tx status after execute", async () => {
|
|
833
|
+
const ctx = createContext({
|
|
834
|
+
inventoryChainFocus: "bsc",
|
|
835
|
+
walletBalances: createWalletBalances("0.02", null),
|
|
836
|
+
});
|
|
837
|
+
ctx.executeBscTrade = vi.fn(async () =>
|
|
838
|
+
createExecuteResult(true, { executionStatus: "pending" }),
|
|
839
|
+
);
|
|
840
|
+
mockUseApp.mockImplementation(() => ctx);
|
|
841
|
+
|
|
842
|
+
let tree: TestRenderer.ReactTestRenderer;
|
|
843
|
+
await act(async () => {
|
|
844
|
+
tree = TestRenderer.create(React.createElement(InventoryView));
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
const tokenInput = tree?.root.findAll(
|
|
848
|
+
(node) =>
|
|
849
|
+
node.type === "input" &&
|
|
850
|
+
node.props["data-testid"] === "wallet-quick-token-input",
|
|
851
|
+
)[0];
|
|
852
|
+
await act(async () => {
|
|
853
|
+
tokenInput.props.onChange({
|
|
854
|
+
target: { value: "0x1234567890abcdef1234567890abcdef12345678" },
|
|
855
|
+
});
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
const quickBuy = tree?.root.findAll(
|
|
859
|
+
(node) =>
|
|
860
|
+
node.type === "button" &&
|
|
861
|
+
node.props["data-testid"] === "wallet-quick-buy",
|
|
862
|
+
)[0];
|
|
863
|
+
await act(async () => {
|
|
864
|
+
quickBuy.props.onClick();
|
|
865
|
+
await flushAsync();
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
// Click Execute Trade to show inline confirmation
|
|
869
|
+
const executeButton = tree?.root.findAll(
|
|
870
|
+
(node) =>
|
|
871
|
+
node.type === "button" &&
|
|
872
|
+
node.props["data-testid"] === "wallet-quote-execute",
|
|
873
|
+
)[0];
|
|
874
|
+
await act(async () => {
|
|
875
|
+
executeButton.props.onClick();
|
|
876
|
+
await flushAsync();
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
// Click the Confirm button to execute
|
|
880
|
+
const confirmButton = tree?.root.findAll(
|
|
881
|
+
(node) =>
|
|
882
|
+
node.type === "button" &&
|
|
883
|
+
node.props["data-testid"] === "wallet-quote-confirm",
|
|
884
|
+
)[0];
|
|
885
|
+
expect(confirmButton).toBeDefined();
|
|
886
|
+
await act(async () => {
|
|
887
|
+
confirmButton.props.onClick();
|
|
888
|
+
await flushAsync();
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
const refreshButton = tree?.root.findAll(
|
|
892
|
+
(node) =>
|
|
893
|
+
node.type === "button" &&
|
|
894
|
+
node.props["data-testid"] === "wallet-tx-refresh",
|
|
895
|
+
)[0];
|
|
896
|
+
expect(refreshButton).toBeDefined();
|
|
897
|
+
|
|
898
|
+
await act(async () => {
|
|
899
|
+
refreshButton.props.onClick();
|
|
900
|
+
await flushAsync();
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
expect(ctx.getBscTradeTxStatus).toHaveBeenCalledWith(
|
|
904
|
+
"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
905
|
+
);
|
|
906
|
+
expect(text(tree?.root)).toContain("bsctradepanel.Confirmations");
|
|
907
|
+
});
|
|
908
|
+
});
|