@celljs/ta-web 4.16.0 → 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 +121 -333
- 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 +9 -148
- package/esm/browser/components/chat-list.js +277 -513
- package/esm/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +89 -19
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- 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 +7 -6
- 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 +3 -1
- 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 +1 -11
- package/esm/browser/gateway/console-parts.js +38 -128
- package/esm/browser/gateway/console-tenant.js +2 -1
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-view.js +39 -1
- package/esm/browser/i18n/locales.d.ts +143 -6
- package/esm/browser/i18n/messages-ja.js +144 -7
- package/esm/browser/i18n/messages-zh-tw.js +144 -7
- package/esm/browser/i18n/messages.d.ts +140 -3
- package/esm/browser/i18n/messages.js +288 -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 +9 -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 +114 -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 +9 -148
- package/lib/browser/components/chat-list.js +294 -532
- package/lib/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +88 -18
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- 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 +8 -6
- 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 +2 -0
- 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 +1 -11
- package/lib/browser/gateway/console-parts.js +38 -129
- package/lib/browser/gateway/console-tenant.js +2 -1
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-view.js +39 -1
- package/lib/browser/i18n/locales.d.ts +143 -6
- package/lib/browser/i18n/messages-ja.js +144 -7
- package/lib/browser/i18n/messages-zh-tw.js +144 -7
- package/lib/browser/i18n/messages.d.ts +140 -3
- package/lib/browser/i18n/messages.js +288 -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 +9 -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
package/lib/browser/workbench.js
CHANGED
|
@@ -12,32 +12,37 @@ const ta_client_1 = require("@celljs/ta-client");
|
|
|
12
12
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
13
13
|
const ta_relay_1 = require("@celljs/ta-relay");
|
|
14
14
|
const hosts_1 = require("./hosts");
|
|
15
|
-
const device_values_1 = require("./offline/device-values");
|
|
16
15
|
const presence_reporter_1 = require("./presence/presence-reporter");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
16
|
+
const page_answers_1 = require("./screen/page-answers");
|
|
17
|
+
const screen_protocol_1 = require("./screen/screen-protocol");
|
|
19
18
|
const desktop_1 = require("./util/desktop");
|
|
20
19
|
const workbench_calls_1 = require("./workbench-calls");
|
|
20
|
+
const workbench_hosts_1 = require("./workbench-hosts");
|
|
21
21
|
const workbench_protocol_1 = require("./workbench-protocol");
|
|
22
22
|
const workbench_util_1 = require("./workbench-util");
|
|
23
23
|
/** How often a page that is seen reads again which build of Ta is installed (TaServerInfo.update). */
|
|
24
24
|
const UPDATE_CHECK_MS = 60000;
|
|
25
25
|
/** A restart not back in this long is no longer waited for: the row of the connection says what is wrong. */
|
|
26
26
|
const RESTART_WAIT_MS = 120000;
|
|
27
|
-
let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
27
|
+
let TaWorkbenchImpl = class TaWorkbenchImpl extends workbench_hosts_1.WorkbenchHosts {
|
|
28
28
|
constructor() {
|
|
29
|
-
|
|
29
|
+
super(...arguments);
|
|
30
30
|
this.current = { status: 'connecting', hosts: this.list.hosts, host: this.list.current, sessions: [], saved: [] };
|
|
31
31
|
/** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
|
|
32
32
|
this.presence = new presence_reporter_1.PresenceReporter(state => {
|
|
33
|
-
|
|
33
|
+
// Ta's own screen is no page of the user: no one is shown at a conversation for it.
|
|
34
|
+
if (this.connection && this.current.status === 'online' && !this.pages.agent) {
|
|
34
35
|
this.connection.presence.report(state).catch(() => undefined);
|
|
35
36
|
}
|
|
36
37
|
});
|
|
38
|
+
/** What ta serve may ask this page, and what it is told of the page (docs/design/ta-app-use.md 4.1). */
|
|
39
|
+
this.pages = new page_answers_1.PageAnswers(info => {
|
|
40
|
+
if (this.connection && this.current.status === 'online') {
|
|
41
|
+
this.connection.pages.attach(info).catch(() => undefined);
|
|
42
|
+
}
|
|
43
|
+
}, { agent: screen_protocol_1.ScreenUtil.agent(), desktop: typeof globalThis.taDesktop === 'object' });
|
|
37
44
|
this.attempts = 0;
|
|
38
45
|
this.graceMs = workbench_util_1.GRACE_MS;
|
|
39
|
-
/** What was kept of the computers dropped, being taken off the device. */
|
|
40
|
-
this.forgetting = Promise.resolve();
|
|
41
46
|
/**
|
|
42
47
|
* The calls of the services and of the stores, to the connection of the time; answered from the device
|
|
43
48
|
* while offline, for the computer in use from the start (web extensions started from the device read
|
|
@@ -57,93 +62,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
57
62
|
/** Those waiting for the connection (`connected`): `resolve` once online, `reject` once signed out. */
|
|
58
63
|
this.connectedWaiters = new Set();
|
|
59
64
|
this.waking = false;
|
|
60
|
-
/** Settings.chatArchiveDays: the saved conversations older are read only by `readArchived`. */
|
|
61
|
-
this.archiveDays = settings_protocol_1.DEFAULT_SETTINGS.chatArchiveDays;
|
|
62
|
-
/** Counts the lists of open sessions the server told: a read of the lists begun before one does not undo it. */
|
|
63
|
-
this.pushes = 0;
|
|
64
65
|
/** Counts sign-ins and sign-outs: an attempt of an earlier one does nothing when it ends. */
|
|
65
66
|
this.generation = 0;
|
|
66
67
|
this.listeners = new Set();
|
|
67
|
-
this.terminalListeners = new Set();
|
|
68
|
-
this.extensionDataListeners = new Set();
|
|
69
|
-
this.authListeners = new Set();
|
|
70
|
-
this.remoteListeners = new Set();
|
|
71
|
-
/** Those that listen to the rooms, and what they hear: messages and the state too, or the state of some keys. */
|
|
72
|
-
this.roomListeners = new Map();
|
|
73
68
|
}
|
|
74
69
|
get state() {
|
|
75
70
|
return this.current;
|
|
76
71
|
}
|
|
77
|
-
get server() {
|
|
78
|
-
return this.service('server');
|
|
79
|
-
}
|
|
80
|
-
get workspace() {
|
|
81
|
-
return this.service('workspace');
|
|
82
|
-
}
|
|
83
|
-
get terminals() {
|
|
84
|
-
return this.service('terminals');
|
|
85
|
-
}
|
|
86
|
-
get settings() {
|
|
87
|
-
return this.service('settings');
|
|
88
|
-
}
|
|
89
|
-
get packages() {
|
|
90
|
-
return this.service('packages');
|
|
91
|
-
}
|
|
92
|
-
get auth() {
|
|
93
|
-
return this.service('auth');
|
|
94
|
-
}
|
|
95
|
-
get access() {
|
|
96
|
-
return this.service('access');
|
|
97
|
-
}
|
|
98
|
-
get gateway() {
|
|
99
|
-
return this.service('gateway');
|
|
100
|
-
}
|
|
101
|
-
get relay() {
|
|
102
|
-
return this.service('relay');
|
|
103
|
-
}
|
|
104
|
-
get remote() {
|
|
105
|
-
return this.service('remote');
|
|
106
|
-
}
|
|
107
|
-
get rooms() {
|
|
108
|
-
return this.service('rooms');
|
|
109
|
-
}
|
|
110
|
-
service(name) {
|
|
111
|
-
return this.calls.service(name);
|
|
112
|
-
}
|
|
113
|
-
signedIn() {
|
|
114
|
-
if (!this.connection) {
|
|
115
|
-
throw new Error('Not signed in to ta serve.');
|
|
116
|
-
}
|
|
117
|
-
return this.connection;
|
|
118
|
-
}
|
|
119
|
-
onTerminalData(listener) {
|
|
120
|
-
this.terminalListeners.add(listener);
|
|
121
|
-
return () => this.terminalListeners.delete(listener);
|
|
122
|
-
}
|
|
123
|
-
onExtensionData(listener) {
|
|
124
|
-
this.extensionDataListeners.add(listener);
|
|
125
|
-
return () => this.extensionDataListeners.delete(listener);
|
|
126
|
-
}
|
|
127
|
-
onAuthEvent(listener) {
|
|
128
|
-
this.authListeners.add(listener);
|
|
129
|
-
return () => this.authListeners.delete(listener);
|
|
130
|
-
}
|
|
131
|
-
onRemoteEvent(listener) {
|
|
132
|
-
this.remoteListeners.add(listener);
|
|
133
|
-
return () => this.remoteListeners.delete(listener);
|
|
134
|
-
}
|
|
135
|
-
onRoomEvent(listener, options = {}) {
|
|
136
|
-
const wrapped = (event) => listener(event);
|
|
137
|
-
this.roomListeners.set(wrapped, ta_protocol_1.TaRoomWatchUtil.of(options.messages, options.state));
|
|
138
|
-
if (this.connection) {
|
|
139
|
-
void this.watchRooms(this.connection, false);
|
|
140
|
-
}
|
|
141
|
-
return () => {
|
|
142
|
-
if (this.roomListeners.delete(wrapped) && this.connection) {
|
|
143
|
-
void this.watchRooms(this.connection, false);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
72
|
async restartServer() {
|
|
148
73
|
var _a;
|
|
149
74
|
if (this.restart) {
|
|
@@ -201,6 +126,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
201
126
|
}
|
|
202
127
|
async start() {
|
|
203
128
|
this.watchWake();
|
|
129
|
+
this.pages.watch();
|
|
204
130
|
const fragment = new URLSearchParams(location.hash.slice(1));
|
|
205
131
|
// A token of `ta serve --web`, or a pairing link: the page of a relay opened for one let in from a browser (docs/design/ta-team.md 8.3).
|
|
206
132
|
const fromUrl = workbench_util_1.WorkbenchUtil.fromFragment(fragment);
|
|
@@ -217,109 +143,6 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
217
143
|
this.update({ status: 'signed-out' });
|
|
218
144
|
}
|
|
219
145
|
}
|
|
220
|
-
async signIn(text) {
|
|
221
|
-
const credential = workbench_util_1.WorkbenchUtil.credential(text.trim());
|
|
222
|
-
const id = workbench_util_1.WorkbenchUtil.serverOf(credential, (0, workbench_util_1.pageHost)());
|
|
223
|
-
if (this.current.status === 'signed-out' || id === this.current.host) {
|
|
224
|
-
this.keepHosts(hosts_1.HostUtil.use(this.list, id, credential, Date.now()));
|
|
225
|
-
await this.connectWith(credential);
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
// Another computer while one is in use: tried first, so that a wrong or old code leaves the one in use.
|
|
229
|
-
const server = await this.probe(credential);
|
|
230
|
-
this.keepHosts(hosts_1.HostUtil.use(this.list, id, credential, Date.now(), { user: server.user, host: server.host }));
|
|
231
|
-
this.load(id);
|
|
232
|
-
}
|
|
233
|
-
switchTo(hostId) {
|
|
234
|
-
const host = this.list.hosts.find(one => one.id === hostId);
|
|
235
|
-
if (!host || (hostId === this.current.host && this.current.status !== 'signed-out')) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
this.keepHosts(hosts_1.HostUtil.select(this.list, hostId, Date.now()));
|
|
239
|
-
if (this.current.status === 'signed-out') {
|
|
240
|
-
// Nothing of another computer is shown yet: signed in to in place.
|
|
241
|
-
void this.connectWith(host.credential);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
this.load(hostId);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
forget(hostId) {
|
|
248
|
-
const wasCurrent = hostId === this.current.host;
|
|
249
|
-
this.drop(hostId);
|
|
250
|
-
if (!wasCurrent) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
const next = hosts_1.HostUtil.latest(this.list);
|
|
254
|
-
if (next) {
|
|
255
|
-
this.keepHosts(hosts_1.HostUtil.select(this.list, next.id, Date.now()));
|
|
256
|
-
this.load(next.id);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
this.signOut();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
rename(hostId, name) {
|
|
263
|
-
this.keepHosts(hosts_1.HostUtil.rename(this.list, hostId, name));
|
|
264
|
-
}
|
|
265
|
-
/** Whether a computer answers to the credential, and who it is; the connection is closed after. */
|
|
266
|
-
async probe(credential) {
|
|
267
|
-
const { connection, refused } = this.open(credential);
|
|
268
|
-
let timer;
|
|
269
|
-
try {
|
|
270
|
-
const late = new Promise((_, reject) => {
|
|
271
|
-
timer = setTimeout(() => reject(new workbench_util_1.WorkbenchError('unreachable')), workbench_util_1.PROBE_MS);
|
|
272
|
-
});
|
|
273
|
-
await Promise.race([connection.connect(), late]);
|
|
274
|
-
return await Promise.race([connection.server.getServerInfo(), late]);
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
throw error instanceof workbench_util_1.WorkbenchError ? error : new workbench_util_1.WorkbenchError((await refused()) ? 'refused' : 'unreachable');
|
|
278
|
-
}
|
|
279
|
-
finally {
|
|
280
|
-
clearTimeout(timer);
|
|
281
|
-
connection.close();
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Everything the page shows is of one computer, its web extensions too: it loads again for another,
|
|
286
|
-
* after a moment that shows which (`switching`). What it kept of that one shows at once.
|
|
287
|
-
*/
|
|
288
|
-
load(hostId) {
|
|
289
|
-
this.update({ switching: hostId });
|
|
290
|
-
setTimeout(() => this.reloadSoon(), workbench_util_1.SWITCH_MS);
|
|
291
|
-
}
|
|
292
|
-
reload() {
|
|
293
|
-
location.reload();
|
|
294
|
-
}
|
|
295
|
-
/** A host off this device, with what the page kept of it. */
|
|
296
|
-
drop(hostId) {
|
|
297
|
-
this.keepHosts(hosts_1.HostUtil.remove(this.list, hostId));
|
|
298
|
-
const kept = (0, workbench_util_1.storage)();
|
|
299
|
-
kept === null || kept === void 0 ? void 0 : kept.removeItem(workbench_util_1.WorkbenchUtil.listsKey(hostId));
|
|
300
|
-
if (kept) {
|
|
301
|
-
state_protocol_1.StateUtil.forgetHost(kept, hostId);
|
|
302
|
-
}
|
|
303
|
-
this.forgetting = Promise.all([this.forgetting, device_values_1.OfflineKeys.forget((0, device_values_1.deviceValues)(), hostId)]);
|
|
304
|
-
if (this.listsOf === hostId) {
|
|
305
|
-
this.listsOf = undefined;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
/** Loads the page again once what was kept of the computers dropped is off the device: a load aborts what IndexedDB has not written. */
|
|
309
|
-
reloadSoon() {
|
|
310
|
-
void this.forgetting.finally(() => this.reload());
|
|
311
|
-
}
|
|
312
|
-
keepHosts(list) {
|
|
313
|
-
var _a;
|
|
314
|
-
this.list = list;
|
|
315
|
-
try {
|
|
316
|
-
(_a = (0, workbench_util_1.storage)()) === null || _a === void 0 ? void 0 : _a.setItem(hosts_1.HostUtil.KEY, JSON.stringify(list));
|
|
317
|
-
}
|
|
318
|
-
catch (_b) {
|
|
319
|
-
// Full: kept for this page.
|
|
320
|
-
}
|
|
321
|
-
this.update({ hosts: list.hosts, host: list.current });
|
|
322
|
-
}
|
|
323
146
|
async connectWith(credential) {
|
|
324
147
|
var _a, _b;
|
|
325
148
|
var _c;
|
|
@@ -378,6 +201,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
378
201
|
}
|
|
379
202
|
this.attempts = 0;
|
|
380
203
|
this.connection = connection;
|
|
204
|
+
connection.onPageAsk((kind, payload) => this.pages.ask(kind, payload));
|
|
381
205
|
connection.onTerminalData((terminalId, data, exitCode) => {
|
|
382
206
|
for (const listener of this.terminalListeners) {
|
|
383
207
|
listener(terminalId, data, exitCode);
|
|
@@ -394,6 +218,11 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
394
218
|
}
|
|
395
219
|
});
|
|
396
220
|
connection.onRemoteEvent(event => this.emitRemote(event));
|
|
221
|
+
connection.onVoiceEvent(event => {
|
|
222
|
+
for (const listener of this.voiceListeners) {
|
|
223
|
+
listener(event);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
397
226
|
connection.onRoomEvent(event => {
|
|
398
227
|
for (const [listener, watch] of this.roomListeners) {
|
|
399
228
|
if (ta_protocol_1.TaRoomWatchUtil.hears(watch, event)) {
|
|
@@ -412,6 +241,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
412
241
|
}
|
|
413
242
|
this.update({ status: 'online', retryAt: undefined });
|
|
414
243
|
this.presence.resend();
|
|
244
|
+
this.pages.tell();
|
|
415
245
|
void this.refresh();
|
|
416
246
|
void this.watchRemote(connection);
|
|
417
247
|
this.roomsWatched = undefined;
|
|
@@ -427,6 +257,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
427
257
|
// it: the calls of the page go now, with the one that reads who it is, not a round trip after it.
|
|
428
258
|
this.update({ status: 'online', error: undefined, retryAt: undefined });
|
|
429
259
|
this.presence.resend();
|
|
260
|
+
this.pages.tell();
|
|
430
261
|
}
|
|
431
262
|
let server;
|
|
432
263
|
try {
|
|
@@ -446,6 +277,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
446
277
|
this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf(credential, (0, workbench_util_1.pageHost)()), credential, Date.now(), { user: server.user, host: server.host }));
|
|
447
278
|
this.update({ status: 'online', error: undefined, retryAt: undefined, server });
|
|
448
279
|
this.presence.resend();
|
|
280
|
+
this.pages.tell();
|
|
449
281
|
await this.refresh();
|
|
450
282
|
}
|
|
451
283
|
/** A connection to the computer of `credential`, not opened yet, and whether that computer refused it once it failed. */
|
|
@@ -501,137 +333,6 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
501
333
|
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.reconnect();
|
|
502
334
|
}
|
|
503
335
|
}
|
|
504
|
-
listOpened(info) {
|
|
505
|
-
if (this.current.sessions.some(session => session.sessionId === info.sessionId)) {
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
// Newer than a list read before it, as one the server told.
|
|
509
|
-
this.pushes++;
|
|
510
|
-
this.update({ sessions: workbench_util_1.WorkbenchUtil.sorted([...this.current.sessions, info]) });
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* One read of the lists at a time: asked again meanwhile, one more follows it for all who asked, so that
|
|
514
|
-
* reads on a slow network do not pile up.
|
|
515
|
-
*/
|
|
516
|
-
refresh() {
|
|
517
|
-
var _a;
|
|
518
|
-
if (!this.refreshing) {
|
|
519
|
-
this.refreshing = this.readLists().finally(() => {
|
|
520
|
-
this.refreshing = undefined;
|
|
521
|
-
});
|
|
522
|
-
return this.refreshing;
|
|
523
|
-
}
|
|
524
|
-
(_a = this.refreshAgain) !== null && _a !== void 0 ? _a : (this.refreshAgain = this.refreshing
|
|
525
|
-
.catch(() => undefined)
|
|
526
|
-
.then(() => {
|
|
527
|
-
this.refreshAgain = undefined;
|
|
528
|
-
return this.refresh();
|
|
529
|
-
}));
|
|
530
|
-
return this.refreshAgain;
|
|
531
|
-
}
|
|
532
|
-
async readLists() {
|
|
533
|
-
const pushes = this.pushes;
|
|
534
|
-
// A ta serve of before has no saved sessions to list: its list stays the open ones. The default
|
|
535
|
-
// directory comes along, as another device may have changed it. The archived are left out: a list
|
|
536
|
-
// read every few seconds stays as small as the conversations of the last days, however many there were.
|
|
537
|
-
const since = workbench_util_1.WorkbenchUtil.daysAgo(Date.now(), this.archiveDays);
|
|
538
|
-
const [sessions, saved, server] = await Promise.all([
|
|
539
|
-
this.server.listSessions(),
|
|
540
|
-
this.server.listSavedSessions(since === undefined ? undefined : { since }).catch(() => []),
|
|
541
|
-
this.server.getServerInfo().catch(() => this.current.server),
|
|
542
|
-
]);
|
|
543
|
-
// A ta serve of before lists them all.
|
|
544
|
-
const recent = since === undefined ? saved : saved.filter(session => session.updatedAt >= since);
|
|
545
|
-
// Read every few seconds and mostly the same: what shows them is not drawn again for nothing. A list
|
|
546
|
-
// the server told meanwhile is newer than this one, read before it.
|
|
547
|
-
this.update({
|
|
548
|
-
sessions: pushes === this.pushes ? workbench_util_1.WorkbenchUtil.same(this.current.sessions, workbench_util_1.WorkbenchUtil.sorted(sessions)) : this.current.sessions,
|
|
549
|
-
saved: workbench_util_1.WorkbenchUtil.same(this.current.saved, recent),
|
|
550
|
-
server: workbench_util_1.WorkbenchUtil.same(this.current.server, server),
|
|
551
|
-
});
|
|
552
|
-
// A day later, those that just grew old are in the archive read, not lost between the two lists.
|
|
553
|
-
if (this.current.archived && this.archivedSince !== since) {
|
|
554
|
-
void this.readArchived().catch(() => undefined);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
setArchiveDays(days) {
|
|
558
|
-
if (days === this.archiveDays) {
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
this.archiveDays = days;
|
|
562
|
-
if (this.current.status === 'online') {
|
|
563
|
-
void this.refresh().catch(() => undefined);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
readArchived() {
|
|
567
|
-
var _a;
|
|
568
|
-
(_a = this.archiving) !== null && _a !== void 0 ? _a : (this.archiving = (async () => {
|
|
569
|
-
const since = workbench_util_1.WorkbenchUtil.daysAgo(Date.now(), this.archiveDays);
|
|
570
|
-
const archived = since === undefined ? [] : await this.server.listSavedSessions({ before: since });
|
|
571
|
-
this.archivedSince = since;
|
|
572
|
-
const old = since === undefined ? [] : archived.filter(session => session.updatedAt < since);
|
|
573
|
-
this.update({ archived: workbench_util_1.WorkbenchUtil.same(this.current.archived, old) });
|
|
574
|
-
})().finally(() => {
|
|
575
|
-
this.archiving = undefined;
|
|
576
|
-
}));
|
|
577
|
-
return this.archiving;
|
|
578
|
-
}
|
|
579
|
-
createStore(sessionId, options) {
|
|
580
|
-
return new ta_client_1.SessionStore(this.calls.link, sessionId, { pageBytes: workbench_util_1.PAGE_BYTES, ...options });
|
|
581
|
-
}
|
|
582
|
-
/** The open sessions from now on as they change, on each connection; a Ta service of before has its lists read again every few seconds. */
|
|
583
|
-
async watchSessions(connection) {
|
|
584
|
-
try {
|
|
585
|
-
const sessions = await connection.server.watchSessions();
|
|
586
|
-
if (this.connection === connection) {
|
|
587
|
-
this.takeSessions(sessions);
|
|
588
|
-
this.update({ sessionsPushed: true });
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
catch (error) {
|
|
592
|
-
if (this.connection === connection && ta_client_1.TaRemoteError.isMethodNotFound(error)) {
|
|
593
|
-
this.update({ sessionsPushed: false });
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
/** The open sessions as the server told them; one that closed is among the saved ones now, which are read again. */
|
|
598
|
-
takeSessions(sessions) {
|
|
599
|
-
this.pushes++;
|
|
600
|
-
const closed = this.current.sessions.some(session => !sessions.some(other => other.sessionId === session.sessionId));
|
|
601
|
-
this.update({ sessions: workbench_util_1.WorkbenchUtil.same(this.current.sessions, workbench_util_1.WorkbenchUtil.sorted(sessions)) });
|
|
602
|
-
if (closed) {
|
|
603
|
-
void this.refresh().catch(() => undefined);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
/** The prompts of ssh that wait for an answer, from now and those already there. */
|
|
607
|
-
async watchRemote(connection) {
|
|
608
|
-
const prompts = await connection.remote.watch().catch(() => []);
|
|
609
|
-
for (const prompt of prompts) {
|
|
610
|
-
this.emitRemote({ type: 'prompt', prompt });
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* Watches the rooms as the listeners want (messages too if one does), or no more once none listens; on a new
|
|
615
|
-
* connection (`opened`) the listeners read them again (`rooms`), for what changed while away.
|
|
616
|
-
*/
|
|
617
|
-
async watchRooms(connection, opened) {
|
|
618
|
-
const wanted = this.roomListeners.size === 0 ? undefined : ta_protocol_1.TaRoomWatchUtil.union(this.roomListeners.values());
|
|
619
|
-
if (!ta_protocol_1.TaRoomWatchUtil.same(wanted, this.roomsWatched)) {
|
|
620
|
-
this.roomsWatched = wanted;
|
|
621
|
-
// A ta serve of before has no rooms; one of before the state of some keys hears it only with messages.
|
|
622
|
-
await (wanted === undefined ? connection.rooms.unwatch() : connection.rooms.watch(wanted.messages, wanted.state)).catch(() => undefined);
|
|
623
|
-
}
|
|
624
|
-
if (opened) {
|
|
625
|
-
for (const listener of this.roomListeners.keys()) {
|
|
626
|
-
listener({ type: 'rooms' });
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
emitRemote(event) {
|
|
631
|
-
for (const listener of this.remoteListeners) {
|
|
632
|
-
listener(event);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
336
|
stopRetrying() {
|
|
636
337
|
this.generation++;
|
|
637
338
|
clearTimeout(this.retryTimer);
|
|
@@ -726,17 +427,6 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
726
427
|
}
|
|
727
428
|
}
|
|
728
429
|
}
|
|
729
|
-
keepLists(of) {
|
|
730
|
-
var _a;
|
|
731
|
-
const { server, sessions, saved } = this.current;
|
|
732
|
-
const kept = { of, server, sessions, saved };
|
|
733
|
-
try {
|
|
734
|
-
(_a = (0, workbench_util_1.storage)()) === null || _a === void 0 ? void 0 : _a.setItem(workbench_util_1.WorkbenchUtil.listsKey(of), JSON.stringify(kept));
|
|
735
|
-
}
|
|
736
|
-
catch (_b) {
|
|
737
|
-
// Full: the next start waits for the server, as it would without.
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
430
|
};
|
|
741
431
|
exports.TaWorkbenchImpl = TaWorkbenchImpl;
|
|
742
432
|
exports.TaWorkbenchImpl = TaWorkbenchImpl = __decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"description": "The web client of ta serve: sessions, streaming messages, tool runs with diffs, and dialogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@celljs/core": "4.
|
|
37
|
-
"@celljs/react": "4.
|
|
38
|
-
"@celljs/ta-client": "4.
|
|
39
|
-
"@celljs/ta-protocol": "4.
|
|
40
|
-
"@celljs/ta-relay": "4.
|
|
41
|
-
"@celljs/widget": "4.
|
|
36
|
+
"@celljs/core": "4.17.0",
|
|
37
|
+
"@celljs/react": "4.17.0",
|
|
38
|
+
"@celljs/ta-client": "4.17.0",
|
|
39
|
+
"@celljs/ta-protocol": "4.17.0",
|
|
40
|
+
"@celljs/ta-relay": "4.17.0",
|
|
41
|
+
"@celljs/widget": "4.17.0",
|
|
42
42
|
"@types/three": "^0.187.0",
|
|
43
43
|
"@xterm/addon-fit": "^0.11.0",
|
|
44
44
|
"@xterm/addon-unicode11": "^0.9.0",
|