@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,703 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Character view — roster-first character selection with optional customization.
|
|
4
|
+
*/
|
|
5
|
+
import { client, } from "@elizaos/app-core/api";
|
|
6
|
+
import { dispatchWindowEvent, VOICE_CONFIG_UPDATED_EVENT, } from "@elizaos/app-core/events";
|
|
7
|
+
import { getVrmPreviewUrl, useApp } from "@elizaos/app-core/state";
|
|
8
|
+
import { PREMADE_VOICES, sanitizeApiKey, } from "@elizaos/app-core/voice";
|
|
9
|
+
import { Button, Input, Textarea, ThemedSelect } from "@elizaos/ui";
|
|
10
|
+
import { Lock, LockOpen, Volume2, VolumeX } from "lucide-react";
|
|
11
|
+
import { useCallback, useEffect, useState } from "react";
|
|
12
|
+
const DEFAULT_ELEVEN_FAST_MODEL = "eleven_flash_v2_5";
|
|
13
|
+
const STYLE_SECTION_KEYS = ["all", "chat", "post"];
|
|
14
|
+
const STYLE_SECTION_PLACEHOLDERS = {
|
|
15
|
+
all: "Add shared rule",
|
|
16
|
+
chat: "Add chat rule",
|
|
17
|
+
post: "Add post rule",
|
|
18
|
+
};
|
|
19
|
+
const STYLE_SECTION_EMPTY_STATES = {
|
|
20
|
+
all: "No shared rules yet.",
|
|
21
|
+
chat: "No chat rules yet.",
|
|
22
|
+
post: "No post rules yet.",
|
|
23
|
+
};
|
|
24
|
+
const VOICE_SELECT_GROUPS = [
|
|
25
|
+
{
|
|
26
|
+
label: "Female",
|
|
27
|
+
items: PREMADE_VOICES.filter((preset) => preset.gender === "female").map((preset) => ({
|
|
28
|
+
id: preset.id,
|
|
29
|
+
text: preset.name,
|
|
30
|
+
})),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Male",
|
|
34
|
+
items: PREMADE_VOICES.filter((preset) => preset.gender === "male").map((preset) => ({
|
|
35
|
+
id: preset.id,
|
|
36
|
+
text: preset.name,
|
|
37
|
+
})),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Character",
|
|
41
|
+
items: PREMADE_VOICES.filter((preset) => preset.gender === "character").map((preset) => ({
|
|
42
|
+
id: preset.id,
|
|
43
|
+
text: preset.name,
|
|
44
|
+
})),
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const CHARACTER_PRESET_META = {
|
|
48
|
+
"uwu~": { name: "Reimu", avatarIndex: 1, voicePresetId: "sarah" },
|
|
49
|
+
"hell yeah": { name: "Marisa", avatarIndex: 2, voicePresetId: "adam" },
|
|
50
|
+
"lol k": { name: "Yukari", avatarIndex: 3, voicePresetId: "liam" },
|
|
51
|
+
"Noted.": { name: "Sakuya", avatarIndex: 4, voicePresetId: "alice" },
|
|
52
|
+
"hehe~": { name: "Koishi", avatarIndex: 2, voicePresetId: "gigi" },
|
|
53
|
+
"...": { name: "Remilia", avatarIndex: 4, voicePresetId: "lily" },
|
|
54
|
+
"locked in": { name: "Reisen", avatarIndex: 3, voicePresetId: "josh" },
|
|
55
|
+
};
|
|
56
|
+
function replaceCharacterToken(value, name) {
|
|
57
|
+
return value.replaceAll("{{name}}", name).replaceAll("{{agentName}}", name);
|
|
58
|
+
}
|
|
59
|
+
function buildCharacterFromPreset(preset, name) {
|
|
60
|
+
return {
|
|
61
|
+
name,
|
|
62
|
+
username: name,
|
|
63
|
+
bio: preset.bio.map((line) => replaceCharacterToken(line, name)),
|
|
64
|
+
system: replaceCharacterToken(preset.system, name),
|
|
65
|
+
adjectives: [...preset.adjectives],
|
|
66
|
+
style: {
|
|
67
|
+
all: [...preset.style.all],
|
|
68
|
+
chat: [...preset.style.chat],
|
|
69
|
+
post: [...preset.style.post],
|
|
70
|
+
},
|
|
71
|
+
messageExamples: preset.messageExamples.map((conversation) => ({
|
|
72
|
+
examples: conversation.map((message) => ({
|
|
73
|
+
name: message.user === "{{agentName}}"
|
|
74
|
+
? name
|
|
75
|
+
: replaceCharacterToken(message.user, name),
|
|
76
|
+
content: {
|
|
77
|
+
text: replaceCharacterToken(message.content.text, name),
|
|
78
|
+
},
|
|
79
|
+
})),
|
|
80
|
+
})),
|
|
81
|
+
postExamples: preset.postExamples.map((example) => replaceCharacterToken(example, name)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function buildCharacterDraftFromPreset(entry) {
|
|
85
|
+
const character = buildCharacterFromPreset(entry.preset, entry.name);
|
|
86
|
+
return {
|
|
87
|
+
name: character.name ?? "",
|
|
88
|
+
username: character.username ?? "",
|
|
89
|
+
bio: Array.isArray(character.bio)
|
|
90
|
+
? character.bio.join("\n")
|
|
91
|
+
: (character.bio ?? ""),
|
|
92
|
+
system: character.system ?? "",
|
|
93
|
+
adjectives: character.adjectives ?? [],
|
|
94
|
+
style: {
|
|
95
|
+
all: character.style?.all ?? [],
|
|
96
|
+
chat: character.style?.chat ?? [],
|
|
97
|
+
post: character.style?.post ?? [],
|
|
98
|
+
},
|
|
99
|
+
messageExamples: character.messageExamples ?? [],
|
|
100
|
+
postExamples: character.postExamples ?? [],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function normalizeCharacterDraftForComparison(character) {
|
|
104
|
+
return {
|
|
105
|
+
name: (character?.name ?? "").trim(),
|
|
106
|
+
username: (character?.username ?? "").trim(),
|
|
107
|
+
bio: typeof character?.bio === "string"
|
|
108
|
+
? character.bio.trim()
|
|
109
|
+
: Array.isArray(character?.bio)
|
|
110
|
+
? character.bio.join("\n").trim()
|
|
111
|
+
: "",
|
|
112
|
+
system: (character?.system ?? "").trim(),
|
|
113
|
+
adjectives: [...(character?.adjectives ?? [])],
|
|
114
|
+
style: {
|
|
115
|
+
all: [...(character?.style?.all ?? [])],
|
|
116
|
+
chat: [...(character?.style?.chat ?? [])],
|
|
117
|
+
post: [...(character?.style?.post ?? [])],
|
|
118
|
+
},
|
|
119
|
+
messageExamples: (character?.messageExamples ?? []).map((conversation) => ({
|
|
120
|
+
examples: (conversation.examples ?? []).map((message) => ({
|
|
121
|
+
name: message.name,
|
|
122
|
+
content: {
|
|
123
|
+
text: message.content?.text ?? "",
|
|
124
|
+
},
|
|
125
|
+
})),
|
|
126
|
+
})),
|
|
127
|
+
postExamples: [...(character?.postExamples ?? [])],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function characterDraftMatchesPreset(character, avatarIndex, entry) {
|
|
131
|
+
if (avatarIndex !== entry.avatarIndex)
|
|
132
|
+
return false;
|
|
133
|
+
const normalizedCurrent = normalizeCharacterDraftForComparison(character);
|
|
134
|
+
const normalizedPreset = normalizeCharacterDraftForComparison(buildCharacterDraftFromPreset(entry));
|
|
135
|
+
return JSON.stringify(normalizedCurrent) === JSON.stringify(normalizedPreset);
|
|
136
|
+
}
|
|
137
|
+
function resolveRosterEntries(styles) {
|
|
138
|
+
return styles.map((preset, index) => {
|
|
139
|
+
const meta = CHARACTER_PRESET_META[preset.catchphrase];
|
|
140
|
+
const fallbackName = `Character ${index + 1}`;
|
|
141
|
+
return {
|
|
142
|
+
id: preset.catchphrase,
|
|
143
|
+
name: meta?.name ?? fallbackName,
|
|
144
|
+
avatarIndex: meta?.avatarIndex ?? (index % 4) + 1,
|
|
145
|
+
voicePresetId: meta?.voicePresetId,
|
|
146
|
+
preset,
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function findMatchingRosterEntry(character, avatarIndex, roster) {
|
|
151
|
+
if (!character)
|
|
152
|
+
return null;
|
|
153
|
+
const currentName = typeof character.name === "string" ? character.name.trim() : "";
|
|
154
|
+
const exactNameMatch = roster.find((entry) => entry.name === currentName);
|
|
155
|
+
if (exactNameMatch)
|
|
156
|
+
return exactNameMatch.id;
|
|
157
|
+
let bestMatch = null;
|
|
158
|
+
for (const entry of roster) {
|
|
159
|
+
let score = 0;
|
|
160
|
+
if (entry.avatarIndex === avatarIndex)
|
|
161
|
+
score += 3;
|
|
162
|
+
const draftAdjectives = new Set(character.adjectives ?? []);
|
|
163
|
+
for (const adjective of entry.preset.adjectives) {
|
|
164
|
+
if (draftAdjectives.has(adjective))
|
|
165
|
+
score += 1;
|
|
166
|
+
}
|
|
167
|
+
if (typeof character.system === "string" &&
|
|
168
|
+
character.system.includes(entry.preset.catchphrase)) {
|
|
169
|
+
score += 1;
|
|
170
|
+
}
|
|
171
|
+
if (!bestMatch || score > bestMatch.score) {
|
|
172
|
+
bestMatch = { id: entry.id, score };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return bestMatch && bestMatch.score >= 4 ? bestMatch.id : null;
|
|
176
|
+
}
|
|
177
|
+
function findExactRosterEntry(character, roster) {
|
|
178
|
+
if (!character)
|
|
179
|
+
return null;
|
|
180
|
+
const currentName = typeof character.name === "string" ? character.name.trim() : "";
|
|
181
|
+
return roster.find((entry) => entry.name === currentName) ?? null;
|
|
182
|
+
}
|
|
183
|
+
function hasCharacterContent(character) {
|
|
184
|
+
return Boolean(character && Object.keys(character).length > 0);
|
|
185
|
+
}
|
|
186
|
+
function resolveActiveRosterEntry(character, avatarIndex, selectedCharacterId, roster) {
|
|
187
|
+
if (selectedCharacterId) {
|
|
188
|
+
const selectedEntry = roster.find((entry) => entry.id === selectedCharacterId) ?? null;
|
|
189
|
+
if (selectedEntry)
|
|
190
|
+
return selectedEntry;
|
|
191
|
+
}
|
|
192
|
+
const exactEntry = findExactRosterEntry(character ?? null, roster);
|
|
193
|
+
if (exactEntry)
|
|
194
|
+
return exactEntry;
|
|
195
|
+
const matchedId = findMatchingRosterEntry(character ?? null, avatarIndex, roster);
|
|
196
|
+
if (!matchedId)
|
|
197
|
+
return null;
|
|
198
|
+
return roster.find((entry) => entry.id === matchedId) ?? null;
|
|
199
|
+
}
|
|
200
|
+
function getStyleEntryRenderKey(section, items, item, index) {
|
|
201
|
+
let occurrence = 0;
|
|
202
|
+
for (const current of items.slice(0, index + 1)) {
|
|
203
|
+
if (current === item)
|
|
204
|
+
occurrence += 1;
|
|
205
|
+
}
|
|
206
|
+
return `${section}:${item}:${occurrence}`;
|
|
207
|
+
}
|
|
208
|
+
/* ── CharacterView ──────────────────────────────────────────────────── */
|
|
209
|
+
export function CharacterView({ inModal, sceneOverlay = false, } = {}) {
|
|
210
|
+
const { tab, setTab, characterData, characterDraft, characterLoading, characterSaving, characterSaveSuccess, characterSaveError, handleCharacterFieldInput, handleCharacterArrayInput, handleCharacterStyleInput, handleSaveCharacter, loadCharacter, setState, onboardingOptions, selectedVrmIndex, t,
|
|
211
|
+
// Registry / Drop
|
|
212
|
+
registryStatus, registryLoading, registryRegistering, registryError, dropStatus, loadRegistryStatus, registerOnChain, syncRegistryProfile, loadDropStatus, walletConfig, } = useApp();
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
void loadCharacter();
|
|
215
|
+
void loadRegistryStatus();
|
|
216
|
+
void loadDropStatus();
|
|
217
|
+
}, [loadCharacter, loadRegistryStatus, loadDropStatus]);
|
|
218
|
+
const handleFieldEdit = useCallback((field, value) => {
|
|
219
|
+
handleCharacterFieldInput(field, value);
|
|
220
|
+
}, [handleCharacterFieldInput]);
|
|
221
|
+
const handleStyleEdit = useCallback((key, value) => {
|
|
222
|
+
handleCharacterStyleInput(key, value);
|
|
223
|
+
}, [handleCharacterStyleInput]);
|
|
224
|
+
/* ── Character generation state ─────────────────────────────────── */
|
|
225
|
+
const [generating, setGenerating] = useState(null);
|
|
226
|
+
const [pendingStyleEntries, setPendingStyleEntries] = useState({
|
|
227
|
+
all: "",
|
|
228
|
+
chat: "",
|
|
229
|
+
post: "",
|
|
230
|
+
});
|
|
231
|
+
const [styleEntryDrafts, setStyleEntryDrafts] = useState({
|
|
232
|
+
all: [],
|
|
233
|
+
chat: [],
|
|
234
|
+
post: [],
|
|
235
|
+
});
|
|
236
|
+
const [customizeStep, setCustomizeStep] = useState("core");
|
|
237
|
+
const [customOverridesEnabled, setCustomOverridesEnabled] = useState(false);
|
|
238
|
+
const [selectedCharacterId, setSelectedCharacterId] = useState(null);
|
|
239
|
+
const [rosterStyles, setRosterStyles] = useState(onboardingOptions?.styles ?? []);
|
|
240
|
+
/* ── Voice config state ─────────────────────────────────────────── */
|
|
241
|
+
const [voiceConfig, setVoiceConfig] = useState({});
|
|
242
|
+
const [voiceLoading, setVoiceLoading] = useState(false);
|
|
243
|
+
const [voiceSaving, setVoiceSaving] = useState(false);
|
|
244
|
+
const [voiceSaveError, setVoiceSaveError] = useState(null);
|
|
245
|
+
const [voiceTesting, setVoiceTesting] = useState(false);
|
|
246
|
+
const [voiceTestAudio, setVoiceTestAudio] = useState(null);
|
|
247
|
+
const [selectedVoicePresetId, setSelectedVoicePresetId] = useState(null);
|
|
248
|
+
const [voiceSelectionLocked, setVoiceSelectionLocked] = useState(false);
|
|
249
|
+
useEffect(() => {
|
|
250
|
+
if (onboardingOptions?.styles?.length) {
|
|
251
|
+
setRosterStyles(onboardingOptions.styles);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
let cancelled = false;
|
|
255
|
+
void client
|
|
256
|
+
.getOnboardingOptions()
|
|
257
|
+
.then((options) => {
|
|
258
|
+
if (!cancelled) {
|
|
259
|
+
setRosterStyles(options.styles ?? []);
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
.catch(() => {
|
|
263
|
+
/* ignore */
|
|
264
|
+
});
|
|
265
|
+
return () => {
|
|
266
|
+
cancelled = true;
|
|
267
|
+
};
|
|
268
|
+
}, [onboardingOptions?.styles]);
|
|
269
|
+
const characterRoster = resolveRosterEntries(rosterStyles);
|
|
270
|
+
const visibleCharacterRoster = characterRoster.slice(0, 4);
|
|
271
|
+
const currentCharacter = hasCharacterContent(characterDraft)
|
|
272
|
+
? characterDraft
|
|
273
|
+
: characterData;
|
|
274
|
+
const activeRosterEntry = resolveActiveRosterEntry(currentCharacter, selectedVrmIndex, selectedCharacterId, characterRoster);
|
|
275
|
+
const detailedEditMode = tab === "character";
|
|
276
|
+
/* Load voice config on mount */
|
|
277
|
+
useEffect(() => {
|
|
278
|
+
void (async () => {
|
|
279
|
+
setVoiceLoading(true);
|
|
280
|
+
try {
|
|
281
|
+
const cfg = await client.getConfig();
|
|
282
|
+
const messages = cfg.messages;
|
|
283
|
+
const tts = messages?.tts;
|
|
284
|
+
if (tts) {
|
|
285
|
+
setVoiceConfig(tts);
|
|
286
|
+
if (tts.elevenlabs?.voiceId) {
|
|
287
|
+
const preset = PREMADE_VOICES.find((p) => p.voiceId === tts.elevenlabs?.voiceId);
|
|
288
|
+
setSelectedVoicePresetId(preset?.id ?? null);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
catch {
|
|
293
|
+
/* ignore */
|
|
294
|
+
}
|
|
295
|
+
setVoiceLoading(false);
|
|
296
|
+
})();
|
|
297
|
+
}, []);
|
|
298
|
+
const handleSelectPreset = useCallback((preset) => {
|
|
299
|
+
setSelectedVoicePresetId(preset.id);
|
|
300
|
+
setVoiceConfig((prev) => ({
|
|
301
|
+
...prev,
|
|
302
|
+
elevenlabs: { ...(prev.elevenlabs ?? {}), voiceId: preset.voiceId },
|
|
303
|
+
}));
|
|
304
|
+
}, []);
|
|
305
|
+
const applyVoicePresetForEntry = useCallback((entry) => {
|
|
306
|
+
setVoiceSaveError(null);
|
|
307
|
+
if (!entry.voicePresetId)
|
|
308
|
+
return;
|
|
309
|
+
const voicePreset = PREMADE_VOICES.find((preset) => preset.id === entry.voicePresetId);
|
|
310
|
+
if (voicePreset)
|
|
311
|
+
handleSelectPreset(voicePreset);
|
|
312
|
+
}, [handleSelectPreset]);
|
|
313
|
+
const applyCharacterDefaults = useCallback((entry) => {
|
|
314
|
+
const nextCharacter = buildCharacterDraftFromPreset(entry);
|
|
315
|
+
handleFieldEdit("name", nextCharacter.name ?? "");
|
|
316
|
+
handleFieldEdit("username", nextCharacter.username ?? "");
|
|
317
|
+
handleFieldEdit("bio", nextCharacter.bio ?? "");
|
|
318
|
+
handleFieldEdit("system", nextCharacter.system ?? "");
|
|
319
|
+
handleFieldEdit("adjectives", nextCharacter.adjectives ?? []);
|
|
320
|
+
handleFieldEdit("style", nextCharacter.style ?? { all: [], chat: [], post: [] });
|
|
321
|
+
handleFieldEdit("messageExamples", nextCharacter.messageExamples ?? []);
|
|
322
|
+
handleFieldEdit("postExamples", nextCharacter.postExamples ?? []);
|
|
323
|
+
}, [handleFieldEdit]);
|
|
324
|
+
const commitCharacterSelection = useCallback((entry, applyDefaults) => {
|
|
325
|
+
setSelectedCharacterId(entry.id);
|
|
326
|
+
setState("selectedVrmIndex", entry.avatarIndex);
|
|
327
|
+
if (!voiceSelectionLocked && selectedCharacterId !== entry.id) {
|
|
328
|
+
applyVoicePresetForEntry(entry);
|
|
329
|
+
}
|
|
330
|
+
if (applyDefaults) {
|
|
331
|
+
applyCharacterDefaults(entry);
|
|
332
|
+
}
|
|
333
|
+
}, [
|
|
334
|
+
applyCharacterDefaults,
|
|
335
|
+
applyVoicePresetForEntry,
|
|
336
|
+
selectedCharacterId,
|
|
337
|
+
setState,
|
|
338
|
+
voiceSelectionLocked,
|
|
339
|
+
]);
|
|
340
|
+
const handleTestVoice = useCallback((previewUrl) => {
|
|
341
|
+
if (voiceTestAudio) {
|
|
342
|
+
voiceTestAudio.pause();
|
|
343
|
+
voiceTestAudio.currentTime = 0;
|
|
344
|
+
}
|
|
345
|
+
setVoiceTesting(true);
|
|
346
|
+
const audio = new Audio(previewUrl);
|
|
347
|
+
setVoiceTestAudio(audio);
|
|
348
|
+
audio.onended = () => setVoiceTesting(false);
|
|
349
|
+
audio.onerror = () => setVoiceTesting(false);
|
|
350
|
+
audio.play().catch(() => setVoiceTesting(false));
|
|
351
|
+
}, [voiceTestAudio]);
|
|
352
|
+
const handleStopTest = useCallback(() => {
|
|
353
|
+
if (voiceTestAudio) {
|
|
354
|
+
voiceTestAudio.pause();
|
|
355
|
+
voiceTestAudio.currentTime = 0;
|
|
356
|
+
}
|
|
357
|
+
setVoiceTesting(false);
|
|
358
|
+
}, [voiceTestAudio]);
|
|
359
|
+
const persistVoiceConfig = useCallback(async () => {
|
|
360
|
+
setVoiceSaveError(null);
|
|
361
|
+
const normalizedElevenlabs = {
|
|
362
|
+
...voiceConfig.elevenlabs,
|
|
363
|
+
modelId: voiceConfig.elevenlabs?.modelId ?? DEFAULT_ELEVEN_FAST_MODEL,
|
|
364
|
+
};
|
|
365
|
+
const sanitizedKey = sanitizeApiKey(normalizedElevenlabs?.apiKey);
|
|
366
|
+
if (sanitizedKey)
|
|
367
|
+
normalizedElevenlabs.apiKey = sanitizedKey;
|
|
368
|
+
else
|
|
369
|
+
delete normalizedElevenlabs.apiKey;
|
|
370
|
+
const normalizedVoiceConfig = {
|
|
371
|
+
...voiceConfig,
|
|
372
|
+
provider: voiceConfig.provider ?? "elevenlabs",
|
|
373
|
+
elevenlabs: normalizedElevenlabs,
|
|
374
|
+
};
|
|
375
|
+
await client.updateConfig({
|
|
376
|
+
messages: {
|
|
377
|
+
tts: normalizedVoiceConfig,
|
|
378
|
+
},
|
|
379
|
+
});
|
|
380
|
+
dispatchWindowEvent(VOICE_CONFIG_UPDATED_EVENT, normalizedVoiceConfig);
|
|
381
|
+
}, [voiceConfig]);
|
|
382
|
+
const d = characterDraft;
|
|
383
|
+
const bioText = typeof d.bio === "string"
|
|
384
|
+
? d.bio
|
|
385
|
+
: Array.isArray(d.bio)
|
|
386
|
+
? d.bio.join("\n")
|
|
387
|
+
: "";
|
|
388
|
+
const getCharContext = useCallback(() => ({
|
|
389
|
+
name: d.name ?? "",
|
|
390
|
+
system: d.system ?? "",
|
|
391
|
+
bio: bioText,
|
|
392
|
+
style: d.style ?? { all: [], chat: [], post: [] },
|
|
393
|
+
postExamples: d.postExamples ?? [],
|
|
394
|
+
}), [d, bioText]);
|
|
395
|
+
useEffect(() => {
|
|
396
|
+
setStyleEntryDrafts({
|
|
397
|
+
all: [...(d.style?.all ?? [])],
|
|
398
|
+
chat: [...(d.style?.chat ?? [])],
|
|
399
|
+
post: [...(d.style?.post ?? [])],
|
|
400
|
+
});
|
|
401
|
+
}, [d.style]);
|
|
402
|
+
const handleGenerate = useCallback(async (field, mode = "replace") => {
|
|
403
|
+
setGenerating(field);
|
|
404
|
+
try {
|
|
405
|
+
const { generated } = await client.generateCharacterField(field, getCharContext(), mode);
|
|
406
|
+
if (field === "bio") {
|
|
407
|
+
handleFieldEdit("bio", generated.trim());
|
|
408
|
+
}
|
|
409
|
+
else if (field === "system") {
|
|
410
|
+
handleFieldEdit("system", generated.trim());
|
|
411
|
+
}
|
|
412
|
+
else if (field === "style") {
|
|
413
|
+
try {
|
|
414
|
+
const parsed = JSON.parse(generated);
|
|
415
|
+
if (mode === "append") {
|
|
416
|
+
handleStyleEdit("all", [...(d.style?.all ?? []), ...(parsed.all ?? [])].join("\n"));
|
|
417
|
+
handleStyleEdit("chat", [...(d.style?.chat ?? []), ...(parsed.chat ?? [])].join("\n"));
|
|
418
|
+
handleStyleEdit("post", [...(d.style?.post ?? []), ...(parsed.post ?? [])].join("\n"));
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
if (parsed.all)
|
|
422
|
+
handleStyleEdit("all", parsed.all.join("\n"));
|
|
423
|
+
if (parsed.chat)
|
|
424
|
+
handleStyleEdit("chat", parsed.chat.join("\n"));
|
|
425
|
+
if (parsed.post)
|
|
426
|
+
handleStyleEdit("post", parsed.post.join("\n"));
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
catch {
|
|
430
|
+
/* raw text fallback */
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
else if (field === "chatExamples") {
|
|
434
|
+
try {
|
|
435
|
+
const parsed = JSON.parse(generated);
|
|
436
|
+
if (Array.isArray(parsed)) {
|
|
437
|
+
const formatted = parsed.map((convo) => ({
|
|
438
|
+
examples: convo.map((msg) => ({
|
|
439
|
+
name: msg.user,
|
|
440
|
+
content: { text: msg.content.text },
|
|
441
|
+
})),
|
|
442
|
+
}));
|
|
443
|
+
handleFieldEdit("messageExamples", formatted);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
catch {
|
|
447
|
+
/* raw text fallback */
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
else if (field === "postExamples") {
|
|
451
|
+
try {
|
|
452
|
+
const parsed = JSON.parse(generated);
|
|
453
|
+
if (Array.isArray(parsed)) {
|
|
454
|
+
if (mode === "append") {
|
|
455
|
+
handleCharacterArrayInput("postExamples", [...(d.postExamples ?? []), ...parsed].join("\n"));
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
handleCharacterArrayInput("postExamples", parsed.join("\n"));
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
catch {
|
|
463
|
+
/* raw text fallback */
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
catch {
|
|
468
|
+
/* generation failed */
|
|
469
|
+
}
|
|
470
|
+
setGenerating(null);
|
|
471
|
+
}, [
|
|
472
|
+
getCharContext,
|
|
473
|
+
d,
|
|
474
|
+
handleFieldEdit,
|
|
475
|
+
handleStyleEdit,
|
|
476
|
+
handleCharacterArrayInput,
|
|
477
|
+
]);
|
|
478
|
+
const handlePendingStyleEntryChange = useCallback((key, value) => {
|
|
479
|
+
setPendingStyleEntries((prev) => ({ ...prev, [key]: value }));
|
|
480
|
+
}, []);
|
|
481
|
+
const handleAddStyleEntry = useCallback((key) => {
|
|
482
|
+
const value = pendingStyleEntries[key].trim();
|
|
483
|
+
if (!value)
|
|
484
|
+
return;
|
|
485
|
+
const nextItems = [...(d.style?.[key] ?? [])];
|
|
486
|
+
if (!nextItems.includes(value)) {
|
|
487
|
+
nextItems.push(value);
|
|
488
|
+
handleStyleEdit(key, nextItems.join("\n"));
|
|
489
|
+
}
|
|
490
|
+
setPendingStyleEntries((prev) => ({ ...prev, [key]: "" }));
|
|
491
|
+
}, [d.style, handleStyleEdit, pendingStyleEntries]);
|
|
492
|
+
const handleRemoveStyleEntry = useCallback((key, index) => {
|
|
493
|
+
const nextItems = [...(d.style?.[key] ?? [])];
|
|
494
|
+
nextItems.splice(index, 1);
|
|
495
|
+
handleStyleEdit(key, nextItems.join("\n"));
|
|
496
|
+
}, [d.style, handleStyleEdit]);
|
|
497
|
+
const handleStyleEntryDraftChange = useCallback((key, index, value) => {
|
|
498
|
+
setStyleEntryDrafts((prev) => {
|
|
499
|
+
const nextItems = [...(prev[key] ?? [])];
|
|
500
|
+
nextItems[index] = value;
|
|
501
|
+
return { ...prev, [key]: nextItems };
|
|
502
|
+
});
|
|
503
|
+
}, []);
|
|
504
|
+
const handleCommitStyleEntry = useCallback((key, index) => {
|
|
505
|
+
const nextValue = styleEntryDrafts[key]?.[index]?.trim() ?? "";
|
|
506
|
+
const nextItems = [...(d.style?.[key] ?? [])];
|
|
507
|
+
if (!nextValue) {
|
|
508
|
+
nextItems.splice(index, 1);
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
nextItems[index] = nextValue;
|
|
512
|
+
}
|
|
513
|
+
handleStyleEdit(key, nextItems.join("\n"));
|
|
514
|
+
}, [d.style, handleStyleEdit, styleEntryDrafts]);
|
|
515
|
+
const handleSelectCharacter = useCallback((entry) => {
|
|
516
|
+
const shouldApplyDefaults = !customOverridesEnabled &&
|
|
517
|
+
(!currentCharacter ||
|
|
518
|
+
!activeRosterEntry ||
|
|
519
|
+
characterDraftMatchesPreset(currentCharacter, selectedVrmIndex, activeRosterEntry));
|
|
520
|
+
commitCharacterSelection(entry, shouldApplyDefaults);
|
|
521
|
+
}, [
|
|
522
|
+
activeRosterEntry,
|
|
523
|
+
commitCharacterSelection,
|
|
524
|
+
currentCharacter,
|
|
525
|
+
customOverridesEnabled,
|
|
526
|
+
selectedVrmIndex,
|
|
527
|
+
]);
|
|
528
|
+
const handleCustomOverridesChange = useCallback((enabled) => {
|
|
529
|
+
setTab(enabled ? "character" : "character-select");
|
|
530
|
+
setCustomOverridesEnabled(enabled);
|
|
531
|
+
setCustomizeStep("core");
|
|
532
|
+
if (enabled)
|
|
533
|
+
return;
|
|
534
|
+
const activeEntry = resolveActiveRosterEntry(currentCharacter, selectedVrmIndex, selectedCharacterId, characterRoster);
|
|
535
|
+
if (activeEntry) {
|
|
536
|
+
setSelectedCharacterId(activeEntry.id);
|
|
537
|
+
}
|
|
538
|
+
}, [
|
|
539
|
+
characterRoster,
|
|
540
|
+
currentCharacter,
|
|
541
|
+
selectedCharacterId,
|
|
542
|
+
selectedVrmIndex,
|
|
543
|
+
setTab,
|
|
544
|
+
]);
|
|
545
|
+
useEffect(() => {
|
|
546
|
+
setCustomOverridesEnabled(detailedEditMode);
|
|
547
|
+
if (detailedEditMode) {
|
|
548
|
+
setCustomizeStep("core");
|
|
549
|
+
}
|
|
550
|
+
}, [detailedEditMode]);
|
|
551
|
+
useEffect(() => {
|
|
552
|
+
if (characterLoading ||
|
|
553
|
+
selectedCharacterId ||
|
|
554
|
+
!characterRoster.length ||
|
|
555
|
+
!currentCharacter) {
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
const activeEntry = resolveActiveRosterEntry(currentCharacter, selectedVrmIndex, selectedCharacterId, characterRoster) ??
|
|
559
|
+
characterRoster[0] ??
|
|
560
|
+
null;
|
|
561
|
+
if (!activeEntry)
|
|
562
|
+
return;
|
|
563
|
+
const matchesFactory = characterDraftMatchesPreset(currentCharacter, selectedVrmIndex, activeEntry);
|
|
564
|
+
setSelectedCharacterId(activeEntry.id);
|
|
565
|
+
setCustomOverridesEnabled(detailedEditMode);
|
|
566
|
+
if (matchesFactory) {
|
|
567
|
+
commitCharacterSelection(activeEntry, true);
|
|
568
|
+
}
|
|
569
|
+
}, [
|
|
570
|
+
characterLoading,
|
|
571
|
+
characterRoster,
|
|
572
|
+
commitCharacterSelection,
|
|
573
|
+
currentCharacter,
|
|
574
|
+
detailedEditMode,
|
|
575
|
+
selectedCharacterId,
|
|
576
|
+
selectedVrmIndex,
|
|
577
|
+
]);
|
|
578
|
+
const handleSaveAll = useCallback(async () => {
|
|
579
|
+
setVoiceSaving(true);
|
|
580
|
+
setVoiceSaveError(null);
|
|
581
|
+
try {
|
|
582
|
+
await persistVoiceConfig();
|
|
583
|
+
}
|
|
584
|
+
catch (err) {
|
|
585
|
+
setVoiceSaveError(err instanceof Error ? err.message : "Failed to save voice settings.");
|
|
586
|
+
setVoiceSaving(false);
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
setVoiceSaving(false);
|
|
590
|
+
await handleSaveCharacter();
|
|
591
|
+
}, [handleSaveCharacter, persistVoiceConfig]);
|
|
592
|
+
/* ── Helpers ────────────────────────────────────────────────────── */
|
|
593
|
+
const cardCls = sceneOverlay
|
|
594
|
+
? "p-5 border border-white/10 bg-black/15 backdrop-blur-md rounded-2xl shadow-[0_18px_48px_rgba(0,0,0,0.28)]"
|
|
595
|
+
: "p-5 border border-border/40 bg-card/40 backdrop-blur-xl rounded-2xl shadow-sm";
|
|
596
|
+
const editorCardCls = `${cardCls} flex min-h-0 flex-col overflow-hidden`;
|
|
597
|
+
const sectionCls = sceneOverlay && !inModal ? "relative z-10 mt-4 px-1" : `mt-4 ${cardCls}`;
|
|
598
|
+
const labelCls = "font-medium text-xs text-muted mb-1 block";
|
|
599
|
+
const hintCls = "text-[11px] text-muted";
|
|
600
|
+
const scrollPaneCls = "min-h-0 overflow-y-auto pr-1 [scrollbar-gutter:stable] custom-scrollbar";
|
|
601
|
+
if (characterLoading && !characterData) {
|
|
602
|
+
return (_jsx("div", { className: sectionCls, children: _jsx("div", { className: "text-center py-6 text-[var(--muted)] text-[13px]", children: t("characterview.loadingCharacterDa") }) }));
|
|
603
|
+
}
|
|
604
|
+
const hasWallet = Boolean(walletConfig?.evmAddress);
|
|
605
|
+
const isRegistered = registryStatus?.registered === true;
|
|
606
|
+
const dropLive = dropStatus?.dropEnabled &&
|
|
607
|
+
dropStatus?.publicMintOpen &&
|
|
608
|
+
!dropStatus?.mintedOut;
|
|
609
|
+
const userMinted = dropStatus?.userHasMinted === true;
|
|
610
|
+
const activeVoicePreset = PREMADE_VOICES.find((preset) => preset.id === selectedVoicePresetId) ??
|
|
611
|
+
null;
|
|
612
|
+
const voiceSelectValue = selectedVoicePresetId ?? null;
|
|
613
|
+
const combinedSaveError = voiceSaveError ?? characterSaveError;
|
|
614
|
+
const customizationActionLabel = customOverridesEnabled
|
|
615
|
+
? t("characterview.backToCharacterSelect")
|
|
616
|
+
: t("characterview.customize");
|
|
617
|
+
const characterRosterGridCls = "flex flex-wrap items-start justify-center gap-y-1";
|
|
618
|
+
const rosterSlantClipPath = "polygon(32px 0, 100% 0, calc(100% - 32px) 100%, 0 100%)";
|
|
619
|
+
const insetShadowClipPath = "polygon(0px 0, 100% 0, calc(100% - 4px) 100%, -8px 100%)";
|
|
620
|
+
const rootCls = sceneOverlay && !inModal
|
|
621
|
+
? "relative z-10 flex min-h-full flex-col justify-end pb-4"
|
|
622
|
+
: `${inModal || sceneOverlay ? "pb-8" : ""} ${sceneOverlay ? "relative z-10" : ""}`;
|
|
623
|
+
const coreFieldsPanel = (_jsxs("div", { className: `${editorCardCls} min-h-[24rem]`, "data-testid": "character-core-editor", children: [_jsxs("div", { className: "flex min-h-0 flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: labelCls, children: t("characterview.aboutMe") }), _jsx(Button, { variant: "ghost", size: "sm", className: "h-6 rounded-md px-2 text-[10px] font-bold text-accent", onClick: () => void handleGenerate("bio"), disabled: generating === "bio", children: generating === "bio" ? "generating..." : "regenerate" })] }), _jsx(Textarea, { value: bioText, rows: 6, placeholder: t("characterview.describeWhoYourAg"), onChange: (e) => handleFieldEdit("bio", e.target.value), className: "min-h-[10rem] flex-1 resize-none overflow-y-auto rounded-lg border-border/50 bg-bg p-3 text-sm leading-relaxed focus-visible:border-accent focus-visible:ring-accent/50" })] }), _jsxs("div", { className: "flex min-h-0 flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: labelCls, children: t("characterview.directionsAndThing") }), _jsx(Button, { variant: "ghost", size: "sm", className: "h-6 rounded-md px-2 text-[10px] font-bold text-accent", onClick: () => void handleGenerate("system"), disabled: generating === "system", children: generating === "system" ? "generating..." : "regenerate" })] }), _jsx(Textarea, { value: d.system ?? "", rows: 7, maxLength: 10000, placeholder: t("characterview.writeInFirstPerso"), onChange: (e) => handleFieldEdit("system", e.target.value), className: "min-h-[10rem] flex-1 resize-none overflow-y-auto rounded-lg border-border/50 bg-bg p-3 font-mono text-xs leading-relaxed focus-visible:border-accent focus-visible:ring-accent/50" })] })] }));
|
|
624
|
+
const styleEditorPanel = (_jsx("div", { className: `${editorCardCls} min-h-[24rem]`, "data-testid": "character-customize-sidebar", children: _jsxs("div", { className: "flex min-h-0 flex-col gap-3", "data-testid": "character-style-editor", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("div", { className: "text-sm font-bold tracking-wide text-txt", children: t("characterview.StyleRules") }), _jsx(Button, { variant: "outline", size: "sm", className: "h-7 shrink-0 rounded-md px-2.5 text-[11px] font-bold", onClick: () => void handleGenerate("style", "replace"), disabled: generating === "style", children: generating === "style" ? "generating..." : "regenerate" })] }), _jsx("div", { className: "grid min-h-0 flex-1 gap-3 xl:grid-cols-1 2xl:grid-cols-3", "data-testid": "character-style-editor-scroll", children: STYLE_SECTION_KEYS.map((key) => {
|
|
625
|
+
const items = d.style?.[key] ?? [];
|
|
626
|
+
return (_jsxs("div", { className: "flex min-h-0 flex-col overflow-hidden rounded-lg border border-border/30 bg-bg/30", "data-testid": `style-section-${key}`, children: [_jsx("div", { className: "flex items-center justify-between gap-2 border-b border-border/20 px-3 py-2", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-[11px] font-bold uppercase tracking-widest text-muted", children: key }), _jsxs("span", { className: "text-[10px] font-bold uppercase tracking-[0.18em] text-muted/70", children: [items.length, " rule", items.length === 1 ? "" : "s"] })] }) }), _jsx("div", { className: `${scrollPaneCls} flex-1 p-3 pr-2`, children: _jsx("div", { className: "flex flex-col gap-2", children: items.length > 0 ? (items.map((item, index) => (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-border/20 bg-bg/50 p-2", "data-testid": `style-entry-${key}-${index}`, children: [_jsx("span", { className: "mt-0.5 shrink-0 text-[10px] font-bold text-muted/70", children: index + 1 }), _jsx(Textarea, { value: styleEntryDrafts[key]?.[index] ?? item, rows: 2, onChange: (e) => handleStyleEntryDraftChange(key, index, e.target.value), onBlur: () => handleCommitStyleEntry(key, index), className: "min-h-[72px] min-w-0 flex-1 resize-none rounded-md border-border/40 bg-bg p-2 text-xs leading-relaxed text-txt focus-visible:border-accent/50 focus-visible:ring-accent/50", "data-testid": `style-entry-editor-${key}-${index}` }), _jsx(Button, { variant: "ghost", size: "icon", className: "h-7 w-7 shrink-0 text-muted hover:bg-danger/10 hover:text-danger", onClick: () => handleRemoveStyleEntry(key, index), title: t("characterview.remove"), children: "\u00D7" })] }, getStyleEntryRenderKey(key, items, item, index))))) : (_jsx("div", { className: `${hintCls} rounded-md border border-dashed border-border/30 bg-bg/40 px-3 py-2`, children: STYLE_SECTION_EMPTY_STATES[key] })) }) }), _jsx("div", { className: "border-t border-border/20 p-3", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { type: "text", value: pendingStyleEntries[key], placeholder: STYLE_SECTION_PLACEHOLDERS[key], onChange: (e) => handlePendingStyleEntryChange(key, e.target.value), onKeyDown: (e) => {
|
|
627
|
+
if (e.key === "Enter") {
|
|
628
|
+
e.preventDefault();
|
|
629
|
+
handleAddStyleEntry(key);
|
|
630
|
+
}
|
|
631
|
+
}, className: "h-8 min-w-0 flex-1 rounded-md border-border/40 bg-bg focus-visible:border-accent focus-visible:ring-accent/50", "data-testid": `style-entry-input-${key}` }), _jsx(Button, { variant: "outline", size: "sm", className: "h-8 shrink-0 rounded-md px-3 text-[11px] font-bold", onClick: () => handleAddStyleEntry(key), disabled: !pendingStyleEntries[key].trim(), children: "+ add" })] }) })] }, key));
|
|
632
|
+
}) })] }) }));
|
|
633
|
+
const chatExamplesPanel = (_jsxs("div", { className: `${editorCardCls} min-h-[24rem]`, "data-testid": "character-chat-examples-card", children: [_jsxs("div", { className: "mb-4 flex items-center justify-between gap-3 border-b border-border/40 pb-3", children: [_jsxs("div", { className: "flex flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3", children: [_jsx("div", { className: "text-sm font-bold tracking-wide text-txt", children: t("characterview.chatExamples") }), _jsx("span", { className: "rounded-full border border-white/5 bg-black/10 px-2 py-0.5 text-[11px] font-medium text-muted", children: t("characterview.HowTheAgentResp") })] }), _jsx(Button, { variant: "outline", size: "sm", className: "h-7 shrink-0 border-border/50 bg-bg/50 text-[11px] font-bold text-accent shadow-inner transition-all hover:border-accent/40 hover:text-accent", onClick: () => void handleGenerate("chatExamples", "replace"), disabled: generating === "chatExamples", children: generating === "chatExamples" ? "generating..." : "generate" })] }), _jsxs("div", { className: `${scrollPaneCls} flex flex-1 flex-col gap-3 pr-2`, children: [(d.messageExamples ?? []).map((convo, ci) => (_jsxs("div", { className: "rounded-xl border border-border/40 bg-black/10 p-4 shadow-inner backdrop-blur-sm", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between border-b border-border/30 pb-2", children: [_jsxs("span", { className: "text-[11px] font-bold uppercase tracking-widest text-muted", children: [t("characterview.conversation"), " ", ci + 1] }), _jsx(Button, { variant: "ghost", size: "sm", className: "h-6 px-2 text-[10px] font-bold text-muted transition-all hover:bg-danger/10 hover:text-danger", onClick: () => {
|
|
634
|
+
const updated = [...(d.messageExamples ?? [])];
|
|
635
|
+
updated.splice(ci, 1);
|
|
636
|
+
handleFieldEdit("messageExamples", updated);
|
|
637
|
+
}, children: t("characterview.remove") })] }), _jsx("div", { className: "flex flex-col gap-2", children: convo.examples.map((msg, mi) => (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: `w-12 shrink-0 text-right text-[11px] font-bold uppercase tracking-wider ${msg.name === "{{user1}}" ? "text-muted" : "text-accent"}`, children: msg.name === "{{user1}}" ? "user" : "agent" }), _jsx(Input, { type: "text", value: msg.content?.text ?? "", onChange: (e) => {
|
|
638
|
+
const updated = [...(d.messageExamples ?? [])];
|
|
639
|
+
const convoClone = {
|
|
640
|
+
examples: [...updated[ci].examples],
|
|
641
|
+
};
|
|
642
|
+
convoClone.examples[mi] = {
|
|
643
|
+
...convoClone.examples[mi],
|
|
644
|
+
content: { text: e.target.value },
|
|
645
|
+
};
|
|
646
|
+
updated[ci] = convoClone;
|
|
647
|
+
handleFieldEdit("messageExamples", updated);
|
|
648
|
+
}, className: "h-9 flex-1 rounded-lg border-border/50 bg-bg/50 text-xs shadow-inner backdrop-blur-md transition-all focus-visible:border-accent/50 focus-visible:ring-accent/50" })] }, `${msg.name}:${msg.content?.text ?? ""}`))) })] }, convo.examples
|
|
649
|
+
.map((msg) => `${msg.name}:${msg.content?.text ?? ""}`)
|
|
650
|
+
.join("|")))), (d.messageExamples ?? []).length === 0 && (_jsx("div", { className: `${hintCls} rounded-xl border border-white/5 bg-black/5 py-3 text-center`, children: t("characterview.noChatExamplesYet") }))] })] }));
|
|
651
|
+
const postExamplesPanel = (_jsxs("div", { className: `${editorCardCls} min-h-[24rem]`, "data-testid": "character-post-examples-card", children: [_jsxs("div", { className: "mb-4 flex items-center justify-between gap-3 border-b border-border/40 pb-3", children: [_jsxs("div", { className: "flex flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3", children: [_jsx("div", { className: "text-sm font-bold tracking-wide text-txt", children: t("characterview.postExamples") }), _jsx("span", { className: "rounded-full border border-white/5 bg-black/10 px-2 py-0.5 text-[11px] font-medium text-muted", children: t("characterview.SocialMediaVoice") })] }), _jsx(Button, { variant: "outline", size: "sm", className: "h-7 shrink-0 border-border/50 bg-bg/50 text-[11px] font-bold text-accent shadow-inner transition-all hover:border-accent/40 hover:text-accent", onClick: () => void handleGenerate("postExamples", "replace"), disabled: generating === "postExamples", children: generating === "postExamples" ? "generating..." : "generate" })] }), _jsxs("div", { className: `${scrollPaneCls} flex flex-1 flex-col gap-2 pr-2`, children: [(d.postExamples ?? []).map((post, pi) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { type: "text", value: post, onChange: (e) => {
|
|
652
|
+
const updated = [...(d.postExamples ?? [])];
|
|
653
|
+
updated[pi] = e.target.value;
|
|
654
|
+
handleFieldEdit("postExamples", updated);
|
|
655
|
+
}, className: "h-9 flex-1 rounded-lg border-border/50 bg-bg/50 text-xs shadow-inner backdrop-blur-md transition-all focus-visible:border-accent/50 focus-visible:ring-accent/50" }), _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted hover:bg-danger/10 hover:text-danger", onClick: () => {
|
|
656
|
+
const updated = [...(d.postExamples ?? [])];
|
|
657
|
+
updated.splice(pi, 1);
|
|
658
|
+
handleFieldEdit("postExamples", updated);
|
|
659
|
+
}, children: "\u00D7" })] }, post || `post-${pi}`))), (d.postExamples ?? []).length === 0 && (_jsx("div", { className: `${hintCls} rounded-xl border border-white/5 bg-black/5 py-3 text-center`, children: t("characterview.noPostExamplesYet") }))] }), _jsx("div", { className: "border-t border-border/40 pt-4", children: _jsx(Button, { variant: "ghost", size: "sm", className: "self-start rounded-md border border-transparent text-[11px] font-bold text-accent transition-all hover:border-accent/30 hover:bg-accent/10", onClick: () => {
|
|
660
|
+
const updated = [...(d.postExamples ?? []), ""];
|
|
661
|
+
handleFieldEdit("postExamples", updated);
|
|
662
|
+
}, children: t("characterview.AddPost") }) })] }));
|
|
663
|
+
return (_jsxs("div", { className: rootCls, children: [hasWallet && (_jsx("div", { className: sectionCls, children: !isRegistered && !dropLive && (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("div", { className: "text-[12px] text-[var(--muted)]", children: t("characterview.RegisterYourAgent") }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", className: "btn text-xs py-[5px] px-4 !mt-0 cursor-pointer", disabled: registryRegistering || registryLoading, onClick: () => void registerOnChain(), children: registryRegistering ? "registering..." : "register now" }), registryError && (_jsx("span", { className: "text-xs text-[var(--danger,#e74c3c)]", children: registryError }))] })] })) })), isRegistered &&
|
|
664
|
+
(() => {
|
|
665
|
+
const currentName = characterDraft?.name || d.name || "";
|
|
666
|
+
const onChainName = registryStatus.agentName || "";
|
|
667
|
+
const nameOutOfSync = currentName && onChainName && currentName !== onChainName;
|
|
668
|
+
return (_jsx("div", { className: sectionCls, children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center gap-2 text-[12px]", children: [_jsx("span", { className: "text-green-400 font-bold tracking-wide", children: t("characterview.Registered") }), _jsx("span", { className: "text-muted/50", children: "|" }), _jsxs("span", { className: "text-muted font-medium", children: [t("characterview.Token"), registryStatus.tokenId] }), _jsx("span", { className: "text-muted/50", children: "|" }), _jsx("span", { className: "text-txt font-semibold", children: onChainName })] }), nameOutOfSync && (_jsxs("div", { className: "flex items-center gap-3 bg-amber-400/10 border border-amber-400/20 px-3 py-2 rounded-lg", children: [_jsxs("span", { className: "text-[11px] text-amber-400/80 font-medium tracking-wide", children: [t("characterview.OnChainName"), " ", _jsx("strong", { className: "text-amber-400", children: onChainName }), " ", t("characterview.DiffersFrom"), " ", _jsxs("strong", { className: "text-amber-400", children: [currentName, "\""] })] }), _jsx(Button, { variant: "outline", size: "sm", className: "text-[10px] h-6 px-2.5 border-amber-400/50 text-amber-400 hover:bg-amber-400/20 transition-all font-bold", disabled: registryRegistering, onClick: () => void syncRegistryProfile(), children: registryRegistering ? "syncing..." : "sync to chain" })] })), registryError && (_jsx("span", { className: "text-xs text-[var(--danger,#e74c3c)]", children: registryError })), _jsx("a", { href: `https://etherscan.io/token/${registryStatus.walletAddress}`, target: "_blank", rel: "noopener noreferrer", className: "text-[11px] underline text-[var(--accent)]", children: t("characterview.viewOnEtherscan") })] }) }));
|
|
669
|
+
})(), hasWallet && userMinted && !isRegistered && (_jsx("div", { className: sectionCls, children: _jsx("div", { className: "text-[12px] text-[var(--ok,#16a34a)]", children: t("characterview.MintedFromCollecti") }) })), !customOverridesEnabled ? (_jsx("div", { className: sectionCls, children: _jsx("div", { className: "overflow-hidden", "data-testid": "character-roster-grid", children: _jsx("div", { className: characterRosterGridCls, children: visibleCharacterRoster.length > 0 ? (visibleCharacterRoster.map((entry) => {
|
|
670
|
+
const isSelected = selectedCharacterId === entry.id;
|
|
671
|
+
return (_jsx("button", { type: "button", className: `group relative -mx-3 min-w-0 w-[9.75rem] text-center transition-all duration-300 ease-out ${isSelected
|
|
672
|
+
? "z-100 scale-[1.00] opacity-100"
|
|
673
|
+
: "scale-[1.00] opacity-70 hover:scale-[1.00] hover:opacity-100"}`, onClick: () => handleSelectCharacter(entry), "data-testid": `character-preset-${entry.id}`, children: _jsx("div", { className: `relative h-[10rem] w-full p-[2px] transition-all duration-300 ${isSelected
|
|
674
|
+
? "bg-yellow-400 shadow-[0_0_28px_rgba(250,204,21,0.32)]"
|
|
675
|
+
: sceneOverlay
|
|
676
|
+
? "bg-white/10 hover:bg-white/35"
|
|
677
|
+
: "bg-border/20 hover:bg-border/60"}`, style: {
|
|
678
|
+
clipPath: rosterSlantClipPath,
|
|
679
|
+
}, children: _jsxs("div", { className: "relative h-full w-full overflow-hidden", style: {
|
|
680
|
+
clipPath: rosterSlantClipPath,
|
|
681
|
+
}, children: [isSelected && (_jsx("div", { className: "pointer-events-none absolute -inset-3 bg-yellow-300/15 blur-xl", style: { clipPath: rosterSlantClipPath } })), _jsx("img", { src: getVrmPreviewUrl(entry.avatarIndex), alt: entry.name, className: `h-full w-full object-cover transition-transform duration-300 ease-out ${isSelected
|
|
682
|
+
? "scale-[1.04]"
|
|
683
|
+
: "scale-100 group-hover:scale-[1.02]"}` }), _jsx("div", { className: "absolute inset-x-0 bottom-0", children: _jsx("div", { className: `px-2 py-1 text-sm font-semibold text-white transition-all ${isSelected
|
|
684
|
+
? "bg-black/78 shadow-[inset_0_1px_0_rgba(255,255,255,0.08)]"
|
|
685
|
+
: "bg-black/62"}`, style: {
|
|
686
|
+
clipPath: insetShadowClipPath,
|
|
687
|
+
}, children: entry.name }) })] }) }) }, entry.id));
|
|
688
|
+
})) : (_jsx("div", { className: "rounded-2xl border border-border/40 bg-black/10 p-4 text-sm text-muted", children: "Loading character presets..." })) }) }) })) : null, customOverridesEnabled && (_jsxs("div", { className: "mt-3 flex flex-col gap-4", children: [_jsx("div", { className: "flex items-center justify-start", "data-testid": "character-edit-toolbar", children: _jsxs("div", { className: "inline-flex items-center gap-2", children: [_jsx(Button, { type: "button", variant: customizeStep === "core" ? "default" : "outline", size: "sm", className: "h-8 rounded-lg px-3 text-xs font-semibold", onClick: () => setCustomizeStep("core"), children: t("characterview.core") }), _jsx(Button, { type: "button", variant: customizeStep === "style" ? "default" : "outline", size: "sm", className: "h-8 rounded-lg px-3 text-xs font-semibold xl:hidden", onClick: () => setCustomizeStep("style"), children: t("characterview.style") }), _jsx(Button, { type: "button", variant: customizeStep === "examples" ? "default" : "outline", size: "sm", className: "h-8 rounded-lg px-3 text-xs font-semibold", onClick: () => setCustomizeStep("examples"), children: t("characterview.examples") })] }) }), customizeStep === "examples" ? (_jsxs("div", { className: "grid min-h-0 grid-cols-1 gap-4 xl:grid-cols-[minmax(0,26rem)_minmax(0,1fr)_minmax(0,24rem)] xl:items-start xl:gap-6", "data-testid": "character-examples-grid", children: [chatExamplesPanel, _jsx("div", { "aria-hidden": true, className: "hidden xl:block" }), postExamplesPanel] })) : (_jsxs("div", { className: "grid min-h-0 grid-cols-1 gap-4 xl:grid-cols-[minmax(0,23rem)_minmax(0,1fr)_minmax(0,32rem)] xl:items-start xl:gap-6", "data-testid": "character-customize-grid", children: [_jsx("div", { className: customizeStep === "style" ? "hidden xl:block" : "block", children: coreFieldsPanel }), _jsx("div", { "aria-hidden": true, className: "hidden xl:block" }), _jsx("div", { className: customizeStep === "core" ? "hidden xl:block" : "block", children: styleEditorPanel })] }))] })), _jsxs("div", { className: `${sectionCls} relative z-10`, children: [(characterSaveSuccess || combinedSaveError) && (_jsxs("div", { className: "mb-3 flex flex-wrap items-center justify-center gap-2", children: [characterSaveSuccess && (_jsx("span", { className: "rounded-lg border border-green-400/20 bg-green-400/10 px-3 py-1.5 text-xs font-bold text-green-400", children: characterSaveSuccess })), combinedSaveError && (_jsx("span", { className: "rounded-lg border border-danger/20 bg-danger/10 px-3 py-1.5 text-xs font-medium text-danger", children: combinedSaveError }))] })), _jsxs("div", { className: "relative flex flex-col gap-3 md:min-h-10 md:flex-row md:items-center md:justify-between", children: [_jsx("div", { className: "flex items-center justify-center md:justify-start", children: !customOverridesEnabled && (_jsxs("div", { className: "flex min-w-0 items-center gap-2", "data-testid": "character-voice-picker", children: [_jsx(Button, { type: "button", variant: voiceSelectionLocked ? "default" : "outline", size: "icon", className: "h-8 w-8 rounded-full border-border/50 bg-bg/65 p-0 shadow-inner backdrop-blur-sm", onClick: () => setVoiceSelectionLocked((value) => !value), "aria-label": voiceSelectionLocked
|
|
689
|
+
? "Unlock voice selection"
|
|
690
|
+
: "Lock voice selection", title: voiceSelectionLocked
|
|
691
|
+
? "Voice stays pinned when switching characters"
|
|
692
|
+
: "Lock current voice", children: voiceSelectionLocked ? (_jsx(Lock, { className: "h-3.5 w-3.5" })) : (_jsx(LockOpen, { className: "h-3.5 w-3.5" })) }), _jsx(ThemedSelect, { value: voiceSelectValue, groups: VOICE_SELECT_GROUPS, onChange: (id) => {
|
|
693
|
+
const preset = PREMADE_VOICES.find((voicePreset) => voicePreset.id === id);
|
|
694
|
+
if (preset)
|
|
695
|
+
handleSelectPreset(preset);
|
|
696
|
+
}, placeholder: t("characterview.selectAVoice"), menuPlacement: "top", className: "w-[11rem] max-w-[58vw]", triggerClassName: "h-8 rounded-full border-border/50 bg-bg/65 px-4 py-0 text-[11px] shadow-inner backdrop-blur-sm", menuClassName: "border-border/60 bg-bg/92 shadow-2xl backdrop-blur-md" }), _jsx(Button, { type: "button", variant: voiceTesting ? "destructive" : "outline", size: "icon", className: "h-8 w-8 rounded-full border-border/50 bg-bg/65 p-0 shadow-inner backdrop-blur-sm", onClick: () => voiceTesting
|
|
697
|
+
? handleStopTest()
|
|
698
|
+
: activeVoicePreset
|
|
699
|
+
? handleTestVoice(activeVoicePreset.previewUrl)
|
|
700
|
+
: undefined, "aria-label": voiceTesting ? "Stop voice preview" : "Preview voice", title: voiceTesting ? "Stop voice preview" : "Preview voice", disabled: !activeVoicePreset || voiceLoading, children: voiceTesting ? (_jsx(VolumeX, { className: "h-3.5 w-3.5" })) : (_jsx(Volume2, { className: "h-3.5 w-3.5" })) })] })) }), _jsx("div", { className: "flex items-center justify-center md:absolute md:left-1/2 md:top-1/2 md:z-10 md:-translate-x-1/2 md:-translate-y-1/2", children: _jsx(Button, { size: "lg", className: "rounded-xl px-8 text-[13px] font-bold tracking-wider shadow-[0_0_15px_rgba(var(--accent),0.2)] transition-all hover:shadow-[0_0_20px_rgba(var(--accent),0.4)]", disabled: characterSaving || voiceSaving, onClick: () => void handleSaveAll(), children: characterSaving || voiceSaving ? "saving..." : "Save Character" }) }), _jsx("div", { className: "flex items-center justify-center md:justify-end", children: _jsx(Button, { type: "button", variant: customOverridesEnabled ? "outline" : "default", size: "sm", className: `h-10 rounded-xl px-4 text-sm font-semibold ${customOverridesEnabled
|
|
701
|
+
? "border-border/40 bg-bg/40 text-txt"
|
|
702
|
+
: "shadow-[0_0_18px_rgba(var(--accent),0.18)]"}`, onClick: () => handleCustomOverridesChange(!customOverridesEnabled), "data-testid": "character-customize-toggle", children: customizationActionLabel }) })] })] })] }));
|
|
703
|
+
}
|