@celljs/ta-web 4.15.2 → 4.17.0
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/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VoiceCall = exports.TURN_MS = exports.END_MS = exports.SILENT_ROUNDS = void 0;
|
|
4
|
+
const voice_1 = require("../util/voice");
|
|
5
|
+
/** Listens heard nothing this many times in a row: nobody is there, the call ends. */
|
|
6
|
+
exports.SILENT_ROUNDS = 4;
|
|
7
|
+
/**
|
|
8
|
+
* The words heard stay the same this long: the user is done, though the recognizer goes on (it hears voices around them
|
|
9
|
+
* and waits for a silence that never comes).
|
|
10
|
+
*/
|
|
11
|
+
exports.END_MS = 1300;
|
|
12
|
+
/** At most this long a turn, from the first words: talk around the user that keeps the words coming ends there too. */
|
|
13
|
+
exports.TURN_MS = 15000;
|
|
14
|
+
/** After a failure of the recognizer (not a denial), before it listens again. */
|
|
15
|
+
const RETRY_MS = 600;
|
|
16
|
+
const IDLE = { active: false, phase: 'listening', heard: '' };
|
|
17
|
+
/**
|
|
18
|
+
* 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
|
|
19
|
+
* its answer out, then listens again, until the user hangs up or says nothing for a while. With the voice of the device
|
|
20
|
+
* one speaks at a time: Ta does not listen while it speaks (the user interrupts with a tap), so it never hears itself.
|
|
21
|
+
* A voice service hears the user begin to speak while Ta reads, and the call stops reading for them (onSpeech).
|
|
22
|
+
*/
|
|
23
|
+
class VoiceCall {
|
|
24
|
+
constructor(options, device = voice_1.Voice) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
this.device = device;
|
|
27
|
+
this.state = IDLE;
|
|
28
|
+
this.listeners = new Set();
|
|
29
|
+
/** Of the listen now: one that ended or was stopped for another says nothing more. */
|
|
30
|
+
this.round = 0;
|
|
31
|
+
this.silent = 0;
|
|
32
|
+
/** Of the call now: a voice opened for a call hung up is let go. */
|
|
33
|
+
this.calls = 0;
|
|
34
|
+
/** Its voice service is opening: an answer that comes meanwhile waits for it (`waiting`, '' for none). */
|
|
35
|
+
this.opening = false;
|
|
36
|
+
/** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
|
|
37
|
+
this.announcements = [];
|
|
38
|
+
this.voice = device;
|
|
39
|
+
}
|
|
40
|
+
subscribe(listener) {
|
|
41
|
+
this.listeners.add(listener);
|
|
42
|
+
return () => this.listeners.delete(listener);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Begins the call: Ta listens. With what the user said as they called (let go over 通话 of a talk), already being
|
|
46
|
+
* sent by the box, Ta waits for its turn and reads the answer instead; should the sending fail, it listens.
|
|
47
|
+
* `direct`: the conversation's voice kept on (let go over 持续说), the conversation answering, no partner.
|
|
48
|
+
*/
|
|
49
|
+
start(said, { direct = false } = {}) {
|
|
50
|
+
if (this.state.active) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.device.hush();
|
|
54
|
+
this.silent = 0;
|
|
55
|
+
const call = ++this.calls;
|
|
56
|
+
const opening = this.open(direct);
|
|
57
|
+
// Said as they called: the turn is at work already, its answer is read once the voice is there.
|
|
58
|
+
this.set(said ? { active: true, phase: 'thinking', heard: said.text, said: said.text } : { active: true, phase: opening ? 'connecting' : 'listening' });
|
|
59
|
+
said === null || said === void 0 ? void 0 : said.sent.catch(() => this.state.active && this.state.phase === 'thinking' && this.unsent());
|
|
60
|
+
if (!opening) {
|
|
61
|
+
if (!said) {
|
|
62
|
+
this.listen();
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.opening = true;
|
|
67
|
+
opening.then(([voice, partner]) => {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
if (!this.state.active || call !== this.calls) {
|
|
70
|
+
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
71
|
+
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.opening = false;
|
|
75
|
+
this.partner = partner;
|
|
76
|
+
// What the partner says by itself is said as news is: in a silence, and cut into as any answer.
|
|
77
|
+
(_b = partner === null || partner === void 0 ? void 0 : partner.news) === null || _b === void 0 ? void 0 : _b.call(partner, text => call === this.calls && this.announce(text));
|
|
78
|
+
if (partner) {
|
|
79
|
+
this.set({ partnered: true });
|
|
80
|
+
}
|
|
81
|
+
if (partner && said && this.state.phase === 'thinking') {
|
|
82
|
+
// Said as they called, to the conversation: the partner answers it, not the turn.
|
|
83
|
+
this.waiting = undefined;
|
|
84
|
+
this.ask(said.text, true);
|
|
85
|
+
}
|
|
86
|
+
if (voice) {
|
|
87
|
+
this.voice = voice;
|
|
88
|
+
this.offSpeech = (_c = voice.onSpeech) === null || _c === void 0 ? void 0 : _c.call(voice, () => this.bargeIn());
|
|
89
|
+
this.set({ bargeIn: !!voice.onSpeech });
|
|
90
|
+
}
|
|
91
|
+
const waiting = this.waiting;
|
|
92
|
+
this.waiting = undefined;
|
|
93
|
+
if (waiting !== undefined) {
|
|
94
|
+
this.turnEnded(waiting || undefined);
|
|
95
|
+
}
|
|
96
|
+
else if (this.state.paused) {
|
|
97
|
+
if (this.state.phase === 'connecting') {
|
|
98
|
+
this.set({ phase: 'listening' });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (this.state.phase !== 'thinking') {
|
|
102
|
+
this.listen();
|
|
103
|
+
}
|
|
104
|
+
}, (error) => {
|
|
105
|
+
if (this.state.active && call === this.calls) {
|
|
106
|
+
this.end('failed', error instanceof Error ? error.message : String(error));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
hangUp() {
|
|
111
|
+
var _a, _b, _c, _d;
|
|
112
|
+
if (!this.state.active) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
(_a = this.partner) === null || _a === void 0 ? void 0 : _a.close();
|
|
116
|
+
this.partner = undefined;
|
|
117
|
+
this.calls++;
|
|
118
|
+
this.opening = false;
|
|
119
|
+
this.waiting = undefined;
|
|
120
|
+
this.stopListening();
|
|
121
|
+
this.voice.hush();
|
|
122
|
+
(_b = this.offSpeech) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
123
|
+
this.offSpeech = undefined;
|
|
124
|
+
(_d = (_c = this.voice).stop) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
125
|
+
this.voice = this.device;
|
|
126
|
+
this.pending = undefined;
|
|
127
|
+
this.announcements = [];
|
|
128
|
+
this.set(IDLE);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Says something the user did not ask for, which they should hear in a call (Ta waits for them, a task ended):
|
|
132
|
+
* at once while Ta listens and the user has said nothing yet, else once what goes on now is over; never over
|
|
133
|
+
* the user, nor over an answer.
|
|
134
|
+
*/
|
|
135
|
+
announce(text) {
|
|
136
|
+
const said = text.trim();
|
|
137
|
+
if (!this.state.active || !said) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this.announcements.push(said);
|
|
141
|
+
if (!this.state.paused && !this.opening && this.state.phase === 'listening' && !this.state.heard.trim()) {
|
|
142
|
+
this.listen();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/** The user began to speak while Ta reads: it stops and listens to them. */
|
|
146
|
+
bargeIn() {
|
|
147
|
+
if (this.state.active && !this.state.paused && this.state.phase === 'speaking') {
|
|
148
|
+
this.interrupt();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The page went to the background, where the device stops its listening and reading: the call stops them itself
|
|
153
|
+
* and waits, rather than look as if it listened. What was being said is said again on resume.
|
|
154
|
+
*/
|
|
155
|
+
pause() {
|
|
156
|
+
if (!this.state.active || this.state.paused) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.stopListening();
|
|
160
|
+
if (this.state.phase === 'speaking') {
|
|
161
|
+
this.voice.hush();
|
|
162
|
+
this.pending = this.speaking;
|
|
163
|
+
}
|
|
164
|
+
this.set({ paused: true, heard: this.state.phase === 'thinking' ? this.state.heard : '' });
|
|
165
|
+
}
|
|
166
|
+
/** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
|
|
167
|
+
resume() {
|
|
168
|
+
if (!this.state.active || !this.state.paused) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.silent = 0;
|
|
172
|
+
this.set({ paused: false });
|
|
173
|
+
const pending = this.pending;
|
|
174
|
+
this.pending = undefined;
|
|
175
|
+
if (pending) {
|
|
176
|
+
this.read(pending);
|
|
177
|
+
}
|
|
178
|
+
else if (this.state.phase !== 'thinking' && this.state.phase !== 'connecting') {
|
|
179
|
+
this.listen();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** While Ta speaks (an answer, or news it tells by itself): it stops and listens to the user, before any more news. */
|
|
183
|
+
interrupt() {
|
|
184
|
+
if (this.state.active && this.state.phase === 'speaking') {
|
|
185
|
+
this.voice.hush();
|
|
186
|
+
this.listen(false);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* How the conversation is, as it changes: a run that started after what the user said is the call's turn, and
|
|
191
|
+
* once it settles its reply is read. A run already going when the call asked (a follow-up) is its turn too.
|
|
192
|
+
*/
|
|
193
|
+
turn(working, reply) {
|
|
194
|
+
var _a;
|
|
195
|
+
// A partner answers in this call: the turns of the conversation are its work, not the call's.
|
|
196
|
+
if (!this.state.active || this.state.phase !== 'thinking' || this.partner) {
|
|
197
|
+
this.asked = undefined;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (working) {
|
|
201
|
+
(_a = this.asked) !== null && _a !== void 0 ? _a : (this.asked = { before: reply === null || reply === void 0 ? void 0 : reply.index });
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (this.asked) {
|
|
205
|
+
const fresh = reply && reply.index !== this.asked.before ? reply.text : undefined;
|
|
206
|
+
this.asked = undefined;
|
|
207
|
+
this.turnEnded(fresh);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The conversation's turn settled: its answer, if a new one came, is read out, and Ta listens again. Only for a turn
|
|
212
|
+
* the call asked; what comes while Ta listens (a task that reports back) does not cut the user off.
|
|
213
|
+
*/
|
|
214
|
+
turnEnded(reply) {
|
|
215
|
+
if (!this.state.active || this.state.phase !== 'thinking') {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const said = reply === null || reply === void 0 ? void 0 : reply.trim();
|
|
219
|
+
if (this.opening) {
|
|
220
|
+
this.waiting = said !== null && said !== void 0 ? said : '';
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (this.state.paused) {
|
|
224
|
+
// Read once it shows again; nothing new, it listens then.
|
|
225
|
+
this.pending = said || undefined;
|
|
226
|
+
this.set({ phase: 'listening', heard: '' });
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (!said) {
|
|
230
|
+
this.listen();
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.read(said);
|
|
234
|
+
}
|
|
235
|
+
read(said) {
|
|
236
|
+
const round = ++this.round;
|
|
237
|
+
this.speaking = said;
|
|
238
|
+
this.set({ phase: 'speaking', heard: '', reading: undefined });
|
|
239
|
+
this.voice.speak(said, this.options.language(), () => {
|
|
240
|
+
if (this.state.active && round === this.round) {
|
|
241
|
+
this.listen();
|
|
242
|
+
}
|
|
243
|
+
}, this.options.voice(), (pieces, at) => this.state.active && round === this.round && this.set({ reading: { pieces, at } }));
|
|
244
|
+
}
|
|
245
|
+
/** Listens; first says what waits to be said, unless the user just cut in to speak (`announce` false). */
|
|
246
|
+
listen(announce = true) {
|
|
247
|
+
this.stopListening();
|
|
248
|
+
if (this.state.paused) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const announcement = announce ? this.announcements.shift() : undefined;
|
|
252
|
+
if (announcement) {
|
|
253
|
+
this.read(announcement);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const round = ++this.round;
|
|
257
|
+
let heard = '';
|
|
258
|
+
this.set({ phase: 'listening', heard: '' });
|
|
259
|
+
const listening = this.voice.listen(this.options.language(), text => {
|
|
260
|
+
var _a, _b, _c;
|
|
261
|
+
if (round === this.round) {
|
|
262
|
+
const more = text.trim() !== heard.trim();
|
|
263
|
+
heard = text;
|
|
264
|
+
// The user says more: the captions are of what they say now, the last exchange gone.
|
|
265
|
+
this.set(text.trim() ? { heard: text, said: undefined, reading: undefined } : { heard: text });
|
|
266
|
+
if (more && text.trim()) {
|
|
267
|
+
clearTimeout(this.endTimer);
|
|
268
|
+
this.endTimer = setTimeout(() => this.endTurn(), (_a = this.options.endMs) !== null && _a !== void 0 ? _a : exports.END_MS);
|
|
269
|
+
(_b = this.turnTimer) !== null && _b !== void 0 ? _b : (this.turnTimer = setTimeout(() => this.endTurn(), (_c = this.options.turnMs) !== null && _c !== void 0 ? _c : exports.TURN_MS));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}, error => {
|
|
273
|
+
if (round !== this.round || !this.state.active) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.listening = undefined;
|
|
277
|
+
clearTimeout(this.endTimer);
|
|
278
|
+
clearTimeout(this.turnTimer);
|
|
279
|
+
this.endTimer = this.turnTimer = undefined;
|
|
280
|
+
this.heard(heard.trim(), error);
|
|
281
|
+
});
|
|
282
|
+
if (!listening) {
|
|
283
|
+
this.end('unavailable');
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
this.listening = listening;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* The user is done speaking (a pause after their words, or the mark of the bar tapped): what was heard goes now,
|
|
290
|
+
* the recognizer stopped, whatever it would still hear.
|
|
291
|
+
*/
|
|
292
|
+
endTurn() {
|
|
293
|
+
const said = this.state.heard.trim();
|
|
294
|
+
if (!this.state.active || this.state.paused || this.state.phase !== 'listening' || !said || !this.listening) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
this.stopListening();
|
|
298
|
+
this.heard(said, undefined);
|
|
299
|
+
}
|
|
300
|
+
/** A listen ended: what was said goes to the double; nothing, Ta listens again, a few times. */
|
|
301
|
+
heard(said, error) {
|
|
302
|
+
if (error && voice_1.Voice.denied(error)) {
|
|
303
|
+
this.end('denied');
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (said) {
|
|
307
|
+
this.silent = 0;
|
|
308
|
+
this.set({ phase: 'thinking', heard: said, said, reading: undefined });
|
|
309
|
+
if (this.partner) {
|
|
310
|
+
this.ask(said);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
this.options.send(said).catch(() => this.state.active && this.unsent());
|
|
314
|
+
}
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (++this.silent >= exports.SILENT_ROUNDS) {
|
|
318
|
+
this.end('silent');
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (error) {
|
|
322
|
+
this.retry = setTimeout(() => this.state.active && this.state.phase === 'listening' && this.listen(), RETRY_MS);
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
this.listen();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/** The voice and the partner the call opens as it starts; undefined when it opens neither. A partner that fails is none. */
|
|
329
|
+
open(direct) {
|
|
330
|
+
var _a, _b, _c, _d, _e;
|
|
331
|
+
const voice = (_b = (_a = this.options).openVoice) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
332
|
+
const partner = direct ? undefined : (_e = (_d = (_c = this.options).openPartner) === null || _d === void 0 ? void 0 : _d.call(_c)) === null || _e === void 0 ? void 0 : _e.catch(() => undefined);
|
|
333
|
+
return voice || partner ? Promise.all([voice, partner]) : undefined;
|
|
334
|
+
}
|
|
335
|
+
/** The partner answers what the user said; its reply is read as a turn's is. */
|
|
336
|
+
ask(text, sent) {
|
|
337
|
+
var _a;
|
|
338
|
+
const call = this.calls;
|
|
339
|
+
(_a = this.partner) === null || _a === void 0 ? void 0 : _a.say(text, sent ? { sent } : undefined).then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.unsent());
|
|
340
|
+
}
|
|
341
|
+
/** What the user said did not go: not in the captions as if it had, and Ta listens again. */
|
|
342
|
+
unsent() {
|
|
343
|
+
this.set({ said: undefined });
|
|
344
|
+
this.listen();
|
|
345
|
+
}
|
|
346
|
+
end(reason, detail) {
|
|
347
|
+
var _a, _b;
|
|
348
|
+
this.hangUp();
|
|
349
|
+
(_b = (_a = this.options).ended) === null || _b === void 0 ? void 0 : _b.call(_a, reason, detail);
|
|
350
|
+
}
|
|
351
|
+
stopListening() {
|
|
352
|
+
clearTimeout(this.retry);
|
|
353
|
+
clearTimeout(this.endTimer);
|
|
354
|
+
clearTimeout(this.turnTimer);
|
|
355
|
+
this.endTimer = undefined;
|
|
356
|
+
this.turnTimer = undefined;
|
|
357
|
+
this.round++;
|
|
358
|
+
const listening = this.listening;
|
|
359
|
+
this.listening = undefined;
|
|
360
|
+
listening === null || listening === void 0 ? void 0 : listening.stop();
|
|
361
|
+
}
|
|
362
|
+
set(change) {
|
|
363
|
+
this.state = { ...this.state, ...change };
|
|
364
|
+
for (const listener of this.listeners) {
|
|
365
|
+
listener();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
exports.VoiceCall = VoiceCall;
|
|
370
|
+
//# sourceMappingURL=voice-call.js.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { SessionStore } from '@celljs/ta-client';
|
|
2
|
+
import type { TaAttachResult, TaEvent } from '@celljs/ta-protocol';
|
|
3
|
+
import { TaWebExtensions } from '../extension/web-extension-protocol';
|
|
4
|
+
import { TaNotices } from '../notices/notices-protocol';
|
|
5
|
+
import { TaKeptChats } from '../offline/kept-chats-protocol';
|
|
6
|
+
import { TaState } from '../state/state-protocol';
|
|
7
|
+
import { TaWorkbench } from '../workbench-protocol';
|
|
8
|
+
import { ChatPackages } from './chat-packages';
|
|
9
|
+
import type { ChatState } from './chat-protocol';
|
|
10
|
+
import { ChatStores } from './chat-stores';
|
|
11
|
+
/** The conversation shown: one change of it at a time, its store attached, followed and left. */
|
|
12
|
+
export declare abstract class ChatShown {
|
|
13
|
+
protected readonly workbench: TaWorkbench;
|
|
14
|
+
protected readonly extensions: TaWebExtensions;
|
|
15
|
+
protected readonly notices: TaNotices;
|
|
16
|
+
protected readonly persisted: TaState;
|
|
17
|
+
protected readonly kept: TaKeptChats;
|
|
18
|
+
protected current: ChatState;
|
|
19
|
+
protected readonly listeners: Set<(state: ChatState) => void>;
|
|
20
|
+
/** One change of the conversation shown at a time. */
|
|
21
|
+
protected queue: Promise<void>;
|
|
22
|
+
protected unfollow: (() => void)[];
|
|
23
|
+
protected watching: boolean;
|
|
24
|
+
/** The conversation asked for last: of quick switches, only the last is shown. */
|
|
25
|
+
protected wanted?: string;
|
|
26
|
+
/** Sessions shown while still on their way, counted for their keys. */
|
|
27
|
+
protected coming: number;
|
|
28
|
+
/** Stop was pressed while the new conversation opened: its run stops once it is there. */
|
|
29
|
+
protected stopping: boolean;
|
|
30
|
+
protected madeStores?: ChatStores;
|
|
31
|
+
protected madePackages?: ChatPackages;
|
|
32
|
+
/** The packages of the conversation shown, loaded again after a run that changed them. */
|
|
33
|
+
protected get packages(): ChatPackages;
|
|
34
|
+
/** The sessions and stores of the conversations, made once the services are in. */
|
|
35
|
+
protected get stores(): ChatStores;
|
|
36
|
+
get state(): ChatState;
|
|
37
|
+
subscribe(listener: (state: ChatState) => void): () => void;
|
|
38
|
+
protected enqueue(change: () => Promise<void>): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Follows a session, running the web tools it asks for. One shown lately and still open shows at once
|
|
41
|
+
* as it was, and catches up as it attaches again; so does one this device kept (its file: `sessionFile`,
|
|
42
|
+
* else the list's). Another shows once loaded, the conversation shown staying until then, so that
|
|
43
|
+
* switching does not flash an empty page. `attachment`: what opening it attached already (ChatStores.open),
|
|
44
|
+
* taken by the store in the same turn of the event loop, so that no event after it is missed.
|
|
45
|
+
*/
|
|
46
|
+
protected attach({ sessionId, attachment }: {
|
|
47
|
+
sessionId: string;
|
|
48
|
+
attachment?: TaAttachResult;
|
|
49
|
+
}, send?: (store: SessionStore) => Promise<unknown>, sessionFile?: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
|
|
52
|
+
* showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
|
|
53
|
+
* it syncs. Its store attaches after (`attach`), taking only what changed since; only a conversation this
|
|
54
|
+
* device never had waits for the computer, its place saying it opens.
|
|
55
|
+
*/
|
|
56
|
+
protected showNow(key: string, sessionFile?: string): Promise<void>;
|
|
57
|
+
/** Whether the conversation of `key` (or of its file) is shown already. */
|
|
58
|
+
protected showing(key: string, sessionFile: string | undefined): boolean;
|
|
59
|
+
/** Shows a store in place of the one shown, which is kept for later. */
|
|
60
|
+
protected enter(store: SessionStore, sessionFile?: string): void;
|
|
61
|
+
protected follow(store: SessionStore, view: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* The events of a store go to web extensions once it is attached: not those it catches up on, which
|
|
64
|
+
* happened while another conversation was shown.
|
|
65
|
+
*/
|
|
66
|
+
protected listen(store: SessionStore): void;
|
|
67
|
+
/** Stops following the conversation shown; it is kept to show again unless `keep` is false (it closed, or is gone). */
|
|
68
|
+
protected leave(keep?: boolean): void;
|
|
69
|
+
protected onEvent(event: TaEvent): void;
|
|
70
|
+
protected update(change: Partial<ChatState>): void;
|
|
71
|
+
protected abstract recover(): Promise<void>;
|
|
72
|
+
protected abstract replace(): Promise<void>;
|
|
73
|
+
protected abstract reopen(store: SessionStore): Promise<void>;
|
|
74
|
+
protected abstract remember(info: {
|
|
75
|
+
sessionFile?: string;
|
|
76
|
+
group?: string;
|
|
77
|
+
} | undefined): void;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=chat-shown.d.ts.map
|