@celljs/ta-web 4.49.0 → 4.50.1
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 +1 -1
- package/README.md +1 -1
- package/esm/browser/account/account-side.js +4 -0
- package/esm/browser/account/device-account.d.ts +6 -0
- package/esm/browser/account/device-account.js +20 -5
- package/esm/browser/assistant/assistant-view.js +2 -0
- package/esm/browser/assistant/call-announcing.d.ts +25 -0
- package/esm/browser/assistant/call-announcing.js +32 -0
- package/esm/browser/assistant/call-answering.d.ts +43 -0
- package/esm/browser/assistant/call-answering.js +63 -0
- package/esm/browser/assistant/call-hearing.d.ts +53 -0
- package/esm/browser/assistant/call-hearing.js +98 -0
- package/esm/browser/assistant/call-pausing.d.ts +40 -0
- package/esm/browser/assistant/call-pausing.js +82 -0
- package/esm/browser/assistant/call-reading.d.ts +32 -0
- package/esm/browser/assistant/call-reading.js +35 -0
- package/esm/browser/assistant/call-revoicing.d.ts +33 -0
- package/esm/browser/assistant/call-revoicing.js +68 -0
- package/esm/browser/assistant/call-turns.d.ts +29 -0
- package/esm/browser/assistant/call-turns.js +33 -0
- package/esm/browser/assistant/spoken-answer.d.ts +21 -0
- package/esm/browser/assistant/spoken-answer.js +69 -0
- package/esm/browser/assistant/spoken-call.d.ts +7 -0
- package/esm/browser/assistant/spoken-call.js +16 -0
- package/esm/browser/assistant/voice-call-protocol.d.ts +5 -0
- package/esm/browser/assistant/voice-call.d.ts +47 -43
- package/esm/browser/assistant/voice-call.js +193 -219
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/account-recovery-view.d.ts +11 -0
- package/esm/browser/components/account-recovery-view.js +81 -0
- package/esm/browser/components/account-view.d.ts +1 -2
- package/esm/browser/components/account-view.js +10 -1
- package/esm/browser/components/app-nav.js +19 -8
- package/esm/browser/components/app-shell-hooks.d.ts +5 -0
- package/esm/browser/components/app-shell-hooks.js +45 -0
- package/esm/browser/components/app-shell-state.js +2 -1
- package/esm/browser/components/app-update-view.js +4 -4
- package/esm/browser/components/app-view.js +9 -5
- package/esm/browser/components/chat-emoji.d.ts +35 -0
- package/esm/browser/components/chat-emoji.js +129 -0
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +6 -0
- package/esm/browser/components/composer-attachments.js +12 -1
- package/esm/browser/components/composer-box-protocol.d.ts +15 -0
- package/esm/browser/components/composer-box.js +110 -87
- package/esm/browser/components/composer-drop-hooks.d.ts +26 -0
- package/esm/browser/components/composer-drop-hooks.js +36 -0
- package/esm/browser/components/composer-emoji.js +1 -1
- package/esm/browser/components/composer-faces.d.ts +16 -0
- package/esm/browser/components/composer-faces.js +37 -0
- package/esm/browser/components/composer-media.d.ts +10 -0
- package/esm/browser/components/composer-media.js +12 -1
- package/esm/browser/components/composer-target.d.ts +4 -0
- package/esm/browser/components/composer-target.js +18 -7
- package/esm/browser/components/composer-type-focus.d.ts +24 -0
- package/esm/browser/components/composer-type-focus.js +17 -0
- package/esm/browser/components/composer-voice.d.ts +24 -0
- package/esm/browser/components/composer-voice.js +37 -0
- package/esm/browser/components/composer.d.ts +2 -2
- package/esm/browser/components/composer.js +39 -8
- package/esm/browser/components/context-menu.js +2 -1
- package/esm/browser/components/emoji-panel.d.ts +11 -7
- package/esm/browser/components/emoji-panel.js +40 -22
- package/esm/browser/components/extension-settings.js +2 -2
- package/esm/browser/components/folder-new.d.ts +18 -0
- package/esm/browser/components/folder-new.js +53 -0
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +18 -6
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/image-menu.d.ts +8 -3
- package/esm/browser/components/image-menu.js +34 -9
- package/esm/browser/components/markdown.js +9 -2
- package/esm/browser/components/media.js +3 -2
- package/esm/browser/components/message-list.js +2 -2
- package/esm/browser/components/message-steps.js +20 -11
- package/esm/browser/components/message-user.js +2 -2
- package/esm/browser/components/moved-notice.js +2 -1
- package/esm/browser/components/nav-places.d.ts +2 -0
- package/esm/browser/components/nav-places.js +4 -2
- package/esm/browser/components/phone-shell.d.ts +2 -0
- package/esm/browser/components/phone-shell.js +5 -1
- package/esm/browser/components/secret-text.d.ts +1 -1
- package/esm/browser/components/secret-text.js +4 -3
- package/esm/browser/components/session-view.js +3 -0
- package/esm/browser/components/settings-choices.d.ts +2 -1
- package/esm/browser/components/settings-choices.js +13 -5
- package/esm/browser/components/settings-more.js +3 -3
- package/esm/browser/components/settings-parts.js +13 -2
- package/esm/browser/components/share-item-sheet.js +7 -1
- package/esm/browser/components/tab-title.d.ts +27 -0
- package/esm/browser/components/tab-title.js +35 -0
- package/esm/browser/components/use-composer-attachments.d.ts +28 -0
- package/esm/browser/components/use-composer-attachments.js +65 -0
- package/esm/browser/components/use-composer-files.d.ts +25 -0
- package/esm/browser/components/use-composer-files.js +52 -0
- package/esm/browser/components/web-composer.d.ts +3 -1
- package/esm/browser/components/web-composer.js +3 -2
- package/esm/browser/components/workbench-view.js +1 -0
- package/esm/browser/components/working-directory.js +2 -1
- package/esm/browser/device/app-update.d.ts +6 -3
- package/esm/browser/device/app-update.js +11 -5
- package/esm/browser/device/drag-move.d.ts +21 -0
- package/esm/browser/device/drag-move.js +86 -0
- package/esm/browser/extension/icons.js +7 -1
- package/esm/browser/extension/web-api-desktop.d.ts +19 -0
- package/esm/browser/extension/web-api-menus.d.ts +19 -0
- package/esm/browser/extension/web-api-spec.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +24 -23
- package/esm/browser/extension/web-extension-context.d.ts +1 -0
- package/esm/browser/extension/web-extension-context.js +12 -5
- package/esm/browser/extension/web-extension-run.js +1 -0
- package/esm/browser/extension/web-share-ui.d.ts +1 -1
- package/esm/browser/extension/web-share-ui.js +2 -0
- package/esm/browser/extension/web-share.d.ts +13 -0
- package/esm/browser/extension/web-share.js +37 -2
- package/esm/browser/i18n/en/account.d.ts +18 -0
- package/esm/browser/i18n/en/account.js +18 -0
- package/esm/browser/i18n/en/call.js +1 -1
- package/esm/browser/i18n/en/chat.d.ts +15 -0
- package/esm/browser/i18n/en/chat.js +16 -1
- package/esm/browser/i18n/en/common.d.ts +2 -0
- package/esm/browser/i18n/en/common.js +2 -0
- package/esm/browser/i18n/en/discover.d.ts +2 -0
- package/esm/browser/i18n/en/discover.js +2 -0
- package/esm/browser/i18n/en/service.d.ts +4 -0
- package/esm/browser/i18n/en/service.js +4 -0
- package/esm/browser/i18n/en/settings.d.ts +17 -0
- package/esm/browser/i18n/en/settings.js +17 -0
- package/esm/browser/i18n/ja/account.js +18 -0
- package/esm/browser/i18n/ja/call.js +1 -1
- package/esm/browser/i18n/ja/chat.js +16 -1
- package/esm/browser/i18n/ja/common.js +2 -0
- package/esm/browser/i18n/ja/discover.js +3 -1
- package/esm/browser/i18n/ja/service.js +4 -0
- package/esm/browser/i18n/ja/settings.js +17 -0
- package/esm/browser/i18n/locales.d.ts +59 -1
- package/esm/browser/i18n/messages.d.ts +58 -0
- package/esm/browser/i18n/zh/account.js +18 -0
- package/esm/browser/i18n/zh/call.js +1 -1
- package/esm/browser/i18n/zh/chat.js +16 -1
- package/esm/browser/i18n/zh/common.js +2 -0
- package/esm/browser/i18n/zh/discover.js +3 -1
- package/esm/browser/i18n/zh/service.js +4 -0
- package/esm/browser/i18n/zh/settings.js +17 -0
- package/esm/browser/i18n/zh-tw/account.js +18 -0
- package/esm/browser/i18n/zh-tw/call.js +1 -1
- package/esm/browser/i18n/zh-tw/chat.js +16 -1
- package/esm/browser/i18n/zh-tw/common.js +2 -0
- package/esm/browser/i18n/zh-tw/discover.js +3 -1
- package/esm/browser/i18n/zh-tw/service.js +4 -0
- package/esm/browser/i18n/zh-tw/settings.js +17 -0
- package/esm/browser/offline/kept-chats.d.ts +3 -1
- package/esm/browser/offline/kept-chats.js +1 -1
- package/esm/browser/partners/group-picker.d.ts +3 -2
- package/esm/browser/partners/group-picker.js +8 -3
- package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/esm/browser/sandbox/work/work-docs.js +5 -2
- package/esm/browser/sandbox/work/work-frame.d.ts +3 -0
- package/esm/browser/sandbox/work/work-frame.js +9 -3
- package/esm/browser/sandbox/work/work-gates.d.ts +77 -0
- package/esm/browser/sandbox/work/work-gates.js +182 -0
- package/esm/browser/settings/agent-settings.js +1 -1
- package/esm/browser/settings/navigation.d.ts +38 -10
- package/esm/browser/settings/navigation.js +73 -17
- package/esm/browser/settings/settings-protocol.d.ts +16 -1
- package/esm/browser/settings/settings-protocol.js +20 -2
- package/esm/browser/settings/settings.js +4 -1
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +15 -2
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +6 -3
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation-column.js +28 -8
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +5 -0
- package/esm/browser/style/device.js +5 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +3 -3
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +13 -6
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +4 -2
- package/esm/browser/util/chat-emoji.d.ts +44 -0
- package/esm/browser/util/chat-emoji.js +269 -0
- package/esm/browser/util/composer-drop.d.ts +26 -0
- package/esm/browser/util/composer-drop.js +40 -0
- package/esm/browser/util/composer-files.d.ts +48 -0
- package/esm/browser/util/composer-files.js +99 -0
- package/esm/browser/util/composer.d.ts +13 -1
- package/esm/browser/util/composer.js +24 -6
- package/esm/browser/util/markdown.d.ts +5 -0
- package/esm/browser/util/markdown.js +18 -0
- package/esm/browser/util/message.d.ts +6 -1
- package/esm/browser/util/message.js +13 -2
- package/esm/browser/util/process.d.ts +10 -13
- package/esm/browser/util/process.js +31 -83
- package/esm/browser/util/turn-join.d.ts +38 -0
- package/esm/browser/util/turn-join.js +119 -0
- package/esm/browser/workbench-services.js +1 -1
- package/lib/browser/account/account-side.js +4 -0
- package/lib/browser/account/device-account.d.ts +6 -0
- package/lib/browser/account/device-account.js +20 -5
- package/lib/browser/assistant/assistant-view.js +2 -0
- package/lib/browser/assistant/call-announcing.d.ts +26 -0
- package/lib/browser/assistant/call-announcing.js +36 -0
- package/lib/browser/assistant/call-answering.d.ts +44 -0
- package/lib/browser/assistant/call-answering.js +67 -0
- package/lib/browser/assistant/call-hearing.d.ts +54 -0
- package/lib/browser/assistant/call-hearing.js +102 -0
- package/lib/browser/assistant/call-pausing.d.ts +41 -0
- package/lib/browser/assistant/call-pausing.js +86 -0
- package/lib/browser/assistant/call-reading.d.ts +33 -0
- package/lib/browser/assistant/call-reading.js +39 -0
- package/lib/browser/assistant/call-revoicing.d.ts +34 -0
- package/lib/browser/assistant/call-revoicing.js +72 -0
- package/lib/browser/assistant/call-turns.d.ts +30 -0
- package/lib/browser/assistant/call-turns.js +37 -0
- package/lib/browser/assistant/spoken-answer.d.ts +22 -0
- package/lib/browser/assistant/spoken-answer.js +73 -0
- package/lib/browser/assistant/spoken-call.d.ts +8 -0
- package/lib/browser/assistant/spoken-call.js +19 -0
- package/lib/browser/assistant/voice-call-protocol.d.ts +5 -0
- package/lib/browser/assistant/voice-call.d.ts +47 -43
- package/lib/browser/assistant/voice-call.js +192 -218
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/account-recovery-view.d.ts +12 -0
- package/lib/browser/components/account-recovery-view.js +117 -0
- package/lib/browser/components/account-view.d.ts +1 -2
- package/lib/browser/components/account-view.js +10 -1
- package/lib/browser/components/app-nav.js +19 -8
- package/lib/browser/components/app-shell-hooks.d.ts +5 -0
- package/lib/browser/components/app-shell-hooks.js +46 -0
- package/lib/browser/components/app-shell-state.js +1 -0
- package/lib/browser/components/app-update-view.js +4 -4
- package/lib/browser/components/app-view.js +8 -4
- package/lib/browser/components/chat-emoji.d.ts +36 -0
- package/lib/browser/components/chat-emoji.js +167 -0
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +6 -0
- package/lib/browser/components/composer-attachments.js +12 -0
- package/lib/browser/components/composer-box-protocol.d.ts +15 -0
- package/lib/browser/components/composer-box.js +107 -84
- package/lib/browser/components/composer-drop-hooks.d.ts +27 -0
- package/lib/browser/components/composer-drop-hooks.js +72 -0
- package/lib/browser/components/composer-emoji.js +1 -1
- package/lib/browser/components/composer-faces.d.ts +17 -0
- package/lib/browser/components/composer-faces.js +73 -0
- package/lib/browser/components/composer-media.d.ts +10 -0
- package/lib/browser/components/composer-media.js +13 -0
- package/lib/browser/components/composer-target.d.ts +4 -0
- package/lib/browser/components/composer-target.js +18 -7
- package/lib/browser/components/composer-type-focus.d.ts +25 -0
- package/lib/browser/components/composer-type-focus.js +20 -0
- package/lib/browser/components/composer-voice.d.ts +25 -0
- package/lib/browser/components/composer-voice.js +73 -0
- package/lib/browser/components/composer.d.ts +2 -2
- package/lib/browser/components/composer.js +38 -7
- package/lib/browser/components/context-menu.js +2 -1
- package/lib/browser/components/emoji-panel.d.ts +11 -7
- package/lib/browser/components/emoji-panel.js +40 -22
- package/lib/browser/components/extension-settings.js +1 -1
- package/lib/browser/components/folder-new.d.ts +19 -0
- package/lib/browser/components/folder-new.js +90 -0
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +17 -5
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/image-menu.d.ts +8 -3
- package/lib/browser/components/image-menu.js +34 -9
- package/lib/browser/components/markdown.js +9 -2
- package/lib/browser/components/media.js +3 -2
- package/lib/browser/components/message-list.js +2 -2
- package/lib/browser/components/message-steps.js +20 -11
- package/lib/browser/components/message-user.js +1 -1
- package/lib/browser/components/moved-notice.js +2 -1
- package/lib/browser/components/nav-places.d.ts +2 -0
- package/lib/browser/components/nav-places.js +4 -2
- package/lib/browser/components/phone-shell.d.ts +2 -0
- package/lib/browser/components/phone-shell.js +5 -1
- package/lib/browser/components/secret-text.d.ts +1 -1
- package/lib/browser/components/secret-text.js +4 -3
- package/lib/browser/components/session-view.js +3 -0
- package/lib/browser/components/settings-choices.d.ts +2 -1
- package/lib/browser/components/settings-choices.js +12 -4
- package/lib/browser/components/settings-more.js +2 -2
- package/lib/browser/components/settings-parts.js +11 -0
- package/lib/browser/components/share-item-sheet.js +7 -1
- package/lib/browser/components/tab-title.d.ts +28 -0
- package/lib/browser/components/tab-title.js +38 -0
- package/lib/browser/components/use-composer-attachments.d.ts +29 -0
- package/lib/browser/components/use-composer-attachments.js +101 -0
- package/lib/browser/components/use-composer-files.d.ts +26 -0
- package/lib/browser/components/use-composer-files.js +88 -0
- package/lib/browser/components/web-composer.d.ts +3 -1
- package/lib/browser/components/web-composer.js +3 -2
- package/lib/browser/components/workbench-view.js +1 -0
- package/lib/browser/components/working-directory.js +2 -1
- package/lib/browser/device/app-update.d.ts +6 -3
- package/lib/browser/device/app-update.js +11 -5
- package/lib/browser/device/drag-move.d.ts +22 -0
- package/lib/browser/device/drag-move.js +122 -0
- package/lib/browser/extension/icons.js +6 -0
- package/lib/browser/extension/web-api-desktop.d.ts +19 -0
- package/lib/browser/extension/web-api-menus.d.ts +19 -0
- package/lib/browser/extension/web-api-spec.js +2 -0
- package/lib/browser/extension/web-extension-api.d.ts +24 -23
- package/lib/browser/extension/web-extension-context.d.ts +1 -0
- package/lib/browser/extension/web-extension-context.js +12 -5
- package/lib/browser/extension/web-extension-run.js +1 -0
- package/lib/browser/extension/web-share-ui.d.ts +1 -1
- package/lib/browser/extension/web-share-ui.js +2 -0
- package/lib/browser/extension/web-share.d.ts +13 -0
- package/lib/browser/extension/web-share.js +37 -2
- package/lib/browser/i18n/en/account.d.ts +18 -0
- package/lib/browser/i18n/en/account.js +18 -0
- package/lib/browser/i18n/en/call.js +1 -1
- package/lib/browser/i18n/en/chat.d.ts +15 -0
- package/lib/browser/i18n/en/chat.js +16 -1
- package/lib/browser/i18n/en/common.d.ts +2 -0
- package/lib/browser/i18n/en/common.js +2 -0
- package/lib/browser/i18n/en/discover.d.ts +2 -0
- package/lib/browser/i18n/en/discover.js +2 -0
- package/lib/browser/i18n/en/service.d.ts +4 -0
- package/lib/browser/i18n/en/service.js +4 -0
- package/lib/browser/i18n/en/settings.d.ts +17 -0
- package/lib/browser/i18n/en/settings.js +17 -0
- package/lib/browser/i18n/ja/account.js +18 -0
- package/lib/browser/i18n/ja/call.js +1 -1
- package/lib/browser/i18n/ja/chat.js +16 -1
- package/lib/browser/i18n/ja/common.js +2 -0
- package/lib/browser/i18n/ja/discover.js +3 -1
- package/lib/browser/i18n/ja/service.js +4 -0
- package/lib/browser/i18n/ja/settings.js +17 -0
- package/lib/browser/i18n/locales.d.ts +59 -1
- package/lib/browser/i18n/messages.d.ts +58 -0
- package/lib/browser/i18n/zh/account.js +18 -0
- package/lib/browser/i18n/zh/call.js +1 -1
- package/lib/browser/i18n/zh/chat.js +16 -1
- package/lib/browser/i18n/zh/common.js +2 -0
- package/lib/browser/i18n/zh/discover.js +3 -1
- package/lib/browser/i18n/zh/service.js +4 -0
- package/lib/browser/i18n/zh/settings.js +17 -0
- package/lib/browser/i18n/zh-tw/account.js +18 -0
- package/lib/browser/i18n/zh-tw/call.js +1 -1
- package/lib/browser/i18n/zh-tw/chat.js +16 -1
- package/lib/browser/i18n/zh-tw/common.js +2 -0
- package/lib/browser/i18n/zh-tw/discover.js +3 -1
- package/lib/browser/i18n/zh-tw/service.js +4 -0
- package/lib/browser/i18n/zh-tw/settings.js +17 -0
- package/lib/browser/offline/kept-chats.d.ts +3 -1
- package/lib/browser/offline/kept-chats.js +1 -1
- package/lib/browser/partners/group-picker.d.ts +3 -2
- package/lib/browser/partners/group-picker.js +8 -3
- package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/lib/browser/sandbox/work/work-docs.js +5 -2
- package/lib/browser/sandbox/work/work-frame.d.ts +3 -0
- package/lib/browser/sandbox/work/work-frame.js +9 -3
- package/lib/browser/sandbox/work/work-gates.d.ts +78 -0
- package/lib/browser/sandbox/work/work-gates.js +185 -0
- package/lib/browser/settings/agent-settings.js +1 -1
- package/lib/browser/settings/navigation.d.ts +38 -10
- package/lib/browser/settings/navigation.js +74 -18
- package/lib/browser/settings/settings-protocol.d.ts +16 -1
- package/lib/browser/settings/settings-protocol.js +21 -3
- package/lib/browser/settings/settings.js +3 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +15 -2
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +6 -3
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation-column.js +28 -8
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +5 -0
- package/lib/browser/style/device.js +5 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +3 -3
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +13 -6
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +4 -2
- package/lib/browser/util/chat-emoji.d.ts +45 -0
- package/lib/browser/util/chat-emoji.js +272 -0
- package/lib/browser/util/composer-drop.d.ts +27 -0
- package/lib/browser/util/composer-drop.js +43 -0
- package/lib/browser/util/composer-files.d.ts +49 -0
- package/lib/browser/util/composer-files.js +102 -0
- package/lib/browser/util/composer.d.ts +13 -1
- package/lib/browser/util/composer.js +24 -6
- package/lib/browser/util/markdown.d.ts +5 -0
- package/lib/browser/util/markdown.js +18 -0
- package/lib/browser/util/message.d.ts +6 -1
- package/lib/browser/util/message.js +13 -2
- package/lib/browser/util/process.d.ts +10 -13
- package/lib/browser/util/process.js +32 -84
- package/lib/browser/util/turn-join.d.ts +39 -0
- package/lib/browser/util/turn-join.js +122 -0
- package/lib/browser/workbench-services.js +1 -1
- package/package.json +7 -7
- package/public/emoji/wechat-v1.webp +0 -0
|
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VoiceCall = void 0;
|
|
4
4
|
const turn_end_1 = require("../util/turn-end");
|
|
5
5
|
const voice_1 = require("../util/voice");
|
|
6
|
+
const call_announcing_1 = require("./call-announcing");
|
|
7
|
+
const call_answering_1 = require("./call-answering");
|
|
6
8
|
const call_conversing_1 = require("./call-conversing");
|
|
9
|
+
const call_hearing_1 = require("./call-hearing");
|
|
7
10
|
const call_partnering_1 = require("./call-partnering");
|
|
11
|
+
const call_pausing_1 = require("./call-pausing");
|
|
12
|
+
const call_reading_1 = require("./call-reading");
|
|
13
|
+
const call_revoicing_1 = require("./call-revoicing");
|
|
8
14
|
const call_turn_end_1 = require("./call-turn-end");
|
|
15
|
+
const call_turns_1 = require("./call-turns");
|
|
9
16
|
const voice_reading_1 = require("./voice-reading");
|
|
10
|
-
const voice_reopen_1 = require("./voice-reopen");
|
|
11
17
|
const IDLE = { active: false, phase: 'listening', heard: '' };
|
|
12
18
|
/**
|
|
13
19
|
* A call with a conversation (the double's, or any other), by the voice of the page: Ta listens until the user pauses, sends what they said, reads
|
|
@@ -23,17 +29,12 @@ class VoiceCall {
|
|
|
23
29
|
this.listeners = new Set();
|
|
24
30
|
/** Of the listen now: one that ended or was stopped for another says nothing more. */
|
|
25
31
|
this.round = 0;
|
|
26
|
-
this.silent = 0;
|
|
27
|
-
/** When someone last spoke (the user, or Ta): the silence that ends the call counts from it. */
|
|
28
|
-
this.spoke = 0;
|
|
29
32
|
/** Of the call now: a voice opened for a call hung up is let go. */
|
|
30
33
|
this.calls = 0;
|
|
31
34
|
/** Its voice service is opening: an answer that comes meanwhile waits for it (`waiting`, '' for none). */
|
|
32
35
|
this.opening = false;
|
|
33
36
|
/** The answer begun on what the user said so far (CallPartner.draft). */
|
|
34
37
|
this.drafts = new call_conversing_1.CallDrafts();
|
|
35
|
-
/** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
|
|
36
|
-
this.announcements = [];
|
|
37
38
|
/** For the face of the call (CallSounds): Ta's voice, whichever the call has (it opens after the call shows). */
|
|
38
39
|
this.sounds = new voice_reading_1.CallSounds(() => this.voice);
|
|
39
40
|
this.level = this.sounds.level;
|
|
@@ -60,6 +61,124 @@ class VoiceCall {
|
|
|
60
61
|
end: reason => this.end(reason),
|
|
61
62
|
lost: () => this.revoice(),
|
|
62
63
|
}, options.silentMs);
|
|
64
|
+
this.turns = new call_turns_1.CallTurns({
|
|
65
|
+
get state() {
|
|
66
|
+
return call.state;
|
|
67
|
+
},
|
|
68
|
+
get partnered() {
|
|
69
|
+
return !!call.partners.partner;
|
|
70
|
+
},
|
|
71
|
+
turnEnded: reply => this.turnEnded(reply),
|
|
72
|
+
});
|
|
73
|
+
this.pausing = new call_pausing_1.CallPausing({
|
|
74
|
+
get state() {
|
|
75
|
+
return call.state;
|
|
76
|
+
},
|
|
77
|
+
get voice() {
|
|
78
|
+
return call.voice;
|
|
79
|
+
},
|
|
80
|
+
get opening() {
|
|
81
|
+
return call.opening;
|
|
82
|
+
},
|
|
83
|
+
get pending() {
|
|
84
|
+
return call.pending;
|
|
85
|
+
},
|
|
86
|
+
setPending: pending => {
|
|
87
|
+
call.pending = pending;
|
|
88
|
+
},
|
|
89
|
+
get speaking() {
|
|
90
|
+
return call.speaking;
|
|
91
|
+
},
|
|
92
|
+
set: change => call.set(change),
|
|
93
|
+
stopListening: () => call.stopListening(),
|
|
94
|
+
listen: announce => call.listen(announce),
|
|
95
|
+
read: text => call.read(text),
|
|
96
|
+
dropDrafts: () => call.drafts.drop(),
|
|
97
|
+
conversingResumed: () => call.conversing.resumed(),
|
|
98
|
+
interrupt: () => call.interrupt(),
|
|
99
|
+
});
|
|
100
|
+
this.answering = options.answer
|
|
101
|
+
? new call_answering_1.CallAnswering({
|
|
102
|
+
get state() {
|
|
103
|
+
return call.state;
|
|
104
|
+
},
|
|
105
|
+
answer: said => options.answer(said),
|
|
106
|
+
round: () => call.round,
|
|
107
|
+
waiting: () => call.turns.waiting,
|
|
108
|
+
set: change => call.set(change),
|
|
109
|
+
over: () => call.over(),
|
|
110
|
+
send: said => call.send(said),
|
|
111
|
+
unsent: () => call.unsent(),
|
|
112
|
+
})
|
|
113
|
+
: undefined;
|
|
114
|
+
this.revoicing = new call_revoicing_1.CallRevoicing({
|
|
115
|
+
get state() {
|
|
116
|
+
return call.state;
|
|
117
|
+
},
|
|
118
|
+
calls: () => call.calls,
|
|
119
|
+
thought: () => { var _a; return !!((_a = call.partners.partner) === null || _a === void 0 ? void 0 : _a.brain); },
|
|
120
|
+
setOpening: opening => {
|
|
121
|
+
call.opening = opening;
|
|
122
|
+
},
|
|
123
|
+
set: change => call.set(change),
|
|
124
|
+
takeVoice: (voice, partner) => {
|
|
125
|
+
if (partner) {
|
|
126
|
+
call.partners.adopt(partner);
|
|
127
|
+
}
|
|
128
|
+
call.takeVoice(voice);
|
|
129
|
+
},
|
|
130
|
+
voiced: () => call.voiced(),
|
|
131
|
+
options: () => options,
|
|
132
|
+
failed: error => call.end('failed', error instanceof Error ? error.message : String(error)),
|
|
133
|
+
});
|
|
134
|
+
this.announcing = new call_announcing_1.CallAnnouncing({
|
|
135
|
+
get state() {
|
|
136
|
+
return call.state;
|
|
137
|
+
},
|
|
138
|
+
get voice() {
|
|
139
|
+
return call.voice;
|
|
140
|
+
},
|
|
141
|
+
get opening() {
|
|
142
|
+
return call.opening;
|
|
143
|
+
},
|
|
144
|
+
listen: () => call.listen(),
|
|
145
|
+
});
|
|
146
|
+
this.reading = new call_reading_1.CallReading({
|
|
147
|
+
get state() {
|
|
148
|
+
return call.state;
|
|
149
|
+
},
|
|
150
|
+
get voice() {
|
|
151
|
+
return call.voice;
|
|
152
|
+
},
|
|
153
|
+
options: () => options,
|
|
154
|
+
set: change => call.set(change),
|
|
155
|
+
round: () => call.round,
|
|
156
|
+
nextRound: () => ++call.round,
|
|
157
|
+
ending: () => { var _a, _b; return !!((_b = (_a = call.partners.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)); },
|
|
158
|
+
hangUp: () => call.hangUp(),
|
|
159
|
+
listen: () => call.listen(),
|
|
160
|
+
});
|
|
161
|
+
this.hearing = new call_hearing_1.CallHearing({
|
|
162
|
+
get state() {
|
|
163
|
+
return call.state;
|
|
164
|
+
},
|
|
165
|
+
get thinks() {
|
|
166
|
+
return !!call.voice.thinks;
|
|
167
|
+
},
|
|
168
|
+
get turnEnd() {
|
|
169
|
+
return call.turnEnd;
|
|
170
|
+
},
|
|
171
|
+
silentMs: () => { var _a; return (_a = options.silentMs) !== null && _a !== void 0 ? _a : call_turn_end_1.SILENT_MS; },
|
|
172
|
+
get listening() {
|
|
173
|
+
return !!call.listening;
|
|
174
|
+
},
|
|
175
|
+
stopListening: () => call.stopListening(),
|
|
176
|
+
listen: (announce, held) => call.listen(announce, held),
|
|
177
|
+
take: said => call.take(said),
|
|
178
|
+
waits: said => call.turnEnd.waits(said),
|
|
179
|
+
set: change => call.set(change),
|
|
180
|
+
end: reason => call.end(reason),
|
|
181
|
+
});
|
|
63
182
|
this.turnEnd = new call_turn_end_1.CallTurnEnd(options, () => this.quiet(), text => this.suspect(text));
|
|
64
183
|
}
|
|
65
184
|
subscribe(listener) {
|
|
@@ -74,9 +193,8 @@ class VoiceCall {
|
|
|
74
193
|
if (this.state.active)
|
|
75
194
|
return;
|
|
76
195
|
this.device.hush();
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
79
|
-
const call = ++this.calls;
|
|
196
|
+
this.hearing.spokeNow();
|
|
197
|
+
this.calls++;
|
|
80
198
|
const opening = this.open(direct);
|
|
81
199
|
// Said as they called: the turn is at work already, its answer is read once the voice is there.
|
|
82
200
|
this.set({
|
|
@@ -92,6 +210,11 @@ class VoiceCall {
|
|
|
92
210
|
return;
|
|
93
211
|
}
|
|
94
212
|
this.opening = true;
|
|
213
|
+
this.opened(opening);
|
|
214
|
+
}
|
|
215
|
+
/** Its voice service and partner are there, or none is: the call hears it, or says why it failed. */
|
|
216
|
+
opened(opening) {
|
|
217
|
+
const call = this.calls;
|
|
95
218
|
opening.then(([voice, partner]) => {
|
|
96
219
|
var _a;
|
|
97
220
|
if (!this.state.active || call !== this.calls) {
|
|
@@ -103,9 +226,9 @@ class VoiceCall {
|
|
|
103
226
|
this.partners.adopt(partner);
|
|
104
227
|
// Said as they called, to the conversation: the partner answers it, not the turn; a voice that thinks
|
|
105
228
|
// begins afresh.
|
|
106
|
-
if (partner &&
|
|
229
|
+
if (partner && this.state.heard && this.state.phase === 'thinking' && !(voice === null || voice === void 0 ? void 0 : voice.thinks)) {
|
|
107
230
|
this.waiting = undefined;
|
|
108
|
-
this.partners.ask(
|
|
231
|
+
this.partners.ask(this.state.heard, true);
|
|
109
232
|
}
|
|
110
233
|
if (voice) {
|
|
111
234
|
this.takeVoice(voice);
|
|
@@ -151,173 +274,72 @@ class VoiceCall {
|
|
|
151
274
|
}
|
|
152
275
|
/**
|
|
153
276
|
* Its voice service is gone (ta serve restarted, the connection dropped): the call says it connects, and opens it
|
|
154
|
-
* again as the connection comes back (
|
|
277
|
+
* again as the connection comes back (CallRevoicing); a service no longer chosen gives the voice of the device.
|
|
155
278
|
*/
|
|
156
279
|
revoice() {
|
|
157
280
|
var _a, _b, _c, _d;
|
|
158
|
-
const call = this.calls;
|
|
159
|
-
// A voice that thought had the brain of the partner: both open again.
|
|
160
|
-
const thought = !!((_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.brain);
|
|
161
281
|
this.conversing.stop();
|
|
162
|
-
(
|
|
282
|
+
(_a = this.offSpeech) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
163
283
|
this.offSpeech = undefined;
|
|
164
|
-
(
|
|
284
|
+
(_c = (_b = this.voice).stop) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
165
285
|
this.voice = this.device;
|
|
166
|
-
if (
|
|
286
|
+
if ((_d = this.partners.partner) === null || _d === void 0 ? void 0 : _d.brain) {
|
|
167
287
|
this.partners.close();
|
|
168
288
|
}
|
|
169
|
-
this.
|
|
170
|
-
this.set({ phase: 'connecting', heard: '', bargeIn: false });
|
|
171
|
-
let partner;
|
|
172
|
-
this.reopening = new voice_reopen_1.VoiceReopen(async () => {
|
|
173
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
174
|
-
var _h;
|
|
175
|
-
if (!thought) {
|
|
176
|
-
return (_b = (_a = this.options).openVoice) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
177
|
-
}
|
|
178
|
-
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
179
|
-
const opening = (_h = (_e = (_d = (_c = this.options).openPartner) === null || _d === void 0 ? void 0 : _d.call(_c)) === null || _e === void 0 ? void 0 : _e.catch(() => undefined)) !== null && _h !== void 0 ? _h : Promise.resolve(undefined);
|
|
180
|
-
const voice = await ((_g = (_f = this.options).openVoice) === null || _g === void 0 ? void 0 : _g.call(_f, opening));
|
|
181
|
-
partner = await opening;
|
|
182
|
-
return voice;
|
|
183
|
-
});
|
|
184
|
-
this.reopening.run().then(voice => {
|
|
185
|
-
var _a;
|
|
186
|
-
if (call !== this.calls || !this.state.active) {
|
|
187
|
-
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
188
|
-
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
this.opening = false;
|
|
192
|
-
if (thought) {
|
|
193
|
-
this.partners.adopt(partner);
|
|
194
|
-
}
|
|
195
|
-
if (voice) {
|
|
196
|
-
this.takeVoice(voice);
|
|
197
|
-
}
|
|
198
|
-
this.voiced();
|
|
199
|
-
}, (error) => call === this.calls && this.state.active && this.end('failed', error instanceof Error ? error.message : String(error)));
|
|
289
|
+
this.revoicing.run();
|
|
200
290
|
}
|
|
201
291
|
hangUp() {
|
|
202
|
-
var _a, _b, _c
|
|
292
|
+
var _a, _b, _c;
|
|
203
293
|
if (!this.state.active)
|
|
204
294
|
return;
|
|
205
295
|
this.drafts.drop();
|
|
206
296
|
this.conversing.stop();
|
|
207
297
|
this.partners.close();
|
|
208
298
|
this.calls++;
|
|
209
|
-
|
|
210
|
-
this.reopening = undefined;
|
|
299
|
+
this.revoicing.cancel();
|
|
211
300
|
this.opening = false;
|
|
212
301
|
this.waiting = undefined;
|
|
213
302
|
this.stopListening();
|
|
214
303
|
this.voice.hush();
|
|
215
|
-
(
|
|
304
|
+
(_a = this.offSpeech) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
216
305
|
this.offSpeech = undefined;
|
|
217
|
-
(
|
|
306
|
+
(_c = (_b = this.voice).stop) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
218
307
|
this.voice = this.device;
|
|
219
308
|
this.pending = undefined;
|
|
220
|
-
this.
|
|
309
|
+
this.announcing.clear();
|
|
221
310
|
this.set(IDLE);
|
|
222
311
|
}
|
|
223
|
-
/**
|
|
224
|
-
* Says something the user did not ask for, which they should hear in a call (Ta waits for them, a task ended):
|
|
225
|
-
* at once while Ta listens and the user has said nothing yet, else once what goes on now is over; never over
|
|
226
|
-
* the user, nor over an answer.
|
|
227
|
-
*/
|
|
312
|
+
/** What the user did not ask for, said in a silence (CallAnnouncing). */
|
|
228
313
|
announce(text) {
|
|
229
|
-
|
|
230
|
-
// A voice that thinks is told the news of the work by Ta itself (TaVoiceEngine.tell).
|
|
231
|
-
if (!this.state.active || !said || this.voice.thinks)
|
|
232
|
-
return;
|
|
233
|
-
this.announcements.push(said);
|
|
234
|
-
if (!this.state.paused && !this.opening && this.state.phase === 'listening' && !this.state.heard.trim()) {
|
|
235
|
-
this.listen();
|
|
236
|
-
}
|
|
314
|
+
this.announcing.announce(text);
|
|
237
315
|
}
|
|
238
316
|
/** The user began to speak while Ta reads: it stops and listens to them. */
|
|
239
317
|
bargeIn() {
|
|
240
|
-
|
|
241
|
-
this.interrupt();
|
|
242
|
-
}
|
|
318
|
+
this.pausing.bargeIn();
|
|
243
319
|
}
|
|
244
|
-
/**
|
|
245
|
-
* The page went to the background, where the device stops its listening and reading: the call stops them itself
|
|
246
|
-
* and waits, rather than look as if it listened. What was being said is said again on resume.
|
|
247
|
-
*/
|
|
320
|
+
/** The page went to the background: the call waits, rather than look as if it listened (CallPausing). */
|
|
248
321
|
pause() {
|
|
249
|
-
|
|
250
|
-
if (!this.state.active || this.state.paused) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (this.voice.thinks) {
|
|
254
|
-
(_b = (_a = this.voice).mute) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
255
|
-
this.voice.hush();
|
|
256
|
-
this.set({ paused: true, phase: 'listening', heard: '' });
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
this.stopListening();
|
|
260
|
-
this.drafts.drop();
|
|
261
|
-
if (this.state.phase === 'speaking') {
|
|
262
|
-
this.voice.hush();
|
|
263
|
-
this.pending = this.speaking;
|
|
264
|
-
}
|
|
265
|
-
this.set({ paused: true, heard: this.state.phase === 'thinking' ? this.state.heard : '' });
|
|
322
|
+
this.pausing.pause();
|
|
266
323
|
}
|
|
267
324
|
/** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
|
|
268
325
|
resume() {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
this.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
this.
|
|
282
|
-
if (pending) {
|
|
283
|
-
this.read(pending);
|
|
284
|
-
}
|
|
285
|
-
else if (this.state.phase !== 'thinking' && this.state.phase !== 'connecting') {
|
|
286
|
-
this.listen();
|
|
287
|
-
}
|
|
326
|
+
this.pausing.resume();
|
|
327
|
+
}
|
|
328
|
+
/** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
|
|
329
|
+
over() {
|
|
330
|
+
this.reading.over();
|
|
331
|
+
}
|
|
332
|
+
/** What is being read now, to read again after a pause. */
|
|
333
|
+
get speaking() {
|
|
334
|
+
return this.reading.now;
|
|
335
|
+
}
|
|
336
|
+
/** A call says \`said\` aloud, then listens. */
|
|
337
|
+
read(said) {
|
|
338
|
+
this.reading.read(said);
|
|
288
339
|
}
|
|
289
340
|
/** While Ta speaks (an answer, or news it tells by itself): it stops and listens to the user, before any more news. */
|
|
290
341
|
interrupt() {
|
|
291
|
-
|
|
292
|
-
this.voice.hush();
|
|
293
|
-
if (this.voice.thinks) {
|
|
294
|
-
this.set({ phase: 'listening', heard: '' });
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
this.listen(false);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* How the conversation is, as it changes: a run that started after what the user said is the call's turn, and
|
|
303
|
-
* once it settles its reply is read. A run already going when the call asked (a follow-up) is its turn too.
|
|
304
|
-
*/
|
|
305
|
-
turn(working, reply) {
|
|
306
|
-
var _a;
|
|
307
|
-
// A partner answers in this call: the turns of the conversation are its work, not the call's.
|
|
308
|
-
if (!this.state.active || this.state.phase !== 'thinking' || this.partners.partner) {
|
|
309
|
-
this.asked = undefined;
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
if (working) {
|
|
313
|
-
(_a = this.asked) !== null && _a !== void 0 ? _a : (this.asked = { before: reply === null || reply === void 0 ? void 0 : reply.index });
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
if (this.asked) {
|
|
317
|
-
const fresh = reply && reply.index !== this.asked.before ? reply.text : undefined;
|
|
318
|
-
this.asked = undefined;
|
|
319
|
-
this.turnEnded(fresh);
|
|
320
|
-
}
|
|
342
|
+
this.pausing.interrupt();
|
|
321
343
|
}
|
|
322
344
|
/**
|
|
323
345
|
* The conversation's turn settled: its answer, if a new one came, is read out, and Ta listens again. Only for a turn
|
|
@@ -344,27 +366,6 @@ class VoiceCall {
|
|
|
344
366
|
}
|
|
345
367
|
this.read(said);
|
|
346
368
|
}
|
|
347
|
-
/** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
|
|
348
|
-
over() {
|
|
349
|
-
var _a, _b;
|
|
350
|
-
if ((_b = (_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)) {
|
|
351
|
-
this.hangUp();
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
this.listen();
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
read(said) {
|
|
358
|
-
const round = ++this.round;
|
|
359
|
-
this.speaking = said;
|
|
360
|
-
this.spoke = Date.now();
|
|
361
|
-
this.set({ phase: 'speaking', heard: '', reading: undefined });
|
|
362
|
-
this.voice.speak(said, this.options.language(), () => {
|
|
363
|
-
if (this.state.active && round === this.round) {
|
|
364
|
-
this.over();
|
|
365
|
-
}
|
|
366
|
-
}, this.options.voice(), (pieces, at) => this.state.active && round === this.round && this.set({ reading: { pieces, at } }));
|
|
367
|
-
}
|
|
368
369
|
/**
|
|
369
370
|
* Listens; first says what waits to be said, unless the user just cut in to speak (`announce` false). `held`: sounds
|
|
370
371
|
* alone a listen ended on, which what is heard now follows, gone or sent once it waited FILLER_MS for words.
|
|
@@ -379,7 +380,7 @@ class VoiceCall {
|
|
|
379
380
|
if (this.state.paused) {
|
|
380
381
|
return;
|
|
381
382
|
}
|
|
382
|
-
const announcement =
|
|
383
|
+
const announcement = this.announcing.next(announce);
|
|
383
384
|
if (announcement) {
|
|
384
385
|
this.read(announcement);
|
|
385
386
|
return;
|
|
@@ -424,71 +425,39 @@ class VoiceCall {
|
|
|
424
425
|
}
|
|
425
426
|
/** The user says they are done (the mark of the bar tapped): what was heard goes now as it is, sounds alone too. */
|
|
426
427
|
endTurn() {
|
|
427
|
-
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
const said = this.listened();
|
|
431
|
-
if (said) {
|
|
432
|
-
this.stopListening();
|
|
433
|
-
this.take(said);
|
|
434
|
-
}
|
|
428
|
+
this.hearing.endTurn();
|
|
435
429
|
}
|
|
436
|
-
/** The words heard stayed the same a while
|
|
430
|
+
/** The words heard stayed the same a while: the user is done (CallHearing). */
|
|
437
431
|
quiet() {
|
|
438
|
-
|
|
439
|
-
if (said) {
|
|
440
|
-
this.stopListening();
|
|
441
|
-
this.heard(said, undefined, true);
|
|
442
|
-
}
|
|
432
|
+
this.hearing.quiet();
|
|
443
433
|
}
|
|
444
|
-
/** What was heard of a listen going on
|
|
434
|
+
/** What was heard of a listen going on (CallHearing). */
|
|
445
435
|
listened() {
|
|
446
|
-
|
|
447
|
-
|
|
436
|
+
return this.hearing.listened();
|
|
437
|
+
}
|
|
438
|
+
/** A listen ended (CallHearing). */
|
|
439
|
+
heard(said, error, waited = false) {
|
|
440
|
+
this.hearing.heard(said, error, waited);
|
|
448
441
|
}
|
|
449
442
|
/**
|
|
450
|
-
*
|
|
451
|
-
* the
|
|
443
|
+
* What the user said goes to the partner, or to the conversation; words that answer the question it waits on answer
|
|
444
|
+
* it, and the work goes on from there (CallAnswering).
|
|
452
445
|
*/
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
if (
|
|
456
|
-
this.
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
if (said && !waited && this.turnEnd.waits(said)) {
|
|
460
|
-
if (error) {
|
|
461
|
-
this.retry = setTimeout(() => this.state.active && this.state.phase === 'listening' && this.listen(false, said), call_turn_end_1.RETRY_MS);
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
this.listen(false, said);
|
|
465
|
-
}
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
if (said && turn_end_1.TurnEnd.sounds(said) === 'hesitation') {
|
|
469
|
-
said = '';
|
|
470
|
-
this.set({ heard: '' });
|
|
471
|
-
}
|
|
472
|
-
if (said) {
|
|
473
|
-
this.take(said);
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
if (++this.silent >= call_turn_end_1.SILENT_ROUNDS && Date.now() - this.spoke >= ((_a = this.options.silentMs) !== null && _a !== void 0 ? _a : call_turn_end_1.SILENT_MS)) {
|
|
477
|
-
this.end('silent');
|
|
446
|
+
take(said) {
|
|
447
|
+
this.hearing.heardWords();
|
|
448
|
+
if (this.answering && !this.partners.partner) {
|
|
449
|
+
this.answering.take(said);
|
|
478
450
|
return;
|
|
479
451
|
}
|
|
480
|
-
|
|
481
|
-
this.retry = setTimeout(() => this.state.active && this.state.phase === 'listening' && this.listen(), call_turn_end_1.RETRY_MS);
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
this.listen();
|
|
485
|
-
}
|
|
452
|
+
this.thinking(said);
|
|
486
453
|
}
|
|
487
|
-
/** What the user said goes to the
|
|
488
|
-
|
|
489
|
-
this.silent = 0;
|
|
490
|
-
this.spoke = Date.now();
|
|
454
|
+
/** What the user said goes to the conversation: it thinks of it, and its reply is read as any turn. */
|
|
455
|
+
thinking(said) {
|
|
491
456
|
this.set({ phase: 'thinking', heard: said, said, reading: undefined });
|
|
457
|
+
this.send(said);
|
|
458
|
+
}
|
|
459
|
+
/** What the user said goes to the partner, or to the conversation. */
|
|
460
|
+
send(said) {
|
|
492
461
|
const draft = this.drafts.take(said);
|
|
493
462
|
if (this.partners.partner && draft) {
|
|
494
463
|
this.partners.kept(draft, said);
|
|
@@ -529,8 +498,13 @@ class VoiceCall {
|
|
|
529
498
|
this.hangUp();
|
|
530
499
|
(_b = (_a = this.options).ended) === null || _b === void 0 ? void 0 : _b.call(_a, reason, detail);
|
|
531
500
|
}
|
|
501
|
+
turn(working, reply) {
|
|
502
|
+
this.turns.turn(working, reply);
|
|
503
|
+
}
|
|
532
504
|
stopListening() {
|
|
533
|
-
|
|
505
|
+
var _a;
|
|
506
|
+
this.hearing.stop();
|
|
507
|
+
(_a = this.answering) === null || _a === void 0 ? void 0 : _a.stop();
|
|
534
508
|
this.turnEnd.stop();
|
|
535
509
|
this.round++;
|
|
536
510
|
const listening = this.listening;
|
|
@@ -102,6 +102,7 @@ function DraftView({ draft, menu, aboveComposer, belowComposer }) {
|
|
|
102
102
|
const fail = (cause) => notices.error(cause);
|
|
103
103
|
const submit = (message, images) => chat.submit(message, images);
|
|
104
104
|
const list = React.useCallback((directory) => workbench.workspace.listDirectory('.', directory), [workbench]);
|
|
105
|
+
const create = React.useCallback((directory, name) => workbench.workspace.createDirectory(name, directory), [workbench]);
|
|
105
106
|
const pickModel = React.useCallback((model) => chat.setDraftModel(model), [chat]);
|
|
106
107
|
const model = (0, draft_model_1.useDraftModel)(workbench.settings, draft, pickModel, t);
|
|
107
108
|
const commands = (0, directory_commands_1.useDirectoryCommands)(workbench.server, draft.cwd || undefined);
|
|
@@ -132,7 +133,7 @@ function DraftView({ draft, menu, aboveComposer, belowComposer }) {
|
|
|
132
133
|
React.createElement("div", { className: "ta-thread" }, sent ? React.createElement(message_list_1.MessageList, { state: sent, outbox: outbox }) : React.createElement(Hero, { cwd: draft.cwd, onPick: text => void submit(text).catch(fail) }))),
|
|
133
134
|
React.createElement("div", { className: "ta-bottom" },
|
|
134
135
|
aboveComposer,
|
|
135
|
-
React.createElement(composer_1.Composer, { above: React.createElement(phone_hint_1.PhoneHint, null), server: workbench.server, workspace: workbench.workspace, working: going, onStop: () => chat.stopDraft(), commands: commands, cwd: draft.cwd || undefined, onSubmit: submit, onError: fail, talkPlace: "draft", draft: drafts_protocol_1.DraftPlaces.NEW, recentShots: recentShots, actions: model ? [[model]] : undefined, head: going ? undefined : React.createElement(folder_picker_1.DirectoryButton, { cwd: draft.cwd, list: list, remote: workbench, onPick: cwd => chat.setDraftCwd(cwd) }) }),
|
|
136
|
+
React.createElement(composer_1.Composer, { above: React.createElement(phone_hint_1.PhoneHint, null), server: workbench.server, workspace: workbench.workspace, working: going, onStop: () => chat.stopDraft(), commands: commands, cwd: draft.cwd || undefined, onSubmit: submit, onError: fail, talkPlace: "draft", draft: drafts_protocol_1.DraftPlaces.NEW, recentShots: recentShots, actions: model ? [[model]] : undefined, head: going ? undefined : (React.createElement(folder_picker_1.DirectoryButton, { cwd: draft.cwd, list: list, create: create, remote: workbench, onPick: cwd => chat.setDraftCwd(cwd) })) }),
|
|
136
137
|
belowComposer)));
|
|
137
138
|
}
|
|
138
139
|
/** A conversation picked that is still loading, laid out as it will be: its head, a spinner, a message box that waits. */
|
|
@@ -123,7 +123,7 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
123
123
|
entry('restart', t('ta.update.restartTo', { version: serve_restart_1.ServeRestartUtil.label(update) }), lucide_react_1.RotateCw, () => void restartTa.restart(), { action: true });
|
|
124
124
|
}
|
|
125
125
|
if (appUpdate) {
|
|
126
|
-
entry('appUpdate', t('ta.appUpdate.installTo', { version: appUpdate.version }), lucide_react_1.Download, () => app_update_1.AppUpdate.install(), { action: true });
|
|
126
|
+
entry('appUpdate', t(appUpdate.back ? 'ta.appUpdate.backTo' : 'ta.appUpdate.installTo', { version: appUpdate.version }), lucide_react_1.Download, () => app_update_1.AppUpdate.install(), { action: true });
|
|
127
127
|
}
|
|
128
128
|
entry('install', t('ta.pwa.install'), lucide_react_1.Download, () => void pwa.install(), { action: true });
|
|
129
129
|
// As WeChat's: the account in use kept, with its computers, to come back to in one tap (docs/design/ta-me.md 4).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TaAccountInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { Act } from './account-view';
|
|
4
|
+
/**
|
|
5
|
+
* The recovery code of the account (docs/design/ta-account.md 10): made here and written down, or made on another
|
|
6
|
+
* computer, or given on a new one to bring the friends and group chats back. A computer's alone: the app has none.
|
|
7
|
+
*/
|
|
8
|
+
export declare function RecoveryPart({ info, act }: {
|
|
9
|
+
info: TaAccountInfo;
|
|
10
|
+
act: Act;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=account-recovery-view.d.ts.map
|