@celljs/ta-web 4.10.0 → 4.12.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 +7 -7
- package/README.md +7 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +12 -0
- package/esm/browser/assistant/assistant-extension.js +5 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
- 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 +13 -3
- package/esm/browser/assistant/assistant-task-util.js +59 -12
- package/esm/browser/assistant/assistant-view.js +48 -24
- package/esm/browser/assistant/assistant.d.ts +18 -4
- package/esm/browser/assistant/assistant.js +52 -17
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-protocol.d.ts +5 -0
- package/esm/browser/chat/chat-stores.d.ts +8 -5
- package/esm/browser/chat/chat-stores.js +17 -9
- package/esm/browser/chat/chat-view.js +23 -15
- package/esm/browser/chat/chat.d.ts +16 -8
- package/esm/browser/chat/chat.js +86 -51
- 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 +5 -2
- package/esm/browser/components/app-nav.js +22 -9
- package/esm/browser/components/app-shell-hooks.js +5 -3
- package/esm/browser/components/app-view.js +84 -20
- 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 +73 -6
- package/esm/browser/components/chat-list.js +295 -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 +15 -4
- package/esm/browser/components/composer-box.js +139 -77
- package/esm/browser/components/composer.d.ts +9 -6
- package/esm/browser/components/composer.js +32 -4
- package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
- package/esm/browser/components/conversation-scroll-hooks.js +98 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
- package/esm/browser/components/conversation-scroll-util.js +56 -0
- package/esm/browser/components/conversation-scroll.d.ts +52 -31
- package/esm/browser/components/conversation-scroll.js +170 -129
- 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 -3
- package/esm/browser/components/earlier-messages.js +42 -8
- package/esm/browser/components/editor-area.d.ts +6 -22
- package/esm/browser/components/editor-area.js +10 -97
- package/esm/browser/components/face.d.ts +24 -0
- package/esm/browser/components/face.js +42 -0
- 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 +1 -1
- package/esm/browser/components/folder-picker.js +1 -1
- 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/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 +3 -1
- package/esm/browser/components/icon.js +4 -3
- package/esm/browser/components/image-viewer.d.ts +10 -2
- package/esm/browser/components/image-viewer.js +48 -11
- 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 +5 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.js +36 -4
- package/esm/browser/components/media.js +73 -7
- package/esm/browser/components/message-actions.js +3 -0
- package/esm/browser/components/message-footer.d.ts +8 -0
- package/esm/browser/components/message-footer.js +20 -3
- package/esm/browser/components/message-list.d.ts +60 -7
- package/esm/browser/components/message-list.js +206 -58
- package/esm/browser/components/message-menu.js +6 -1
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +21 -2
- package/esm/browser/components/nav-places.js +20 -4
- 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 +23 -1
- 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 +2 -3
- package/esm/browser/components/session-settings.js +1 -0
- package/esm/browser/components/session-view.d.ts +3 -1
- package/esm/browser/components/session-view.js +35 -21
- 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.js +45 -14
- package/esm/browser/components/stop-times.d.ts +47 -0
- package/esm/browser/components/stop-times.js +81 -0
- package/esm/browser/components/tool-view.js +7 -2
- 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/use-stop-times.d.ts +3 -0
- package/esm/browser/components/use-stop-times.js +17 -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 +11 -3
- package/esm/browser/components/voice-talk.js +24 -4
- 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/hold.js +4 -6
- package/esm/browser/device/long-press.d.ts +10 -0
- package/esm/browser/device/long-press.js +28 -12
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/photo-picker.d.ts +14 -0
- package/esm/browser/device/photo-picker.js +48 -0
- package/esm/browser/device/pull-down.js +3 -2
- 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 +2 -0
- package/esm/browser/device/row-swipe.js +14 -3
- package/esm/browser/device/sheet-swipe.d.ts +1 -1
- package/esm/browser/device/sheet-swipe.js +25 -4
- 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 +16 -2
- package/esm/browser/extension/web-api-components.d.ts +287 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +394 -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 +186 -565
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +354 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +57 -7
- package/esm/browser/extension/web-extension-protocol.js +34 -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 +29 -69
- package/esm/browser/extension/web-extensions.js +121 -516
- 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/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 +92 -2
- package/esm/browser/i18n/messages.d.ts +91 -1
- package/esm/browser/i18n/messages.js +187 -7
- package/esm/browser/index.d.ts +9 -0
- package/esm/browser/index.js +9 -0
- package/esm/browser/links/links-protocol.d.ts +7 -0
- package/esm/browser/links/links.d.ts +24 -7
- package/esm/browser/links/links.js +64 -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 +17 -0
- package/esm/browser/notices/notices.d.ts +1 -1
- package/esm/browser/notices/notices.js +6 -2
- 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.js +12 -3
- package/esm/browser/offline/offline-reads.js +3 -1
- 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 +15 -0
- package/esm/browser/settings/settings-protocol.js +18 -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 +45 -5
- package/esm/browser/style/device.js +15 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +192 -56
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +39 -1
- 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 +32 -6
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +21 -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 +2 -0
- package/esm/browser/util/frame.js +2 -0
- package/esm/browser/util/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +4 -1
- package/esm/browser/util/markdown.js +1 -1
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +57 -3
- package/esm/browser/util/process.js +123 -11
- 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 +47 -7
- package/esm/browser/util/voice.js +269 -27
- package/esm/browser/workbench-calls.d.ts +6 -4
- package/esm/browser/workbench-calls.js +15 -10
- package/esm/browser/workbench-protocol.d.ts +31 -2
- package/esm/browser/workbench-util.d.ts +15 -4
- package/esm/browser/workbench-util.js +28 -5
- package/esm/browser/workbench.d.ts +33 -1
- package/esm/browser/workbench.js +142 -14
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +13 -0
- package/lib/browser/assistant/assistant-extension.js +5 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
- 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 +13 -3
- package/lib/browser/assistant/assistant-task-util.js +59 -12
- package/lib/browser/assistant/assistant-view.js +46 -22
- package/lib/browser/assistant/assistant.d.ts +18 -4
- package/lib/browser/assistant/assistant.js +52 -17
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-protocol.d.ts +5 -0
- package/lib/browser/chat/chat-stores.d.ts +8 -5
- package/lib/browser/chat/chat-stores.js +17 -9
- package/lib/browser/chat/chat-view.js +22 -14
- package/lib/browser/chat/chat.d.ts +16 -8
- package/lib/browser/chat/chat.js +86 -51
- 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 +5 -2
- package/lib/browser/components/app-nav.js +18 -5
- package/lib/browser/components/app-shell-hooks.js +5 -3
- package/lib/browser/components/app-view.js +80 -16
- 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 +73 -6
- package/lib/browser/components/chat-list.js +295 -59
- 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 +15 -4
- package/lib/browser/components/composer-box.js +136 -74
- package/lib/browser/components/composer.d.ts +9 -6
- package/lib/browser/components/composer.js +31 -3
- package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
- package/lib/browser/components/conversation-scroll-hooks.js +135 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
- package/lib/browser/components/conversation-scroll-util.js +60 -0
- package/lib/browser/components/conversation-scroll.d.ts +52 -31
- package/lib/browser/components/conversation-scroll.js +171 -164
- 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 -3
- package/lib/browser/components/earlier-messages.js +44 -9
- package/lib/browser/components/editor-area.d.ts +6 -22
- package/lib/browser/components/editor-area.js +11 -98
- package/lib/browser/components/face.d.ts +25 -0
- package/lib/browser/components/face.js +79 -0
- 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 +1 -1
- package/lib/browser/components/folder-picker.js +1 -1
- 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/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 +3 -1
- package/lib/browser/components/icon.js +4 -3
- package/lib/browser/components/image-viewer.d.ts +10 -2
- package/lib/browser/components/image-viewer.js +47 -10
- 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 +5 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.js +36 -4
- package/lib/browser/components/media.js +73 -7
- package/lib/browser/components/message-actions.js +3 -0
- package/lib/browser/components/message-footer.d.ts +8 -0
- package/lib/browser/components/message-footer.js +20 -2
- package/lib/browser/components/message-list.d.ts +60 -7
- package/lib/browser/components/message-list.js +206 -55
- package/lib/browser/components/message-menu.js +6 -1
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +21 -2
- package/lib/browser/components/nav-places.js +22 -4
- 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 +23 -1
- 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 +2 -3
- package/lib/browser/components/session-settings.js +1 -0
- package/lib/browser/components/session-view.d.ts +3 -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.js +43 -12
- package/lib/browser/components/stop-times.d.ts +48 -0
- package/lib/browser/components/stop-times.js +85 -0
- package/lib/browser/components/tool-view.js +7 -2
- 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/use-stop-times.d.ts +4 -0
- package/lib/browser/components/use-stop-times.js +53 -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 +11 -3
- package/lib/browser/components/voice-talk.js +25 -4
- 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/hold.js +4 -6
- package/lib/browser/device/long-press.d.ts +10 -0
- package/lib/browser/device/long-press.js +28 -12
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/photo-picker.d.ts +15 -0
- package/lib/browser/device/photo-picker.js +51 -0
- package/lib/browser/device/pull-down.js +3 -2
- 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 +2 -0
- package/lib/browser/device/row-swipe.js +14 -3
- package/lib/browser/device/sheet-swipe.d.ts +1 -1
- package/lib/browser/device/sheet-swipe.js +25 -4
- 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 +15 -1
- package/lib/browser/extension/web-api-components.d.ts +288 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +395 -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 +186 -565
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +391 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +57 -7
- package/lib/browser/extension/web-extension-protocol.js +35 -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 +29 -69
- package/lib/browser/extension/web-extensions.js +117 -545
- 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/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 +92 -2
- package/lib/browser/i18n/messages.d.ts +91 -1
- package/lib/browser/i18n/messages.js +187 -7
- package/lib/browser/index.d.ts +9 -0
- package/lib/browser/index.js +9 -0
- package/lib/browser/links/links-protocol.d.ts +7 -0
- package/lib/browser/links/links.d.ts +24 -7
- package/lib/browser/links/links.js +64 -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 +17 -0
- package/lib/browser/notices/notices.d.ts +1 -1
- package/lib/browser/notices/notices.js +6 -2
- 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.js +12 -3
- package/lib/browser/offline/offline-reads.js +3 -1
- 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 +15 -0
- package/lib/browser/settings/settings-protocol.js +19 -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 +45 -5
- package/lib/browser/style/device.js +15 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +192 -56
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +39 -1
- 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 +32 -6
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +21 -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 +2 -0
- package/lib/browser/util/frame.js +2 -0
- package/lib/browser/util/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +4 -1
- package/lib/browser/util/markdown.js +1 -1
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +57 -3
- package/lib/browser/util/process.js +125 -12
- 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 +47 -7
- package/lib/browser/util/voice.js +269 -27
- package/lib/browser/workbench-calls.d.ts +6 -4
- package/lib/browser/workbench-calls.js +15 -10
- package/lib/browser/workbench-protocol.d.ts +31 -2
- package/lib/browser/workbench-util.d.ts +15 -4
- package/lib/browser/workbench-util.js +28 -5
- package/lib/browser/workbench.d.ts +33 -1
- package/lib/browser/workbench.js +140 -12
- package/package.json +11 -8
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
import { WorkbenchCalls } from './workbench-calls';
|
|
5
5
|
import { type Credential, TaWorkbench, type WorkbenchState } from './workbench-protocol';
|
|
@@ -17,6 +17,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
17
17
|
protected graceMs: number;
|
|
18
18
|
/** The ta serve of the sign-in of now, whose lists are kept as they change. */
|
|
19
19
|
protected listsOf?: string;
|
|
20
|
+
/** What was kept of the computers dropped, being taken off the device. */
|
|
21
|
+
protected forgetting: Promise<unknown>;
|
|
20
22
|
/**
|
|
21
23
|
* The calls of the services and of the stores, to the connection of the time; answered from the device
|
|
22
24
|
* while offline, for the computer in use from the start (web extensions started from the device read
|
|
@@ -31,6 +33,13 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
31
33
|
protected waking: boolean;
|
|
32
34
|
protected refreshing?: Promise<void>;
|
|
33
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;
|
|
34
43
|
/** Counts sign-ins and sign-outs: an attempt of an earlier one does nothing when it ends. */
|
|
35
44
|
protected generation: number;
|
|
36
45
|
protected readonly listeners: Set<(state: WorkbenchState) => void>;
|
|
@@ -38,6 +47,10 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
38
47
|
protected readonly extensionDataListeners: Set<(name: string, keys: string[], cwd?: string) => void>;
|
|
39
48
|
protected readonly authListeners: Set<(loginId: string, event: TaAuthEvent) => void>;
|
|
40
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;
|
|
41
54
|
get state(): WorkbenchState;
|
|
42
55
|
get server(): TaServer;
|
|
43
56
|
get workspace(): TaWorkspaceServer;
|
|
@@ -49,12 +62,17 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
49
62
|
get gateway(): TaGatewayServer;
|
|
50
63
|
get relay(): TaRelayServer;
|
|
51
64
|
get remote(): TaRemoteServer;
|
|
65
|
+
get rooms(): TaRoomServer;
|
|
52
66
|
protected service<K extends ServiceName>(name: K): TaConnection[K];
|
|
53
67
|
protected signedIn(): TaConnection;
|
|
54
68
|
onTerminalData(listener: (terminalId: string, data: string, exitCode?: number) => void): () => void;
|
|
55
69
|
onExtensionData(listener: (name: string, keys: string[], cwd?: string) => void): () => void;
|
|
56
70
|
onAuthEvent(listener: (loginId: string, event: TaAuthEvent) => void): () => void;
|
|
57
71
|
onRemoteEvent(listener: (event: TaRemoteEvent) => void): () => void;
|
|
72
|
+
onRoomEvent(listener: (event: TaRoomEvent) => void, options?: {
|
|
73
|
+
messages?: boolean;
|
|
74
|
+
state?: string[];
|
|
75
|
+
}): () => void;
|
|
58
76
|
setWorkingDirectory(cwd: string): Promise<void>;
|
|
59
77
|
subscribe(listener: (state: WorkbenchState) => void): () => void;
|
|
60
78
|
start(): Promise<void>;
|
|
@@ -72,6 +90,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
72
90
|
protected reload(): void;
|
|
73
91
|
/** A host off this device, with what the page kept of it. */
|
|
74
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;
|
|
75
95
|
protected keepHosts(list: HostList): void;
|
|
76
96
|
protected connectWith(credential: Credential): Promise<void>;
|
|
77
97
|
/** Tries again later while ta serve is not running, until a sign-in or sign-out of later replaces it. */
|
|
@@ -88,15 +108,27 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
88
108
|
signOut(): void;
|
|
89
109
|
connected(): Promise<void>;
|
|
90
110
|
reconnect(): void;
|
|
111
|
+
listOpened(info: TaSessionInfo): void;
|
|
91
112
|
/**
|
|
92
113
|
* One read of the lists at a time: asked again meanwhile, one more follows it for all who asked, so that
|
|
93
114
|
* reads on a slow network do not pile up.
|
|
94
115
|
*/
|
|
95
116
|
refresh(): Promise<void>;
|
|
96
117
|
protected readLists(): Promise<void>;
|
|
118
|
+
setArchiveDays(days: number): void;
|
|
119
|
+
readArchived(): Promise<void>;
|
|
97
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;
|
|
98
125
|
/** The prompts of ssh that wait for an answer, from now and those already there. */
|
|
99
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>;
|
|
100
132
|
protected emitRemote(event: TaRemoteEvent): void;
|
|
101
133
|
protected stopRetrying(): void;
|
|
102
134
|
/**
|
package/lib/browser/workbench.js
CHANGED
|
@@ -13,6 +13,7 @@ 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
15
|
const device_values_1 = require("./offline/device-values");
|
|
16
|
+
const settings_protocol_1 = require("./settings/settings-protocol");
|
|
16
17
|
const state_protocol_1 = require("./state/state-protocol");
|
|
17
18
|
const workbench_calls_1 = require("./workbench-calls");
|
|
18
19
|
const workbench_protocol_1 = require("./workbench-protocol");
|
|
@@ -23,6 +24,8 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
23
24
|
this.current = { status: 'connecting', hosts: this.list.hosts, host: this.list.current, sessions: [], saved: [] };
|
|
24
25
|
this.attempts = 0;
|
|
25
26
|
this.graceMs = workbench_util_1.GRACE_MS;
|
|
27
|
+
/** What was kept of the computers dropped, being taken off the device. */
|
|
28
|
+
this.forgetting = Promise.resolve();
|
|
26
29
|
/**
|
|
27
30
|
* The calls of the services and of the stores, to the connection of the time; answered from the device
|
|
28
31
|
* while offline, for the computer in use from the start (web extensions started from the device read
|
|
@@ -42,6 +45,10 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
42
45
|
/** Those waiting for the connection (`connected`): `resolve` once online, `reject` once signed out. */
|
|
43
46
|
this.connectedWaiters = new Set();
|
|
44
47
|
this.waking = false;
|
|
48
|
+
/** Settings.chatArchiveDays: the saved conversations older are read only by `readArchived`. */
|
|
49
|
+
this.archiveDays = settings_protocol_1.DEFAULT_SETTINGS.chatArchiveDays;
|
|
50
|
+
/** Counts the lists of open sessions the server told: a read of the lists begun before one does not undo it. */
|
|
51
|
+
this.pushes = 0;
|
|
45
52
|
/** Counts sign-ins and sign-outs: an attempt of an earlier one does nothing when it ends. */
|
|
46
53
|
this.generation = 0;
|
|
47
54
|
this.listeners = new Set();
|
|
@@ -49,6 +56,8 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
49
56
|
this.extensionDataListeners = new Set();
|
|
50
57
|
this.authListeners = new Set();
|
|
51
58
|
this.remoteListeners = new Set();
|
|
59
|
+
/** Those that listen to the rooms, and what they hear: messages and the state too, or the state of some keys. */
|
|
60
|
+
this.roomListeners = new Map();
|
|
52
61
|
}
|
|
53
62
|
get state() {
|
|
54
63
|
return this.current;
|
|
@@ -83,6 +92,9 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
83
92
|
get remote() {
|
|
84
93
|
return this.service('remote');
|
|
85
94
|
}
|
|
95
|
+
get rooms() {
|
|
96
|
+
return this.service('rooms');
|
|
97
|
+
}
|
|
86
98
|
service(name) {
|
|
87
99
|
return this.calls.service(name);
|
|
88
100
|
}
|
|
@@ -108,6 +120,18 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
108
120
|
this.remoteListeners.add(listener);
|
|
109
121
|
return () => this.remoteListeners.delete(listener);
|
|
110
122
|
}
|
|
123
|
+
onRoomEvent(listener, options = {}) {
|
|
124
|
+
const wrapped = (event) => listener(event);
|
|
125
|
+
this.roomListeners.set(wrapped, ta_protocol_1.TaRoomWatchUtil.of(options.messages, options.state));
|
|
126
|
+
if (this.connection) {
|
|
127
|
+
void this.watchRooms(this.connection, false);
|
|
128
|
+
}
|
|
129
|
+
return () => {
|
|
130
|
+
if (this.roomListeners.delete(wrapped) && this.connection) {
|
|
131
|
+
void this.watchRooms(this.connection, false);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
111
135
|
async setWorkingDirectory(cwd) {
|
|
112
136
|
this.update({ server: await this.server.setWorkingDirectory(cwd) });
|
|
113
137
|
}
|
|
@@ -203,7 +227,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
203
227
|
*/
|
|
204
228
|
load(hostId) {
|
|
205
229
|
this.update({ switching: hostId });
|
|
206
|
-
setTimeout(() => this.
|
|
230
|
+
setTimeout(() => this.reloadSoon(), workbench_util_1.SWITCH_MS);
|
|
207
231
|
}
|
|
208
232
|
reload() {
|
|
209
233
|
location.reload();
|
|
@@ -216,11 +240,15 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
216
240
|
if (kept) {
|
|
217
241
|
state_protocol_1.StateUtil.forgetHost(kept, hostId);
|
|
218
242
|
}
|
|
219
|
-
|
|
243
|
+
this.forgetting = Promise.all([this.forgetting, device_values_1.OfflineKeys.forget((0, device_values_1.deviceValues)(), hostId)]);
|
|
220
244
|
if (this.listsOf === hostId) {
|
|
221
245
|
this.listsOf = undefined;
|
|
222
246
|
}
|
|
223
247
|
}
|
|
248
|
+
/** Loads the page again once what was kept of the computers dropped is off the device: a load aborts what IndexedDB has not written. */
|
|
249
|
+
reloadSoon() {
|
|
250
|
+
void this.forgetting.finally(() => this.reload());
|
|
251
|
+
}
|
|
224
252
|
keepHosts(list) {
|
|
225
253
|
var _a;
|
|
226
254
|
this.list = list;
|
|
@@ -242,7 +270,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
242
270
|
// Another ta serve: its lists of the last time, or none, rather than those of the one before.
|
|
243
271
|
this.listsOf = of;
|
|
244
272
|
this.calls.reads.use(of);
|
|
245
|
-
this.update({
|
|
273
|
+
this.update({
|
|
274
|
+
server: undefined,
|
|
275
|
+
sessions: [],
|
|
276
|
+
saved: [],
|
|
277
|
+
archived: undefined,
|
|
278
|
+
...workbench_util_1.WorkbenchUtil.readLists((_c = (_b = (0, workbench_util_1.storage)()) === null || _b === void 0 ? void 0 : _b.getItem(workbench_util_1.WorkbenchUtil.listsKey(of))) !== null && _c !== void 0 ? _c : null, of),
|
|
279
|
+
});
|
|
246
280
|
}
|
|
247
281
|
this.update({ status: 'connecting', error: undefined });
|
|
248
282
|
await this.connect(credential);
|
|
@@ -263,7 +297,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
263
297
|
if (wasRefused) {
|
|
264
298
|
// Unpaired on the computer, or a token of before: of no use any more.
|
|
265
299
|
this.drop(workbench_util_1.WorkbenchUtil.serverOf(credential, (0, workbench_util_1.pageHost)()));
|
|
266
|
-
this.update({ status: 'signed-out', error: 'refused', server: undefined, sessions: [], saved: [] });
|
|
300
|
+
this.update({ status: 'signed-out', error: 'refused', server: undefined, sessions: [], saved: [], archived: undefined });
|
|
267
301
|
}
|
|
268
302
|
else {
|
|
269
303
|
const delay = workbench_util_1.WorkbenchUtil.retryDelay(this.attempts++);
|
|
@@ -300,8 +334,16 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
300
334
|
}
|
|
301
335
|
});
|
|
302
336
|
connection.onRemoteEvent(event => this.emitRemote(event));
|
|
337
|
+
connection.onRoomEvent(event => {
|
|
338
|
+
for (const [listener, watch] of this.roomListeners) {
|
|
339
|
+
if (ta_protocol_1.TaRoomWatchUtil.hears(watch, event)) {
|
|
340
|
+
listener(event);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
});
|
|
303
344
|
// A connection closed for a sign-out or another computer says nothing any more.
|
|
304
345
|
const own = () => this.connection === connection;
|
|
346
|
+
connection.onSessions(sessions => own() && this.takeSessions(sessions));
|
|
305
347
|
connection.onClose(() => own() && this.update({ status: 'offline' }));
|
|
306
348
|
connection.onReconnecting(delayMs => own() && this.update({ retryAt: Date.now() + delayMs }));
|
|
307
349
|
connection.onOpen(() => {
|
|
@@ -311,8 +353,14 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
311
353
|
this.update({ status: 'online', retryAt: undefined });
|
|
312
354
|
void this.refresh();
|
|
313
355
|
void this.watchRemote(connection);
|
|
356
|
+
this.roomsWatched = undefined;
|
|
357
|
+
void this.watchRooms(connection, true);
|
|
358
|
+
void this.watchSessions(connection);
|
|
314
359
|
});
|
|
315
360
|
void this.watchRemote(connection);
|
|
361
|
+
this.roomsWatched = undefined;
|
|
362
|
+
void this.watchRooms(connection, true);
|
|
363
|
+
void this.watchSessions(connection);
|
|
316
364
|
if ('pairing' in credential) {
|
|
317
365
|
// Through a relay the computer has let the page in once the socket is open, and no gateway is behind
|
|
318
366
|
// it: the calls of the page go now, with the one that reads who it is, not a round trip after it.
|
|
@@ -368,8 +416,8 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
368
416
|
this.stopRetrying();
|
|
369
417
|
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.close();
|
|
370
418
|
this.connection = undefined;
|
|
371
|
-
this.update({ status: 'signed-out', error: undefined, retryAt: undefined, server: undefined, sessions: [], saved: [] });
|
|
372
|
-
this.
|
|
419
|
+
this.update({ status: 'signed-out', error: undefined, retryAt: undefined, server: undefined, sessions: [], saved: [], archived: undefined });
|
|
420
|
+
this.reloadSoon();
|
|
373
421
|
}
|
|
374
422
|
connected() {
|
|
375
423
|
if (this.current.status === 'online') {
|
|
@@ -390,6 +438,14 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
390
438
|
(_a = this.connection) === null || _a === void 0 ? void 0 : _a.reconnect();
|
|
391
439
|
}
|
|
392
440
|
}
|
|
441
|
+
listOpened(info) {
|
|
442
|
+
if (this.current.sessions.some(session => session.sessionId === info.sessionId)) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
// Newer than a list read before it, as one the server told.
|
|
446
|
+
this.pushes++;
|
|
447
|
+
this.update({ sessions: workbench_util_1.WorkbenchUtil.sorted([...this.current.sessions, info]) });
|
|
448
|
+
}
|
|
393
449
|
/**
|
|
394
450
|
* One read of the lists at a time: asked again meanwhile, one more follows it for all who asked, so that
|
|
395
451
|
* reads on a slow network do not pile up.
|
|
@@ -411,24 +467,79 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
411
467
|
return this.refreshAgain;
|
|
412
468
|
}
|
|
413
469
|
async readLists() {
|
|
470
|
+
const pushes = this.pushes;
|
|
414
471
|
// A ta serve of before has no saved sessions to list: its list stays the open ones. The default
|
|
415
|
-
// directory comes along, as another device may have changed it.
|
|
472
|
+
// directory comes along, as another device may have changed it. The archived are left out: a list
|
|
473
|
+
// read every few seconds stays as small as the conversations of the last days, however many there were.
|
|
474
|
+
const since = workbench_util_1.WorkbenchUtil.daysAgo(Date.now(), this.archiveDays);
|
|
416
475
|
const [sessions, saved, server] = await Promise.all([
|
|
417
476
|
this.server.listSessions(),
|
|
418
|
-
this.server.listSavedSessions().catch(() => []),
|
|
477
|
+
this.server.listSavedSessions(since === undefined ? undefined : { since }).catch(() => []),
|
|
419
478
|
this.server.getServerInfo().catch(() => this.current.server),
|
|
420
479
|
]);
|
|
421
|
-
|
|
422
|
-
|
|
480
|
+
// A ta serve of before lists them all.
|
|
481
|
+
const recent = since === undefined ? saved : saved.filter(session => session.updatedAt >= since);
|
|
482
|
+
// Read every few seconds and mostly the same: what shows them is not drawn again for nothing. A list
|
|
483
|
+
// the server told meanwhile is newer than this one, read before it.
|
|
423
484
|
this.update({
|
|
424
|
-
sessions: workbench_util_1.WorkbenchUtil.same(this.current.sessions, sessions),
|
|
425
|
-
saved: workbench_util_1.WorkbenchUtil.same(this.current.saved,
|
|
485
|
+
sessions: pushes === this.pushes ? workbench_util_1.WorkbenchUtil.same(this.current.sessions, workbench_util_1.WorkbenchUtil.sorted(sessions)) : this.current.sessions,
|
|
486
|
+
saved: workbench_util_1.WorkbenchUtil.same(this.current.saved, recent),
|
|
426
487
|
server: workbench_util_1.WorkbenchUtil.same(this.current.server, server),
|
|
427
488
|
});
|
|
489
|
+
// A day later, those that just grew old are in the archive read, not lost between the two lists.
|
|
490
|
+
if (this.current.archived && this.archivedSince !== since) {
|
|
491
|
+
void this.readArchived().catch(() => undefined);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
setArchiveDays(days) {
|
|
495
|
+
if (days === this.archiveDays) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
this.archiveDays = days;
|
|
499
|
+
if (this.current.status === 'online') {
|
|
500
|
+
void this.refresh().catch(() => undefined);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
readArchived() {
|
|
504
|
+
var _a;
|
|
505
|
+
(_a = this.archiving) !== null && _a !== void 0 ? _a : (this.archiving = (async () => {
|
|
506
|
+
const since = workbench_util_1.WorkbenchUtil.daysAgo(Date.now(), this.archiveDays);
|
|
507
|
+
const archived = since === undefined ? [] : await this.server.listSavedSessions({ before: since });
|
|
508
|
+
this.archivedSince = since;
|
|
509
|
+
const old = since === undefined ? [] : archived.filter(session => session.updatedAt < since);
|
|
510
|
+
this.update({ archived: workbench_util_1.WorkbenchUtil.same(this.current.archived, old) });
|
|
511
|
+
})().finally(() => {
|
|
512
|
+
this.archiving = undefined;
|
|
513
|
+
}));
|
|
514
|
+
return this.archiving;
|
|
428
515
|
}
|
|
429
516
|
createStore(sessionId, options) {
|
|
430
517
|
return new ta_client_1.SessionStore(this.calls.link, sessionId, { pageBytes: workbench_util_1.PAGE_BYTES, ...options });
|
|
431
518
|
}
|
|
519
|
+
/** 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. */
|
|
520
|
+
async watchSessions(connection) {
|
|
521
|
+
try {
|
|
522
|
+
const sessions = await connection.server.watchSessions();
|
|
523
|
+
if (this.connection === connection) {
|
|
524
|
+
this.takeSessions(sessions);
|
|
525
|
+
this.update({ sessionsPushed: true });
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
catch (error) {
|
|
529
|
+
if (this.connection === connection && ta_client_1.TaRemoteError.isMethodNotFound(error)) {
|
|
530
|
+
this.update({ sessionsPushed: false });
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
/** The open sessions as the server told them; one that closed is among the saved ones now, which are read again. */
|
|
535
|
+
takeSessions(sessions) {
|
|
536
|
+
this.pushes++;
|
|
537
|
+
const closed = this.current.sessions.some(session => !sessions.some(other => other.sessionId === session.sessionId));
|
|
538
|
+
this.update({ sessions: workbench_util_1.WorkbenchUtil.same(this.current.sessions, workbench_util_1.WorkbenchUtil.sorted(sessions)) });
|
|
539
|
+
if (closed) {
|
|
540
|
+
void this.refresh().catch(() => undefined);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
432
543
|
/** The prompts of ssh that wait for an answer, from now and those already there. */
|
|
433
544
|
async watchRemote(connection) {
|
|
434
545
|
const prompts = await connection.remote.watch().catch(() => []);
|
|
@@ -436,6 +547,23 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
436
547
|
this.emitRemote({ type: 'prompt', prompt });
|
|
437
548
|
}
|
|
438
549
|
}
|
|
550
|
+
/**
|
|
551
|
+
* Watches the rooms as the listeners want (messages too if one does), or no more once none listens; on a new
|
|
552
|
+
* connection (`opened`) the listeners read them again (`rooms`), for what changed while away.
|
|
553
|
+
*/
|
|
554
|
+
async watchRooms(connection, opened) {
|
|
555
|
+
const wanted = this.roomListeners.size === 0 ? undefined : ta_protocol_1.TaRoomWatchUtil.union(this.roomListeners.values());
|
|
556
|
+
if (!ta_protocol_1.TaRoomWatchUtil.same(wanted, this.roomsWatched)) {
|
|
557
|
+
this.roomsWatched = wanted;
|
|
558
|
+
// A ta serve of before has no rooms; one of before the state of some keys hears it only with messages.
|
|
559
|
+
await (wanted === undefined ? connection.rooms.unwatch() : connection.rooms.watch(wanted.messages, wanted.state)).catch(() => undefined);
|
|
560
|
+
}
|
|
561
|
+
if (opened) {
|
|
562
|
+
for (const listener of this.roomListeners.keys()) {
|
|
563
|
+
listener({ type: 'rooms' });
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
439
567
|
emitRemote(event) {
|
|
440
568
|
for (const listener of this.remoteListeners) {
|
|
441
569
|
listener(event);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.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,13 @@
|
|
|
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.12.0",
|
|
37
|
+
"@celljs/react": "4.12.0",
|
|
38
|
+
"@celljs/ta-client": "4.12.0",
|
|
39
|
+
"@celljs/ta-protocol": "4.12.0",
|
|
40
|
+
"@celljs/ta-relay": "4.12.0",
|
|
41
|
+
"@celljs/widget": "4.12.0",
|
|
42
|
+
"@types/three": "^0.187.0",
|
|
42
43
|
"@xterm/addon-fit": "^0.11.0",
|
|
43
44
|
"@xterm/addon-unicode11": "^0.9.0",
|
|
44
45
|
"@xterm/addon-webgl": "^0.19.0",
|
|
@@ -47,8 +48,10 @@
|
|
|
47
48
|
"lucide-react": "^1.72.0",
|
|
48
49
|
"mermaid": "^12.3.0",
|
|
49
50
|
"monaco-editor": "^0.57.0",
|
|
51
|
+
"phaser": "^4.2.1",
|
|
50
52
|
"react": "^19.3.1",
|
|
51
|
-
"react-intl": "^7.1.14"
|
|
53
|
+
"react-intl": "^7.1.14",
|
|
54
|
+
"three": "^0.187.0"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
54
57
|
"@earendil-works/pi-ai": "^1.5.2",
|