@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
|
@@ -1,118 +1,65 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
10
|
};
|
|
44
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
12
|
exports.TaWebExtensionsImpl = void 0;
|
|
46
13
|
const core_1 = require("@celljs/core");
|
|
47
|
-
const React = __importStar(require("react"));
|
|
48
|
-
const code_editor_1 = require("../components/code-editor");
|
|
49
|
-
const context_menu_1 = require("../components/context-menu");
|
|
50
|
-
const diff_editor_1 = require("../components/diff-editor");
|
|
51
|
-
const empty_state_1 = require("../components/empty-state");
|
|
52
|
-
const folder_picker_1 = require("../components/folder-picker");
|
|
53
|
-
const host_tag_1 = require("../components/host-tag");
|
|
54
|
-
const list_skeleton_1 = require("../components/list-skeleton");
|
|
55
|
-
const markdown_1 = require("../components/markdown");
|
|
56
|
-
const model_picker_1 = require("../components/model-picker");
|
|
57
14
|
const nav_places_1 = require("../components/nav-places");
|
|
58
|
-
const picture_1 = require("../components/picture");
|
|
59
|
-
const qr_view_1 = require("../components/qr-view");
|
|
60
|
-
const select_bar_1 = require("../components/select-bar");
|
|
61
|
-
const swipe_row_1 = require("../components/swipe-row");
|
|
62
|
-
const ta_avatar_1 = require("../components/ta-avatar");
|
|
63
|
-
const web_composer_1 = require("../components/web-composer");
|
|
64
|
-
const web_dialog_1 = require("../components/web-dialog");
|
|
65
15
|
const device_1 = require("../device/device");
|
|
66
|
-
const
|
|
16
|
+
const files_protocol_1 = require("../files/files-protocol");
|
|
67
17
|
const messages_1 = require("../i18n/messages");
|
|
68
|
-
const use_t_1 = require("../i18n/use-t");
|
|
69
18
|
const links_protocol_1 = require("../links/links-protocol");
|
|
70
19
|
const notices_protocol_1 = require("../notices/notices-protocol");
|
|
20
|
+
const session_notices_1 = require("../notices/session-notices");
|
|
71
21
|
const settings_protocol_1 = require("../settings/settings-protocol");
|
|
72
22
|
const state_protocol_1 = require("../state/state-protocol");
|
|
73
|
-
const web_terminal_1 = require("../terminal/web-terminal");
|
|
74
|
-
const desktop_1 = require("../util/desktop");
|
|
75
|
-
const file_drag_1 = require("../util/file-drag");
|
|
76
23
|
const workbench_protocol_1 = require("../workbench-protocol");
|
|
77
|
-
const
|
|
24
|
+
const web_editor_tabs_1 = require("./web-editor-tabs");
|
|
78
25
|
const web_extension_code_1 = require("./web-extension-code");
|
|
26
|
+
const web_extension_context_1 = require("./web-extension-context");
|
|
79
27
|
const web_extension_protocol_1 = require("./web-extension-protocol");
|
|
28
|
+
const web_extension_run_1 = require("./web-extension-run");
|
|
29
|
+
const web_home_1 = require("./web-home");
|
|
80
30
|
const web_on_demand_1 = require("./web-on-demand");
|
|
81
31
|
const web_pages_1 = require("./web-pages");
|
|
82
32
|
const web_sharing_1 = require("./web-sharing");
|
|
83
33
|
const web_tasks_1 = require("./web-tasks");
|
|
84
34
|
const web_view_util_1 = require("./web-view-util");
|
|
85
|
-
const DEFAULT_ORDER = 100;
|
|
86
|
-
const FILE_DRAG = Object.freeze({ set: file_drag_1.FileDragUtil.set, has: file_drag_1.FileDragUtil.has, get: file_drag_1.FileDragUtil.get, paths: file_drag_1.FileDragUtil.paths });
|
|
87
35
|
let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
88
36
|
constructor() {
|
|
89
37
|
this.builtins = [];
|
|
90
38
|
this.tasks = new web_tasks_1.WebTaskBoard();
|
|
39
|
+
this.home = new web_home_1.WebHomeBoard();
|
|
40
|
+
this.tabs = new web_editor_tabs_1.WebEditorTabs({
|
|
41
|
+
state: () => this.current,
|
|
42
|
+
update: change => this.update(change),
|
|
43
|
+
persisted: () => this.persisted,
|
|
44
|
+
notices: () => this.notices,
|
|
45
|
+
language: () => this.settings.state.language,
|
|
46
|
+
closed: editor => {
|
|
47
|
+
const run = this.running.get(editor.extension);
|
|
48
|
+
if (editor.onClose && run) {
|
|
49
|
+
this.guard(run, editor.onClose);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
openView: id => this.openView(id, true),
|
|
53
|
+
});
|
|
91
54
|
/** The code read before, by its hash: a start reads only what changed. */
|
|
92
55
|
this.code = new web_extension_code_1.WebExtensionCode(() => (typeof localStorage === 'undefined' ? undefined : localStorage));
|
|
93
|
-
this.current =
|
|
94
|
-
extensions: [],
|
|
95
|
-
views: [],
|
|
96
|
-
widgets: [],
|
|
97
|
-
composerAddons: [],
|
|
98
|
-
renderers: {},
|
|
99
|
-
avatars: {},
|
|
100
|
-
tools: [],
|
|
101
|
-
openers: [],
|
|
102
|
-
editors: [],
|
|
103
|
-
focus: 0,
|
|
104
|
-
page: '',
|
|
105
|
-
pageShown: 0,
|
|
106
|
-
onOpen: [],
|
|
107
|
-
kept: [],
|
|
108
|
-
usage: {},
|
|
109
|
-
searches: [],
|
|
110
|
-
};
|
|
56
|
+
this.current = web_extension_protocol_1.WebExtensionsStateUtil.empty();
|
|
111
57
|
this.running = new Map();
|
|
112
58
|
this.listeners = new Set();
|
|
113
59
|
this.refreshing = Promise.resolve(false);
|
|
114
|
-
/** The
|
|
115
|
-
this.
|
|
60
|
+
/** The extensions of the list of the last time have started (startKept), once. */
|
|
61
|
+
this.keptStarted = false;
|
|
62
|
+
this.nextCustom = 0;
|
|
116
63
|
this.sharing = new web_sharing_1.WebSharing({
|
|
117
64
|
language: () => this.settings.state.language,
|
|
118
65
|
notices: () => this.notices,
|
|
@@ -120,6 +67,14 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
120
67
|
views: () => this.current.views,
|
|
121
68
|
refresh: () => this.refresh(),
|
|
122
69
|
showView: id => this.showView(id),
|
|
70
|
+
openSpecific: async (url) => {
|
|
71
|
+
for (const opener of this.current.specificOpeners) {
|
|
72
|
+
if (await opener({ type: 'url', url })) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
},
|
|
123
78
|
});
|
|
124
79
|
/** The pages change with the extensions and with the navigation of the settings. */
|
|
125
80
|
this.subscribePages = (listener) => {
|
|
@@ -130,27 +85,6 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
130
85
|
settings();
|
|
131
86
|
};
|
|
132
87
|
};
|
|
133
|
-
/** The API of one extension: what it registers is its own and goes when it stops. */
|
|
134
|
-
/** Monaco in the theme and language of the settings, the same component for every extension. */
|
|
135
|
-
this.codeEditor = (props) => React.createElement(code_editor_1.CodeEditor, { ...props, settings: this.settings });
|
|
136
|
-
this.diffEditor = (props) => React.createElement(diff_editor_1.DiffEditor, { ...props, settings: this.settings });
|
|
137
|
-
this.listDirectory = (directory) => this.workbench.workspace.listDirectory('.', directory);
|
|
138
|
-
/** The message box, whose button of the directory lists those of the server. */
|
|
139
|
-
this.composer = (props) => { var _a; return React.createElement(web_composer_1.WebComposer, {
|
|
140
|
-
...props,
|
|
141
|
-
notices: this.notices,
|
|
142
|
-
listDirectory: this.listDirectory,
|
|
143
|
-
serverCwd: (_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd,
|
|
144
|
-
remote: this.workbench,
|
|
145
|
-
}); };
|
|
146
|
-
this.modelPicker = (props) => React.createElement(model_picker_1.SettingsModelPicker, { ...props, settings: this.workbench.settings });
|
|
147
|
-
this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(folder_picker_1.FolderPicker, {
|
|
148
|
-
list: this.listDirectory,
|
|
149
|
-
initial: initial || ((_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.',
|
|
150
|
-
remote: this.workbench,
|
|
151
|
-
onPick: async (path) => onPick(path),
|
|
152
|
-
onClose,
|
|
153
|
-
}); };
|
|
154
88
|
}
|
|
155
89
|
get state() {
|
|
156
90
|
return this.current;
|
|
@@ -194,22 +128,14 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
194
128
|
await this.refresh();
|
|
195
129
|
await ((_b = (_a = this.conversation) === null || _a === void 0 ? void 0 : _a.reload) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
196
130
|
}
|
|
197
|
-
async remove(id) {
|
|
198
|
-
await this.workbench.packages.removeWebExtension(id);
|
|
199
|
-
await this.reloadPackages();
|
|
200
|
-
}
|
|
201
131
|
showEditor(id) {
|
|
202
|
-
|
|
203
|
-
this.pendingActive = undefined;
|
|
204
|
-
this.update({ activeEditor: id, focus: this.current.focus + 1 });
|
|
205
|
-
this.keepTabs();
|
|
206
|
-
}
|
|
132
|
+
this.tabs.show(id);
|
|
207
133
|
}
|
|
208
134
|
openView(id, preserveFocus = false) {
|
|
209
135
|
const view = this.current.views.find(candidate => candidate.id === id && candidate.location === 'panel');
|
|
210
136
|
const run = view && this.running.get(view.extension);
|
|
211
137
|
if (view && run) {
|
|
212
|
-
this.
|
|
138
|
+
this.open({ id: web_view_util_1.WebViewUtil.editorId(view.id), extension: run.loaded.id, title: view.title, icon: view.icon, render: view.component }, preserveFocus);
|
|
213
139
|
}
|
|
214
140
|
}
|
|
215
141
|
showPage(id) {
|
|
@@ -236,6 +162,11 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
236
162
|
this.showPage('');
|
|
237
163
|
return true;
|
|
238
164
|
}
|
|
165
|
+
// Of an extension this page has not heard of yet (one an agent just made, installed from another device):
|
|
166
|
+
// the list is read again once, not the page of extensions shown in its place.
|
|
167
|
+
if (!this.knows(id)) {
|
|
168
|
+
await this.refresh().catch(() => undefined);
|
|
169
|
+
}
|
|
239
170
|
const info = this.onDemand.find(id);
|
|
240
171
|
if (info) {
|
|
241
172
|
await this.onDemand.ensure(info);
|
|
@@ -260,6 +191,10 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
260
191
|
}
|
|
261
192
|
return !!view && (view.location === 'page' || view.location === 'panel');
|
|
262
193
|
}
|
|
194
|
+
/** Whether `ui.showView` has something for an id: an extension started on open, or a view. */
|
|
195
|
+
knows(id) {
|
|
196
|
+
return !!this.onDemand.find(id) || this.current.views.some(view => view.id === id || (view.location === 'page' && view.id.startsWith(`${id}/`)));
|
|
197
|
+
}
|
|
263
198
|
pages() {
|
|
264
199
|
const { language, settings } = this.settings.state;
|
|
265
200
|
const handheld = device_1.Device.state.handheld;
|
|
@@ -276,13 +211,25 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
276
211
|
listed.handheld === handheld) {
|
|
277
212
|
return listed.pages;
|
|
278
213
|
}
|
|
279
|
-
const arranged = (0, nav_places_1.places)(views, settings.navigation, handheld);
|
|
280
|
-
const placeOf = (view) => view === arranged.home || arranged.nav.includes(view) ? 'navigation' : arranged.discover.includes(view) ? 'discover' : 'list';
|
|
281
214
|
const infoOf = (id) => { var _a; return (_a = this.running.get(id)) === null || _a === void 0 ? void 0 : _a.loaded.info; };
|
|
282
|
-
const
|
|
215
|
+
const kinds = this.listedKinds();
|
|
216
|
+
const pages = web_pages_1.WebPagesUtil.pages({
|
|
217
|
+
views,
|
|
218
|
+
onOpen,
|
|
219
|
+
shown: page,
|
|
220
|
+
usage,
|
|
221
|
+
language,
|
|
222
|
+
placeOf: (0, nav_places_1.arrangeViews)(views, onOpen, settings.navigation, handheld, infoOf, kinds),
|
|
223
|
+
infoOf,
|
|
224
|
+
kinds,
|
|
225
|
+
});
|
|
283
226
|
this.listedPages = { state: this.current, language, navigation: settings.navigation, handheld, pages };
|
|
284
227
|
return pages;
|
|
285
228
|
}
|
|
229
|
+
/** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
|
|
230
|
+
listedKinds() {
|
|
231
|
+
return web_pages_1.WebPagesUtil.listedKinds([...this.current.onOpen.map(entry => entry.info), ...[...this.running.values()].map(run => run.loaded.info)]);
|
|
232
|
+
}
|
|
286
233
|
stopExtension(name) {
|
|
287
234
|
const info = this.onDemand.find(name);
|
|
288
235
|
if (info && this.running.has(info.id)) {
|
|
@@ -301,6 +248,16 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
301
248
|
share(target) {
|
|
302
249
|
this.update({ sharing: target });
|
|
303
250
|
}
|
|
251
|
+
showCustom(extension, component) {
|
|
252
|
+
const id = ++this.nextCustom;
|
|
253
|
+
this.update({ customs: [...this.current.customs, { id, extension, component }] });
|
|
254
|
+
return () => this.closeCustom(id);
|
|
255
|
+
}
|
|
256
|
+
closeCustom(id) {
|
|
257
|
+
if (this.current.customs.some(entry => entry.id === id)) {
|
|
258
|
+
this.update({ customs: this.current.customs.filter(entry => entry.id !== id) });
|
|
259
|
+
}
|
|
260
|
+
}
|
|
304
261
|
/** Loads and starts an extension started on open, as reconcile starts the others. */
|
|
305
262
|
async launch(info) {
|
|
306
263
|
var _a;
|
|
@@ -331,53 +288,13 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
331
288
|
return this.current.page === id || this.current.activeEditor === web_view_util_1.WebViewUtil.editorId(id);
|
|
332
289
|
}
|
|
333
290
|
closeEditor(id) {
|
|
334
|
-
return this.
|
|
335
|
-
}
|
|
336
|
-
async closeEditors(ids) {
|
|
337
|
-
const editors = this.current.editors.filter(candidate => ids.includes(candidate.id));
|
|
338
|
-
const dirty = editors.filter(editor => editor.dirty);
|
|
339
|
-
if (dirty.length > 0) {
|
|
340
|
-
const language = this.settings.state.language;
|
|
341
|
-
const title = dirty.length === 1
|
|
342
|
-
? (0, messages_1.message)(language, 'ta.editor.unsavedTitle').replace('{title}', web_extension_protocol_1.WebLabelUtil.text(dirty[0].title))
|
|
343
|
-
: (0, messages_1.message)(language, 'ta.editor.unsavedManyTitle').replace('{count}', String(dirty.length));
|
|
344
|
-
const confirmed = await this.notices.confirm({
|
|
345
|
-
title,
|
|
346
|
-
message: (0, messages_1.message)(language, 'ta.editor.unsavedMessage'),
|
|
347
|
-
confirmLabel: (0, messages_1.message)(language, 'ta.editor.discardClose'),
|
|
348
|
-
danger: true,
|
|
349
|
-
});
|
|
350
|
-
if (!confirmed) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
// Those closed meanwhile are not closed twice.
|
|
355
|
-
for (const editor of editors) {
|
|
356
|
-
if (this.current.editors.includes(editor)) {
|
|
357
|
-
this.dropEditor(editor);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
291
|
+
return this.tabs.close([id]);
|
|
360
292
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.update({ editors: this.current.editors.map(editor => (editor.id === id ? { ...editor, preview: false } : editor)) });
|
|
364
|
-
}
|
|
293
|
+
closeEditors(ids) {
|
|
294
|
+
return this.tabs.close(ids);
|
|
365
295
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
this.removeEditors(candidate => candidate === editor);
|
|
369
|
-
const run = this.running.get(editor.extension);
|
|
370
|
-
if (editor.onClose && run) {
|
|
371
|
-
this.guard(run, editor.onClose);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
setDirty(run, id, dirty) {
|
|
375
|
-
const found = this.current.editors.find(editor => editor.id === id && editor.extension === run.loaded.id);
|
|
376
|
-
if (found && !!found.dirty !== dirty) {
|
|
377
|
-
this.update({
|
|
378
|
-
editors: this.current.editors.map(editor => (editor === found ? { ...editor, dirty, preview: dirty ? false : editor.preview } : editor)),
|
|
379
|
-
});
|
|
380
|
-
}
|
|
296
|
+
pinEditor(id) {
|
|
297
|
+
this.tabs.pin(id);
|
|
381
298
|
}
|
|
382
299
|
connect(conversation) {
|
|
383
300
|
this.conversation = conversation;
|
|
@@ -385,9 +302,17 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
385
302
|
this.update({ cwd: conversation === null || conversation === void 0 ? void 0 : conversation.cwd, sessionId: conversation === null || conversation === void 0 ? void 0 : conversation.sessionId });
|
|
386
303
|
}
|
|
387
304
|
}
|
|
305
|
+
setConversationShown(shown) {
|
|
306
|
+
if (this.current.conversationShown !== shown) {
|
|
307
|
+
this.update({ conversationShown: shown });
|
|
308
|
+
}
|
|
309
|
+
}
|
|
388
310
|
setSessionSwitcher(switcher) {
|
|
389
311
|
this.switcher = switcher;
|
|
390
312
|
}
|
|
313
|
+
sessionSwitcher() {
|
|
314
|
+
return this.switcher;
|
|
315
|
+
}
|
|
391
316
|
emit(event) {
|
|
392
317
|
for (const run of this.running.values()) {
|
|
393
318
|
for (const { type, handler } of run.handlers) {
|
|
@@ -413,52 +338,78 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
413
338
|
if (changed) {
|
|
414
339
|
this.publish();
|
|
415
340
|
}
|
|
341
|
+
const host = this.workbench.state.host;
|
|
342
|
+
const listing = this.workbench.packages.listWebExtensions();
|
|
343
|
+
// Answered below; until then those of the last time start.
|
|
344
|
+
listing.catch(() => undefined);
|
|
345
|
+
changed = (await this.startKept(host)) || changed;
|
|
346
|
+
const listed = await listing;
|
|
347
|
+
if (host) {
|
|
348
|
+
this.code.keepList(host, listed);
|
|
349
|
+
}
|
|
416
350
|
// A built-in package turned off stays in the list, for its switch in the settings.
|
|
417
|
-
const infos =
|
|
418
|
-
const
|
|
419
|
-
this.code.keepOnly(
|
|
420
|
-
const stopped = this.stopUnless(run => {
|
|
421
|
-
const keep = !run.loaded.info || (hashes.has(run.loaded.id) && hashes.get(run.loaded.id) === run.hash);
|
|
422
|
-
if (!keep) {
|
|
423
|
-
this.onDemand.stopped(run.loaded.id);
|
|
424
|
-
}
|
|
425
|
-
return keep;
|
|
426
|
-
});
|
|
351
|
+
const infos = listed.filter(info => info.enabled !== false);
|
|
352
|
+
const fresh = new Map(infos.map(info => [info.id, info]));
|
|
353
|
+
this.code.keepOnly(infos.map(info => info.hash));
|
|
427
354
|
// Those started on open wait to be opened (ta-launcher.md).
|
|
428
355
|
this.onDemand.set(infos.filter(info => info.activation === 'open'));
|
|
429
356
|
// Fetched together, started in the order of the list: the order of their views stays the same.
|
|
430
|
-
const
|
|
431
|
-
const loads = await Promise.all(
|
|
432
|
-
|
|
357
|
+
const starting = infos.filter(info => { var _a; return ((_a = this.running.get(info.id)) === null || _a === void 0 ? void 0 : _a.hash) !== info.hash && info.activation !== 'open'; });
|
|
358
|
+
const loads = await Promise.all(starting.map(info => this.loadPackage(info)));
|
|
359
|
+
// Stopped only now, just before the new code starts: the views of the old one stay drawn until the next
|
|
360
|
+
// publish, and stopped while the new code is read (after an update, over the relay) they would show
|
|
361
|
+
// without the styles it took away.
|
|
362
|
+
const stopped = this.stopUnless(run => {
|
|
363
|
+
if (!run.loaded.info) {
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
const info = fresh.get(run.loaded.id);
|
|
367
|
+
if (info && info.hash === run.hash) {
|
|
368
|
+
// Started from the list of the last time: what else it says is of now.
|
|
369
|
+
run.loaded = { ...run.loaded, info };
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
this.onDemand.stopped(run.loaded.id);
|
|
373
|
+
return false;
|
|
374
|
+
});
|
|
375
|
+
for (const [index, info] of starting.entries()) {
|
|
433
376
|
this.startPackage(info, loads[index]);
|
|
434
377
|
}
|
|
435
378
|
this.placeholders = undefined;
|
|
436
379
|
// The list of those started on open may have changed too.
|
|
437
380
|
this.publish();
|
|
438
|
-
changed = changed || stopped ||
|
|
439
|
-
|
|
440
|
-
await this.restoreTabs();
|
|
441
|
-
}
|
|
381
|
+
changed = changed || stopped || starting.length > 0;
|
|
382
|
+
await this.tabs.restore();
|
|
442
383
|
return changed;
|
|
443
384
|
}
|
|
444
|
-
/**
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
385
|
+
/**
|
|
386
|
+
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
387
|
+
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
388
|
+
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
389
|
+
* still the same and stops the others.
|
|
390
|
+
*/
|
|
391
|
+
async startKept(host) {
|
|
392
|
+
if (this.keptStarted || !host) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
this.keptStarted = true;
|
|
396
|
+
const infos = this.code.list(host).filter(info => info.enabled !== false && info.activation !== 'open' && !this.running.has(info.id));
|
|
397
|
+
const loads = await Promise.all(infos.map(info => {
|
|
398
|
+
const code = this.code.get(info.hash);
|
|
399
|
+
return code === undefined ? undefined : web_view_util_1.WebExtensionUtil.load(code).catch(() => undefined);
|
|
400
|
+
}));
|
|
401
|
+
let started = false;
|
|
402
|
+
for (const [index, info] of infos.entries()) {
|
|
403
|
+
const factory = loads[index];
|
|
404
|
+
if (factory && !this.running.has(info.id)) {
|
|
405
|
+
this.start({ id: info.id, name: info.name, info }, factory, info.hash);
|
|
406
|
+
started = true;
|
|
407
|
+
}
|
|
454
408
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
keepTabs() {
|
|
458
|
-
var _a;
|
|
459
|
-
if (this.restored) {
|
|
460
|
-
this.persisted.set(web_view_util_1.WebViewUtil.TABS, web_view_util_1.WebViewUtil.tabs(this.current.editors, (_a = this.pendingActive) !== null && _a !== void 0 ? _a : this.current.activeEditor));
|
|
409
|
+
if (started) {
|
|
410
|
+
this.publish();
|
|
461
411
|
}
|
|
412
|
+
return started;
|
|
462
413
|
}
|
|
463
414
|
/** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
|
|
464
415
|
stopUnless(keep) {
|
|
@@ -489,17 +440,17 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
489
440
|
startPackage(info, load) {
|
|
490
441
|
const loaded = { id: info.id, name: info.name, info };
|
|
491
442
|
if ('error' in load) {
|
|
492
|
-
this.running.set(info.id,
|
|
443
|
+
this.running.set(info.id, web_extension_run_1.WebExtensionRunUtil.create({ ...loaded, error: load.error }, info.hash));
|
|
493
444
|
}
|
|
494
445
|
else {
|
|
495
446
|
this.start(loaded, load.factory, load.hash);
|
|
496
447
|
}
|
|
497
448
|
}
|
|
498
449
|
start(loaded, factory, hash) {
|
|
499
|
-
const run =
|
|
450
|
+
const run = web_extension_run_1.WebExtensionRunUtil.create(loaded, hash);
|
|
500
451
|
this.running.set(loaded.id, run);
|
|
501
452
|
try {
|
|
502
|
-
const dispose = factory(this.
|
|
453
|
+
const dispose = factory(this.context.create(run));
|
|
503
454
|
run.dispose = typeof dispose === 'function' ? dispose : undefined;
|
|
504
455
|
run.started = true;
|
|
505
456
|
}
|
|
@@ -513,290 +464,39 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
513
464
|
if (run.dispose) {
|
|
514
465
|
this.guard(run, run.dispose);
|
|
515
466
|
}
|
|
516
|
-
|
|
517
|
-
run.
|
|
518
|
-
run.renderers.clear();
|
|
519
|
-
run.avatar = undefined;
|
|
520
|
-
run.tools = [];
|
|
521
|
-
run.openers = [];
|
|
522
|
-
run.taskSources = [];
|
|
523
|
-
run.searches = [];
|
|
524
|
-
run.handlers = [];
|
|
525
|
-
for (const unsubscribe of run.unsubscribes.splice(0)) {
|
|
526
|
-
unsubscribe();
|
|
527
|
-
}
|
|
528
|
-
this.removeEditors(editor => editor.extension === run.loaded.id);
|
|
529
|
-
}
|
|
530
|
-
openEditor(run, editor, preserveFocus = false, preview = false) {
|
|
531
|
-
if (!run.stopped) {
|
|
532
|
-
this.open({ ...editor, extension: run.loaded.id, preview }, preserveFocus);
|
|
533
|
-
}
|
|
467
|
+
web_extension_run_1.WebExtensionRunUtil.clear(run);
|
|
468
|
+
this.tabs.remove(editor => editor.extension === run.loaded.id);
|
|
534
469
|
}
|
|
535
470
|
open(editor, preserveFocus = false) {
|
|
536
|
-
|
|
537
|
-
const index = editors.findIndex(candidate => candidate.id === editor.id);
|
|
538
|
-
if (index >= 0) {
|
|
539
|
-
const open = editors[index];
|
|
540
|
-
// A tab kept stays kept; one dirty stays dirty.
|
|
541
|
-
editors[index] = { ...editor, preview: !!editor.preview && !!open.preview && !open.dirty, dirty: open.dirty };
|
|
542
|
-
}
|
|
543
|
-
else {
|
|
544
|
-
// A preview takes the place of the preview open, as a single click does in an IDE.
|
|
545
|
-
const replaced = editor.preview ? editors.find(candidate => candidate.preview && !candidate.dirty) : undefined;
|
|
546
|
-
if (replaced) {
|
|
547
|
-
editors[editors.indexOf(replaced)] = editor;
|
|
548
|
-
const run = this.running.get(replaced.extension);
|
|
549
|
-
if (replaced.onClose && run) {
|
|
550
|
-
this.guard(run, replaced.onClose);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
else {
|
|
554
|
-
editors = [...editors, editor];
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
if (!preserveFocus) {
|
|
558
|
-
this.pendingActive = undefined;
|
|
559
|
-
this.update({ editors, activeEditor: editor.id, focus: this.current.focus + 1 });
|
|
560
|
-
}
|
|
561
|
-
else if (editor.id === this.pendingActive || this.current.activeEditor === undefined) {
|
|
562
|
-
if (editor.id === this.pendingActive) {
|
|
563
|
-
this.pendingActive = undefined;
|
|
564
|
-
}
|
|
565
|
-
this.update({ editors, activeEditor: editor.id });
|
|
566
|
-
}
|
|
567
|
-
else {
|
|
568
|
-
this.update({ editors });
|
|
569
|
-
}
|
|
570
|
-
this.keepTabs();
|
|
471
|
+
this.tabs.open(editor, preserveFocus);
|
|
571
472
|
}
|
|
572
|
-
|
|
473
|
+
/** What the API of each extension asks of the page; made when the first starts, once the fields are injected. */
|
|
474
|
+
get context() {
|
|
573
475
|
var _a;
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
const active = editors.some(editor => editor.id === this.current.activeEditor) ? this.current.activeEditor : (_a = editors[editors.length - 1]) === null || _a === void 0 ? void 0 : _a.id;
|
|
579
|
-
this.update({ editors, activeEditor: active });
|
|
580
|
-
this.keepTabs();
|
|
581
|
-
}
|
|
582
|
-
record(loaded, hash) {
|
|
583
|
-
return {
|
|
584
|
-
loaded,
|
|
585
|
-
hash,
|
|
586
|
-
started: false,
|
|
587
|
-
stopped: false,
|
|
588
|
-
views: new Map(),
|
|
589
|
-
widgets: new Map(),
|
|
590
|
-
renderers: new Map(),
|
|
591
|
-
tools: [],
|
|
592
|
-
openers: [],
|
|
593
|
-
taskSources: [],
|
|
594
|
-
searches: [],
|
|
595
|
-
composerAddons: [],
|
|
596
|
-
handlers: [],
|
|
597
|
-
unsubscribes: [],
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
api(run) {
|
|
601
|
-
const { workbench, settings } = this;
|
|
602
|
-
const subscribe = (listener) => this.subscribe(listener);
|
|
603
|
-
const register = (change) => {
|
|
604
|
-
if (!run.stopped) {
|
|
605
|
-
change();
|
|
606
|
-
if (run.started) {
|
|
607
|
-
this.publish();
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
return {
|
|
612
|
-
React,
|
|
613
|
-
get server() {
|
|
614
|
-
return workbench.server;
|
|
615
|
-
},
|
|
616
|
-
get workspace() {
|
|
617
|
-
return workbench.workspace;
|
|
618
|
-
},
|
|
619
|
-
get terminals() {
|
|
620
|
-
return workbench.terminals;
|
|
621
|
-
},
|
|
622
|
-
get packages() {
|
|
623
|
-
return workbench.packages;
|
|
624
|
-
},
|
|
625
|
-
get remote() {
|
|
626
|
-
return workbench.remote;
|
|
627
|
-
},
|
|
628
|
-
get settings() {
|
|
629
|
-
return workbench.settings;
|
|
630
|
-
},
|
|
631
|
-
ui: {
|
|
632
|
-
setWidget: (key, component, options = {}) => register(() => (component ? run.widgets.set(key, { component, options }) : run.widgets.delete(key))),
|
|
633
|
-
notify: (message, type = 'info') => {
|
|
634
|
-
if (!run.stopped) {
|
|
635
|
-
this.notices.notify(message, { level: type });
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
confirm: (title, message, options) => (run.stopped ? Promise.resolve(false) : this.notices.confirm({ title, message, ...options })),
|
|
639
|
-
input: (title, placeholder, options) => run.stopped ? Promise.resolve(undefined) : this.notices.input({ title, placeholder, value: options === null || options === void 0 ? void 0 : options.value }),
|
|
640
|
-
editor: (title, prefill) => (run.stopped ? Promise.resolve(undefined) : this.notices.input({ title, value: prefill, multiline: true })),
|
|
641
|
-
get theme() {
|
|
642
|
-
return settings.state.theme;
|
|
643
|
-
},
|
|
644
|
-
get language() {
|
|
645
|
-
return settings.state.language;
|
|
646
|
-
},
|
|
647
|
-
supportsWebview: desktop_1.DesktopUtil.has('webview'),
|
|
648
|
-
desktop: desktop_1.DesktopUtil.fileManager(),
|
|
649
|
-
fileDrag: FILE_DRAG,
|
|
650
|
-
debugWebview: desktop_1.DesktopUtil.debugWebview(),
|
|
651
|
-
openEditor: (editor, options) => this.openEditor(run, editor, (options === null || options === void 0 ? void 0 : options.preserveFocus) === true, (options === null || options === void 0 ? void 0 : options.preview) === true),
|
|
652
|
-
closeEditor: id => this.removeEditors(editor => editor.id === id && editor.extension === run.loaded.id),
|
|
653
|
-
pinEditor: id => {
|
|
654
|
-
if (this.current.editors.some(editor => editor.id === id && editor.extension === run.loaded.id)) {
|
|
655
|
-
this.pinEditor(id);
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
setEditorDirty: (id, dirty) => this.setDirty(run, id, dirty),
|
|
659
|
-
useActiveEditor: () => {
|
|
660
|
-
const active = () => this.current.activeEditor;
|
|
661
|
-
return React.useSyncExternalStore(subscribe, active, active);
|
|
662
|
-
},
|
|
663
|
-
useCwd: () => {
|
|
664
|
-
var _a;
|
|
665
|
-
const cwd = React.useSyncExternalStore(subscribe, () => this.current.cwd);
|
|
666
|
-
const fallback = React.useSyncExternalStore(listener => workbench.subscribe(listener), () => { var _a; return (_a = workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd; });
|
|
667
|
-
return (_a = cwd !== null && cwd !== void 0 ? cwd : fallback) !== null && _a !== void 0 ? _a : '.';
|
|
668
|
-
},
|
|
669
|
-
useSessionId: () => React.useSyncExternalStore(subscribe, () => this.current.sessionId),
|
|
670
|
-
useDevice: device_1.useDevice,
|
|
671
|
-
showView: id => (run.stopped ? Promise.resolve(false) : this.showView(id)),
|
|
672
|
-
usePages: () => {
|
|
673
|
-
// Read again when the device or the navigation changes where a page is.
|
|
674
|
-
(0, device_1.useDevice)(device => device.handheld);
|
|
675
|
-
return React.useSyncExternalStore(this.subscribePages, () => this.pages());
|
|
676
|
-
},
|
|
677
|
-
useContextMenu: () => {
|
|
678
|
-
const [menu, open] = (0, context_menu_1.useContextMenu)();
|
|
679
|
-
const openSections = React.useCallback((event, sections) => open(event, sections
|
|
680
|
-
.filter(section => section.length > 0)
|
|
681
|
-
.flatMap((section, index) => [...(index > 0 ? ['-'] : []), ...section])), [open]);
|
|
682
|
-
return [menu, openSections];
|
|
683
|
-
},
|
|
684
|
-
scanCode: scanner_1.Scanner.available() ? instructions => scanner_1.Scanner.scan(instructions, (0, messages_1.message)(settings.state.language, 'ta.cancel')) : undefined,
|
|
685
|
-
stopExtension: name => !run.stopped && this.stopExtension(name),
|
|
686
|
-
shareExtension: target => !run.stopped && this.share(target),
|
|
687
|
-
openShared: text => (run.stopped ? Promise.resolve(false) : this.openShared(text)),
|
|
688
|
-
forgetPage: id => !run.stopped && this.forgetPage(id),
|
|
689
|
-
useTasks: () => React.useSyncExternalStore(this.tasks.subscribe, this.tasks.tasks, this.tasks.tasks),
|
|
690
|
-
removeTasks: tasks => (run.stopped ? Promise.resolve(false) : web_tasks_1.WebTaskUtil.remove(tasks, this.notices, (0, use_t_1.translator)(settings.state.language))),
|
|
691
|
-
useView: id => {
|
|
692
|
-
const find = () => this.current.views.find(candidate => candidate.id === id);
|
|
693
|
-
const isShown = () => this.isShown(id);
|
|
694
|
-
const view = React.useSyncExternalStore(subscribe, find, find);
|
|
695
|
-
const shown = React.useSyncExternalStore(subscribe, isShown, isShown);
|
|
696
|
-
// The title is read again in another language: a string, so that the same words stay the same value.
|
|
697
|
-
const title = view ? web_extension_protocol_1.WebLabelUtil.text(view.title) : undefined;
|
|
698
|
-
return React.useMemo(() => (view && title !== undefined ? { title, location: view.location, shown, menu: view.menu } : undefined), [view, title, shown]);
|
|
699
|
-
},
|
|
700
|
-
Avatar: ta_avatar_1.TaAvatar,
|
|
701
|
-
icons: icons_1.WEB_ICONS,
|
|
702
|
-
CodeEditor: this.codeEditor,
|
|
703
|
-
DiffEditor: this.diffEditor,
|
|
704
|
-
// Ends with the extension.
|
|
705
|
-
createTerminal: (options) => {
|
|
706
|
-
const terminal = new web_terminal_1.DefaultWebTerminal(settings, (target, open) => void this.links.open(target, open), options);
|
|
707
|
-
run.unsubscribes.push(() => terminal.dispose());
|
|
708
|
-
return terminal;
|
|
709
|
-
},
|
|
710
|
-
Composer: this.composer,
|
|
711
|
-
Markdown: markdown_1.Markdown,
|
|
712
|
-
Empty: empty_state_1.EmptyState,
|
|
713
|
-
Skeleton: list_skeleton_1.ListSkeleton,
|
|
714
|
-
HostTag: host_tag_1.HostTag,
|
|
715
|
-
SwipeRow: swipe_row_1.SwipeRow,
|
|
716
|
-
SelectCheck: select_bar_1.SelectCheck,
|
|
717
|
-
SelectBar: select_bar_1.SelectBar,
|
|
718
|
-
Picture: picture_1.Picture,
|
|
719
|
-
PictureCards: picture_1.PictureCards,
|
|
720
|
-
QrCode: qr_view_1.QrView,
|
|
721
|
-
Dialog: web_dialog_1.WebDialog,
|
|
722
|
-
FolderPicker: this.folderPicker,
|
|
723
|
-
ModelPicker: this.modelPicker,
|
|
724
|
-
},
|
|
725
|
-
onTerminalData: listener => {
|
|
726
|
-
if (run.stopped) {
|
|
727
|
-
return () => undefined;
|
|
728
|
-
}
|
|
729
|
-
const unsubscribe = workbench.onTerminalData((terminalId, data, exitCode) => this.guard(run, () => listener(terminalId, data, exitCode)));
|
|
730
|
-
run.unsubscribes.push(unsubscribe);
|
|
731
|
-
return () => {
|
|
732
|
-
unsubscribe();
|
|
733
|
-
run.unsubscribes = run.unsubscribes.filter(other => other !== unsubscribe);
|
|
734
|
-
};
|
|
735
|
-
},
|
|
736
|
-
storage: { ...this.storage(run), directory: cwd => this.storage(run, cwd) },
|
|
737
|
-
registerView: (name, view) => register(() => run.views.set(name, view)),
|
|
738
|
-
registerMessageRenderer: (customType, renderer) => register(() => run.renderers.set(customType, renderer)),
|
|
739
|
-
registerAvatar: avatar => register(() => {
|
|
740
|
-
run.avatar = avatar;
|
|
741
|
-
}),
|
|
742
|
-
registerTool: tool => register(() => run.tools.push(tool)),
|
|
743
|
-
registerTasks: source => register(() => run.taskSources.push(source)),
|
|
744
|
-
registerSearch: source => register(() => run.searches.push(source)),
|
|
745
|
-
registerComposerAddon: addon => register(() => run.composerAddons.push(addon)),
|
|
746
|
-
registerOpener: opener => register(() => run.openers.push(async (link) => {
|
|
747
|
-
// An opener that fails, or of an extension that stopped, leaves the link to the next one.
|
|
748
|
-
try {
|
|
749
|
-
return !run.stopped && (await opener(link)) === true;
|
|
750
|
-
}
|
|
751
|
-
catch (error) {
|
|
752
|
-
console.error(`The web extension ${run.loaded.name} failed:`, error);
|
|
753
|
-
return false;
|
|
754
|
-
}
|
|
755
|
-
})),
|
|
756
|
-
on: (type, handler) => register(() => run.handlers.push({ type, handler: handler })),
|
|
757
|
-
sendUserMessage: async (text) => {
|
|
758
|
-
var _a;
|
|
759
|
-
if (!((_a = this.conversation) === null || _a === void 0 ? void 0 : _a.send)) {
|
|
760
|
-
throw new Error('No conversation is shown yet.');
|
|
761
|
-
}
|
|
762
|
-
await this.conversation.send(text);
|
|
763
|
-
},
|
|
764
|
-
switchSession: async (session, opening) => {
|
|
765
|
-
if (!this.switcher) {
|
|
766
|
-
throw new Error('The page cannot show another conversation yet.');
|
|
767
|
-
}
|
|
768
|
-
const shown = this.switcher(session, opening);
|
|
769
|
-
this.showPage('');
|
|
770
|
-
await shown;
|
|
771
|
-
},
|
|
772
|
-
openTemporary: (source, from) => this.openTemporary(source, from),
|
|
773
|
-
callHost: (method, ...params) => workbench.packages.callPackageHost(run.loaded.name, method, params),
|
|
774
|
-
reloadExtensions: () => this.reloadPackages(),
|
|
775
|
-
};
|
|
476
|
+
(_a = this.wired) !== null && _a !== void 0 ? _a : (this.wired = new web_extension_context_1.WebExtensionContext(this.contextHost()));
|
|
477
|
+
return this.wired;
|
|
776
478
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
const { workbench } = this;
|
|
780
|
-
const { name } = run.loaded;
|
|
479
|
+
contextHost() {
|
|
480
|
+
const self = this;
|
|
781
481
|
return {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
if (changed === name && directory === cwd) {
|
|
791
|
-
this.guard(run, () => listener(keys));
|
|
792
|
-
}
|
|
793
|
-
});
|
|
794
|
-
run.unsubscribes.push(unsubscribe);
|
|
795
|
-
return () => {
|
|
796
|
-
unsubscribe();
|
|
797
|
-
run.unsubscribes = run.unsubscribes.filter(other => other !== unsubscribe);
|
|
798
|
-
};
|
|
482
|
+
extensions: this,
|
|
483
|
+
workbench: this.workbench,
|
|
484
|
+
settings: this.settings,
|
|
485
|
+
files: this.taFiles,
|
|
486
|
+
notices: this.notices,
|
|
487
|
+
// Detached: asked for when a terminal opens a link, not before.
|
|
488
|
+
get links() {
|
|
489
|
+
return self.links;
|
|
799
490
|
},
|
|
491
|
+
tabs: this.tabs,
|
|
492
|
+
publish: () => this.publish(),
|
|
493
|
+
guard: (run, action) => this.guard(run, action),
|
|
494
|
+
isShown: id => this.isShown(id),
|
|
495
|
+
subscribePages: listener => this.subscribePages(listener),
|
|
496
|
+
conversation: () => this.conversation,
|
|
497
|
+
switcher: () => this.switcher,
|
|
498
|
+
sessionNotices: this.sessionNotices,
|
|
499
|
+
persisted: this.persisted,
|
|
800
500
|
};
|
|
801
501
|
}
|
|
802
502
|
guard(run, action) {
|
|
@@ -808,64 +508,24 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
|
|
|
808
508
|
}
|
|
809
509
|
}
|
|
810
510
|
publish() {
|
|
811
|
-
var _a;
|
|
812
511
|
const runs = [...this.running.values()];
|
|
813
|
-
const renderers = {};
|
|
814
|
-
const avatars = {};
|
|
815
|
-
const tools = [];
|
|
816
|
-
for (const run of runs) {
|
|
817
|
-
if (run.avatar) {
|
|
818
|
-
avatars[run.loaded.name] = run.avatar;
|
|
819
|
-
}
|
|
820
|
-
for (const [type, renderer] of run.renderers) {
|
|
821
|
-
(_a = renderers[type]) !== null && _a !== void 0 ? _a : (renderers[type] = renderer);
|
|
822
|
-
}
|
|
823
|
-
for (const tool of run.tools) {
|
|
824
|
-
if (!tools.some(other => other.name === tool.name)) {
|
|
825
|
-
tools.push(tool);
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
512
|
this.tasks.setSources(runs.flatMap(run => run.taskSources.map(source => ({ extension: run.loaded.name, source }))));
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
extension: run.loaded.id,
|
|
833
|
-
title: view.title,
|
|
834
|
-
component: view.render,
|
|
835
|
-
icon: view.icon,
|
|
836
|
-
location: (_b = view.location) !== null && _b !== void 0 ? _b : 'page',
|
|
837
|
-
order: (_c = view.order) !== null && _c !== void 0 ? _c : DEFAULT_ORDER,
|
|
838
|
-
head: view.head,
|
|
839
|
-
pages: view.pages,
|
|
840
|
-
discover: view.discover,
|
|
841
|
-
menu: (_a = view.menu) === null || _a === void 0 ? void 0 : _a.bind(view),
|
|
842
|
-
...(this.onDemand.has(run.loaded.id) ? { onOpen: true } : {}),
|
|
843
|
-
}); }));
|
|
513
|
+
this.home.setSources(runs.flatMap(run => run.homeSources.map(source => ({ extension: run.loaded.name, source }))));
|
|
514
|
+
const { views, ...registered } = web_extension_run_1.WebExtensionRunUtil.collect(runs, id => this.onDemand.has(id));
|
|
844
515
|
if (this.placeholders) {
|
|
845
516
|
views.push(...this.placeholders.filter(placeholder => !views.some(view => view.id === placeholder.id)));
|
|
846
517
|
}
|
|
847
518
|
else {
|
|
848
|
-
this.
|
|
519
|
+
const kinds = this.listedKinds();
|
|
520
|
+
// Those of a kind a page lists never take a place of the navigation: none to keep for its first frame.
|
|
521
|
+
this.persisted.set(web_view_util_1.WebViewUtil.KEPT, web_view_util_1.WebViewUtil.keep(views.filter(view => { var _a; return !web_pages_1.WebPagesUtil.listed((_a = this.running.get(view.extension)) === null || _a === void 0 ? void 0 : _a.loaded.info, kinds); })));
|
|
849
522
|
}
|
|
850
523
|
this.update({
|
|
851
|
-
|
|
852
|
-
extensions: runs.map(run => run.loaded),
|
|
524
|
+
...registered,
|
|
853
525
|
views: views.sort((a, b) => a.order - b.order),
|
|
854
|
-
widgets: runs.flatMap(run => [...run.widgets].map(([key, { component, options }]) => { var _a; return ({
|
|
855
|
-
id: `${run.loaded.id}/${key}`,
|
|
856
|
-
extension: run.loaded.id,
|
|
857
|
-
placement: (_a = options.placement) !== null && _a !== void 0 ? _a : 'aboveEditor',
|
|
858
|
-
title: options.title,
|
|
859
|
-
component,
|
|
860
|
-
}); })),
|
|
861
|
-
composerAddons: runs.flatMap(run => run.composerAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
|
|
862
|
-
renderers,
|
|
863
|
-
avatars,
|
|
864
|
-
tools,
|
|
865
526
|
onOpen: this.onDemand.list(),
|
|
866
527
|
kept: this.onDemand.kept(),
|
|
867
528
|
usage: this.onDemand.used,
|
|
868
|
-
searches: runs.flatMap(run => run.searches).sort((a, b) => { var _a, _b; return ((_a = a.order) !== null && _a !== void 0 ? _a : DEFAULT_ORDER) - ((_b = b.order) !== null && _b !== void 0 ? _b : DEFAULT_ORDER); }),
|
|
869
529
|
});
|
|
870
530
|
}
|
|
871
531
|
update(change) {
|
|
@@ -884,6 +544,10 @@ __decorate([
|
|
|
884
544
|
(0, core_1.Autowired)(settings_protocol_1.TaSettings),
|
|
885
545
|
__metadata("design:type", Object)
|
|
886
546
|
], TaWebExtensionsImpl.prototype, "settings", void 0);
|
|
547
|
+
__decorate([
|
|
548
|
+
(0, core_1.Autowired)(files_protocol_1.TaFiles),
|
|
549
|
+
__metadata("design:type", Object)
|
|
550
|
+
], TaWebExtensionsImpl.prototype, "taFiles", void 0);
|
|
887
551
|
__decorate([
|
|
888
552
|
(0, core_1.Autowired)({ id: links_protocol_1.TaLinks, detached: true }),
|
|
889
553
|
__metadata("design:type", Object)
|
|
@@ -896,6 +560,10 @@ __decorate([
|
|
|
896
560
|
(0, core_1.Autowired)(state_protocol_1.TaState),
|
|
897
561
|
__metadata("design:type", Object)
|
|
898
562
|
], TaWebExtensionsImpl.prototype, "persisted", void 0);
|
|
563
|
+
__decorate([
|
|
564
|
+
(0, core_1.Autowired)(session_notices_1.TaSessionNotices),
|
|
565
|
+
__metadata("design:type", Object)
|
|
566
|
+
], TaWebExtensionsImpl.prototype, "sessionNotices", void 0);
|
|
899
567
|
__decorate([
|
|
900
568
|
(0, core_1.Autowired)(web_extension_protocol_1.BuiltinWebExtension),
|
|
901
569
|
(0, core_1.Optional)(),
|