@jingyi0605/codingns4dsh 0.2.1-beta.3 → 0.2.1-beta.5
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/README.en.md +30 -6
- package/README.md +121 -10
- package/THIRD_PARTY_NOTICES +141 -0
- package/assets/assistant-basics/female-v1.png +0 -0
- package/assets/assistant-basics/male-v1.png +0 -0
- package/assets/desktop-assistant/20261008-WebView2/345/210/206/345/217/221/350/257/264/346/230/216.md +14 -0
- package/assets/desktop-assistant/webview2/LICENSE.txt +27 -0
- package/assets/desktop-assistant/webview2/Microsoft.Web.WebView2.Core.dll +0 -0
- package/assets/desktop-assistant/webview2/Microsoft.Web.WebView2.Wpf.dll +0 -0
- package/assets/desktop-assistant/webview2/NOTICE.txt +85 -0
- package/assets/desktop-assistant/webview2/arm64/WebView2Loader.dll +0 -0
- package/assets/desktop-assistant/webview2/x64/WebView2Loader.dll +0 -0
- package/assets/desktop-assistant/webview2/x86/WebView2Loader.dll +0 -0
- package/assets/moss/LICENSE +201 -0
- package/assets/moss/ort_cpu_runtime.py +839 -0
- package/assets/moss/worker.py +278 -0
- package/assets/voice/bilingual-zh-en-bpe.vocab +500 -0
- package/avatar-packages/catalog.json +259 -0
- package/avatar-packages/manifests/bubu-codebrew-bear.avatar.json +13 -0
- package/avatar-packages/manifests/ds-whale-live2d.avatar.json +27 -0
- package/avatar-packages/manifests/ds-whale-sprite.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-haru.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-hiyori.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-mao.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-mark.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-rice.avatar.json +13 -0
- package/avatar-packages/manifests/live2d-wanko.avatar.json +13 -0
- package/avatar-packages/manifests/nastya.avatar.json +13 -0
- package/avatar-packages/manifests/scout-corgi.avatar.json +13 -0
- package/avatar-packages/manifests/xiaoman.avatar.json +13 -0
- package/data/build/dist/client/account-bar.d.ts +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +22 -14
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +8 -0
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -0
- package/data/build/dist/client/adapter-catalog-watch.js +79 -0
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -0
- package/data/build/dist/client/assistant-settings-styles.d.ts +7 -0
- package/data/build/dist/client/assistant-settings-styles.d.ts.map +1 -0
- package/data/build/dist/client/assistant-settings-styles.js +6 -0
- package/data/build/dist/client/assistant-settings-styles.js.map +1 -0
- package/data/build/dist/client/avatar/builtin.d.ts +5 -0
- package/data/build/dist/client/avatar/builtin.d.ts.map +1 -0
- package/data/build/dist/client/avatar/builtin.js +9 -0
- package/data/build/dist/client/avatar/builtin.js.map +1 -0
- package/data/build/dist/client/avatar/cache-status.d.ts +4 -0
- package/data/build/dist/client/avatar/cache-status.d.ts.map +1 -0
- package/data/build/dist/client/avatar/cache-status.js +40 -0
- package/data/build/dist/client/avatar/cache-status.js.map +1 -0
- package/data/build/dist/client/avatar/catalog-panel.d.ts +49 -0
- package/data/build/dist/client/avatar/catalog-panel.d.ts.map +1 -0
- package/data/build/dist/client/avatar/catalog-panel.js +245 -0
- package/data/build/dist/client/avatar/catalog-panel.js.map +1 -0
- package/data/build/dist/client/avatar/catalog-picker.d.ts +38 -0
- package/data/build/dist/client/avatar/catalog-picker.d.ts.map +1 -0
- package/data/build/dist/client/avatar/catalog-picker.js +65 -0
- package/data/build/dist/client/avatar/catalog-picker.js.map +1 -0
- package/data/build/dist/client/avatar/desktop-bridge.d.ts +21 -0
- package/data/build/dist/client/avatar/desktop-bridge.d.ts.map +1 -0
- package/data/build/dist/client/avatar/desktop-bridge.js +109 -0
- package/data/build/dist/client/avatar/desktop-bridge.js.map +1 -0
- package/data/build/dist/client/avatar/desktop-entry.d.ts +2 -0
- package/data/build/dist/client/avatar/desktop-entry.d.ts.map +1 -0
- package/data/build/dist/client/avatar/desktop-entry.js +34 -0
- package/data/build/dist/client/avatar/desktop-entry.js.map +1 -0
- package/data/build/dist/client/avatar/desktop-view.d.ts +23 -0
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -0
- package/data/build/dist/client/avatar/desktop-view.js +72 -0
- package/data/build/dist/client/avatar/desktop-view.js.map +1 -0
- package/data/build/dist/client/avatar/engine.d.ts +45 -0
- package/data/build/dist/client/avatar/engine.d.ts.map +1 -0
- package/data/build/dist/client/avatar/engine.js +165 -0
- package/data/build/dist/client/avatar/engine.js.map +1 -0
- package/data/build/dist/client/avatar/floating.d.ts +20 -0
- package/data/build/dist/client/avatar/floating.d.ts.map +1 -0
- package/data/build/dist/client/avatar/floating.js +99 -0
- package/data/build/dist/client/avatar/floating.js.map +1 -0
- package/data/build/dist/client/avatar/image.d.ts +5 -0
- package/data/build/dist/client/avatar/image.d.ts.map +1 -0
- package/data/build/dist/client/avatar/image.js +22 -0
- package/data/build/dist/client/avatar/image.js.map +1 -0
- package/data/build/dist/client/avatar/live2d.d.ts +67 -0
- package/data/build/dist/client/avatar/live2d.d.ts.map +1 -0
- package/data/build/dist/client/avatar/live2d.js +288 -0
- package/data/build/dist/client/avatar/live2d.js.map +1 -0
- package/data/build/dist/client/avatar/loading.d.ts +27 -0
- package/data/build/dist/client/avatar/loading.d.ts.map +1 -0
- package/data/build/dist/client/avatar/loading.js +74 -0
- package/data/build/dist/client/avatar/loading.js.map +1 -0
- package/data/build/dist/client/avatar/manager.d.ts +71 -0
- package/data/build/dist/client/avatar/manager.d.ts.map +1 -0
- package/data/build/dist/client/avatar/manager.js +323 -0
- package/data/build/dist/client/avatar/manager.js.map +1 -0
- package/data/build/dist/client/avatar/portrait-capture.d.ts +30 -0
- package/data/build/dist/client/avatar/portrait-capture.d.ts.map +1 -0
- package/data/build/dist/client/avatar/portrait-capture.js +233 -0
- package/data/build/dist/client/avatar/portrait-capture.js.map +1 -0
- package/data/build/dist/client/avatar/portrait-editor.d.ts +14 -0
- package/data/build/dist/client/avatar/portrait-editor.d.ts.map +1 -0
- package/data/build/dist/client/avatar/portrait-editor.js +105 -0
- package/data/build/dist/client/avatar/portrait-editor.js.map +1 -0
- package/data/build/dist/client/avatar/portrait-service.d.ts +51 -0
- package/data/build/dist/client/avatar/portrait-service.d.ts.map +1 -0
- package/data/build/dist/client/avatar/portrait-service.js +244 -0
- package/data/build/dist/client/avatar/portrait-service.js.map +1 -0
- package/data/build/dist/client/avatar/portrait.d.ts +28 -0
- package/data/build/dist/client/avatar/portrait.d.ts.map +1 -0
- package/data/build/dist/client/avatar/portrait.js +56 -0
- package/data/build/dist/client/avatar/portrait.js.map +1 -0
- package/data/build/dist/client/avatar/preview-capture.d.ts +4 -0
- package/data/build/dist/client/avatar/preview-capture.d.ts.map +1 -0
- package/data/build/dist/client/avatar/preview-capture.js +100 -0
- package/data/build/dist/client/avatar/preview-capture.js.map +1 -0
- package/data/build/dist/client/avatar/preview-store.d.ts +41 -0
- package/data/build/dist/client/avatar/preview-store.d.ts.map +1 -0
- package/data/build/dist/client/avatar/preview-store.js +171 -0
- package/data/build/dist/client/avatar/preview-store.js.map +1 -0
- package/data/build/dist/client/avatar/preview.d.ts +14 -0
- package/data/build/dist/client/avatar/preview.d.ts.map +1 -0
- package/data/build/dist/client/avatar/preview.js +56 -0
- package/data/build/dist/client/avatar/preview.js.map +1 -0
- package/data/build/dist/client/avatar/registration.d.ts +2 -0
- package/data/build/dist/client/avatar/registration.d.ts.map +1 -0
- package/data/build/dist/client/avatar/registration.js +2 -0
- package/data/build/dist/client/avatar/registration.js.map +1 -0
- package/data/build/dist/client/avatar/registry.d.ts +45 -0
- package/data/build/dist/client/avatar/registry.d.ts.map +1 -0
- package/data/build/dist/client/avatar/registry.js +34 -0
- package/data/build/dist/client/avatar/registry.js.map +1 -0
- package/data/build/dist/client/avatar/settings-panel.d.ts +21 -0
- package/data/build/dist/client/avatar/settings-panel.d.ts.map +1 -0
- package/data/build/dist/client/avatar/settings-panel.js +169 -0
- package/data/build/dist/client/avatar/settings-panel.js.map +1 -0
- package/data/build/dist/client/avatar/slot.d.ts +17 -0
- package/data/build/dist/client/avatar/slot.d.ts.map +1 -0
- package/data/build/dist/client/avatar/slot.js +70 -0
- package/data/build/dist/client/avatar/slot.js.map +1 -0
- package/data/build/dist/client/avatar/spritesheet.d.ts +19 -0
- package/data/build/dist/client/avatar/spritesheet.d.ts.map +1 -0
- package/data/build/dist/client/avatar/spritesheet.js +91 -0
- package/data/build/dist/client/avatar/spritesheet.js.map +1 -0
- package/data/build/dist/client/avatar/temporary-preview.d.ts +25 -0
- package/data/build/dist/client/avatar/temporary-preview.d.ts.map +1 -0
- package/data/build/dist/client/avatar/temporary-preview.js +61 -0
- package/data/build/dist/client/avatar/temporary-preview.js.map +1 -0
- package/data/build/dist/client/bundle.js +25603 -3080
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-catalog.d.ts +3 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -1
- package/data/build/dist/client/cli-catalog.js +7 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +14 -52
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/debug/ui.d.ts.map +1 -1
- package/data/build/dist/client/debug/ui.js +14 -5
- package/data/build/dist/client/debug/ui.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +8599 -0
- package/data/build/dist/client/features/assistant-composer-input.d.ts +10 -0
- package/data/build/dist/client/features/assistant-composer-input.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-composer-input.js +40 -0
- package/data/build/dist/client/features/assistant-composer-input.js.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-session.d.ts +45 -0
- package/data/build/dist/client/features/assistant-configuration-session.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-session.js +252 -0
- package/data/build/dist/client/features/assistant-configuration-session.js.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-tabs.d.ts +34 -0
- package/data/build/dist/client/features/assistant-configuration-tabs.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-configuration-tabs.js +48 -0
- package/data/build/dist/client/features/assistant-configuration-tabs.js.map +1 -0
- package/data/build/dist/client/features/assistant-conversation-message.d.ts +27 -0
- package/data/build/dist/client/features/assistant-conversation-message.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-conversation-message.js +55 -0
- package/data/build/dist/client/features/assistant-conversation-message.js.map +1 -0
- package/data/build/dist/client/features/assistant-debug-dialog.d.ts +3 -0
- package/data/build/dist/client/features/assistant-debug-dialog.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-debug-dialog.js +3 -0
- package/data/build/dist/client/features/assistant-debug-dialog.js.map +1 -0
- package/data/build/dist/client/features/assistant-debug-workbench.d.ts +48 -0
- package/data/build/dist/client/features/assistant-debug-workbench.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-debug-workbench.js +376 -0
- package/data/build/dist/client/features/assistant-debug-workbench.js.map +1 -0
- package/data/build/dist/client/features/assistant-floating-call.d.ts +33 -0
- package/data/build/dist/client/features/assistant-floating-call.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-floating-call.js +67 -0
- package/data/build/dist/client/features/assistant-floating-call.js.map +1 -0
- package/data/build/dist/client/features/assistant-panel.d.ts +2 -2
- package/data/build/dist/client/features/assistant-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-panel.js +10 -123
- package/data/build/dist/client/features/assistant-panel.js.map +1 -1
- package/data/build/dist/client/features/assistant-realtime-call.d.ts +57 -0
- package/data/build/dist/client/features/assistant-realtime-call.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-realtime-call.js +131 -0
- package/data/build/dist/client/features/assistant-realtime-call.js.map +1 -0
- package/data/build/dist/client/features/assistant-record-style.d.ts +5 -0
- package/data/build/dist/client/features/assistant-record-style.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-record-style.js +25 -0
- package/data/build/dist/client/features/assistant-record-style.js.map +1 -0
- package/data/build/dist/client/features/assistant-voice-initialization.d.ts +26 -0
- package/data/build/dist/client/features/assistant-voice-initialization.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-voice-initialization.js +138 -0
- package/data/build/dist/client/features/assistant-voice-initialization.js.map +1 -0
- package/data/build/dist/client/features/assistant-voice-settings-group.d.ts +19 -0
- package/data/build/dist/client/features/assistant-voice-settings-group.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-voice-settings-group.js +34 -0
- package/data/build/dist/client/features/assistant-voice-settings-group.js.map +1 -0
- package/data/build/dist/client/features/assistant-voice-settings.d.ts +13 -0
- package/data/build/dist/client/features/assistant-voice-settings.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-voice-settings.js +184 -0
- package/data/build/dist/client/features/assistant-voice-settings.js.map +1 -0
- package/data/build/dist/client/features/assistant-workbench-controls.d.ts +72 -0
- package/data/build/dist/client/features/assistant-workbench-controls.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-workbench-controls.js +145 -0
- package/data/build/dist/client/features/assistant-workbench-controls.js.map +1 -0
- package/data/build/dist/client/features/assistant-workbench-entry.d.ts +4 -0
- package/data/build/dist/client/features/assistant-workbench-entry.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-workbench-entry.js +7 -0
- package/data/build/dist/client/features/assistant-workbench-entry.js.map +1 -0
- package/data/build/dist/client/features/assistant-workbench.d.ts +109 -0
- package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-workbench.js +568 -0
- package/data/build/dist/client/features/assistant-workbench.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +48 -13
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.js +100 -39
- package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
- package/data/build/dist/client/features/lan-access.js +2 -2
- package/data/build/dist/client/features/lan-access.js.map +1 -1
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -1
- package/data/build/dist/client/features/mobile-access.js +9 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts +4 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +176 -106
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/types.d.ts +4 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-conversation-dialog.d.ts +9 -2
- package/data/build/dist/client/features/voice-conversation-dialog.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-conversation-dialog.js +29 -7
- package/data/build/dist/client/features/voice-conversation-dialog.js.map +1 -1
- package/data/build/dist/client/features/voice-initialization-dialog.d.ts +42 -2
- package/data/build/dist/client/features/voice-initialization-dialog.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-initialization-dialog.js +181 -67
- package/data/build/dist/client/features/voice-initialization-dialog.js.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.js +37 -10
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -1
- package/data/build/dist/client/git-management.d.ts +1 -1
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +46 -27
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/global-voice-runtime-registry.d.ts +4 -0
- package/data/build/dist/client/global-voice-runtime-registry.d.ts.map +1 -1
- package/data/build/dist/client/global-voice-runtime-registry.js.map +1 -1
- package/data/build/dist/client/index.d.ts +11 -0
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +10 -0
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +61 -14
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/assistantAvatar.d.ts +138 -0
- package/data/build/dist/client/locales/assistantAvatar.d.ts.map +1 -0
- package/data/build/dist/client/locales/assistantAvatar.js +273 -0
- package/data/build/dist/client/locales/assistantAvatar.js.map +1 -0
- package/data/build/dist/client/locales/assistantDebug.d.ts +4 -0
- package/data/build/dist/client/locales/assistantDebug.d.ts.map +1 -0
- package/data/build/dist/client/locales/assistantDebug.js +362 -0
- package/data/build/dist/client/locales/assistantDebug.js.map +1 -0
- package/data/build/dist/client/locales/assistantTts.d.ts +80 -0
- package/data/build/dist/client/locales/assistantTts.d.ts.map +1 -0
- package/data/build/dist/client/locales/assistantTts.js +76 -0
- package/data/build/dist/client/locales/assistantTts.js.map +1 -0
- package/data/build/dist/client/locales/assistantWorkbench.d.ts +126 -0
- package/data/build/dist/client/locales/assistantWorkbench.d.ts.map +1 -0
- package/data/build/dist/client/locales/assistantWorkbench.js +96 -0
- package/data/build/dist/client/locales/assistantWorkbench.js.map +1 -0
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +4 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/peerHostWorkspace.js +2 -2
- package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/terminalAuth.d.ts.map +1 -1
- package/data/build/dist/client/locales/terminalAuth.js +80 -0
- package/data/build/dist/client/locales/terminalAuth.js.map +1 -1
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +4 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/locales/voiceModels.d.ts +45 -0
- package/data/build/dist/client/locales/voiceModels.d.ts.map +1 -0
- package/data/build/dist/client/locales/voiceModels.js +85 -0
- package/data/build/dist/client/locales/voiceModels.js.map +1 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.d.ts +29 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.js +93 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.js.map +1 -0
- package/data/build/dist/client/mobile-rightbar-visibility.d.ts +32 -0
- package/data/build/dist/client/mobile-rightbar-visibility.d.ts.map +1 -0
- package/data/build/dist/client/mobile-rightbar-visibility.js +188 -0
- package/data/build/dist/client/mobile-rightbar-visibility.js.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts +9 -19
- package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -1
- package/data/build/dist/client/mobile-session-interaction.js +25 -169
- package/data/build/dist/client/mobile-session-interaction.js.map +1 -1
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts +4 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -1
- package/data/build/dist/client/mobile-sidebar-gestures.js +17 -9
- package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -1
- package/data/build/dist/client/model-catalog-cache.d.ts +4 -4
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -1
- package/data/build/dist/client/model-catalog-cache.js +66 -34
- package/data/build/dist/client/model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/moss-voice-output.d.ts +39 -0
- package/data/build/dist/client/moss-voice-output.d.ts.map +1 -0
- package/data/build/dist/client/moss-voice-output.js +241 -0
- package/data/build/dist/client/moss-voice-output.js.map +1 -0
- package/data/build/dist/client/rpc-call.d.ts +4 -0
- package/data/build/dist/client/rpc-call.d.ts.map +1 -0
- package/data/build/dist/client/rpc-call.js +23 -0
- package/data/build/dist/client/rpc-call.js.map +1 -0
- package/data/build/dist/client/serial-polling.d.ts +13 -0
- package/data/build/dist/client/serial-polling.d.ts.map +1 -0
- package/data/build/dist/client/serial-polling.js +41 -0
- package/data/build/dist/client/serial-polling.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -1
- package/data/build/dist/client/session-adapter-cache.js +11 -1
- package/data/build/dist/client/session-adapter-cache.js.map +1 -1
- package/data/build/dist/client/settings-bridge.d.ts +1 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -1
- package/data/build/dist/client/settings-bridge.js +9 -1
- package/data/build/dist/client/settings-bridge.js.map +1 -1
- package/data/build/dist/client/sherpa-voice-adapter.d.ts +23 -2
- package/data/build/dist/client/sherpa-voice-adapter.d.ts.map +1 -1
- package/data/build/dist/client/sherpa-voice-adapter.js +386 -93
- package/data/build/dist/client/sherpa-voice-adapter.js.map +1 -1
- package/data/build/dist/client/streaming-sentence-queue.d.ts +20 -0
- package/data/build/dist/client/streaming-sentence-queue.d.ts.map +1 -0
- package/data/build/dist/client/streaming-sentence-queue.js +130 -0
- package/data/build/dist/client/streaming-sentence-queue.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +11 -0
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +42 -15
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/log-preview.d.ts +14 -0
- package/data/build/dist/client/terminal/log-preview.d.ts.map +1 -0
- package/data/build/dist/client/terminal/log-preview.js +23 -0
- package/data/build/dist/client/terminal/log-preview.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts +38 -7
- package/data/build/dist/client/terminal/model.d.ts.map +1 -1
- package/data/build/dist/client/terminal/model.js +188 -32
- package/data/build/dist/client/terminal/model.js.map +1 -1
- package/data/build/dist/client/terminal/recovery.d.ts +7 -3
- package/data/build/dist/client/terminal/recovery.d.ts.map +1 -1
- package/data/build/dist/client/terminal/recovery.js +45 -41
- package/data/build/dist/client/terminal/recovery.js.map +1 -1
- package/data/build/dist/client/terminal/selection-actions.d.ts +63 -0
- package/data/build/dist/client/terminal/selection-actions.d.ts.map +1 -0
- package/data/build/dist/client/terminal/selection-actions.js +132 -0
- package/data/build/dist/client/terminal/selection-actions.js.map +1 -0
- package/data/build/dist/client/terminal/share-menu.d.ts +17 -0
- package/data/build/dist/client/terminal/share-menu.d.ts.map +1 -0
- package/data/build/dist/client/terminal/share-menu.js +131 -0
- package/data/build/dist/client/terminal/share-menu.js.map +1 -0
- package/data/build/dist/client/terminal/sharing.d.ts +42 -0
- package/data/build/dist/client/terminal/sharing.d.ts.map +1 -0
- package/data/build/dist/client/terminal/sharing.js +144 -0
- package/data/build/dist/client/terminal/sharing.js.map +1 -0
- package/data/build/dist/client/terminal/snapshot.d.ts +32 -0
- package/data/build/dist/client/terminal/snapshot.d.ts.map +1 -0
- package/data/build/dist/client/terminal/snapshot.js +108 -0
- package/data/build/dist/client/terminal/snapshot.js.map +1 -0
- package/data/build/dist/client/terminal/styles.d.ts +14 -0
- package/data/build/dist/client/terminal/styles.d.ts.map +1 -1
- package/data/build/dist/client/terminal/styles.js +39 -1
- package/data/build/dist/client/terminal/styles.js.map +1 -1
- package/data/build/dist/client/terminal/surface-cache.d.ts +10 -0
- package/data/build/dist/client/terminal/surface-cache.d.ts.map +1 -0
- package/data/build/dist/client/terminal/surface-cache.js +19 -0
- package/data/build/dist/client/terminal/surface-cache.js.map +1 -0
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -1
- package/data/build/dist/client/terminal/ui.js +78 -21
- package/data/build/dist/client/terminal/ui.js.map +1 -1
- package/data/build/dist/client/terminal/xterm-view.d.ts +5 -2
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -1
- package/data/build/dist/client/terminal/xterm-view.js +429 -397
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -1
- package/data/build/dist/client/touch-input-focus.d.ts +30 -0
- package/data/build/dist/client/touch-input-focus.d.ts.map +1 -0
- package/data/build/dist/client/touch-input-focus.js +190 -0
- package/data/build/dist/client/touch-input-focus.js.map +1 -0
- package/data/build/dist/client/voice-capture.d.ts +9 -0
- package/data/build/dist/client/voice-capture.d.ts.map +1 -1
- package/data/build/dist/client/voice-capture.js +35 -1
- package/data/build/dist/client/voice-capture.js.map +1 -1
- package/data/build/dist/client/voice-chat-updates.d.ts +12 -0
- package/data/build/dist/client/voice-chat-updates.d.ts.map +1 -0
- package/data/build/dist/client/voice-chat-updates.js +39 -0
- package/data/build/dist/client/voice-chat-updates.js.map +1 -0
- package/data/build/dist/client/voice-diagnostics.d.ts +19 -0
- package/data/build/dist/client/voice-diagnostics.d.ts.map +1 -0
- package/data/build/dist/client/voice-diagnostics.js +73 -0
- package/data/build/dist/client/voice-diagnostics.js.map +1 -0
- package/data/build/dist/client/voice-model-setup-progress.d.ts +8 -0
- package/data/build/dist/client/voice-model-setup-progress.d.ts.map +1 -0
- package/data/build/dist/client/voice-model-setup-progress.js +27 -0
- package/data/build/dist/client/voice-model-setup-progress.js.map +1 -0
- package/data/build/dist/client/voice-stream-uploader.d.ts +41 -0
- package/data/build/dist/client/voice-stream-uploader.d.ts.map +1 -0
- package/data/build/dist/client/voice-stream-uploader.js +154 -0
- package/data/build/dist/client/voice-stream-uploader.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js +9 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +5 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +25 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.d.ts +33 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.js +187 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-agent-adapter.d.ts +55 -0
- package/data/build/dist/dsh-capabilities/host/assistant-agent-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-agent-adapter.js +264 -0
- package/data/build/dist/dsh-capabilities/host/assistant-agent-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-attachment-adapter.d.ts +16 -0
- package/data/build/dist/dsh-capabilities/host/assistant-attachment-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-attachment-adapter.js +69 -0
- package/data/build/dist/dsh-capabilities/host/assistant-attachment-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-llm-adapter.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/host/assistant-llm-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-llm-adapter.js +112 -0
- package/data/build/dist/dsh-capabilities/host/assistant-llm-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-web-search-adapter.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/host/assistant-web-search-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/assistant-web-search-adapter.js +41 -0
- package/data/build/dist/dsh-capabilities/host/assistant-web-search-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +3 -0
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +18 -0
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/settings-store.d.ts +2 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/avatar/catalog.d.ts +21 -0
- package/data/build/dist/host/avatar/catalog.d.ts.map +1 -0
- package/data/build/dist/host/avatar/catalog.js +123 -0
- package/data/build/dist/host/avatar/catalog.js.map +1 -0
- package/data/build/dist/host/avatar/engine.d.ts +42 -0
- package/data/build/dist/host/avatar/engine.d.ts.map +1 -0
- package/data/build/dist/host/avatar/engine.js +167 -0
- package/data/build/dist/host/avatar/engine.js.map +1 -0
- package/data/build/dist/host/avatar/materials.d.ts +28 -0
- package/data/build/dist/host/avatar/materials.d.ts.map +1 -0
- package/data/build/dist/host/avatar/materials.js +183 -0
- package/data/build/dist/host/avatar/materials.js.map +1 -0
- package/data/build/dist/host/avatar/packages.d.ts +34 -0
- package/data/build/dist/host/avatar/packages.d.ts.map +1 -0
- package/data/build/dist/host/avatar/packages.js +200 -0
- package/data/build/dist/host/avatar/packages.js.map +1 -0
- package/data/build/dist/host/avatar/registry.d.ts +12 -0
- package/data/build/dist/host/avatar/registry.d.ts.map +1 -0
- package/data/build/dist/host/avatar/registry.js +22 -0
- package/data/build/dist/host/avatar/registry.js.map +1 -0
- package/data/build/dist/host/avatar/remote.d.ts +18 -0
- package/data/build/dist/host/avatar/remote.d.ts.map +1 -0
- package/data/build/dist/host/avatar/remote.js +103 -0
- package/data/build/dist/host/avatar/remote.js.map +1 -0
- package/data/build/dist/host/avatar/sources.d.ts +11 -0
- package/data/build/dist/host/avatar/sources.d.ts.map +1 -0
- package/data/build/dist/host/avatar/sources.js +78 -0
- package/data/build/dist/host/avatar/sources.js.map +1 -0
- package/data/build/dist/host/avatar/temporary-previews.d.ts +26 -0
- package/data/build/dist/host/avatar/temporary-previews.d.ts.map +1 -0
- package/data/build/dist/host/avatar/temporary-previews.js +139 -0
- package/data/build/dist/host/avatar/temporary-previews.js.map +1 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +3 -10
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js +10 -10
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +7 -5
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js +8 -7
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +10 -3
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +9 -8
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/cursor-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/cursor-driver.js +4 -3
- package/data/build/dist/host/cli-adapters/cursor-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +5 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +2 -4
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -1
- package/data/build/dist/host/cli-adapters/driver.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +28 -36
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +2 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/kimi-driver.js +4 -3
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +10 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/log-files.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/log-files.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/log-files.js +32 -0
- package/data/build/dist/host/cli-adapters/log-files.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +10 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js +128 -26
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +471 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +2 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +8 -2
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.js +90 -9
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-driver.js +55 -72
- package/data/build/dist/host/cli-adapters/qoder-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts +6 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/qoder-subscription.js +37 -10
- package/data/build/dist/host/cli-adapters/qoder-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +13 -21
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +71 -127
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js +6 -6
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts +5 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.js +68 -11
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +4 -3
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/debug.d.ts.map +1 -1
- package/data/build/dist/host/debug.js +5 -4
- package/data/build/dist/host/debug.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.d.ts +44 -0
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/controller.js +150 -0
- package/data/build/dist/host/desktop-assistant/controller.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/feature.d.ts +9 -0
- package/data/build/dist/host/desktop-assistant/feature.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/feature.js +102 -0
- package/data/build/dist/host/desktop-assistant/feature.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/launcher.d.ts +5 -0
- package/data/build/dist/host/desktop-assistant/launcher.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/launcher.js +84 -0
- package/data/build/dist/host/desktop-assistant/launcher.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/mac-agent.d.ts +5 -0
- package/data/build/dist/host/desktop-assistant/mac-agent.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/mac-agent.js +122 -0
- package/data/build/dist/host/desktop-assistant/mac-agent.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/process.d.ts +4 -0
- package/data/build/dist/host/desktop-assistant/process.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/process.js +25 -0
- package/data/build/dist/host/desktop-assistant/process.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/server.d.ts +12 -0
- package/data/build/dist/host/desktop-assistant/server.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/server.js +74 -0
- package/data/build/dist/host/desktop-assistant/server.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/win-agent.d.ts +2 -0
- package/data/build/dist/host/desktop-assistant/win-agent.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/win-agent.js +197 -0
- package/data/build/dist/host/desktop-assistant/win-agent.js.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts +1 -1
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -1
- package/data/build/dist/host/dsh-runtime-version.js +22 -17
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -1
- package/data/build/dist/host/features/assistant-avatar-assets.d.ts +3 -0
- package/data/build/dist/host/features/assistant-avatar-assets.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-assets.js +3 -0
- package/data/build/dist/host/features/assistant-avatar-assets.js.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-basics.d.ts +3 -0
- package/data/build/dist/host/features/assistant-avatar-basics.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-basics.js +34 -0
- package/data/build/dist/host/features/assistant-avatar-basics.js.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-legacy-assets.d.ts +6 -0
- package/data/build/dist/host/features/assistant-avatar-legacy-assets.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-legacy-assets.js +146 -0
- package/data/build/dist/host/features/assistant-avatar-legacy-assets.js.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-runtime.d.ts +20 -0
- package/data/build/dist/host/features/assistant-avatar-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-avatar-runtime.js +250 -0
- package/data/build/dist/host/features/assistant-avatar-runtime.js.map +1 -0
- package/data/build/dist/host/features/assistant-conversation-storage.d.ts +8 -0
- package/data/build/dist/host/features/assistant-conversation-storage.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-conversation-storage.js +38 -0
- package/data/build/dist/host/features/assistant-conversation-storage.js.map +1 -0
- package/data/build/dist/host/features/assistant-conversation.d.ts +57 -0
- package/data/build/dist/host/features/assistant-conversation.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-conversation.js +364 -0
- package/data/build/dist/host/features/assistant-conversation.js.map +1 -0
- package/data/build/dist/host/features/assistant-dispatch.d.ts +2 -2
- package/data/build/dist/host/features/assistant-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-dispatch.js +4 -3
- package/data/build/dist/host/features/assistant-dispatch.js.map +1 -1
- package/data/build/dist/host/features/assistant-index-analysis.d.ts +49 -0
- package/data/build/dist/host/features/assistant-index-analysis.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-index-analysis.js +255 -0
- package/data/build/dist/host/features/assistant-index-analysis.js.map +1 -0
- package/data/build/dist/host/features/assistant-index-journal.d.ts +20 -0
- package/data/build/dist/host/features/assistant-index-journal.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-index-journal.js +40 -0
- package/data/build/dist/host/features/assistant-index-journal.js.map +1 -0
- package/data/build/dist/host/features/assistant-index-retry.d.ts +12 -0
- package/data/build/dist/host/features/assistant-index-retry.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-index-retry.js +54 -0
- package/data/build/dist/host/features/assistant-index-retry.js.map +1 -0
- package/data/build/dist/host/features/assistant-index-updates.d.ts +40 -0
- package/data/build/dist/host/features/assistant-index-updates.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-index-updates.js +183 -0
- package/data/build/dist/host/features/assistant-index-updates.js.map +1 -0
- package/data/build/dist/host/features/assistant-lifecycle-settings.d.ts +5 -0
- package/data/build/dist/host/features/assistant-lifecycle-settings.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-lifecycle-settings.js +72 -0
- package/data/build/dist/host/features/assistant-lifecycle-settings.js.map +1 -0
- package/data/build/dist/host/features/assistant-management-tools.d.ts +34 -0
- package/data/build/dist/host/features/assistant-management-tools.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-management-tools.js +69 -0
- package/data/build/dist/host/features/assistant-management-tools.js.map +1 -0
- package/data/build/dist/host/features/assistant-prompts.d.ts +6 -0
- package/data/build/dist/host/features/assistant-prompts.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-prompts.js +62 -0
- package/data/build/dist/host/features/assistant-prompts.js.map +1 -0
- package/data/build/dist/host/features/assistant-session-index.d.ts +6 -1
- package/data/build/dist/host/features/assistant-session-index.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-session-index.js +11 -12
- package/data/build/dist/host/features/assistant-session-index.js.map +1 -1
- package/data/build/dist/host/features/assistant-source-cache.d.ts +12 -0
- package/data/build/dist/host/features/assistant-source-cache.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-source-cache.js +56 -0
- package/data/build/dist/host/features/assistant-source-cache.js.map +1 -0
- package/data/build/dist/host/features/assistant-structured-index.d.ts +21 -0
- package/data/build/dist/host/features/assistant-structured-index.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-structured-index.js +138 -0
- package/data/build/dist/host/features/assistant-structured-index.js.map +1 -0
- package/data/build/dist/host/features/assistant-summary.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-summary.js +7 -1
- package/data/build/dist/host/features/assistant-summary.js.map +1 -1
- package/data/build/dist/host/features/assistant-text-chat.d.ts +29 -0
- package/data/build/dist/host/features/assistant-text-chat.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-text-chat.js +195 -0
- package/data/build/dist/host/features/assistant-text-chat.js.map +1 -0
- package/data/build/dist/host/features/assistant-tts-service.d.ts +47 -0
- package/data/build/dist/host/features/assistant-tts-service.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-tts-service.js +507 -0
- package/data/build/dist/host/features/assistant-tts-service.js.map +1 -0
- package/data/build/dist/host/features/assistant-voice-chat.d.ts +35 -0
- package/data/build/dist/host/features/assistant-voice-chat.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-voice-chat.js +133 -0
- package/data/build/dist/host/features/assistant-voice-chat.js.map +1 -0
- package/data/build/dist/host/features/assistant-voice-hotwords.d.ts +33 -0
- package/data/build/dist/host/features/assistant-voice-hotwords.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-voice-hotwords.js +114 -0
- package/data/build/dist/host/features/assistant-voice-hotwords.js.map +1 -0
- package/data/build/dist/host/features/assistant-voice-initialization.d.ts +26 -0
- package/data/build/dist/host/features/assistant-voice-initialization.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-voice-initialization.js +68 -0
- package/data/build/dist/host/features/assistant-voice-initialization.js.map +1 -0
- package/data/build/dist/host/features/assistant-voice-sources.d.ts +13 -0
- package/data/build/dist/host/features/assistant-voice-sources.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-voice-sources.js +72 -0
- package/data/build/dist/host/features/assistant-voice-sources.js.map +1 -0
- package/data/build/dist/host/features/assistant-voice-stream.d.ts +10 -0
- package/data/build/dist/host/features/assistant-voice-stream.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-voice-stream.js +208 -5
- package/data/build/dist/host/features/assistant-voice-stream.js.map +1 -1
- package/data/build/dist/host/features/global-voice-coordinator.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-coordinator.js +15 -10
- package/data/build/dist/host/features/global-voice-coordinator.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts +8 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +1076 -159
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +4 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/moss-tts-worker.d.ts +32 -0
- package/data/build/dist/host/features/moss-tts-worker.d.ts.map +1 -0
- package/data/build/dist/host/features/moss-tts-worker.js +216 -0
- package/data/build/dist/host/features/moss-tts-worker.js.map +1 -0
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/host/features/peer-host.js +15 -7
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/sherpa-voice-runtime.d.ts +11 -0
- package/data/build/dist/host/features/sherpa-voice-runtime.d.ts.map +1 -1
- package/data/build/dist/host/features/sherpa-voice-runtime.js +72 -17
- package/data/build/dist/host/features/sherpa-voice-runtime.js.map +1 -1
- package/data/build/dist/host/features/sherpa-voice-worker.d.ts +18 -0
- package/data/build/dist/host/features/sherpa-voice-worker.d.ts.map +1 -0
- package/data/build/dist/host/features/sherpa-voice-worker.js +40 -0
- package/data/build/dist/host/features/sherpa-voice-worker.js.map +1 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.d.ts +41 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.js +200 -0
- package/data/build/dist/host/features/sherpa-worker-runtime.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +9 -1
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/features/voice-model-management.d.ts +22 -0
- package/data/build/dist/host/features/voice-model-management.d.ts.map +1 -0
- package/data/build/dist/host/features/voice-model-management.js +178 -0
- package/data/build/dist/host/features/voice-model-management.js.map +1 -0
- package/data/build/dist/host/features/voice-model-probe.d.ts +8 -0
- package/data/build/dist/host/features/voice-model-probe.d.ts.map +1 -0
- package/data/build/dist/host/features/voice-model-probe.js +76 -0
- package/data/build/dist/host/features/voice-model-probe.js.map +1 -0
- package/data/build/dist/host/features/voice-model-setup.d.ts +5 -2
- package/data/build/dist/host/features/voice-model-setup.d.ts.map +1 -1
- package/data/build/dist/host/features/voice-model-setup.js +40 -13
- package/data/build/dist/host/features/voice-model-setup.js.map +1 -1
- package/data/build/dist/host/features/voice-process-environment.d.ts +3 -0
- package/data/build/dist/host/features/voice-process-environment.d.ts.map +1 -0
- package/data/build/dist/host/features/voice-process-environment.js +16 -0
- package/data/build/dist/host/features/voice-process-environment.js.map +1 -0
- package/data/build/dist/host/features/voice-python-runtime.d.ts +21 -0
- package/data/build/dist/host/features/voice-python-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/voice-python-runtime.js +189 -0
- package/data/build/dist/host/features/voice-python-runtime.js.map +1 -0
- package/data/build/dist/host/index-injection.d.ts.map +1 -1
- package/data/build/dist/host/index-injection.js +5 -1
- package/data/build/dist/host/index-injection.js.map +1 -1
- package/data/build/dist/host/index.d.ts +6 -1
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +32 -14
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +7 -23
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +6 -46
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +48 -28
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +4 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +12 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +7 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +40 -13
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +46 -5
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/settings.d.ts +2 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +77 -13
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/stage0-dev-hmr.d.ts +6 -0
- package/data/build/dist/host/stage0-dev-hmr.d.ts.map +1 -0
- package/data/build/dist/host/stage0-dev-hmr.js +20 -0
- package/data/build/dist/host/stage0-dev-hmr.js.map +1 -0
- package/data/build/dist/host/tar-archive.d.ts +8 -0
- package/data/build/dist/host/tar-archive.d.ts.map +1 -0
- package/data/build/dist/host/tar-archive.js +17 -0
- package/data/build/dist/host/tar-archive.js.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts +1 -1
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -1
- package/data/build/dist/host/terminal/backends/tmux-backend.js +15 -14
- package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -1
- package/data/build/dist/host/voice-diagnostics.d.ts +34 -0
- package/data/build/dist/host/voice-diagnostics.d.ts.map +1 -0
- package/data/build/dist/host/voice-diagnostics.js +124 -0
- package/data/build/dist/host/voice-diagnostics.js.map +1 -0
- package/data/build/dist/shared/assistant-attachments.d.ts +27 -0
- package/data/build/dist/shared/assistant-attachments.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-attachments.js +45 -0
- package/data/build/dist/shared/assistant-attachments.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-adapters.d.ts +18 -0
- package/data/build/dist/shared/assistant-avatar-adapters.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-adapters.js +119 -0
- package/data/build/dist/shared/assistant-avatar-adapters.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-catalog.d.ts +37 -0
- package/data/build/dist/shared/assistant-avatar-catalog.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-catalog.js +21 -0
- package/data/build/dist/shared/assistant-avatar-catalog.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-engine.d.ts +34 -0
- package/data/build/dist/shared/assistant-avatar-engine.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-engine.js +32 -0
- package/data/build/dist/shared/assistant-avatar-engine.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-installation.d.ts +17 -0
- package/data/build/dist/shared/assistant-avatar-installation.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-installation.js +7 -0
- package/data/build/dist/shared/assistant-avatar-installation.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-legacy-resources.d.ts +6 -0
- package/data/build/dist/shared/assistant-avatar-legacy-resources.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-legacy-resources.js +20 -0
- package/data/build/dist/shared/assistant-avatar-legacy-resources.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-legacy.d.ts +15 -0
- package/data/build/dist/shared/assistant-avatar-legacy.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-legacy.js +34 -0
- package/data/build/dist/shared/assistant-avatar-legacy.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-presets.d.ts +3 -0
- package/data/build/dist/shared/assistant-avatar-presets.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-presets.js +3 -0
- package/data/build/dist/shared/assistant-avatar-presets.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-registration.d.ts +16 -0
- package/data/build/dist/shared/assistant-avatar-registration.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-registration.js +33 -0
- package/data/build/dist/shared/assistant-avatar-registration.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar-resources.d.ts +26 -0
- package/data/build/dist/shared/assistant-avatar-resources.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar-resources.js +4 -0
- package/data/build/dist/shared/assistant-avatar-resources.js.map +1 -0
- package/data/build/dist/shared/assistant-avatar.d.ts +103 -0
- package/data/build/dist/shared/assistant-avatar.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-avatar.js +240 -0
- package/data/build/dist/shared/assistant-avatar.js.map +1 -0
- package/data/build/dist/shared/assistant-commands.d.ts +3 -0
- package/data/build/dist/shared/assistant-commands.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-commands.js +3 -0
- package/data/build/dist/shared/assistant-commands.js.map +1 -0
- package/data/build/dist/shared/assistant-lifecycle.d.ts +17 -0
- package/data/build/dist/shared/assistant-lifecycle.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-lifecycle.js +45 -0
- package/data/build/dist/shared/assistant-lifecycle.js.map +1 -0
- package/data/build/dist/shared/assistant-message-timeline.d.ts +13 -0
- package/data/build/dist/shared/assistant-message-timeline.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-message-timeline.js +22 -0
- package/data/build/dist/shared/assistant-message-timeline.js.map +1 -0
- package/data/build/dist/shared/assistant-prompts.d.ts +12 -0
- package/data/build/dist/shared/assistant-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-prompts.js +32 -0
- package/data/build/dist/shared/assistant-prompts.js.map +1 -0
- package/data/build/dist/shared/assistant-tts.d.ts +93 -0
- package/data/build/dist/shared/assistant-tts.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-tts.js +80 -0
- package/data/build/dist/shared/assistant-tts.js.map +1 -0
- package/data/build/dist/shared/assistant-voice-sessions.d.ts +13 -0
- package/data/build/dist/shared/assistant-voice-sessions.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-voice-sessions.js +16 -0
- package/data/build/dist/shared/assistant-voice-sessions.js.map +1 -0
- package/data/build/dist/shared/contracts/assistant.d.ts +206 -0
- package/data/build/dist/shared/contracts/assistant.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +3 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.d.ts +23 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +2 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/errors.js +1 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -1
- package/data/build/dist/shared/contracts/peer-host.d.ts +3 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/peer-host.js +1 -0
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -1
- package/data/build/dist/shared/contracts/terminal-share.d.ts +27 -0
- package/data/build/dist/shared/contracts/terminal-share.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-share.js +2 -0
- package/data/build/dist/shared/contracts/terminal-share.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +3 -1
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +20 -7
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/contracts/voice-runtime.d.ts +15 -1
- package/data/build/dist/shared/contracts/voice-runtime.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/voice-runtime.js.map +1 -1
- package/data/build/dist/shared/desktop-assistant.d.ts +35 -0
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -0
- package/data/build/dist/shared/desktop-assistant.js +27 -0
- package/data/build/dist/shared/desktop-assistant.js.map +1 -0
- package/data/build/dist/shared/index.d.ts +16 -2
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js +10 -0
- package/data/build/dist/shared/index.js.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +62 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -0
- package/data/build/dist/shared/peer-host-http-routes.js +31 -0
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -0
- package/data/build/dist/shared/runtime-environment.d.ts +5 -0
- package/data/build/dist/shared/runtime-environment.d.ts.map +1 -0
- package/data/build/dist/shared/runtime-environment.js +7 -0
- package/data/build/dist/shared/runtime-environment.js.map +1 -0
- package/data/build/dist/shared/voice-diagnostics.d.ts +18 -0
- package/data/build/dist/shared/voice-diagnostics.d.ts.map +1 -0
- package/data/build/dist/shared/voice-diagnostics.js +57 -0
- package/data/build/dist/shared/voice-diagnostics.js.map +1 -0
- package/data/build/dist/shared/voice-initialization.d.ts +22 -0
- package/data/build/dist/shared/voice-initialization.d.ts.map +1 -0
- package/data/build/dist/shared/voice-initialization.js +4 -0
- package/data/build/dist/shared/voice-initialization.js.map +1 -0
- package/data/build/dist/shared/voice-models.d.ts +43 -0
- package/data/build/dist/shared/voice-models.d.ts.map +1 -1
- package/data/build/dist/shared/voice-models.js +23 -8
- package/data/build/dist/shared/voice-models.js.map +1 -1
- package/data/build/dist/shared/voice-stream.d.ts +12 -1
- package/data/build/dist/shared/voice-stream.d.ts.map +1 -1
- package/data/build/dist/shared/voice-stream.js +8 -1
- package/data/build/dist/shared/voice-stream.js.map +1 -1
- package/package.json +19 -3
- package/profile/README.md +2 -2
- package/profile/package.json +2 -2
- package/profile/version.json +1 -1
- package/version.json +1 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { createElement, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { ASSISTANT_AVATAR_RUNTIME_PATH } from '../../shared/assistant-avatar.js';
|
|
3
|
+
import { readAssistantAvatarCacheStatus } from './cache-status.js';
|
|
4
|
+
import { captureAssistantAvatarPreview } from './preview-capture.js';
|
|
5
|
+
import { createAssistantAvatarPortraitFromPreview } from './portrait-capture.js';
|
|
6
|
+
import { assistantAvatarRuntimeRevision } from '../../shared/assistant-avatar-engine.js';
|
|
7
|
+
/** 成功共享引擎;失败更换模块 URL,避免浏览器缓存失败的动态导入而无法恢复。 */
|
|
8
|
+
export class AssistantLive2dModuleLoader {
|
|
9
|
+
importModule;
|
|
10
|
+
fetchStatus;
|
|
11
|
+
module;
|
|
12
|
+
attempt = 0;
|
|
13
|
+
retryAt = 0;
|
|
14
|
+
revision = assistantAvatarRuntimeRevision();
|
|
15
|
+
constructor(importModule = (url) => import(/* @vite-ignore */ url), fetchStatus = (...args) => fetch(...args)) {
|
|
16
|
+
this.importModule = importModule;
|
|
17
|
+
this.fetchStatus = fetchStatus;
|
|
18
|
+
}
|
|
19
|
+
load(location) {
|
|
20
|
+
if (this.revision !== assistantAvatarRuntimeRevision() || (this.retryAt > 0 && Date.now() >= this.retryAt)) {
|
|
21
|
+
this.revision = assistantAvatarRuntimeRevision();
|
|
22
|
+
this.module = undefined;
|
|
23
|
+
this.retryAt = 0;
|
|
24
|
+
}
|
|
25
|
+
if (this.module !== undefined)
|
|
26
|
+
return this.module;
|
|
27
|
+
const url = new URL(ASSISTANT_AVATAR_RUNTIME_PATH, location);
|
|
28
|
+
url.searchParams.set('v', '2.1.1');
|
|
29
|
+
const attempt = this.attempt++;
|
|
30
|
+
if (attempt > 0)
|
|
31
|
+
url.searchParams.set('retry', String(attempt));
|
|
32
|
+
const request = withLoadDeadline(this.importModule(url.href), 45000).then((module) => {
|
|
33
|
+
if (typeof module.init !== 'function')
|
|
34
|
+
throw new Error('avatar_runtime_invalid');
|
|
35
|
+
return module;
|
|
36
|
+
}).catch(async (error) => {
|
|
37
|
+
if (this.module === request)
|
|
38
|
+
this.retryAt = Date.now() + 30_000;
|
|
39
|
+
// 动态 import 的错误不包含 HTTP 状态;只在失败时读取状态,不增加成功加载请求。
|
|
40
|
+
let status;
|
|
41
|
+
try {
|
|
42
|
+
status = (await this.fetchStatus(url, { credentials: 'same-origin', signal: AbortSignal.timeout(5000) })).status;
|
|
43
|
+
}
|
|
44
|
+
catch { /* 状态探测失败时保留最初的引擎错误。 */ }
|
|
45
|
+
if (status === 503)
|
|
46
|
+
throw new Error('avatar_runtime_unavailable');
|
|
47
|
+
if (status !== undefined && status !== 200)
|
|
48
|
+
throw new Error(`avatar_runtime_http_${status}`);
|
|
49
|
+
throw error;
|
|
50
|
+
});
|
|
51
|
+
this.module = request;
|
|
52
|
+
return request;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const runtimeModuleLoader = new AssistantLive2dModuleLoader();
|
|
56
|
+
/** 固定同源独立 ESM,只在用户选择 Live2D 时加载;不进入主 Client bundle。 */
|
|
57
|
+
function loadLive2dModule() {
|
|
58
|
+
return runtimeModuleLoader.load(window.location.href);
|
|
59
|
+
}
|
|
60
|
+
/** l2d 某些下载失败只记录日志而不拒绝 Promise,必须限制永久等待。 */
|
|
61
|
+
async function withLoadDeadline(task, timeoutMs, observeActivity) {
|
|
62
|
+
let timer;
|
|
63
|
+
try {
|
|
64
|
+
return await Promise.race([task, new Promise((_resolve, reject) => {
|
|
65
|
+
const refresh = () => {
|
|
66
|
+
clearTimeout(timer);
|
|
67
|
+
timer = setTimeout(() => reject(new Error('avatar_load_timeout')), timeoutMs);
|
|
68
|
+
};
|
|
69
|
+
observeActivity?.(refresh);
|
|
70
|
+
refresh();
|
|
71
|
+
})]);
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
clearTimeout(timer);
|
|
75
|
+
observeActivity?.(undefined);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** 参考上游 load/setState/resize/destroy;旧加载完成不能复活已销毁实例。 */
|
|
79
|
+
export class AssistantLive2dController {
|
|
80
|
+
runtime;
|
|
81
|
+
motionGroups;
|
|
82
|
+
options;
|
|
83
|
+
timeoutMs;
|
|
84
|
+
disposed = false;
|
|
85
|
+
state = 'idle';
|
|
86
|
+
loaded = false;
|
|
87
|
+
loadConfirmed = false;
|
|
88
|
+
cancelLoad;
|
|
89
|
+
refreshDeadline;
|
|
90
|
+
report;
|
|
91
|
+
constructor(runtime, motionGroups, options, report, timeoutMs = 45000) {
|
|
92
|
+
this.runtime = runtime;
|
|
93
|
+
this.motionGroups = motionGroups;
|
|
94
|
+
this.options = options;
|
|
95
|
+
this.timeoutMs = timeoutMs;
|
|
96
|
+
this.report = report;
|
|
97
|
+
runtime.on?.('loadstart', (total) => {
|
|
98
|
+
if (this.disposed)
|
|
99
|
+
return;
|
|
100
|
+
this.refreshDeadline?.();
|
|
101
|
+
this.report?.({ phase: 'resources', loaded: 0, total });
|
|
102
|
+
});
|
|
103
|
+
runtime.on?.('loadprogress', (loaded, total) => {
|
|
104
|
+
if (this.disposed)
|
|
105
|
+
return;
|
|
106
|
+
this.refreshDeadline?.();
|
|
107
|
+
this.report?.({ phase: total > 0 && loaded >= total ? 'rendering' : 'resources', loaded, total });
|
|
108
|
+
});
|
|
109
|
+
runtime.on?.('loaded', () => { if (!this.disposed)
|
|
110
|
+
this.loadConfirmed = true; });
|
|
111
|
+
}
|
|
112
|
+
async load(source) {
|
|
113
|
+
if (this.disposed)
|
|
114
|
+
return false;
|
|
115
|
+
this.loadConfirmed = false;
|
|
116
|
+
try {
|
|
117
|
+
const operation = this.runtime.load({ path: source, scale: this.options?.scale ?? 1, volume: 0, logLevel: 'warn',
|
|
118
|
+
...(this.options?.position === undefined ? {} : { position: [...this.options.position] }) })
|
|
119
|
+
.then(() => {
|
|
120
|
+
if (this.disposed) {
|
|
121
|
+
this.runtime.destroy();
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
// 真实引擎可能静默返回;只有 loaded 事件才证明初始化成功。
|
|
125
|
+
if (this.runtime.on !== undefined && !this.loadConfirmed)
|
|
126
|
+
throw new Error('avatar_model_not_loaded');
|
|
127
|
+
return true;
|
|
128
|
+
}, (error) => { if (this.disposed) {
|
|
129
|
+
this.runtime.destroy();
|
|
130
|
+
return false;
|
|
131
|
+
} throw error; });
|
|
132
|
+
const cancelled = new Promise((resolve) => { this.cancelLoad = () => resolve(false); });
|
|
133
|
+
// 大模型持续有文件进度时继续等待,只对长时间没有进展的加载超时。
|
|
134
|
+
if (!await withLoadDeadline(Promise.race([operation, cancelled]), this.timeoutMs, (refresh) => { this.refreshDeadline = refresh; }))
|
|
135
|
+
return false;
|
|
136
|
+
this.loaded = true;
|
|
137
|
+
this.setState(this.state);
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
this.dispose();
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
this.cancelLoad = undefined;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
setState(state) {
|
|
149
|
+
if (this.disposed)
|
|
150
|
+
return;
|
|
151
|
+
this.state = state;
|
|
152
|
+
if (!this.loaded)
|
|
153
|
+
return;
|
|
154
|
+
const groups = Object.keys(this.runtime.getMotions());
|
|
155
|
+
const desired = state === 'speaking' ? /talk|speak/iu : state === 'thinking' ? /think|work/iu
|
|
156
|
+
: state === 'error' ? /fail|error|sad/iu : state === 'listening' || state === 'waiting' ? /listen|wait/iu : /idle/iu;
|
|
157
|
+
const configured = this.motionGroups?.[state];
|
|
158
|
+
const group = configured !== undefined && groups.includes(configured) ? configured
|
|
159
|
+
: groups.find((name) => desired.test(name)) ?? groups.find((name) => /idle/iu.test(name));
|
|
160
|
+
if (group !== undefined)
|
|
161
|
+
this.runtime.playMotion(group, undefined, 2);
|
|
162
|
+
}
|
|
163
|
+
resize() { if (!this.disposed && this.loaded)
|
|
164
|
+
this.runtime.resize(); }
|
|
165
|
+
dispose() {
|
|
166
|
+
if (this.disposed)
|
|
167
|
+
return;
|
|
168
|
+
this.disposed = true;
|
|
169
|
+
// 上游只有 on,没有 off;清空回调引用并隔离迟到事件,避免持有旧 React 插槽。
|
|
170
|
+
this.report = undefined;
|
|
171
|
+
this.cancelLoad?.();
|
|
172
|
+
this.runtime.destroy();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/** 没有已绘制预览时只生成一次头像;捕获后立即销毁临时 WebGL 实例。 */
|
|
176
|
+
export async function createLive2dAssistantAvatarPortrait(model, signal) {
|
|
177
|
+
const preview = await createLive2dAssistantAvatarPortraitSource(model, signal);
|
|
178
|
+
return preview === undefined ? undefined : createAssistantAvatarPortraitFromPreview(preview, signal);
|
|
179
|
+
}
|
|
180
|
+
/** 编辑器复用同一静态帧来源,临时实例的销毁仍由适配器统一完成。 */
|
|
181
|
+
export async function createLive2dAssistantAvatarPortraitSource(model, signal) {
|
|
182
|
+
if (signal.aborted || typeof document === 'undefined')
|
|
183
|
+
return undefined;
|
|
184
|
+
const module = await loadLive2dModule();
|
|
185
|
+
if (signal.aborted)
|
|
186
|
+
return undefined;
|
|
187
|
+
const canvas = document.createElement('canvas');
|
|
188
|
+
canvas.width = 512;
|
|
189
|
+
canvas.height = 555;
|
|
190
|
+
canvas.style.cssText = 'position:fixed;left:-10000px;top:0;width:256px;height:277.5px;pointer-events:none;opacity:0';
|
|
191
|
+
canvas.setAttribute('aria-hidden', 'true');
|
|
192
|
+
document.body.appendChild(canvas);
|
|
193
|
+
let controller;
|
|
194
|
+
const abort = () => controller?.dispose();
|
|
195
|
+
try {
|
|
196
|
+
const runtime = module.init(canvas);
|
|
197
|
+
if (runtime === null)
|
|
198
|
+
return undefined;
|
|
199
|
+
controller = new AssistantLive2dController(runtime, model.motionGroups, model.live2d);
|
|
200
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
201
|
+
if (signal.aborted || !await controller.load(model.source) || signal.aborted)
|
|
202
|
+
return undefined;
|
|
203
|
+
return await captureAssistantAvatarPreview(runtime.getCanvas?.() ?? canvas, signal);
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
signal.removeEventListener('abort', abort);
|
|
207
|
+
controller?.dispose();
|
|
208
|
+
canvas.remove();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export function Live2dAssistantAvatar({ model, state, size, onError, onLoadProgress, diagnostics = false, onPreview }) {
|
|
212
|
+
const configKey = JSON.stringify([model.motionGroups, model.live2d]);
|
|
213
|
+
// 设置归一化会复制 JSON;等值映射不能因为父组件刷新而重载整个 WebGL 模型。
|
|
214
|
+
const config = useMemo(() => ({ motionGroups: model.motionGroups, options: model.live2d }), [configKey]);
|
|
215
|
+
const canvas = useRef(null);
|
|
216
|
+
const controller = useRef(undefined);
|
|
217
|
+
const currentState = useRef(state);
|
|
218
|
+
currentState.current = state;
|
|
219
|
+
const [visible, setVisible] = useState(() => typeof document === 'undefined' || !document.hidden);
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
const refresh = () => setVisible(!document.hidden);
|
|
222
|
+
document.addEventListener('visibilitychange', refresh);
|
|
223
|
+
return () => document.removeEventListener('visibilitychange', refresh);
|
|
224
|
+
}, []);
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
const target = canvas.current;
|
|
227
|
+
if (target === null || !visible)
|
|
228
|
+
return undefined;
|
|
229
|
+
let disposed = false;
|
|
230
|
+
let instance;
|
|
231
|
+
const previewController = new AbortController();
|
|
232
|
+
const started = diagnostics ? performance.now() : 0;
|
|
233
|
+
let progress = { phase: 'engine' };
|
|
234
|
+
const report = (next) => {
|
|
235
|
+
if (disposed)
|
|
236
|
+
return;
|
|
237
|
+
if (!diagnostics) {
|
|
238
|
+
onLoadProgress?.(next);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const elapsedMs = performance.now() - started;
|
|
242
|
+
progress = { ...progress, ...next, elapsedMs,
|
|
243
|
+
...(next.phase === 'rendering' && progress.resourcesMs === undefined ? { resourcesMs: elapsedMs } : {}) };
|
|
244
|
+
onLoadProgress?.(progress);
|
|
245
|
+
};
|
|
246
|
+
report(progress);
|
|
247
|
+
const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(() => instance?.resize());
|
|
248
|
+
observer?.observe(target);
|
|
249
|
+
// 正式环境不启动缓存诊断,也不等待它;Stage0 才采集真实前后快照。
|
|
250
|
+
void Promise.all([loadLive2dModule(), diagnostics ? readAssistantAvatarCacheStatus(model.source, window.location.href) : undefined]).then(async ([module, before]) => {
|
|
251
|
+
if (disposed)
|
|
252
|
+
return;
|
|
253
|
+
report({ phase: 'resources', ...(before === undefined ? {} : { cacheBefore: before }) });
|
|
254
|
+
const runtime = module.init(target);
|
|
255
|
+
if (runtime === null)
|
|
256
|
+
throw new Error('avatar_webgl_unavailable');
|
|
257
|
+
instance = new AssistantLive2dController(runtime, config.motionGroups, config.options, report);
|
|
258
|
+
controller.current = instance;
|
|
259
|
+
instance.setState(currentState.current);
|
|
260
|
+
if (!await instance.load(model.source) || disposed)
|
|
261
|
+
return;
|
|
262
|
+
if (onPreview !== undefined) {
|
|
263
|
+
// 引擎 loaded 时首帧可能还未绘制;等待有效绘制后才替换本地静态预览。
|
|
264
|
+
const preview = await captureAssistantAvatarPreview(runtime.getCanvas?.() ?? target, previewController.signal);
|
|
265
|
+
if (disposed)
|
|
266
|
+
return;
|
|
267
|
+
if (preview !== undefined)
|
|
268
|
+
onPreview(preview);
|
|
269
|
+
}
|
|
270
|
+
report({ phase: 'ready' });
|
|
271
|
+
if (!diagnostics)
|
|
272
|
+
return;
|
|
273
|
+
// 加载已完成,诊断不推迟角色显示;保留真实完成耗时,排除诊断响应时间。
|
|
274
|
+
const finished = progress;
|
|
275
|
+
const after = await readAssistantAvatarCacheStatus(model.source, window.location.href);
|
|
276
|
+
if (!disposed && after !== undefined) {
|
|
277
|
+
progress = { ...finished, cacheAfter: after };
|
|
278
|
+
onLoadProgress?.(progress);
|
|
279
|
+
}
|
|
280
|
+
}).catch((error) => { if (!disposed)
|
|
281
|
+
onError(error instanceof Error ? error.message : String(error)); });
|
|
282
|
+
return () => { disposed = true; previewController.abort(); observer?.disconnect(); instance?.dispose(); controller.current = undefined; };
|
|
283
|
+
}, [model.source, config, visible, onError, onLoadProgress, diagnostics, onPreview]);
|
|
284
|
+
useEffect(() => { controller.current?.setState(state); }, [state]);
|
|
285
|
+
return createElement('canvas', { ref: canvas, width: Math.round(size * 2), height: Math.round(size * 208 / 192 * 2), 'aria-hidden': true,
|
|
286
|
+
style: { width: size, height: 'auto', aspectRatio: '192 / 208', maxWidth: '100%', display: 'block' } });
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=live2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live2d.js","sourceRoot":"","sources":["../../../../../src/client/avatar/live2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAA;AAIhF,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAEpE,OAAO,EAAE,wCAAwC,EAAE,MAAM,uBAAuB,CAAA;AAEhF,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAA;AAmBxF,6CAA6C;AAC7C,MAAM,OAAO,2BAA2B;IAKT;IACV;IALX,MAAM,CAA4C;IAClD,OAAO,GAAG,CAAC,CAAA;IACX,OAAO,GAAG,CAAC,CAAA;IACX,QAAQ,GAAG,8BAA8B,EAAE,CAAA;IACnD,YAA6B,eAAgE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,EACjH,cAA4B,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;QAD7C,iBAAY,GAAZ,YAAY,CAA2F;QACjH,gBAAW,GAAX,WAAW,CAA4C;IAAG,CAAC;IAC9E,IAAI,CAAC,QAAgB;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,8BAA8B,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC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,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAA;IACpF,SAAS,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IACjE,OAAO,aAAa,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI;QACtI,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;AAC3G,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { AssistantAvatarCacheStatus } from '../../shared/assistant-avatar-resources.js';
|
|
3
|
+
import type { CodingNsTranslator } from '../locale.js';
|
|
4
|
+
/** 统一加载反馈;可选字段只在渲染器有真实证据时提供。 */
|
|
5
|
+
export interface AssistantAvatarLoadProgress {
|
|
6
|
+
readonly phase: 'engine' | 'resources' | 'rendering' | 'ready';
|
|
7
|
+
readonly loaded?: number;
|
|
8
|
+
readonly total?: number;
|
|
9
|
+
readonly elapsedMs?: number;
|
|
10
|
+
readonly resourcesMs?: number;
|
|
11
|
+
readonly cacheBefore?: AssistantAvatarCacheStatus;
|
|
12
|
+
readonly cacheAfter?: AssistantAvatarCacheStatus;
|
|
13
|
+
}
|
|
14
|
+
/** 百分比只根据已经完成的文件计数生成;未知总数保留循环动画。 */
|
|
15
|
+
export declare function assistantAvatarLoadPercent(progress: AssistantAvatarLoadProgress): number | undefined;
|
|
16
|
+
/** 透明光晕、轨道光点与细进度条,直接复用插槽尺寸和宿主主题。 */
|
|
17
|
+
export declare function AssistantAvatarLoading({ progress, size, t, showCache, diagnostics, preview, animationOnly }: {
|
|
18
|
+
readonly progress: AssistantAvatarLoadProgress;
|
|
19
|
+
readonly size: number;
|
|
20
|
+
readonly t: CodingNsTranslator;
|
|
21
|
+
readonly showCache?: boolean;
|
|
22
|
+
readonly diagnostics?: boolean;
|
|
23
|
+
readonly preview?: boolean;
|
|
24
|
+
/** 临时预览仅显示加载动画,下载与引擎准备均不显示文字或进度条。 */
|
|
25
|
+
readonly animationOnly?: boolean;
|
|
26
|
+
}): ReactElement | null;
|
|
27
|
+
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../../../src/client/avatar/loading.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAA;AAC5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAGtD,gCAAgC;AAChC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAA;IAC9D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,0BAA0B,CAAA;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAA;CACjD;AAeD,oCAAoC;AACpC,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,2BAA2B,GAAG,MAAM,GAAG,SAAS,CAIpG;AAkBD,oCAAoC;AACpC,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,SAAiB,EAAE,WAAmB,EAAE,OAAe,EAAE,aAAqB,EAAE,EAAE;IAC5I,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,kBAAkB,CAAA;IACrG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IACxF,qCAAqC;IACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CACjC,GAAG,YAAY,GAAG,IAAI,CAiDtB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { dshThemeColor } from '../theme.js';
|
|
3
|
+
const loadingStyle = `
|
|
4
|
+
@keyframes codingns-avatar-orbit { to { transform: rotate(360deg); } }
|
|
5
|
+
@keyframes codingns-avatar-breathe { 50% { transform: scale(1.08); opacity: .65; } }
|
|
6
|
+
@keyframes codingns-avatar-shimmer { from { transform: translateX(-130%); } to { transform: translateX(330%); } }
|
|
7
|
+
[data-codingns-avatar-loading] .codingns-avatar-halo { animation: codingns-avatar-breathe 2.6s ease-in-out infinite; }
|
|
8
|
+
[data-codingns-avatar-loading] .codingns-avatar-orbit { animation: codingns-avatar-orbit 3s linear infinite; }
|
|
9
|
+
[data-codingns-avatar-loading] .codingns-avatar-indeterminate { animation: codingns-avatar-shimmer 1.6s ease-in-out infinite; }
|
|
10
|
+
@media (prefers-reduced-motion: reduce) {
|
|
11
|
+
[data-codingns-avatar-loading] .codingns-avatar-halo,
|
|
12
|
+
[data-codingns-avatar-loading] .codingns-avatar-orbit,
|
|
13
|
+
[data-codingns-avatar-loading] .codingns-avatar-indeterminate { animation: none; }
|
|
14
|
+
}`;
|
|
15
|
+
/** 百分比只根据已经完成的文件计数生成;未知总数保留循环动画。 */
|
|
16
|
+
export function assistantAvatarLoadPercent(progress) {
|
|
17
|
+
if (progress.total === undefined || progress.loaded === undefined || !Number.isFinite(progress.total)
|
|
18
|
+
|| !Number.isFinite(progress.loaded) || progress.total <= 0)
|
|
19
|
+
return undefined;
|
|
20
|
+
return Math.round(Math.min(1, Math.max(0, progress.loaded / progress.total)) * 100);
|
|
21
|
+
}
|
|
22
|
+
/** 计数只在同一缓存代际内可相减,Host 重建后不能把相同数字解释成下载为零。 */
|
|
23
|
+
function newHostDownloads(progress) {
|
|
24
|
+
const before = progress.cacheBefore;
|
|
25
|
+
const after = progress.cacheAfter;
|
|
26
|
+
if (before === undefined || after === undefined || after.generation !== before.generation || after.downloads < before.downloads)
|
|
27
|
+
return undefined;
|
|
28
|
+
return after.downloads - before.downloads;
|
|
29
|
+
}
|
|
30
|
+
function cacheText(progress, t) {
|
|
31
|
+
const before = progress.cacheBefore;
|
|
32
|
+
if (before === undefined)
|
|
33
|
+
return t('avatar.cacheUnknown');
|
|
34
|
+
const initial = t('avatar.cacheBefore', { cached: before.cached, total: before.total });
|
|
35
|
+
const count = newHostDownloads(progress);
|
|
36
|
+
return count === undefined ? initial : `${initial} · ${t('avatar.cacheDownloads', { count })}`;
|
|
37
|
+
}
|
|
38
|
+
/** 透明光晕、轨道光点与细进度条,直接复用插槽尺寸和宿主主题。 */
|
|
39
|
+
export function AssistantAvatarLoading({ progress, size, t, showCache = false, diagnostics = false, preview = false, animationOnly = false }) {
|
|
40
|
+
// 即使第三方渲染器仍上报诊断字段,正式环境也不能显示摘要或隐藏的调试 tooltip。
|
|
41
|
+
showCache = !animationOnly && diagnostics && showCache;
|
|
42
|
+
if (progress.phase === 'ready' && (!diagnostics || animationOnly))
|
|
43
|
+
return null;
|
|
44
|
+
const percent = assistantAvatarLoadPercent(progress);
|
|
45
|
+
const compact = size < 120;
|
|
46
|
+
const ready = progress.phase === 'ready';
|
|
47
|
+
const elapsed = progress.elapsedMs === undefined ? '' : t('avatar.loadElapsed', { seconds: (progress.elapsedMs / 1000).toFixed(2) });
|
|
48
|
+
const shortElapsed = progress.elapsedMs === undefined ? '' : t('avatar.loadElapsedCompact', { seconds: (progress.elapsedMs / 1000).toFixed(2) });
|
|
49
|
+
const details = [showCache ? cacheText(progress, t) : '', elapsed,
|
|
50
|
+
progress.resourcesMs === undefined ? '' : t('avatar.loadResourcesElapsed', { seconds: (progress.resourcesMs / 1000).toFixed(2) })].filter(Boolean).join(' · ');
|
|
51
|
+
const newDownloads = newHostDownloads(progress);
|
|
52
|
+
if (ready)
|
|
53
|
+
return createElement('span', { 'data-codingns-avatar-load-summary': true, title: details,
|
|
54
|
+
style: { position: 'absolute', bottom: 0, maxWidth: '100%', fontSize: 10, lineHeight: 1.4, color: dshThemeColor.labelSecondary,
|
|
55
|
+
textAlign: 'center', background: dshThemeColor.cardBackground, borderRadius: 8, padding: '2px 6px' } }, showCache ? createElement('span', { style: { display: 'block' } }, progress.cacheBefore === undefined ? t('avatar.cacheUnknown')
|
|
56
|
+
: t(compact ? 'avatar.cacheTiny' : 'avatar.cacheShort', { cached: progress.cacheBefore.cached, total: progress.cacheBefore.total })) : null, createElement('span', { style: { display: 'block' } }, [showCache && newDownloads !== undefined
|
|
57
|
+
? t(compact ? 'avatar.cacheDownloadsTiny' : 'avatar.cacheDownloadsCompact', { count: newDownloads }) : '',
|
|
58
|
+
compact && showCache && newDownloads !== undefined ? '' : shortElapsed].filter(Boolean).join(' · ')));
|
|
59
|
+
const phaseText = progress.phase === 'engine' ? t('avatar.loadEngine') : progress.phase === 'rendering' ? t('avatar.loadRendering') : t('avatar.loading');
|
|
60
|
+
const orbSize = preview ? 14 : Math.min(80, size * (compact ? .3 : .46));
|
|
61
|
+
const cache = progress.cacheBefore;
|
|
62
|
+
const cacheLabel = compact ? cache === undefined ? t('avatar.cacheUnknownCompact') : t('avatar.cacheTiny', { cached: cache.cached, total: cache.total }) : cacheText(progress, t);
|
|
63
|
+
return createElement('div', { 'data-codingns-avatar-loading': progress.phase, role: 'status', 'aria-label': phaseText,
|
|
64
|
+
...(showCache ? { title: cacheText(progress, t) } : {}),
|
|
65
|
+
style: { position: 'absolute', inset: preview ? 'auto 0 0' : 0, display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', gap: compact || preview ? 4 : 10,
|
|
66
|
+
...(preview ? { padding: '5px 4px', borderRadius: 10, background: dshThemeColor.cardBackground } : {}),
|
|
67
|
+
pointerEvents: 'none', color: dshThemeColor.labelSecondary, textAlign: 'center' } }, createElement('style', null, loadingStyle), createElement('div', { style: { display: 'flex', flexDirection: preview ? 'row' : 'column', alignItems: 'center', gap: compact || preview ? 4 : 10 } }, createElement('div', { 'aria-hidden': true, style: { position: 'relative', flexShrink: 0, width: orbSize, height: orbSize, color: dshThemeColor.accent } }, createElement('div', { className: 'codingns-avatar-halo', style: { position: 'absolute', inset: '-14%', borderRadius: '50%',
|
|
68
|
+
background: 'radial-gradient(circle, rgba(112, 148, 255, .24), rgba(132, 204, 247, .10) 55%, transparent 72%)' } }), createElement('div', { className: 'codingns-avatar-orbit', style: { position: 'absolute', inset: 0, borderRadius: '50%', border: '1px solid rgba(112, 148, 255, .20)' } }, createElement('span', { style: { position: 'absolute', top: -3, left: '50%', width: 6, height: 6, borderRadius: '50%', background: 'currentColor', boxShadow: '0 0 12px rgba(112, 148, 255, .5)' } })), createElement('svg', { viewBox: '0 0 64 64', style: { position: 'absolute', inset: '20%', width: '60%', height: '60%' }, fill: 'none' }, createElement('path', { d: 'M32 9C35 23 41 29 55 32C41 35 35 41 32 55C29 41 23 35 9 32C23 29 29 23 32 9Z', fill: 'currentColor', opacity: .85 }), createElement('circle', { cx: 51, cy: 12, r: 3, fill: 'currentColor', opacity: .4 }))), animationOnly ? null : createElement('span', { style: { fontSize: compact || preview ? 10 : size < 160 ? 11 : 13, fontWeight: 500 } }, compact || preview ? t('avatar.loadingCompact') : phaseText)), animationOnly ? null : createElement('div', { role: 'progressbar', 'aria-label': t('avatar.loadProgress'), 'aria-valuemin': 0, 'aria-valuemax': 100,
|
|
69
|
+
...(percent === undefined ? {} : { 'aria-valuenow': percent }),
|
|
70
|
+
style: { width: Math.min(130, size * .74), height: 3, flexShrink: 0, borderRadius: 3, overflow: 'hidden', background: 'rgba(112, 148, 255, .15)' } }, createElement('div', { className: percent === undefined ? 'codingns-avatar-indeterminate' : undefined,
|
|
71
|
+
style: { width: percent === undefined ? '30%' : `${percent}%`, height: '100%', borderRadius: 3,
|
|
72
|
+
background: 'linear-gradient(90deg, #81c9ed, #7791f7)', transition: 'width .2s ease' } })), animationOnly ? null : createElement('span', { style: { fontSize: 10, lineHeight: 1.5, padding: '0 6px', maxWidth: '100%' } }, percent === undefined ? null : `${progress.loaded}/${progress.total} · ${percent}%`, showCache ? createElement('span', { style: { display: 'block' } }, cacheLabel) : null));
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../../../../src/client/avatar/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAIrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAa3C,MAAM,YAAY,GAAG;;;;;;;;;;;EAWnB,CAAA;AAEF,oCAAoC;AACpC,MAAM,UAAU,0BAA0B,CAAC,QAAqC;IAC9E,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;WAChG,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,I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CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAC3H,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,KAAK,MAAM,OAAO,GAAG,EACnF,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7F,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { AssistantAppearanceSettings, AssistantAvatarModel } from '../../shared/assistant-avatar.js';
|
|
2
|
+
import type { AssistantAvatarAdapter } from '../../shared/assistant-avatar-adapters.js';
|
|
3
|
+
import type { CodingNsSettings } from '../../shared/contracts/config.js';
|
|
4
|
+
import type { CodingNsSettingsStore } from '../../dsh-capabilities/settings-store.js';
|
|
5
|
+
import type { CodingNsClientServices } from '../features/types.js';
|
|
6
|
+
import { AssistantAvatarRegistration } from './registration.js';
|
|
7
|
+
import type { CodingNsRpcClient } from '../features/types.js';
|
|
8
|
+
import type { AssistantAvatarCandidate } from '../../shared/assistant-avatar-installation.js';
|
|
9
|
+
import type { AssistantAvatarCatalogEntry, AssistantAvatarTemporaryPreview } from '../../shared/assistant-avatar-catalog.js';
|
|
10
|
+
import type { AssistantAvatarEngineStatus } from '../../shared/assistant-avatar-engine.js';
|
|
11
|
+
export declare class AssistantAvatarAdapterRegistry extends AssistantAvatarRegistration<AssistantAvatarAdapter> {
|
|
12
|
+
constructor();
|
|
13
|
+
parse(manifest: unknown, manifestUrl: string, adapterId?: string): AssistantAvatarModel;
|
|
14
|
+
}
|
|
15
|
+
export type AssistantAppearanceUpdate = Partial<Pick<AssistantAppearanceSettings, 'floatingEnabled' | 'dialogEnabled' | 'floatingSize' | 'dialogSize'>>;
|
|
16
|
+
/** 唯一写入入口:包导入与手工素材最终都变成同一清单,不拥有语音或会话。 */
|
|
17
|
+
export declare class AssistantAvatarManager {
|
|
18
|
+
private readonly settings;
|
|
19
|
+
readonly adapters: AssistantAvatarAdapterRegistry;
|
|
20
|
+
private readonly fetchManifest;
|
|
21
|
+
private readonly baseUrl;
|
|
22
|
+
private readonly rpc?;
|
|
23
|
+
private readonly removePortrait;
|
|
24
|
+
private writes;
|
|
25
|
+
private appearance;
|
|
26
|
+
private catalog;
|
|
27
|
+
constructor(settings: CodingNsSettingsStore<CodingNsSettings>, adapters?: AssistantAvatarAdapterRegistry, fetchManifest?: typeof fetch, baseUrl?: string | undefined, rpc?: CodingNsRpcClient | undefined, removePortrait?: (id: string) => void);
|
|
28
|
+
/** React 和扩展都可以订阅这一份稳定快照,语音设置变化不会刷新形象列表。 */
|
|
29
|
+
readonly getSnapshot: () => AssistantAppearanceSettings;
|
|
30
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
31
|
+
getAppearance(): AssistantAppearanceSettings;
|
|
32
|
+
list(): readonly AssistantAvatarModel[];
|
|
33
|
+
getSelected(): AssistantAvatarModel;
|
|
34
|
+
select(id: string): Promise<void>;
|
|
35
|
+
add(model: AssistantAvatarModel): Promise<void>;
|
|
36
|
+
update(model: AssistantAvatarModel): Promise<void>;
|
|
37
|
+
remove(id: string): Promise<void>;
|
|
38
|
+
configure(update: AssistantAppearanceUpdate): Promise<void>;
|
|
39
|
+
/** 必须从独立协议操作调用;展示配置不会隐式开启第三方目录。 */
|
|
40
|
+
setThirdPartyEnabled(enabled: boolean): Promise<void>;
|
|
41
|
+
/** 引擎许可与第三方素材协议分开记录;撤销同意不卸载已安装引擎。 */
|
|
42
|
+
setEngineEnabled(enabled: boolean): Promise<void>;
|
|
43
|
+
/** 只读探测;已确认许可后由安装接口写入 CodingNS 自有引擎目录。 */
|
|
44
|
+
engineStatus(signal?: AbortSignal): Promise<AssistantAvatarEngineStatus>;
|
|
45
|
+
installEngine(signal?: AbortSignal): Promise<AssistantAvatarEngineStatus>;
|
|
46
|
+
getCatalog(signal?: AbortSignal): Promise<readonly AssistantAvatarCatalogEntry[]>;
|
|
47
|
+
previewCatalog(id: string, revision: string, lease: string, signal?: AbortSignal): Promise<AssistantAvatarTemporaryPreview>;
|
|
48
|
+
releasePreview(lease: string): Promise<void>;
|
|
49
|
+
keepPreview(lease: string): Promise<void>;
|
|
50
|
+
installCatalog(id: string, revision: string, licenseAccepted: boolean, signal?: AbortSignal, lease?: string): Promise<AssistantAvatarModel>;
|
|
51
|
+
/** 只读清单 JSON;网络/解析/取消失败都不新增形象,不修改当前选择。 */
|
|
52
|
+
importPackage(source: string, adapterId?: string, signal?: AbortSignal): Promise<AssistantAvatarModel>;
|
|
53
|
+
/** 新入口在 Host 安装完整素材后才写入形象列表;旧外链导入 API 保持兼容。 */
|
|
54
|
+
discover(source: string, signal?: AbortSignal): Promise<readonly AssistantAvatarCandidate[]>;
|
|
55
|
+
installPackage(source: string, adapterId?: string, signal?: AbortSignal): Promise<AssistantAvatarModel>;
|
|
56
|
+
private registerInstallation;
|
|
57
|
+
private call;
|
|
58
|
+
private insert;
|
|
59
|
+
private write;
|
|
60
|
+
private saveAppearance;
|
|
61
|
+
private requireWritable;
|
|
62
|
+
private requireConsent;
|
|
63
|
+
private requireEngineConsent;
|
|
64
|
+
private requireModel;
|
|
65
|
+
private requireCustom;
|
|
66
|
+
}
|
|
67
|
+
export declare function bindAssistantAvatarManager(services: CodingNsClientServices, manager: AssistantAvatarManager): void;
|
|
68
|
+
export declare function getAssistantAvatarManager(services: CodingNsClientServices): AssistantAvatarManager;
|
|
69
|
+
/** 扩展应将注销函数登记到 context.resources,已导入的数据不会随适配器注销丢失。 */
|
|
70
|
+
export declare function registerAssistantAvatarAdapter(services: CodingNsClientServices, adapter: AssistantAvatarAdapter): () => void;
|
|
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