@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
|
@@ -31,19 +31,25 @@ let TaLinksImpl = class TaLinksImpl {
|
|
|
31
31
|
this.listeners.add(listener);
|
|
32
32
|
return () => this.listeners.delete(listener);
|
|
33
33
|
}
|
|
34
|
-
async open(
|
|
35
|
-
var _a;
|
|
34
|
+
async open(link, { cwd, paths = [], external = false } = {}) {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
// `~/…` is in the home of the computer of the conversation; that of another machine (ssh://) is not known here.
|
|
37
|
+
const target = link.type === 'path' && !(cwd === null || cwd === void 0 ? void 0 : cwd.includes('://')) ? { ...link, path: link_1.LinkUtil.expandHome(link.path, (_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.home) } : link;
|
|
36
38
|
try {
|
|
37
39
|
if (target.type === 'mail') {
|
|
38
40
|
this.openExternal(target.url);
|
|
39
41
|
}
|
|
40
42
|
else if (target.type === 'url') {
|
|
41
|
-
|
|
43
|
+
// Out of Ta, but for a link that an opener of its own kind takes (a link of a share).
|
|
44
|
+
if (!(await this.dispatch({ type: 'url', url: target.url }, external))) {
|
|
42
45
|
this.askExternal(target.url);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
48
|
+
else if (link_1.LinkUtil.isSessionFile(target.path) && (await this.openConversation(target.path))) {
|
|
49
|
+
// A session file of Ta: its conversation, wherever the conversation of the link works.
|
|
50
|
+
}
|
|
45
51
|
else {
|
|
46
|
-
const link = await this.locate(target, cwd || ((
|
|
52
|
+
const link = await this.locate(target, cwd || ((_b = this.workbench.state.server) === null || _b === void 0 ? void 0 : _b.cwd) || '/', paths);
|
|
47
53
|
if (link && !(await this.dispatch(link))) {
|
|
48
54
|
this.notices.notify(this.text('ta.link.noOpener'), { level: 'warning' });
|
|
49
55
|
}
|
|
@@ -74,9 +80,28 @@ let TaLinksImpl = class TaLinksImpl {
|
|
|
74
80
|
this.openExternal(request.url);
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
/**
|
|
84
|
+
* A file or a directory as the openers take it. A relative path is looked for first where the tools
|
|
85
|
+
* named it and in the directory of the conversation, then near where they worked (LinkUtil.places): an
|
|
86
|
+
* agent in a git worktree writes paths of the worktree.
|
|
87
|
+
*/
|
|
88
|
+
async locate(target, conversationCwd, paths) {
|
|
89
|
+
var _a;
|
|
90
|
+
const { named, nearby } = link_1.LinkUtil.places(target.path, conversationCwd, paths);
|
|
91
|
+
const link = (_a = (await this.find(target, [...named, conversationCwd]))) !== null && _a !== void 0 ? _a : (await this.find(target, nearby));
|
|
92
|
+
if (!link) {
|
|
93
|
+
this.notices.notify(this.text('ta.link.notFound', link_1.LinkUtil.label(target)), { level: 'warning' });
|
|
94
|
+
}
|
|
95
|
+
return link;
|
|
96
|
+
}
|
|
97
|
+
/** The path in the first of `dirs` that has it, each read at once. */
|
|
98
|
+
async find(target, dirs) {
|
|
99
|
+
const links = await Promise.all(dirs.map(dir => this.lookUp(target, dir)));
|
|
100
|
+
return links.find(link => link);
|
|
101
|
+
}
|
|
102
|
+
/** The path in `dir`, whether a file or a directory, read from its directory; undefined when it is not there. */
|
|
103
|
+
async lookUp(target, dir) {
|
|
104
|
+
const { cwd, path } = link_1.LinkUtil.resolve(dir, target.path);
|
|
80
105
|
if (!path) {
|
|
81
106
|
return { type: 'directory', cwd, path };
|
|
82
107
|
}
|
|
@@ -84,14 +109,35 @@ let TaLinksImpl = class TaLinksImpl {
|
|
|
84
109
|
const entries = await this.workbench.workspace.listDirectory(link_1.LinkUtil.dirname(path), cwd).catch(() => []);
|
|
85
110
|
const entry = entries.find(candidate => candidate.name === name);
|
|
86
111
|
if (!entry) {
|
|
87
|
-
this.notices.notify(this.text('ta.link.notFound', link_1.LinkUtil.label(target)), { level: 'warning' });
|
|
88
112
|
return undefined;
|
|
89
113
|
}
|
|
90
114
|
return entry.kind === 'directory' ? { type: 'directory', cwd, path } : { type: 'file', cwd, path, selection: target.selection };
|
|
91
115
|
}
|
|
92
|
-
/**
|
|
93
|
-
async
|
|
94
|
-
|
|
116
|
+
/** Shows the conversation of a session file, opened again when it closed; false when no conversation has it. */
|
|
117
|
+
async openConversation(file) {
|
|
118
|
+
var _a, _b, _c;
|
|
119
|
+
var _d, _e;
|
|
120
|
+
const switcher = this.extensions.sessionSwitcher();
|
|
121
|
+
if (!switcher) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
const open = this.workbench.state.sessions.find(session => session.sessionFile === file);
|
|
125
|
+
const saved = open ? undefined : (await this.workbench.server.listSavedSessions()).find(session => session.sessionFile === file);
|
|
126
|
+
if (!open && !saved) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
const session = (_d = open === null || open === void 0 ? void 0 : open.sessionId) !== null && _d !== void 0 ? _d : this.workbench.server
|
|
130
|
+
.openSession({ cwd: (_e = saved === null || saved === void 0 ? void 0 : saved.cwd) !== null && _e !== void 0 ? _e : '.', sessionFile: file, ...((saved === null || saved === void 0 ? void 0 : saved.group) ? { group: saved.group } : {}) })
|
|
131
|
+
.then(info => info.sessionId);
|
|
132
|
+
const shown = switcher(session, { title: ((_a = (open !== null && open !== void 0 ? open : saved)) === null || _a === void 0 ? void 0 : _a.sessionName) || ((_b = (open !== null && open !== void 0 ? open : saved)) === null || _b === void 0 ? void 0 : _b.firstMessage), cwd: (_c = (open !== null && open !== void 0 ? open : saved)) === null || _c === void 0 ? void 0 : _c.cwd, sessionFile: file });
|
|
133
|
+
this.extensions.showPage('');
|
|
134
|
+
await shown;
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
/** The first opener of the web extensions that opens it; of those of some links only, with `specific`. */
|
|
138
|
+
async dispatch(link, specific = false) {
|
|
139
|
+
const { openers, specificOpeners } = this.extensions.state;
|
|
140
|
+
for (const opener of specific ? specificOpeners : openers) {
|
|
95
141
|
if (await opener(link)) {
|
|
96
142
|
return true;
|
|
97
143
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { WebCodeRendererProps } from '../extension/web-api-contributions';
|
|
3
|
+
/** What web extensions draw fenced blocks of their languages with (WebExtensionAPI.registerCodeRenderer), by language in lower case. */
|
|
4
|
+
export declare const CodeRenderers: React.Context<Readonly<Record<string, React.ComponentType<WebCodeRendererProps>>>>;
|
|
5
|
+
//# sourceMappingURL=code-renderers.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CodeRenderers = void 0;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
/** What web extensions draw fenced blocks of their languages with (WebExtensionAPI.registerCodeRenderer), by language in lower case. */
|
|
39
|
+
exports.CodeRenderers = React.createContext({});
|
|
40
|
+
//# sourceMappingURL=code-renderers.js.map
|
|
@@ -8,11 +8,26 @@ export interface NoticeAction {
|
|
|
8
8
|
label: string;
|
|
9
9
|
run(): void;
|
|
10
10
|
}
|
|
11
|
+
/** A conversation that said what a notice says (TaNotices.notify `from`): drawn with its face and name. */
|
|
12
|
+
export interface NoticeFrom {
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
sessionFile?: string;
|
|
15
|
+
/** Its name, as the lists show it. */
|
|
16
|
+
title: string;
|
|
17
|
+
/** What it asks of the user, beside its name: it waits for them, or its run failed. */
|
|
18
|
+
status?: 'ask' | 'failed';
|
|
19
|
+
/** Shows the conversation: a tap on the notice. */
|
|
20
|
+
open(): void;
|
|
21
|
+
}
|
|
11
22
|
export interface NoticeOptions {
|
|
12
23
|
level?: NoticeLevel;
|
|
13
24
|
/** A second, quieter line: what to do about it. */
|
|
14
25
|
detail?: string;
|
|
15
26
|
action?: NoticeAction;
|
|
27
|
+
/** Buttons side by side under the message (answers to pick); `action` is the last of them. */
|
|
28
|
+
actions?: NoticeAction[];
|
|
29
|
+
/** Said by a conversation. */
|
|
30
|
+
from?: NoticeFrom;
|
|
16
31
|
/** Notices of one key replace each other and count how often they came, instead of piling up. */
|
|
17
32
|
key?: string;
|
|
18
33
|
/** Stays until the user closes it. */
|
|
@@ -26,6 +41,8 @@ export interface Notice {
|
|
|
26
41
|
message: string;
|
|
27
42
|
detail?: string;
|
|
28
43
|
action?: NoticeAction;
|
|
44
|
+
actions?: NoticeAction[];
|
|
45
|
+
from?: NoticeFrom;
|
|
29
46
|
key?: string;
|
|
30
47
|
sticky?: boolean;
|
|
31
48
|
art?: boolean[][];
|
|
@@ -61,6 +78,11 @@ export interface NoticesState {
|
|
|
61
78
|
confirm?: ConfirmRequest;
|
|
62
79
|
/** Or the text asked for, in the same line of questions. */
|
|
63
80
|
input?: InputRequest;
|
|
81
|
+
/**
|
|
82
|
+
* When something the user did last did not happen only because the connection was lost: no notice for
|
|
83
|
+
* that, the row of the connection says it for a moment (ConnectionBar, ConnectionBanner).
|
|
84
|
+
*/
|
|
85
|
+
notDoneAt?: number;
|
|
64
86
|
}
|
|
65
87
|
/**
|
|
66
88
|
* The notices of the page, from ta and its web extensions alike: short-lived messages in a corner, and
|
|
@@ -71,7 +93,10 @@ export interface TaNotices {
|
|
|
71
93
|
subscribe(listener: (state: NoticesState) => void): () => void;
|
|
72
94
|
/** Returns its id. */
|
|
73
95
|
notify(message: string, options?: NoticeOptions): number;
|
|
74
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* A failed action: the message of the error, and its hint for a failure ta serve names. A connection
|
|
98
|
+
* lost is no notice (`notDoneAt`), nor is an error notified in words that only say so.
|
|
99
|
+
*/
|
|
75
100
|
error(cause: unknown, options?: Omit<NoticeOptions, 'level'>): number;
|
|
76
101
|
dismiss(id: number): void;
|
|
77
102
|
/** Resolves with whether the user went ahead. */
|
|
@@ -14,7 +14,7 @@ type Question = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare namespace NoticesUtil {
|
|
16
16
|
/** How long a notice stays, or `undefined` until it is closed. */
|
|
17
|
-
function duration(notice: Pick<Notice, 'level' | 'sticky' | 'action'>): number | undefined;
|
|
17
|
+
function duration(notice: Pick<Notice, 'level' | 'sticky' | 'action' | 'actions'>): number | undefined;
|
|
18
18
|
/** Notices of the same key are one, which came `count` times: the same failure ten times is one notice. */
|
|
19
19
|
function key(level: NoticeLevel, text: string, options: NoticeOptions): string;
|
|
20
20
|
/** At most MAX_NOTICES, the newest kept; a sticky one goes only when there is nothing else to drop. */
|
|
@@ -38,6 +38,8 @@ export declare class TaNoticesImpl implements TaNotices {
|
|
|
38
38
|
subscribe(listener: (state: NoticesState) => void): () => void;
|
|
39
39
|
notify(text: string, options?: NoticeOptions): number;
|
|
40
40
|
error(cause: unknown, options?: Omit<NoticeOptions, 'level'>): number;
|
|
41
|
+
/** Not a notice over the page: the row of the connection says that it did not happen, and why. */
|
|
42
|
+
protected notDone(): number;
|
|
41
43
|
dismiss(id: number): void;
|
|
42
44
|
confirm(options: ConfirmOptions): Promise<boolean>;
|
|
43
45
|
answer(id: number, confirmed: boolean): void;
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TaNoticesImpl = exports.NoticesUtil = exports.SIGN_IN_EVENT = void 0;
|
|
13
13
|
const core_1 = require("@celljs/core");
|
|
14
|
+
const ta_client_1 = require("@celljs/ta-client");
|
|
14
15
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
15
16
|
const messages_1 = require("../i18n/messages");
|
|
16
17
|
const settings_protocol_1 = require("../settings/settings-protocol");
|
|
@@ -27,7 +28,8 @@ var NoticesUtil;
|
|
|
27
28
|
(function (NoticesUtil) {
|
|
28
29
|
/** How long a notice stays, or `undefined` until it is closed. */
|
|
29
30
|
function duration(notice) {
|
|
30
|
-
|
|
31
|
+
var _a;
|
|
32
|
+
return notice.sticky ? undefined : DURATIONS_MS[notice.level] + (notice.action || ((_a = notice.actions) === null || _a === void 0 ? void 0 : _a.length) ? ACTION_MS : 0);
|
|
31
33
|
}
|
|
32
34
|
NoticesUtil.duration = duration;
|
|
33
35
|
/** Notices of the same key are one, which came `count` times: the same failure ten times is one notice. */
|
|
@@ -53,6 +55,9 @@ var NoticesUtil;
|
|
|
53
55
|
[ta_protocol_1.TaErrorCode.TOO_MANY_SESSIONS]: 'ta.error.tooManySessions',
|
|
54
56
|
[ta_protocol_1.TaErrorCode.MESSAGE_CONFLICT]: 'ta.error.messageConflict',
|
|
55
57
|
[ta_protocol_1.TaErrorCode.MODEL_NOT_FOUND]: 'ta.error.modelNotFound',
|
|
58
|
+
[ta_protocol_1.TaErrorCode.NOTHING_TO_COMPACT]: 'ta.error.nothingToCompact',
|
|
59
|
+
[ta_protocol_1.TaErrorCode.ALREADY_COMPACTED]: 'ta.error.alreadyCompacted',
|
|
60
|
+
[ta_protocol_1.TaErrorCode.SESSION_BUSY]: 'ta.error.sessionBusy',
|
|
56
61
|
};
|
|
57
62
|
/** What an error says: its message, and for a failure ta serve names (TaRemoteError) its hint. */
|
|
58
63
|
function describe(cause) {
|
|
@@ -79,8 +84,12 @@ let TaNoticesImpl = class TaNoticesImpl {
|
|
|
79
84
|
return () => this.listeners.delete(listener);
|
|
80
85
|
}
|
|
81
86
|
notify(text, options = {}) {
|
|
82
|
-
var _a;
|
|
87
|
+
var _a, _b;
|
|
83
88
|
const level = (_a = options.level) !== null && _a !== void 0 ? _a : 'info';
|
|
89
|
+
if (level === 'error' && ta_client_1.TaRemoteError.isConnectionLost(`${text}\n${(_b = options.detail) !== null && _b !== void 0 ? _b : ''}`)) {
|
|
90
|
+
// A web extension saying a call failed, in words: only the connection, which mends itself.
|
|
91
|
+
return this.notDone();
|
|
92
|
+
}
|
|
84
93
|
const key = NoticesUtil.key(level, text, options);
|
|
85
94
|
const same = this.current.notices.find(notice => notice.key === key);
|
|
86
95
|
const notice = {
|
|
@@ -89,10 +98,13 @@ let TaNoticesImpl = class TaNoticesImpl {
|
|
|
89
98
|
message: text,
|
|
90
99
|
detail: options.detail,
|
|
91
100
|
action: options.action,
|
|
101
|
+
actions: options.actions,
|
|
102
|
+
from: options.from,
|
|
92
103
|
key,
|
|
93
104
|
sticky: options.sticky,
|
|
94
105
|
art: options.art,
|
|
95
|
-
|
|
106
|
+
// A conversation's newer message takes the place of its last one, not counted.
|
|
107
|
+
count: same && same.message === text && !options.from ? same.count + 1 : 1,
|
|
96
108
|
};
|
|
97
109
|
this.update({ notices: NoticesUtil.keep([...this.current.notices.filter(other => other !== same), notice]) });
|
|
98
110
|
return notice.id;
|
|
@@ -104,15 +116,12 @@ let TaNoticesImpl = class TaNoticesImpl {
|
|
|
104
116
|
window.dispatchEvent(new Event(exports.SIGN_IN_EVENT));
|
|
105
117
|
return 0;
|
|
106
118
|
}
|
|
107
|
-
if (code === ta_protocol_1.TaErrorCode.
|
|
108
|
-
// The
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
key: 'connection-lost',
|
|
114
|
-
detail: (0, messages_1.message)(language, 'ta.connection.notDoneHint'),
|
|
115
|
-
});
|
|
119
|
+
if (code === ta_protocol_1.TaErrorCode.CANCELLED) {
|
|
120
|
+
// The user stopped it (or an extension did, and says why itself): nothing went wrong.
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
if (ta_client_1.TaRemoteError.isConnectionLost(cause)) {
|
|
124
|
+
return this.notDone();
|
|
116
125
|
}
|
|
117
126
|
const known = code ? NoticesUtil.LOCALIZED[code] : undefined;
|
|
118
127
|
if (known) {
|
|
@@ -122,6 +131,11 @@ let TaNoticesImpl = class TaNoticesImpl {
|
|
|
122
131
|
}
|
|
123
132
|
return this.notify(text, { detail, ...options, level: 'error' });
|
|
124
133
|
}
|
|
134
|
+
/** Not a notice over the page: the row of the connection says that it did not happen, and why. */
|
|
135
|
+
notDone() {
|
|
136
|
+
this.update({ notDoneAt: Date.now() });
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
125
139
|
dismiss(id) {
|
|
126
140
|
if (this.current.notices.some(notice => notice.id === id)) {
|
|
127
141
|
this.update({ notices: this.current.notices.filter(notice => notice.id !== id) });
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { WebSessionNotice } from '../extension/web-api-contributions';
|
|
2
|
+
import type { NoticeAction, NoticeLevel, TaNotices } from './notices-protocol';
|
|
3
|
+
export declare const TaSessionNotices: unique symbol;
|
|
4
|
+
/** What conversations tell the user (WebExtensionUI.notifySession), one for every extension of the page: each key told once. */
|
|
5
|
+
export interface TaSessionNotices {
|
|
6
|
+
notify(notice: WebSessionNotice): SessionNoticeWay;
|
|
7
|
+
}
|
|
8
|
+
/** How a page tells of a notice of a conversation (SessionNoticeUtil.way). */
|
|
9
|
+
export type SessionNoticeWay = 'none' | 'banner' | 'system' | 'waiting';
|
|
10
|
+
/** What the page is at when a notice comes. */
|
|
11
|
+
export interface SessionNoticeScene {
|
|
12
|
+
/** The page is in front and has the focus: the user is on it. */
|
|
13
|
+
focused: boolean;
|
|
14
|
+
/** The user looks at that conversation: it is shown, or it is the double's and its page is. */
|
|
15
|
+
looking: boolean;
|
|
16
|
+
/** It is a task the double follows, which tells the user of it. */
|
|
17
|
+
task: boolean;
|
|
18
|
+
/** Notices of the system can be shown: the browser has them and the user allowed them. */
|
|
19
|
+
system: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A phone or a tablet: nothing floats over the page, as a messenger in front tells of a message only by
|
|
22
|
+
* the unread of its list and its tab; the question is answered in its conversation.
|
|
23
|
+
*/
|
|
24
|
+
quiet: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** What the page asks of the shell to tell of a conversation; SessionNotices decides how. */
|
|
27
|
+
export interface SessionNoticeHost {
|
|
28
|
+
readonly notices: TaNotices;
|
|
29
|
+
scene(notice: WebSessionNotice): SessionNoticeScene;
|
|
30
|
+
/** Its name, as the lists show it. */
|
|
31
|
+
title(notice: WebSessionNotice): string;
|
|
32
|
+
/** Shows the conversation. */
|
|
33
|
+
open(notice: WebSessionNotice): Promise<void>;
|
|
34
|
+
/** Sends an answer the user picked, as their message. */
|
|
35
|
+
answer(notice: WebSessionNotice, text: string, clientMessageId: string): Promise<void>;
|
|
36
|
+
/** A notice of the system; `onClick` brings the page to the front first. */
|
|
37
|
+
system(title: string, body: string, options: {
|
|
38
|
+
tag: string;
|
|
39
|
+
silent: boolean;
|
|
40
|
+
onClick(): void;
|
|
41
|
+
}): void;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace SessionNoticeUtil {
|
|
44
|
+
/** How many of a page's keys it remembers having told: a notice read again after it does not come twice. */
|
|
45
|
+
const TOLD = 200;
|
|
46
|
+
/**
|
|
47
|
+
* How to tell of it: not of what the user looks at, nor of a task the double tells of unless it asks; a
|
|
48
|
+
* banner while the user is on the page; a notice of the system while not, if there are any; else a banner
|
|
49
|
+
* that waits for them, only when it asks or failed (an answer the lists mark unread anyway). On a phone or a
|
|
50
|
+
* tablet never a banner: the unread of the list and its tab tell, a notice of the system while away.
|
|
51
|
+
*/
|
|
52
|
+
function way(notice: Pick<WebSessionNotice, 'level'>, scene: SessionNoticeScene): SessionNoticeWay;
|
|
53
|
+
function level(notice: Pick<WebSessionNotice, 'level'>): NoticeLevel;
|
|
54
|
+
/** The banners of one conversation take each other's place. */
|
|
55
|
+
function bannerKey(notice: Pick<WebSessionNotice, 'key' | 'sessionId' | 'sessionFile'>): string;
|
|
56
|
+
/** The id of the message of an answer: the same on every page, so that it is sent once. */
|
|
57
|
+
function answerId(notice: Pick<WebSessionNotice, 'key'>, index: number): string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Tells the user what conversations say, as a messenger does (WebExtensionUI.notifySession): each key once,
|
|
61
|
+
* the way SessionNoticeUtil.way picks.
|
|
62
|
+
*/
|
|
63
|
+
export declare class SessionNotices implements TaSessionNotices {
|
|
64
|
+
protected readonly host: SessionNoticeHost;
|
|
65
|
+
protected readonly told: Set<string>;
|
|
66
|
+
constructor(host: SessionNoticeHost);
|
|
67
|
+
notify(notice: WebSessionNotice): SessionNoticeWay;
|
|
68
|
+
protected actions(notice: WebSessionNotice): NoticeAction[];
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=session-notices.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionNotices = exports.SessionNoticeUtil = exports.TaSessionNotices = void 0;
|
|
4
|
+
exports.TaSessionNotices = Symbol('TaSessionNotices');
|
|
5
|
+
var SessionNoticeUtil;
|
|
6
|
+
(function (SessionNoticeUtil) {
|
|
7
|
+
/** How many of a page's keys it remembers having told: a notice read again after it does not come twice. */
|
|
8
|
+
SessionNoticeUtil.TOLD = 200;
|
|
9
|
+
/**
|
|
10
|
+
* How to tell of it: not of what the user looks at, nor of a task the double tells of unless it asks; a
|
|
11
|
+
* banner while the user is on the page; a notice of the system while not, if there are any; else a banner
|
|
12
|
+
* that waits for them, only when it asks or failed (an answer the lists mark unread anyway). On a phone or a
|
|
13
|
+
* tablet never a banner: the unread of the list and its tab tell, a notice of the system while away.
|
|
14
|
+
*/
|
|
15
|
+
function way(notice, scene) {
|
|
16
|
+
if (scene.task && notice.level !== 'ask') {
|
|
17
|
+
return 'none';
|
|
18
|
+
}
|
|
19
|
+
if (scene.focused) {
|
|
20
|
+
return scene.looking || scene.quiet ? 'none' : 'banner';
|
|
21
|
+
}
|
|
22
|
+
if (scene.system) {
|
|
23
|
+
return 'system';
|
|
24
|
+
}
|
|
25
|
+
return notice.level === 'done' || scene.quiet ? 'none' : 'waiting';
|
|
26
|
+
}
|
|
27
|
+
SessionNoticeUtil.way = way;
|
|
28
|
+
function level(notice) {
|
|
29
|
+
return notice.level === 'ask' ? 'warning' : notice.level === 'failed' ? 'error' : 'info';
|
|
30
|
+
}
|
|
31
|
+
SessionNoticeUtil.level = level;
|
|
32
|
+
/** The banners of one conversation take each other's place. */
|
|
33
|
+
function bannerKey(notice) {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
return `session:${(_b = (_a = notice.sessionFile) !== null && _a !== void 0 ? _a : notice.sessionId) !== null && _b !== void 0 ? _b : notice.key}`;
|
|
36
|
+
}
|
|
37
|
+
SessionNoticeUtil.bannerKey = bannerKey;
|
|
38
|
+
/** The id of the message of an answer: the same on every page, so that it is sent once. */
|
|
39
|
+
function answerId(notice, index) {
|
|
40
|
+
return `notice:${notice.key}:${index}`;
|
|
41
|
+
}
|
|
42
|
+
SessionNoticeUtil.answerId = answerId;
|
|
43
|
+
})(SessionNoticeUtil || (exports.SessionNoticeUtil = SessionNoticeUtil = {}));
|
|
44
|
+
/**
|
|
45
|
+
* Tells the user what conversations say, as a messenger does (WebExtensionUI.notifySession): each key once,
|
|
46
|
+
* the way SessionNoticeUtil.way picks.
|
|
47
|
+
*/
|
|
48
|
+
class SessionNotices {
|
|
49
|
+
constructor(host) {
|
|
50
|
+
this.host = host;
|
|
51
|
+
this.told = new Set();
|
|
52
|
+
}
|
|
53
|
+
notify(notice) {
|
|
54
|
+
if (this.told.has(notice.key)) {
|
|
55
|
+
return 'none';
|
|
56
|
+
}
|
|
57
|
+
this.told.add(notice.key);
|
|
58
|
+
if (this.told.size > SessionNoticeUtil.TOLD) {
|
|
59
|
+
this.told.delete(this.told.values().next().value);
|
|
60
|
+
}
|
|
61
|
+
const way = SessionNoticeUtil.way(notice, this.host.scene(notice));
|
|
62
|
+
const title = way === 'none' ? '' : this.host.title(notice);
|
|
63
|
+
const open = () => void this.host.open(notice).catch(error => this.host.notices.error(error));
|
|
64
|
+
if (way === 'system') {
|
|
65
|
+
this.host.system(title, notice.text, { tag: SessionNoticeUtil.bannerKey(notice), silent: notice.level === 'done', onClick: open });
|
|
66
|
+
}
|
|
67
|
+
else if (way === 'banner' || way === 'waiting') {
|
|
68
|
+
const from = {
|
|
69
|
+
sessionId: notice.sessionId,
|
|
70
|
+
sessionFile: notice.sessionFile,
|
|
71
|
+
title,
|
|
72
|
+
status: notice.level === 'done' ? undefined : notice.level,
|
|
73
|
+
open,
|
|
74
|
+
};
|
|
75
|
+
this.host.notices.notify(notice.text, {
|
|
76
|
+
level: SessionNoticeUtil.level(notice),
|
|
77
|
+
key: SessionNoticeUtil.bannerKey(notice),
|
|
78
|
+
from,
|
|
79
|
+
actions: this.actions(notice),
|
|
80
|
+
// What waits for the user stays until they see it.
|
|
81
|
+
sticky: way === 'waiting' || notice.level === 'ask',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return way;
|
|
85
|
+
}
|
|
86
|
+
actions(notice) {
|
|
87
|
+
var _a, _b;
|
|
88
|
+
const answers = ((_a = notice.options) !== null && _a !== void 0 ? _a : []).map((option, index) => ({
|
|
89
|
+
label: option,
|
|
90
|
+
run: () => void this.host.answer(notice, option, SessionNoticeUtil.answerId(notice, index)).catch(error => this.host.notices.error(error)),
|
|
91
|
+
}));
|
|
92
|
+
return [...answers, ...((_b = notice.actions) !== null && _b !== void 0 ? _b : [])];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.SessionNotices = SessionNotices;
|
|
96
|
+
//# sourceMappingURL=session-notices.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Values this device keeps across starts, for what the page shows while it cannot reach the computer: more
|
|
3
|
+
* than localStorage holds (a conversation is up to about a megabyte), and read without holding up a frame.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeviceValues {
|
|
6
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
7
|
+
/** The values whose key starts with `prefix`. */
|
|
8
|
+
entries<T>(prefix: string): Promise<[string, T][]>;
|
|
9
|
+
set(key: string, value: unknown): Promise<void>;
|
|
10
|
+
delete(key: string): Promise<void>;
|
|
11
|
+
/** Every value whose key starts with `prefix`. */
|
|
12
|
+
deleteAll(prefix: string): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/** The keys of what is kept, each with the computer it is of: what one computer showed is not shown for another. */
|
|
15
|
+
export declare namespace OfflineKeys {
|
|
16
|
+
/** The answer of a call that reads (OfflineReads). */
|
|
17
|
+
function read(host: string, call: string): string;
|
|
18
|
+
/** The conversation of a session file (KeptChats). */
|
|
19
|
+
function chat(host: string, sessionFile: string): string;
|
|
20
|
+
/** Which conversations are kept, the one seen last at the end. */
|
|
21
|
+
function chats(host: string): string;
|
|
22
|
+
/** Takes off the device all that was kept of a computer. */
|
|
23
|
+
function forget(values: DeviceValues, host: string): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
/** In memory: where there is no IndexedDB (a test, a browser that has it off), kept for the page only. */
|
|
26
|
+
export declare class MemoryValues implements DeviceValues {
|
|
27
|
+
protected readonly values: Map<string, unknown>;
|
|
28
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
29
|
+
entries<T>(prefix: string): Promise<[string, T][]>;
|
|
30
|
+
set(key: string, value: unknown): Promise<void>;
|
|
31
|
+
delete(key: string): Promise<void>;
|
|
32
|
+
deleteAll(prefix: string): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* In IndexedDB, one store of keys and values. What fails (no room, the database closed under it) is as if
|
|
36
|
+
* nothing were kept: the page then waits for the computer, as it would without.
|
|
37
|
+
*/
|
|
38
|
+
export declare class IndexedValues implements DeviceValues {
|
|
39
|
+
protected readonly factory: IDBFactory;
|
|
40
|
+
static readonly DATABASE = "ta";
|
|
41
|
+
static readonly STORE = "kept";
|
|
42
|
+
protected database?: Promise<IDBDatabase | undefined>;
|
|
43
|
+
constructor(factory: IDBFactory);
|
|
44
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
45
|
+
entries<T>(prefix: string): Promise<[string, T][]>;
|
|
46
|
+
set(key: string, value: unknown): Promise<void>;
|
|
47
|
+
delete(key: string): Promise<void>;
|
|
48
|
+
deleteAll(prefix: string): Promise<void>;
|
|
49
|
+
/** The keys that start with `prefix`. */
|
|
50
|
+
protected static range(prefix: string): IDBKeyRange;
|
|
51
|
+
protected open(): Promise<IDBDatabase | undefined>;
|
|
52
|
+
protected run<T>(mode: IDBTransactionMode, work: (store: IDBObjectStore) => IDBRequest | Promise<T>, otherwise: T): Promise<T>;
|
|
53
|
+
}
|
|
54
|
+
/** The values of this device: in IndexedDB when the browser has it. */
|
|
55
|
+
export declare function deviceValues(): DeviceValues;
|
|
56
|
+
//# sourceMappingURL=device-values.d.ts.map
|