@celljs/ta-web 4.9.1 → 4.11.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 +8 -7
- package/README.md +8 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +20 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +25 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +5 -2
- package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
- package/esm/browser/assistant/assistant-task-book.js +23 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
- package/esm/browser/assistant/assistant-task-source.js +5 -10
- package/esm/browser/assistant/assistant-task-util.d.ts +14 -2
- package/esm/browser/assistant/assistant-task-util.js +62 -13
- package/esm/browser/assistant/assistant-view.js +117 -71
- package/esm/browser/assistant/assistant.d.ts +28 -5
- package/esm/browser/assistant/assistant.js +96 -22
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +28 -1
- package/esm/browser/chat/chat-stores.d.ts +62 -0
- package/esm/browser/chat/chat-stores.js +129 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +45 -17
- package/esm/browser/chat/chat.d.ts +41 -41
- package/esm/browser/chat/chat.js +276 -190
- package/esm/browser/components/account-menu.d.ts +0 -2
- package/esm/browser/components/account-menu.js +1 -27
- package/esm/browser/components/agent-settings-view.d.ts +3 -2
- package/esm/browser/components/agent-settings-view.js +2 -1
- package/esm/browser/components/app-nav.d.ts +11 -5
- package/esm/browser/components/app-nav.js +39 -17
- package/esm/browser/components/app-shell-hooks.d.ts +2 -2
- package/esm/browser/components/app-shell-hooks.js +12 -6
- package/esm/browser/components/app-view.js +150 -36
- package/esm/browser/components/busy.d.ts +25 -0
- package/esm/browser/components/busy.js +52 -0
- package/esm/browser/components/chat-icon.d.ts +29 -0
- package/esm/browser/components/chat-icon.js +78 -0
- package/esm/browser/components/chat-list.d.ts +93 -8
- package/esm/browser/components/chat-list.js +411 -60
- package/esm/browser/components/chat-seen.d.ts +53 -0
- package/esm/browser/components/chat-seen.js +101 -0
- package/esm/browser/components/composer-box.d.ts +18 -8
- package/esm/browser/components/composer-box.js +199 -52
- package/esm/browser/components/composer.d.ts +13 -6
- package/esm/browser/components/composer.js +8 -5
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +136 -6
- package/esm/browser/components/conversation-scroll.js +467 -108
- package/esm/browser/components/custom-host.d.ts +3 -0
- package/esm/browser/components/custom-host.js +14 -0
- package/esm/browser/components/directory-commands.d.ts +6 -0
- package/esm/browser/components/directory-commands.js +34 -0
- package/esm/browser/components/discover-view.d.ts +11 -4
- package/esm/browser/components/discover-view.js +20 -11
- package/esm/browser/components/dismiss.d.ts +3 -0
- package/esm/browser/components/dismiss.js +29 -0
- package/esm/browser/components/earlier-messages.d.ts +34 -2
- package/esm/browser/components/earlier-messages.js +42 -23
- package/esm/browser/components/editor-area.d.ts +6 -20
- package/esm/browser/components/editor-area.js +10 -96
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/fold-text.d.ts +20 -0
- package/esm/browser/components/fold-text.js +66 -0
- package/esm/browser/components/folder-picker.d.ts +6 -3
- package/esm/browser/components/folder-picker.js +27 -9
- package/esm/browser/components/full-screen.d.ts +9 -0
- package/esm/browser/components/full-screen.js +26 -0
- package/esm/browser/components/grow-box.d.ts +9 -0
- package/esm/browser/components/grow-box.js +50 -0
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/hold-to-talk.d.ts +22 -0
- package/esm/browser/components/hold-to-talk.js +29 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +5 -3
- package/esm/browser/components/icon.js +9 -9
- package/esm/browser/components/image-viewer.d.ts +132 -0
- package/esm/browser/components/image-viewer.js +434 -0
- package/esm/browser/components/launcher-search-util.d.ts +4 -3
- package/esm/browser/components/launcher-search-util.js +12 -4
- package/esm/browser/components/lightbox.d.ts +14 -0
- package/esm/browser/components/lightbox.js +25 -0
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +60 -14
- package/esm/browser/components/media.js +20 -12
- package/esm/browser/components/message-actions.js +2 -0
- package/esm/browser/components/message-footer.d.ts +22 -2
- package/esm/browser/components/message-footer.js +47 -13
- package/esm/browser/components/message-list.d.ts +78 -6
- package/esm/browser/components/message-list.js +281 -36
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +24 -4
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +37 -3
- package/esm/browser/components/nav-places.js +32 -7
- package/esm/browser/components/notice-center.js +34 -0
- package/esm/browser/components/notice-face.d.ts +10 -0
- package/esm/browser/components/notice-face.js +28 -0
- package/esm/browser/components/phone-shell.d.ts +27 -2
- package/esm/browser/components/phone-shell.js +98 -9
- package/esm/browser/components/picture.d.ts +8 -1
- package/esm/browser/components/picture.js +12 -1
- package/esm/browser/components/plus-menu.d.ts +23 -0
- package/esm/browser/components/plus-menu.js +90 -0
- package/esm/browser/components/recent-shot.d.ts +15 -0
- package/esm/browser/components/recent-shot.js +174 -0
- package/esm/browser/components/relay-view.js +10 -3
- package/esm/browser/components/run-status.d.ts +1 -1
- package/esm/browser/components/run-status.js +17 -29
- package/esm/browser/components/said-text.d.ts +6 -0
- package/esm/browser/components/said-text.js +14 -0
- package/esm/browser/components/scan-screen.d.ts +10 -0
- package/esm/browser/components/scan-screen.js +230 -0
- package/esm/browser/components/search-page.js +10 -6
- package/esm/browser/components/session-settings.d.ts +8 -3
- package/esm/browser/components/session-settings.js +15 -1
- package/esm/browser/components/session-view.js +36 -22
- package/esm/browser/components/settings-choices.d.ts +1 -0
- package/esm/browser/components/settings-choices.js +3 -2
- package/esm/browser/components/settings-controls.d.ts +5 -3
- package/esm/browser/components/settings-controls.js +10 -1
- package/esm/browser/components/settings-parts.d.ts +2 -2
- package/esm/browser/components/settings-parts.js +69 -15
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +21 -14
- package/esm/browser/components/unseen-drop.d.ts +39 -0
- package/esm/browser/components/unseen-drop.js +219 -0
- package/esm/browser/components/use-seen-chats.d.ts +8 -0
- package/esm/browser/components/use-seen-chats.js +49 -0
- package/esm/browser/components/voice-button.d.ts +7 -1
- package/esm/browser/components/voice-button.js +15 -2
- package/esm/browser/components/voice-picker.d.ts +6 -0
- package/esm/browser/components/voice-picker.js +53 -0
- package/esm/browser/components/voice-talk.d.ts +51 -0
- package/esm/browser/components/voice-talk.js +242 -0
- package/esm/browser/components/web-composer.d.ts +4 -2
- package/esm/browser/components/web-composer.js +8 -4
- package/esm/browser/components/workbench-tabs.d.ts +41 -0
- package/esm/browser/components/workbench-tabs.js +193 -0
- package/esm/browser/components/workbench-toggle.d.ts +0 -13
- package/esm/browser/components/workbench-toggle.js +1 -28
- package/esm/browser/device/code-scan.d.ts +55 -0
- package/esm/browser/device/code-scan.js +137 -0
- package/esm/browser/device/code-vision.d.ts +51 -0
- package/esm/browser/device/code-vision.js +100 -0
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +134 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +12 -0
- package/esm/browser/device/long-press.js +44 -13
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +67 -78
- package/esm/browser/device/recent-shots.d.ts +45 -0
- package/esm/browser/device/recent-shots.js +142 -0
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +154 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +414 -108
- package/esm/browser/extension/extension-view.d.ts +10 -0
- package/esm/browser/extension/extension-view.js +6 -0
- package/esm/browser/extension/icons.js +15 -2
- package/esm/browser/extension/web-api-components.d.ts +269 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +385 -0
- package/esm/browser/extension/web-api-contributions.js +2 -0
- package/esm/browser/extension/web-api-desktop.d.ts +55 -0
- package/esm/browser/extension/web-api-desktop.js +2 -0
- package/esm/browser/extension/web-api-terminal.d.ts +71 -0
- package/esm/browser/extension/web-api-terminal.js +2 -0
- package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
- package/esm/browser/extension/web-editor-tabs.js +137 -0
- package/esm/browser/extension/web-extension-api.d.ts +218 -521
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +346 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +66 -6
- package/esm/browser/extension/web-extension-protocol.js +41 -0
- package/esm/browser/extension/web-extension-run.d.ts +54 -0
- package/esm/browser/extension/web-extension-run.js +120 -0
- package/esm/browser/extension/web-extensions.d.ts +41 -68
- package/esm/browser/extension/web-extensions.js +188 -487
- package/esm/browser/extension/web-home.d.ts +19 -0
- package/esm/browser/extension/web-home.js +72 -0
- package/esm/browser/extension/web-pages.d.ts +13 -3
- package/esm/browser/extension/web-pages.js +23 -3
- package/esm/browser/extension/web-session-notices.d.ts +36 -0
- package/esm/browser/extension/web-session-notices.js +174 -0
- package/esm/browser/extension/web-sharing.d.ts +2 -0
- package/esm/browser/extension/web-sharing.js +4 -0
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/game/game-host.d.ts +27 -0
- package/esm/browser/game/game-host.js +127 -0
- package/esm/browser/game/game-loader.d.ts +10 -0
- package/esm/browser/game/game-loader.js +28 -0
- package/esm/browser/game/game-protocol.d.ts +49 -0
- package/esm/browser/game/game-protocol.js +2 -0
- package/esm/browser/game/game-runner.d.ts +27 -0
- package/esm/browser/game/game-runner.js +60 -0
- package/esm/browser/game/game-util.d.ts +29 -0
- package/esm/browser/game/game-util.js +180 -0
- package/esm/browser/game/game-view.d.ts +12 -0
- package/esm/browser/game/game-view.js +31 -0
- package/esm/browser/game/game3d-protocol.d.ts +51 -0
- package/esm/browser/game/game3d-protocol.js +2 -0
- package/esm/browser/game/game3d-runner.d.ts +27 -0
- package/esm/browser/game/game3d-runner.js +149 -0
- package/esm/browser/hooks.d.ts +5 -1
- package/esm/browser/hooks.js +13 -2
- package/esm/browser/i18n/locales.d.ts +105 -3
- package/esm/browser/i18n/messages.d.ts +104 -2
- package/esm/browser/i18n/messages.js +215 -11
- package/esm/browser/index.d.ts +15 -0
- package/esm/browser/index.js +15 -0
- package/esm/browser/links/links-protocol.d.ts +5 -0
- package/esm/browser/links/links.d.ts +19 -7
- package/esm/browser/links/links.js +57 -11
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/notices/notices-protocol.d.ts +26 -1
- package/esm/browser/notices/notices.d.ts +3 -1
- package/esm/browser/notices/notices.js +26 -12
- package/esm/browser/notices/session-notices.d.ts +69 -0
- package/esm/browser/notices/session-notices.js +92 -0
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +151 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +109 -0
- package/esm/browser/settings/navigation.d.ts +3 -2
- package/esm/browser/settings/navigation.js +4 -3
- package/esm/browser/settings/settings-protocol.d.ts +17 -0
- package/esm/browser/settings/settings-protocol.js +20 -4
- package/esm/browser/state/state-protocol.d.ts +8 -1
- package/esm/browser/state/state.d.ts +2 -0
- package/esm/browser/state/state.js +21 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +27 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +95 -17
- package/esm/browser/style/device.js +42 -5
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +252 -67
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +38 -2
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +15 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +76 -9
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +2 -2
- package/esm/browser/style/tints.d.ts +27 -0
- package/esm/browser/style/tints.js +56 -0
- package/esm/browser/style.js +13 -1
- package/esm/browser/util/composer.d.ts +6 -0
- package/esm/browser/util/composer.js +16 -0
- package/esm/browser/util/desktop.d.ts +19 -1
- package/esm/browser/util/desktop.js +15 -0
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +22 -2
- package/esm/browser/util/markdown.js +120 -6
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +35 -2
- package/esm/browser/util/process.js +79 -4
- package/esm/browser/util/progress.d.ts +19 -1
- package/esm/browser/util/progress.js +57 -4
- package/esm/browser/util/quote.d.ts +19 -0
- package/esm/browser/util/quote.js +58 -0
- package/esm/browser/util/tool.d.ts +19 -2
- package/esm/browser/util/tool.js +70 -2
- package/esm/browser/util/voice.d.ts +49 -6
- package/esm/browser/util/voice.js +271 -26
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +61 -0
- package/esm/browser/workbench-calls.js +146 -0
- package/esm/browser/workbench-protocol.d.ts +36 -3
- package/esm/browser/workbench-util.d.ts +22 -4
- package/esm/browser/workbench-util.js +37 -7
- package/esm/browser/workbench.d.ts +47 -6
- package/esm/browser/workbench.js +191 -43
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +21 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +25 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +5 -2
- package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
- package/lib/browser/assistant/assistant-task-book.js +23 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
- package/lib/browser/assistant/assistant-task-source.js +5 -10
- package/lib/browser/assistant/assistant-task-util.d.ts +14 -2
- package/lib/browser/assistant/assistant-task-util.js +62 -13
- package/lib/browser/assistant/assistant-view.js +113 -67
- package/lib/browser/assistant/assistant.d.ts +28 -5
- package/lib/browser/assistant/assistant.js +96 -22
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +28 -1
- package/lib/browser/chat/chat-stores.d.ts +63 -0
- package/lib/browser/chat/chat-stores.js +133 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +44 -16
- package/lib/browser/chat/chat.d.ts +41 -41
- package/lib/browser/chat/chat.js +277 -191
- package/lib/browser/components/account-menu.d.ts +0 -2
- package/lib/browser/components/account-menu.js +2 -29
- package/lib/browser/components/agent-settings-view.d.ts +3 -2
- package/lib/browser/components/agent-settings-view.js +2 -1
- package/lib/browser/components/app-nav.d.ts +11 -5
- package/lib/browser/components/app-nav.js +35 -13
- package/lib/browser/components/app-shell-hooks.d.ts +2 -2
- package/lib/browser/components/app-shell-hooks.js +12 -6
- package/lib/browser/components/app-view.js +145 -31
- package/lib/browser/components/busy.d.ts +26 -0
- package/lib/browser/components/busy.js +91 -0
- package/lib/browser/components/chat-icon.d.ts +30 -0
- package/lib/browser/components/chat-icon.js +117 -0
- package/lib/browser/components/chat-list.d.ts +93 -8
- package/lib/browser/components/chat-list.js +412 -60
- package/lib/browser/components/chat-seen.d.ts +54 -0
- package/lib/browser/components/chat-seen.js +104 -0
- package/lib/browser/components/composer-box.d.ts +18 -8
- package/lib/browser/components/composer-box.js +198 -51
- package/lib/browser/components/composer.d.ts +13 -6
- package/lib/browser/components/composer.js +7 -4
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +136 -6
- package/lib/browser/components/conversation-scroll.js +469 -109
- package/lib/browser/components/custom-host.d.ts +4 -0
- package/lib/browser/components/custom-host.js +50 -0
- package/lib/browser/components/directory-commands.d.ts +7 -0
- package/lib/browser/components/directory-commands.js +70 -0
- package/lib/browser/components/discover-view.d.ts +11 -4
- package/lib/browser/components/discover-view.js +19 -10
- package/lib/browser/components/dismiss.d.ts +4 -0
- package/lib/browser/components/dismiss.js +65 -0
- package/lib/browser/components/earlier-messages.d.ts +34 -2
- package/lib/browser/components/earlier-messages.js +44 -24
- package/lib/browser/components/editor-area.d.ts +6 -20
- package/lib/browser/components/editor-area.js +11 -97
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/fold-text.d.ts +21 -0
- package/lib/browser/components/fold-text.js +103 -0
- package/lib/browser/components/folder-picker.d.ts +6 -3
- package/lib/browser/components/folder-picker.js +27 -9
- package/lib/browser/components/full-screen.d.ts +10 -0
- package/lib/browser/components/full-screen.js +62 -0
- package/lib/browser/components/grow-box.d.ts +10 -0
- package/lib/browser/components/grow-box.js +86 -0
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/hold-to-talk.d.ts +23 -0
- package/lib/browser/components/hold-to-talk.js +65 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +5 -3
- package/lib/browser/components/icon.js +11 -9
- package/lib/browser/components/image-viewer.d.ts +133 -0
- package/lib/browser/components/image-viewer.js +472 -0
- package/lib/browser/components/launcher-search-util.d.ts +4 -3
- package/lib/browser/components/launcher-search-util.js +12 -4
- package/lib/browser/components/lightbox.d.ts +15 -0
- package/lib/browser/components/lightbox.js +61 -0
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +60 -14
- package/lib/browser/components/media.js +21 -13
- package/lib/browser/components/message-actions.js +2 -0
- package/lib/browser/components/message-footer.d.ts +22 -2
- package/lib/browser/components/message-footer.js +49 -12
- package/lib/browser/components/message-list.d.ts +78 -6
- package/lib/browser/components/message-list.js +281 -32
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +23 -3
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +37 -3
- package/lib/browser/components/nav-places.js +35 -7
- package/lib/browser/components/notice-center.js +34 -0
- package/lib/browser/components/notice-face.d.ts +11 -0
- package/lib/browser/components/notice-face.js +64 -0
- package/lib/browser/components/phone-shell.d.ts +27 -2
- package/lib/browser/components/phone-shell.js +99 -10
- package/lib/browser/components/picture.d.ts +8 -1
- package/lib/browser/components/picture.js +13 -1
- package/lib/browser/components/plus-menu.d.ts +24 -0
- package/lib/browser/components/plus-menu.js +126 -0
- package/lib/browser/components/recent-shot.d.ts +16 -0
- package/lib/browser/components/recent-shot.js +210 -0
- package/lib/browser/components/relay-view.js +10 -3
- package/lib/browser/components/run-status.d.ts +1 -1
- package/lib/browser/components/run-status.js +17 -29
- package/lib/browser/components/said-text.d.ts +7 -0
- package/lib/browser/components/said-text.js +50 -0
- package/lib/browser/components/scan-screen.d.ts +11 -0
- package/lib/browser/components/scan-screen.js +266 -0
- package/lib/browser/components/search-page.js +10 -6
- package/lib/browser/components/session-settings.d.ts +8 -3
- package/lib/browser/components/session-settings.js +15 -1
- package/lib/browser/components/session-view.js +32 -18
- package/lib/browser/components/settings-choices.d.ts +1 -0
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-controls.d.ts +5 -3
- package/lib/browser/components/settings-controls.js +10 -1
- package/lib/browser/components/settings-parts.d.ts +2 -2
- package/lib/browser/components/settings-parts.js +67 -13
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +21 -14
- package/lib/browser/components/unseen-drop.d.ts +40 -0
- package/lib/browser/components/unseen-drop.js +256 -0
- package/lib/browser/components/use-seen-chats.d.ts +9 -0
- package/lib/browser/components/use-seen-chats.js +85 -0
- package/lib/browser/components/voice-button.d.ts +7 -1
- package/lib/browser/components/voice-button.js +16 -2
- package/lib/browser/components/voice-picker.d.ts +7 -0
- package/lib/browser/components/voice-picker.js +89 -0
- package/lib/browser/components/voice-talk.d.ts +52 -0
- package/lib/browser/components/voice-talk.js +281 -0
- package/lib/browser/components/web-composer.d.ts +4 -2
- package/lib/browser/components/web-composer.js +7 -3
- package/lib/browser/components/workbench-tabs.d.ts +42 -0
- package/lib/browser/components/workbench-tabs.js +232 -0
- package/lib/browser/components/workbench-toggle.d.ts +0 -13
- package/lib/browser/components/workbench-toggle.js +1 -29
- package/lib/browser/device/code-scan.d.ts +56 -0
- package/lib/browser/device/code-scan.js +141 -0
- package/lib/browser/device/code-vision.d.ts +52 -0
- package/lib/browser/device/code-vision.js +103 -0
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +171 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +12 -0
- package/lib/browser/device/long-press.js +44 -13
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +66 -77
- package/lib/browser/device/recent-shots.d.ts +46 -0
- package/lib/browser/device/recent-shots.js +145 -0
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +153 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +418 -109
- package/lib/browser/extension/extension-view.d.ts +10 -0
- package/lib/browser/extension/extension-view.js +7 -1
- package/lib/browser/extension/icons.js +14 -1
- package/lib/browser/extension/web-api-components.d.ts +270 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +386 -0
- package/lib/browser/extension/web-api-contributions.js +3 -0
- package/lib/browser/extension/web-api-desktop.d.ts +56 -0
- package/lib/browser/extension/web-api-desktop.js +3 -0
- package/lib/browser/extension/web-api-terminal.d.ts +72 -0
- package/lib/browser/extension/web-api-terminal.js +3 -0
- package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
- package/lib/browser/extension/web-editor-tabs.js +141 -0
- package/lib/browser/extension/web-extension-api.d.ts +218 -521
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +383 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +66 -6
- package/lib/browser/extension/web-extension-protocol.js +42 -1
- package/lib/browser/extension/web-extension-run.d.ts +55 -0
- package/lib/browser/extension/web-extension-run.js +123 -0
- package/lib/browser/extension/web-extensions.d.ts +41 -68
- package/lib/browser/extension/web-extensions.js +184 -516
- package/lib/browser/extension/web-home.d.ts +20 -0
- package/lib/browser/extension/web-home.js +76 -0
- package/lib/browser/extension/web-pages.d.ts +13 -3
- package/lib/browser/extension/web-pages.js +23 -3
- package/lib/browser/extension/web-session-notices.d.ts +37 -0
- package/lib/browser/extension/web-session-notices.js +177 -0
- package/lib/browser/extension/web-sharing.d.ts +2 -0
- package/lib/browser/extension/web-sharing.js +4 -0
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/game/game-host.d.ts +28 -0
- package/lib/browser/game/game-host.js +163 -0
- package/lib/browser/game/game-loader.d.ts +11 -0
- package/lib/browser/game/game-loader.js +31 -0
- package/lib/browser/game/game-protocol.d.ts +50 -0
- package/lib/browser/game/game-protocol.js +3 -0
- package/lib/browser/game/game-runner.d.ts +28 -0
- package/lib/browser/game/game-runner.js +64 -0
- package/lib/browser/game/game-util.d.ts +30 -0
- package/lib/browser/game/game-util.js +183 -0
- package/lib/browser/game/game-view.d.ts +13 -0
- package/lib/browser/game/game-view.js +68 -0
- package/lib/browser/game/game3d-protocol.d.ts +52 -0
- package/lib/browser/game/game3d-protocol.js +3 -0
- package/lib/browser/game/game3d-runner.d.ts +28 -0
- package/lib/browser/game/game3d-runner.js +153 -0
- package/lib/browser/hooks.d.ts +5 -1
- package/lib/browser/hooks.js +14 -2
- package/lib/browser/i18n/locales.d.ts +105 -3
- package/lib/browser/i18n/messages.d.ts +104 -2
- package/lib/browser/i18n/messages.js +215 -11
- package/lib/browser/index.d.ts +15 -0
- package/lib/browser/index.js +15 -0
- package/lib/browser/links/links-protocol.d.ts +5 -0
- package/lib/browser/links/links.d.ts +19 -7
- package/lib/browser/links/links.js +57 -11
- package/lib/browser/markdown/code-renderers.d.ts +5 -0
- package/lib/browser/markdown/code-renderers.js +40 -0
- package/lib/browser/notices/notices-protocol.d.ts +26 -1
- package/lib/browser/notices/notices.d.ts +3 -1
- package/lib/browser/notices/notices.js +26 -12
- package/lib/browser/notices/session-notices.d.ts +70 -0
- package/lib/browser/notices/session-notices.js +96 -0
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +157 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +113 -0
- package/lib/browser/settings/navigation.d.ts +3 -2
- package/lib/browser/settings/navigation.js +4 -3
- package/lib/browser/settings/settings-protocol.d.ts +17 -0
- package/lib/browser/settings/settings-protocol.js +21 -5
- package/lib/browser/state/state-protocol.d.ts +8 -1
- package/lib/browser/state/state.d.ts +2 -0
- package/lib/browser/state/state.js +21 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +27 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +95 -17
- package/lib/browser/style/device.js +42 -5
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +252 -67
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +38 -2
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +15 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +76 -9
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +2 -2
- package/lib/browser/style/tints.d.ts +28 -0
- package/lib/browser/style/tints.js +59 -0
- package/lib/browser/style.js +13 -1
- package/lib/browser/util/composer.d.ts +6 -0
- package/lib/browser/util/composer.js +16 -0
- package/lib/browser/util/desktop.d.ts +19 -1
- package/lib/browser/util/desktop.js +15 -0
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +22 -2
- package/lib/browser/util/markdown.js +120 -6
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +35 -2
- package/lib/browser/util/process.js +80 -5
- package/lib/browser/util/progress.d.ts +19 -1
- package/lib/browser/util/progress.js +57 -4
- package/lib/browser/util/quote.d.ts +20 -0
- package/lib/browser/util/quote.js +61 -0
- package/lib/browser/util/tool.d.ts +19 -2
- package/lib/browser/util/tool.js +70 -2
- package/lib/browser/util/voice.d.ts +49 -6
- package/lib/browser/util/voice.js +271 -26
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +62 -0
- package/lib/browser/workbench-calls.js +150 -0
- package/lib/browser/workbench-protocol.d.ts +36 -3
- package/lib/browser/workbench-util.d.ts +22 -4
- package/lib/browser/workbench-util.js +38 -8
- package/lib/browser/workbench.d.ts +47 -6
- package/lib/browser/workbench.js +189 -41
- package/package.json +14 -11
- package/public/launch.svg +46 -42
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkbenchCalls = void 0;
|
|
4
|
+
const ta_client_1 = require("@celljs/ta-client");
|
|
5
|
+
const device_values_1 = require("./offline/device-values");
|
|
6
|
+
const offline_reads_1 = require("./offline/offline-reads");
|
|
7
|
+
const workbench_util_1 = require("./workbench-util");
|
|
8
|
+
/**
|
|
9
|
+
* The calls of the page to its computer: those of the workbench's services, and those of its stores
|
|
10
|
+
* (`link`). Each goes to the connection of the time; before there is one, it waits for it. A call that
|
|
11
|
+
* reads (OFFLINE_READS) answers as it did last time while the computer cannot be reached, rather than
|
|
12
|
+
* waiting: what was shown shows again, web extensions started from the device too.
|
|
13
|
+
*/
|
|
14
|
+
class WorkbenchCalls {
|
|
15
|
+
constructor(owner, host) {
|
|
16
|
+
this.owner = owner;
|
|
17
|
+
/** The services, the same across connections. */
|
|
18
|
+
this.services = new Map();
|
|
19
|
+
/**
|
|
20
|
+
* The data web extensions read (by call), from the device or the computer: read again once online, as the
|
|
21
|
+
* server tells of changes only to what the connection of the time read, and it may have changed meanwhile.
|
|
22
|
+
* A connection that dropped and came back is a new one there, which heard of no read before it.
|
|
23
|
+
*/
|
|
24
|
+
this.readData = new Map();
|
|
25
|
+
/**
|
|
26
|
+
* What stores use of the connection, there before it is (a conversation kept on the device shows without
|
|
27
|
+
* one): their calls wait for it as on a connection that dropped, then fail; they attach once connected.
|
|
28
|
+
*/
|
|
29
|
+
this.link = {
|
|
30
|
+
server: new Proxy({}, {
|
|
31
|
+
get: (_target, method) => typeof method !== 'string' || method === 'then'
|
|
32
|
+
? undefined
|
|
33
|
+
: async (...params) => {
|
|
34
|
+
if (!this.owner.connection()) {
|
|
35
|
+
await this.connectedWithin(workbench_util_1.STORE_WAIT_MS);
|
|
36
|
+
}
|
|
37
|
+
return this.signedIn().server[method](...params);
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
onEvents: listener => this.signedIn().onEvents(listener),
|
|
41
|
+
onOpen: listener => this.signedIn().onOpen(listener),
|
|
42
|
+
};
|
|
43
|
+
this.reads = new offline_reads_1.OfflineReads((0, device_values_1.deviceValues)()).use(host);
|
|
44
|
+
}
|
|
45
|
+
/** A service of the page, its methods the same each time too: what is given them is not drawn again for nothing. */
|
|
46
|
+
service(name) {
|
|
47
|
+
const known = this.services.get(name);
|
|
48
|
+
if (known) {
|
|
49
|
+
return known;
|
|
50
|
+
}
|
|
51
|
+
const methods = new Map();
|
|
52
|
+
const service = new Proxy({}, {
|
|
53
|
+
get: (_target, method) => {
|
|
54
|
+
// Not a promise itself.
|
|
55
|
+
if (typeof method !== 'string' || method === 'then') {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
let call = methods.get(method);
|
|
59
|
+
if (!call) {
|
|
60
|
+
call = (...params) => this.call(name, method, params);
|
|
61
|
+
methods.set(method, call);
|
|
62
|
+
}
|
|
63
|
+
return call;
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
this.services.set(name, service);
|
|
67
|
+
return service;
|
|
68
|
+
}
|
|
69
|
+
/** As `connected`, failing as a call on a connection that dropped does once it is not back within `ms`. */
|
|
70
|
+
connectedWithin(ms) {
|
|
71
|
+
let timer;
|
|
72
|
+
const late = new Promise((_, reject) => {
|
|
73
|
+
timer = setTimeout(() => reject(ta_client_1.TaRemoteError.notConnected()), ms);
|
|
74
|
+
});
|
|
75
|
+
return Promise.race([this.owner.connected(), late]).finally(() => clearTimeout(timer));
|
|
76
|
+
}
|
|
77
|
+
/** Online again: the web extensions hear that the data they read changed, and read it from the computer, which tells them of changes again. */
|
|
78
|
+
online() {
|
|
79
|
+
var _a;
|
|
80
|
+
const changed = new Map();
|
|
81
|
+
for (const { name, key, cwd } of this.readData.values()) {
|
|
82
|
+
const of = `${name}\n${cwd !== null && cwd !== void 0 ? cwd : ''}`;
|
|
83
|
+
const entry = (_a = changed.get(of)) !== null && _a !== void 0 ? _a : { name, keys: [], cwd };
|
|
84
|
+
entry.keys.push(key);
|
|
85
|
+
changed.set(of, entry);
|
|
86
|
+
}
|
|
87
|
+
this.readData.clear();
|
|
88
|
+
for (const { name, keys, cwd } of changed.values()) {
|
|
89
|
+
this.owner.dataChanged(name, keys, cwd);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async call(name, method, params) {
|
|
93
|
+
const reads = offline_reads_1.OfflineReads.reads(name, method);
|
|
94
|
+
if (reads && this.owner.status() !== 'online') {
|
|
95
|
+
const kept = await this.keptAnswer(name, method, params);
|
|
96
|
+
if (kept) {
|
|
97
|
+
this.readExtensionData(name, method, params);
|
|
98
|
+
return kept.value;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (!this.owner.connection()) {
|
|
102
|
+
await this.owner.connected();
|
|
103
|
+
}
|
|
104
|
+
const answer = await this.signedIn()[name][method](...params);
|
|
105
|
+
if (reads) {
|
|
106
|
+
this.reads.keep(name, method, params, answer);
|
|
107
|
+
}
|
|
108
|
+
this.readExtensionData(name, method, params);
|
|
109
|
+
return answer;
|
|
110
|
+
}
|
|
111
|
+
readExtensionData(name, method, params) {
|
|
112
|
+
if (name === 'packages' && method === 'getExtensionData') {
|
|
113
|
+
const [extension, key, cwd] = params;
|
|
114
|
+
this.readData.set(offline_reads_1.OfflineReads.call(name, method, params), { name: extension, key, cwd });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The answer kept of a call, once the connection is not there to give it: at once while offline, after a
|
|
119
|
+
* moment while connecting (a start through a relay is online within it); none online, or with none kept.
|
|
120
|
+
*/
|
|
121
|
+
async keptAnswer(name, method, params) {
|
|
122
|
+
const kept = await this.reads.answer(name, method, params);
|
|
123
|
+
if (kept && this.owner.status() === 'connecting') {
|
|
124
|
+
await this.leavesConnecting(workbench_util_1.KEPT_AFTER_MS);
|
|
125
|
+
}
|
|
126
|
+
const status = this.owner.status();
|
|
127
|
+
return status === 'offline' || status === 'connecting' ? kept : undefined;
|
|
128
|
+
}
|
|
129
|
+
/** Resolves once the status is no longer `connecting`, or after `ms`. */
|
|
130
|
+
leavesConnecting(ms) {
|
|
131
|
+
return new Promise(resolve => {
|
|
132
|
+
const done = () => {
|
|
133
|
+
clearTimeout(timer);
|
|
134
|
+
unsubscribe();
|
|
135
|
+
resolve();
|
|
136
|
+
};
|
|
137
|
+
const timer = setTimeout(done, ms);
|
|
138
|
+
const unsubscribe = this.owner.subscribe(state => state.status !== 'connecting' && done());
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
signedIn() {
|
|
142
|
+
const connection = this.owner.connection();
|
|
143
|
+
if (!connection) {
|
|
144
|
+
throw new Error('Not signed in to ta serve.');
|
|
145
|
+
}
|
|
146
|
+
return connection;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.WorkbenchCalls = WorkbenchCalls;
|
|
150
|
+
//# sourceMappingURL=workbench-calls.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionStore, SessionStoreOptions } from '@celljs/ta-client';
|
|
2
|
-
import type { TaAccessServer, TaAuthEvent, TaAuthServer, TaGatewayServer, TaPackageServer, TaRelayServer, TaRemoteEvent, TaRemoteServer, TaSavedSessionInfo, TaServer, TaServerInfo, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
2
|
+
import type { TaAccessServer, TaAuthEvent, TaAuthServer, TaGatewayServer, TaPackageServer, TaRelayServer, TaRemoteEvent, TaRemoteServer, TaRoomEvent, TaRoomServer, TaSavedSessionInfo, TaServer, TaServerInfo, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
3
3
|
import type { RelayPairing } from '@celljs/ta-relay';
|
|
4
4
|
export declare const TaWorkbench: unique symbol;
|
|
5
5
|
/**
|
|
@@ -49,10 +49,20 @@ export interface WorkbenchState {
|
|
|
49
49
|
*/
|
|
50
50
|
offlineShown?: boolean;
|
|
51
51
|
server?: TaServerInfo;
|
|
52
|
+
/**
|
|
53
|
+
* The server tells the open sessions as they change (TaServer.watchSessions): the lists are read again
|
|
54
|
+
* only now and then. Not by a Ta service of before, whose lists are read again every few seconds.
|
|
55
|
+
*/
|
|
56
|
+
sessionsPushed?: boolean;
|
|
52
57
|
/** The open sessions of the server, the newest first. */
|
|
53
58
|
sessions: TaSessionInfo[];
|
|
54
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The conversations in session files that are not open, the latest first: they open again from their file.
|
|
61
|
+
* Only those updated since the archive's days (`setArchiveDays`).
|
|
62
|
+
*/
|
|
55
63
|
saved: TaSavedSessionInfo[];
|
|
64
|
+
/** The saved conversations older than those, the latest first: read when asked (`readArchived`), not with the lists. */
|
|
65
|
+
archived?: TaSavedSessionInfo[];
|
|
56
66
|
}
|
|
57
67
|
/** The web client's side of `ta serve`: one connection and the open sessions. */
|
|
58
68
|
export interface TaWorkbench {
|
|
@@ -68,6 +78,7 @@ export interface TaWorkbench {
|
|
|
68
78
|
readonly gateway: TaGatewayServer;
|
|
69
79
|
readonly relay: TaRelayServer;
|
|
70
80
|
readonly remote: TaRemoteServer;
|
|
81
|
+
readonly rooms: TaRoomServer;
|
|
71
82
|
subscribe(listener: (state: WorkbenchState) => void): () => void;
|
|
72
83
|
/** Signs in with the token of the URL fragment (`ta serve --web`) or the one this page used before. */
|
|
73
84
|
start(): Promise<void>;
|
|
@@ -94,12 +105,25 @@ export interface TaWorkbench {
|
|
|
94
105
|
reconnect(): void;
|
|
95
106
|
/** Reads the open sessions, the saved ones and the default directory again. */
|
|
96
107
|
refresh(): Promise<void>;
|
|
108
|
+
/** A session this page opened, among the open ones at once, before the list of the server comes with it. */
|
|
109
|
+
listOpened(info: TaSessionInfo): void;
|
|
110
|
+
/**
|
|
111
|
+
* The saved conversations not updated for these days are archived (Settings.chatArchiveDays): the lists
|
|
112
|
+
* read every few seconds leave them out, and `archived` has them once read; 0 archives none.
|
|
113
|
+
*/
|
|
114
|
+
setArchiveDays(days: number): void;
|
|
115
|
+
/** Reads the archived conversations (`archived`), as the archive or a search shows them. */
|
|
116
|
+
readArchived(): Promise<void>;
|
|
97
117
|
/**
|
|
98
118
|
* Makes `cwd` the default directory of the server, for every client (TaServer.setWorkingDirectory): where
|
|
99
119
|
* what names no directory opens. Open conversations stay in theirs.
|
|
100
120
|
*/
|
|
101
121
|
setWorkingDirectory(cwd: string): Promise<void>;
|
|
102
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* A store of a session on this connection; the caller attaches and detaches it. It can be made before
|
|
124
|
+
* there is a connection, to show a conversation kept on the device (SessionStoreOptions.initial): it is
|
|
125
|
+
* attached once connected, and its calls meanwhile fail as on a connection that dropped.
|
|
126
|
+
*/
|
|
103
127
|
createStore(sessionId: string, options?: SessionStoreOptions): SessionStore;
|
|
104
128
|
/** Output of the terminals of this connection; the listener stays across reconnections and sign-ins. */
|
|
105
129
|
onTerminalData(listener: (terminalId: string, data: string, exitCode?: number) => void): () => void;
|
|
@@ -112,5 +136,14 @@ export interface TaWorkbench {
|
|
|
112
136
|
* the prompts that wait come again as `prompt` events after a reconnection. The listener stays.
|
|
113
137
|
*/
|
|
114
138
|
onRemoteEvent(listener: (event: TaRemoteEvent) => void): () => void;
|
|
139
|
+
/**
|
|
140
|
+
* What happens in the rooms (TaRoomServer): the page watches them while it has a listener, on each connection,
|
|
141
|
+
* and stops when it has none; with `messages: false` the listener hears only `rooms` and `request`, and messages
|
|
142
|
+
* and the state go to the page only while another wants them. The listener stays across reconnections.
|
|
143
|
+
*/
|
|
144
|
+
onRoomEvent(listener: (event: TaRoomEvent) => void, options?: {
|
|
145
|
+
messages?: boolean;
|
|
146
|
+
state?: string[];
|
|
147
|
+
}): () => void;
|
|
115
148
|
}
|
|
116
149
|
//# sourceMappingURL=workbench-protocol.d.ts.map
|
|
@@ -6,9 +6,17 @@ import type { Credential, WorkbenchState } from './workbench-protocol';
|
|
|
6
6
|
export declare const PROBE_MS = 15000;
|
|
7
7
|
/**
|
|
8
8
|
* How long the connection is down, while the page is seen, before the user is told (`offlineShown`):
|
|
9
|
-
* the
|
|
9
|
+
* the tries to connect again are made quietly within it (a weak network or a phone coming back to the
|
|
10
|
+
* front often takes some seconds through the relay), so a drop that mends itself shows nothing.
|
|
10
11
|
*/
|
|
11
|
-
export declare const GRACE_MS =
|
|
12
|
+
export declare const GRACE_MS = 8000;
|
|
13
|
+
/**
|
|
14
|
+
* While the page connects, how long a call that reads waits for the connection before it answers as it did
|
|
15
|
+
* last time (OfflineReads): through a relay the page is mostly online within it, and gets what is new.
|
|
16
|
+
*/
|
|
17
|
+
export declare const KEPT_AFTER_MS = 1000;
|
|
18
|
+
/** How long a call of a conversation waits for a connection the page never had, as TaConnection's `waitForOpenMs`. */
|
|
19
|
+
export declare const STORE_WAIT_MS = 5000;
|
|
12
20
|
/** How long the page shows which computer it switches to before it loads again for it. */
|
|
13
21
|
export declare const SWITCH_MS = 160;
|
|
14
22
|
export interface KeptLists {
|
|
@@ -18,8 +26,11 @@ export interface KeptLists {
|
|
|
18
26
|
sessions: TaSessionInfo[];
|
|
19
27
|
saved: TaSavedSessionInfo[];
|
|
20
28
|
}
|
|
21
|
-
export type ServiceName = 'server' | 'workspace' | 'terminals' | 'settings' | 'packages' | 'auth' | 'access' | 'gateway' | 'relay' | 'remote';
|
|
22
|
-
/**
|
|
29
|
+
export type ServiceName = 'server' | 'workspace' | 'terminals' | 'settings' | 'packages' | 'auth' | 'access' | 'gateway' | 'relay' | 'remote' | 'rooms';
|
|
30
|
+
/**
|
|
31
|
+
* A conversation opens with about this much of its latest messages (a screen or two: the images of the user's
|
|
32
|
+
* come apart, TaShownImage), its earlier ones loaded as much at a time when scrolled to.
|
|
33
|
+
*/
|
|
23
34
|
export declare const PAGE_BYTES: number;
|
|
24
35
|
/** Why a computer added while another is in use was not switched to. */
|
|
25
36
|
export declare class WorkbenchError extends Error {
|
|
@@ -49,8 +60,15 @@ export declare namespace WorkbenchUtil {
|
|
|
49
60
|
function serverOf(credential: Credential, host: string): string;
|
|
50
61
|
/** Where the lists of `of` are kept: each computer has its own, to show at once when switched to. */
|
|
51
62
|
function listsKey(of: string): string;
|
|
63
|
+
/** The open sessions as the lists show them: the newest first. */
|
|
64
|
+
function sorted(sessions: readonly TaSessionInfo[]): TaSessionInfo[];
|
|
52
65
|
/** The lists kept for `of`, none running: whether one runs is known once connected. */
|
|
53
66
|
function readLists(text: string | null, of: string): Pick<WorkbenchState, 'server' | 'sessions' | 'saved'> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The start of the local day `days` days before `now`, a bound that moves once a day: from when the saved
|
|
69
|
+
* conversations are listed (archived before), from when the list folds them; none for 0.
|
|
70
|
+
*/
|
|
71
|
+
function daysAgo(now: number, days: number): number | undefined;
|
|
54
72
|
/** `previous` if `next` is the same, so that what shows it is not drawn again. */
|
|
55
73
|
function same<T>(previous: T, next: T): T;
|
|
56
74
|
function retryDelay(attempt: number): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkbenchUtil = exports.WorkbenchError = exports.PAGE_BYTES = exports.SWITCH_MS = exports.GRACE_MS = exports.PROBE_MS = void 0;
|
|
3
|
+
exports.WorkbenchUtil = exports.WorkbenchError = exports.PAGE_BYTES = exports.SWITCH_MS = exports.STORE_WAIT_MS = exports.KEPT_AFTER_MS = exports.GRACE_MS = exports.PROBE_MS = void 0;
|
|
4
4
|
exports.storage = storage;
|
|
5
5
|
exports.pageHost = pageHost;
|
|
6
6
|
const ta_relay_1 = require("@celljs/ta-relay");
|
|
@@ -14,19 +14,30 @@ exports.PROBE_MS = 15000;
|
|
|
14
14
|
const RETRY_DELAYS_MS = [1000, 2000, 4000, 8000];
|
|
15
15
|
/**
|
|
16
16
|
* How long the connection is down, while the page is seen, before the user is told (`offlineShown`):
|
|
17
|
-
* the
|
|
17
|
+
* the tries to connect again are made quietly within it (a weak network or a phone coming back to the
|
|
18
|
+
* front often takes some seconds through the relay), so a drop that mends itself shows nothing.
|
|
18
19
|
*/
|
|
19
|
-
exports.GRACE_MS =
|
|
20
|
+
exports.GRACE_MS = 8000;
|
|
20
21
|
/**
|
|
21
22
|
* The lists of the last time, of the ta serve they were of: the next start shows them at once while it
|
|
22
|
-
* connects, as a phone's app shows its chats before it is online. They are small
|
|
23
|
-
* are
|
|
23
|
+
* connects, as a phone's app shows its chats before it is online. They are small, and read before the
|
|
24
|
+
* first frame; the conversations and what web extensions read are kept in IndexedDB (offline/).
|
|
24
25
|
*/
|
|
25
26
|
const LISTS_KEY = 'ta.lists';
|
|
27
|
+
/**
|
|
28
|
+
* While the page connects, how long a call that reads waits for the connection before it answers as it did
|
|
29
|
+
* last time (OfflineReads): through a relay the page is mostly online within it, and gets what is new.
|
|
30
|
+
*/
|
|
31
|
+
exports.KEPT_AFTER_MS = 1000;
|
|
32
|
+
/** How long a call of a conversation waits for a connection the page never had, as TaConnection's `waitForOpenMs`. */
|
|
33
|
+
exports.STORE_WAIT_MS = 5000;
|
|
26
34
|
/** How long the page shows which computer it switches to before it loads again for it. */
|
|
27
35
|
exports.SWITCH_MS = 160;
|
|
28
|
-
/**
|
|
29
|
-
|
|
36
|
+
/**
|
|
37
|
+
* A conversation opens with about this much of its latest messages (a screen or two: the images of the user's
|
|
38
|
+
* come apart, TaShownImage), its earlier ones loaded as much at a time when scrolled to.
|
|
39
|
+
*/
|
|
40
|
+
exports.PAGE_BYTES = 64 * 1024;
|
|
30
41
|
/** Why a computer added while another is in use was not switched to. */
|
|
31
42
|
class WorkbenchError extends Error {
|
|
32
43
|
constructor(reason) {
|
|
@@ -109,6 +120,11 @@ var WorkbenchUtil;
|
|
|
109
120
|
return `${LISTS_KEY} ${of}`;
|
|
110
121
|
}
|
|
111
122
|
WorkbenchUtil.listsKey = listsKey;
|
|
123
|
+
/** The open sessions as the lists show them: the newest first. */
|
|
124
|
+
function sorted(sessions) {
|
|
125
|
+
return [...sessions].sort((a, b) => b.createdAt - a.createdAt);
|
|
126
|
+
}
|
|
127
|
+
WorkbenchUtil.sorted = sorted;
|
|
112
128
|
/** The lists kept for `of`, none running: whether one runs is known once connected. */
|
|
113
129
|
function readLists(text, of) {
|
|
114
130
|
try {
|
|
@@ -116,13 +132,27 @@ var WorkbenchUtil;
|
|
|
116
132
|
if ((kept === null || kept === void 0 ? void 0 : kept.of) !== of || !Array.isArray(kept.sessions) || !Array.isArray(kept.saved)) {
|
|
117
133
|
return undefined;
|
|
118
134
|
}
|
|
119
|
-
return { server: kept.server, sessions: kept.sessions.map(session => ({ ...session, isStreaming: false })), saved: kept.saved };
|
|
135
|
+
return { server: kept.server, sessions: kept.sessions.map(session => ({ ...session, isStreaming: false, waiting: false })), saved: kept.saved };
|
|
120
136
|
}
|
|
121
137
|
catch (_a) {
|
|
122
138
|
return undefined;
|
|
123
139
|
}
|
|
124
140
|
}
|
|
125
141
|
WorkbenchUtil.readLists = readLists;
|
|
142
|
+
/**
|
|
143
|
+
* The start of the local day `days` days before `now`, a bound that moves once a day: from when the saved
|
|
144
|
+
* conversations are listed (archived before), from when the list folds them; none for 0.
|
|
145
|
+
*/
|
|
146
|
+
function daysAgo(now, days) {
|
|
147
|
+
if (!days) {
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
const since = new Date(now);
|
|
151
|
+
since.setHours(0, 0, 0, 0);
|
|
152
|
+
since.setDate(since.getDate() - days);
|
|
153
|
+
return since.getTime();
|
|
154
|
+
}
|
|
155
|
+
WorkbenchUtil.daysAgo = daysAgo;
|
|
126
156
|
/** `previous` if `next` is the same, so that what shows it is not drawn again. */
|
|
127
157
|
function same(previous, next) {
|
|
128
158
|
return JSON.stringify(previous) === JSON.stringify(next) ? previous : next;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SessionStore, type SessionStoreOptions, TaConnection } from '@celljs/ta-client';
|
|
2
|
-
import { type TaAccessServer, type TaAuthEvent, type TaAuthServer, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaServer, type TaServerInfo, type TaSettingsServer, type TaTerminalServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
2
|
+
import { type TaAccessServer, type TaAuthEvent, type TaAuthServer, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaRoomEvent, type TaRoomServer, type TaRoomWatch, type TaServer, type TaServerInfo, type TaSessionInfo, type TaSettingsServer, type TaTerminalServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
3
3
|
import { type HostList } from './hosts';
|
|
4
|
+
import { WorkbenchCalls } from './workbench-calls';
|
|
4
5
|
import { type Credential, TaWorkbench, type WorkbenchState } from './workbench-protocol';
|
|
5
6
|
import { type ServiceName } from './workbench-util';
|
|
6
7
|
export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
@@ -16,13 +17,29 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
16
17
|
protected graceMs: number;
|
|
17
18
|
/** The ta serve of the sign-in of now, whose lists are kept as they change. */
|
|
18
19
|
protected listsOf?: string;
|
|
20
|
+
/** What was kept of the computers dropped, being taken off the device. */
|
|
21
|
+
protected forgetting: Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* The calls of the services and of the stores, to the connection of the time; answered from the device
|
|
24
|
+
* while offline, for the computer in use from the start (web extensions started from the device read
|
|
25
|
+
* before the page connects).
|
|
26
|
+
*/
|
|
27
|
+
protected readonly calls: WorkbenchCalls;
|
|
19
28
|
/** Those waiting for the connection (`connected`): `resolve` once online, `reject` once signed out. */
|
|
20
|
-
protected readonly beforeConnection: Map<ServiceName, object>;
|
|
21
29
|
protected readonly connectedWaiters: Set<{
|
|
22
30
|
resolve(): void;
|
|
23
31
|
reject(error: Error): void;
|
|
24
32
|
}>;
|
|
25
33
|
protected waking: boolean;
|
|
34
|
+
protected refreshing?: Promise<void>;
|
|
35
|
+
protected refreshAgain?: Promise<void>;
|
|
36
|
+
/** Settings.chatArchiveDays: the saved conversations older are read only by `readArchived`. */
|
|
37
|
+
protected archiveDays: number;
|
|
38
|
+
/** The read of the archive under way, and from when it was read (WorkbenchUtil.archiveSince). */
|
|
39
|
+
protected archiving?: Promise<void>;
|
|
40
|
+
protected archivedSince?: number;
|
|
41
|
+
/** Counts the lists of open sessions the server told: a read of the lists begun before one does not undo it. */
|
|
42
|
+
protected pushes: number;
|
|
26
43
|
/** Counts sign-ins and sign-outs: an attempt of an earlier one does nothing when it ends. */
|
|
27
44
|
protected generation: number;
|
|
28
45
|
protected readonly listeners: Set<(state: WorkbenchState) => void>;
|
|
@@ -30,6 +47,10 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
30
47
|
protected readonly extensionDataListeners: Set<(name: string, keys: string[], cwd?: string) => void>;
|
|
31
48
|
protected readonly authListeners: Set<(loginId: string, event: TaAuthEvent) => void>;
|
|
32
49
|
protected readonly remoteListeners: Set<(event: TaRemoteEvent) => void>;
|
|
50
|
+
/** Those that listen to the rooms, and what they hear: messages and the state too, or the state of some keys. */
|
|
51
|
+
protected readonly roomListeners: Map<(event: TaRoomEvent) => void, TaRoomWatch>;
|
|
52
|
+
/** How the connection watches the rooms now: undefined not at all. */
|
|
53
|
+
protected roomsWatched?: TaRoomWatch;
|
|
33
54
|
get state(): WorkbenchState;
|
|
34
55
|
get server(): TaServer;
|
|
35
56
|
get workspace(): TaWorkspaceServer;
|
|
@@ -41,16 +62,17 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
41
62
|
get gateway(): TaGatewayServer;
|
|
42
63
|
get relay(): TaRelayServer;
|
|
43
64
|
get remote(): TaRemoteServer;
|
|
44
|
-
|
|
45
|
-
* A service of the connection; before there is one (the lists of the last time show meanwhile), its
|
|
46
|
-
* calls wait for it, and fail if the page signs out instead.
|
|
47
|
-
*/
|
|
65
|
+
get rooms(): TaRoomServer;
|
|
48
66
|
protected service<K extends ServiceName>(name: K): TaConnection[K];
|
|
49
67
|
protected signedIn(): TaConnection;
|
|
50
68
|
onTerminalData(listener: (terminalId: string, data: string, exitCode?: number) => void): () => void;
|
|
51
69
|
onExtensionData(listener: (name: string, keys: string[], cwd?: string) => void): () => void;
|
|
52
70
|
onAuthEvent(listener: (loginId: string, event: TaAuthEvent) => void): () => void;
|
|
53
71
|
onRemoteEvent(listener: (event: TaRemoteEvent) => void): () => void;
|
|
72
|
+
onRoomEvent(listener: (event: TaRoomEvent) => void, options?: {
|
|
73
|
+
messages?: boolean;
|
|
74
|
+
state?: string[];
|
|
75
|
+
}): () => void;
|
|
54
76
|
setWorkingDirectory(cwd: string): Promise<void>;
|
|
55
77
|
subscribe(listener: (state: WorkbenchState) => void): () => void;
|
|
56
78
|
start(): Promise<void>;
|
|
@@ -68,6 +90,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
68
90
|
protected reload(): void;
|
|
69
91
|
/** A host off this device, with what the page kept of it. */
|
|
70
92
|
protected drop(hostId: string): void;
|
|
93
|
+
/** Loads the page again once what was kept of the computers dropped is off the device: a load aborts what IndexedDB has not written. */
|
|
94
|
+
protected reloadSoon(): void;
|
|
71
95
|
protected keepHosts(list: HostList): void;
|
|
72
96
|
protected connectWith(credential: Credential): Promise<void>;
|
|
73
97
|
/** Tries again later while ta serve is not running, until a sign-in or sign-out of later replaces it. */
|
|
@@ -84,10 +108,27 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
84
108
|
signOut(): void;
|
|
85
109
|
connected(): Promise<void>;
|
|
86
110
|
reconnect(): void;
|
|
111
|
+
listOpened(info: TaSessionInfo): void;
|
|
112
|
+
/**
|
|
113
|
+
* One read of the lists at a time: asked again meanwhile, one more follows it for all who asked, so that
|
|
114
|
+
* reads on a slow network do not pile up.
|
|
115
|
+
*/
|
|
87
116
|
refresh(): Promise<void>;
|
|
117
|
+
protected readLists(): Promise<void>;
|
|
118
|
+
setArchiveDays(days: number): void;
|
|
119
|
+
readArchived(): Promise<void>;
|
|
88
120
|
createStore(sessionId: string, options?: SessionStoreOptions): SessionStore;
|
|
121
|
+
/** 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. */
|
|
122
|
+
protected watchSessions(connection: TaConnection): Promise<void>;
|
|
123
|
+
/** The open sessions as the server told them; one that closed is among the saved ones now, which are read again. */
|
|
124
|
+
protected takeSessions(sessions: TaSessionInfo[]): void;
|
|
89
125
|
/** The prompts of ssh that wait for an answer, from now and those already there. */
|
|
90
126
|
protected watchRemote(connection: TaConnection): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Watches the rooms as the listeners want (messages too if one does), or no more once none listens; on a new
|
|
129
|
+
* connection (`opened`) the listeners read them again (`rooms`), for what changed while away.
|
|
130
|
+
*/
|
|
131
|
+
protected watchRooms(connection: TaConnection, opened: boolean): Promise<void>;
|
|
91
132
|
protected emitRemote(event: TaRemoteEvent): void;
|
|
92
133
|
protected stopRetrying(): void;
|
|
93
134
|
/**
|