@celljs/ta-web 4.15.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -5,9 +5,10 @@ import type { DeviceState } from '../device/device-protocol.js';
|
|
|
5
5
|
import type { TaFiles } from '../files/files-protocol.js';
|
|
6
6
|
import type { GameProps } from '../game/game-protocol.js';
|
|
7
7
|
import type { Game3DProps } from '../game/game3d-protocol.js';
|
|
8
|
+
import type { ScreenPartSpec, TaScreen } from '../screen/screen-protocol.js';
|
|
8
9
|
import type { Language, Theme } from '../settings/settings-protocol.js';
|
|
9
|
-
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebSkeletonProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebVoice } from './web-api-components.js';
|
|
10
|
-
import type { WebAsk, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebHomeEntry, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebSearchSource, WebSessionMenu, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
|
|
10
|
+
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebConversationViewProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebSkeletonProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebVoice } from './web-api-components.js';
|
|
11
|
+
import type { WebAsk, WebCallPartner, WebChatIconSource, WebCodeRendererOptions, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebHomeEntry, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
|
|
11
12
|
import type { WebDesktop, WebFileDrag } from './web-api-desktop.js';
|
|
12
13
|
import type { WebTerminal, WebTerminalOptions } from './web-api-terminal.js';
|
|
13
14
|
import type { WebPageInfo } from './web-pages.js';
|
|
@@ -73,8 +74,14 @@ export interface WebExtensionAPI {
|
|
|
73
74
|
* Draws the fenced blocks of a language (` ```name `) in replies and in `ui.Markdown` itself, as Mermaid is drawn:
|
|
74
75
|
* what a model writes to be seen rather than read, a card of its own. It gets the code as it streams (`closed`
|
|
75
76
|
* false until the fence ends); what throws shows as code. Newer than some Ta apps: `pi.registerCodeRenderer?.(…)`.
|
|
77
|
+
* `options.spoken`: what of a block is said aloud; older apps leave it out.
|
|
76
78
|
*/
|
|
77
|
-
registerCodeRenderer(language: string, renderer: React.ComponentType<WebCodeRendererProps
|
|
79
|
+
registerCodeRenderer(language: string, renderer: React.ComponentType<WebCodeRendererProps>, options?: WebCodeRendererOptions): void;
|
|
80
|
+
/**
|
|
81
|
+
* Answers in calls in place of the conversation called (the first registered): the conversation keeps the work,
|
|
82
|
+
* the partner the talk. Newer than some Ta apps: `pi.registerCallPartner?.(…)`.
|
|
83
|
+
*/
|
|
84
|
+
registerCallPartner(partner: WebCallPartner): void;
|
|
78
85
|
/**
|
|
79
86
|
* Who answers in the sessions of its group (TaOpenSessionOptions.group, the name of the extension's
|
|
80
87
|
* package), drawn at the head of each turn in place of ta.
|
|
@@ -113,6 +120,11 @@ export interface WebExtensionAPI {
|
|
|
113
120
|
* entries of its + menu and something above it, each given the conversation it is drawn for.
|
|
114
121
|
*/
|
|
115
122
|
registerComposerAddon(addon: WebComposerAddon): void;
|
|
123
|
+
/**
|
|
124
|
+
* An app of the rooms (a tile among the apps of a room, its page pushed in the room's panel, a line above its chat),
|
|
125
|
+
* which the Rooms page lists with `ui.useRoomAddons`: one place for every app, however many there are. Newer than some Ta apps: `pi.registerRoomAddon?.(…)`.
|
|
126
|
+
*/
|
|
127
|
+
registerRoomAddon(addon: WebRoomAddon): void;
|
|
116
128
|
/**
|
|
117
129
|
* A section of the settings, after those of Ta: what the user sets once for the extension (a model it
|
|
118
130
|
* uses, a choice it makes), kept with `storage`. Its rows look like Ta's, each with a control the
|
|
@@ -231,11 +243,33 @@ export type WebIcon = React.ComponentType<{
|
|
|
231
243
|
size?: number | string;
|
|
232
244
|
strokeWidth?: number | string;
|
|
233
245
|
}>;
|
|
246
|
+
/** What a notice of an extension has besides its message (WebExtensionUI.notify). */
|
|
247
|
+
export interface WebNotifyOptions {
|
|
248
|
+
action?: {
|
|
249
|
+
label: string;
|
|
250
|
+
run(): void;
|
|
251
|
+
};
|
|
252
|
+
key?: string;
|
|
253
|
+
/** Ta did it for the user: drawn with the double's face, the message as its head (`修改了设置`). */
|
|
254
|
+
ta?: boolean;
|
|
255
|
+
/** What it changed, a row each under the message: `{ label: '通话字幕', before: '关', after: '开' }`, or a name alone. */
|
|
256
|
+
changes?: {
|
|
257
|
+
label?: string;
|
|
258
|
+
before?: string;
|
|
259
|
+
after: string;
|
|
260
|
+
}[];
|
|
261
|
+
}
|
|
262
|
+
export type { ScreenAction, ScreenItem, ScreenPartSpec, ScreenPartView, ScreenPlace } from '../screen/screen-protocol.js';
|
|
263
|
+
/** What web extensions see of TaScreen. */
|
|
264
|
+
export type WebScreen = Pick<TaScreen, 'agent' | 'parts' | 'act' | 'element' | 'where' | 'places' | 'go'>;
|
|
234
265
|
export interface WebExtensionUI {
|
|
235
266
|
/** A widget around the message box, as pi's, or a card in the workbench on the right; `undefined` removes it. */
|
|
236
267
|
setWidget(key: string, widget: React.ComponentType | undefined, options?: WidgetOptions): void;
|
|
237
|
-
/**
|
|
238
|
-
|
|
268
|
+
/**
|
|
269
|
+
* A notice in the corner of the page, as pi's: it goes by itself, an error later than the rest. `action`: a button
|
|
270
|
+
* on it (Undo); `key`: notices of one key replace each other. Ta apps of before take the message and type alone.
|
|
271
|
+
*/
|
|
272
|
+
notify(message: string, type?: 'info' | 'warning' | 'error', options?: WebNotifyOptions): void;
|
|
239
273
|
/**
|
|
240
274
|
* Tells the user what a conversation said, as a messenger tells of a message: nothing while they look at it
|
|
241
275
|
* (and nothing of a task the double follows, which tells of it, unless it asks); a banner with its face and
|
|
@@ -245,6 +279,8 @@ export interface WebExtensionUI {
|
|
|
245
279
|
notifySession(notice: WebSessionNotice): void;
|
|
246
280
|
/** A React hook: the rows extensions add to the double's home (registerHomeItems), in the order they loaded. */
|
|
247
281
|
useHomeItems(): readonly WebHomeEntry[];
|
|
282
|
+
/** A React hook: what extensions add to the rooms (registerRoomAddon), in the order they loaded. Newer than some Ta apps. */
|
|
283
|
+
useRoomAddons(): readonly WebRoomAddonEntry[];
|
|
248
284
|
/**
|
|
249
285
|
* Pins a conversation to the top of the lists (or unpins it), by its session file, as the user does with Pin: for
|
|
250
286
|
* one the extension made that the user looks at each day. Pin it once; the user may unpin it. Newer than some Ta
|
|
@@ -292,6 +328,14 @@ export interface WebExtensionUI {
|
|
|
292
328
|
* element's `loadURL`); the app refuses the rest.
|
|
293
329
|
*/
|
|
294
330
|
readonly debugWebview?: (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
331
|
+
/** Into the box of the conversation in front: `quote` before what it holds, `images` (base64) as if pasted; false when none shows. */
|
|
332
|
+
addToComposer(draft: {
|
|
333
|
+
quote?: string;
|
|
334
|
+
images?: {
|
|
335
|
+
data: string;
|
|
336
|
+
mimeType: string;
|
|
337
|
+
}[];
|
|
338
|
+
}): boolean;
|
|
295
339
|
/**
|
|
296
340
|
* A tab in the editor area beside the conversation (a file, a diff, a browser); an open id is shown
|
|
297
341
|
* again. With `preserveFocus`, it opens behind the tab shown, and the workbench is not revealed: for
|
|
@@ -350,6 +394,14 @@ export interface WebExtensionUI {
|
|
|
350
394
|
* The name of an extension alone opens its first page. Resolves whether there was such a view.
|
|
351
395
|
*/
|
|
352
396
|
showView(id: string): Promise<boolean>;
|
|
397
|
+
/**
|
|
398
|
+
* Shows the list of chats (on a phone its tab); with `busy`, only the conversations of the user's own going on
|
|
399
|
+
* (those that wait for them, answer now, or said something unseen), until the user clears it. Newer than some
|
|
400
|
+
* Ta apps: `pi.ui.showChats?.()`.
|
|
401
|
+
*/
|
|
402
|
+
showChats(options?: {
|
|
403
|
+
busy?: boolean;
|
|
404
|
+
}): void;
|
|
353
405
|
/**
|
|
354
406
|
* A React hook: every page there is (those of the navigation, of Discover, and of the extensions started on
|
|
355
407
|
* open, one for each of these), with what it is doing and when it was shown last; the same array until one
|
|
@@ -401,6 +453,24 @@ export interface WebExtensionUI {
|
|
|
401
453
|
custom(component: React.ComponentType<{
|
|
402
454
|
close(): void;
|
|
403
455
|
}>): () => void;
|
|
456
|
+
/**
|
|
457
|
+
* Answers what the server side of this package asks a page (`host.pages.ask(kind, payload)`, docs/design/ta-app-use.md
|
|
458
|
+
* 4.1): ta serve asks the page of the person whose run asks, the one in front of them. What `handler` returns, or
|
|
459
|
+
* resolves to, is the answer; what it throws, the error. Stops with the function returned, or when the extension
|
|
460
|
+
* stops. Newer than some Ta apps: `pi.ui.answer?.(…)`.
|
|
461
|
+
*/
|
|
462
|
+
answer(kind: string, handler: (payload: unknown) => unknown): () => void;
|
|
463
|
+
/**
|
|
464
|
+
* Ta's pages as an agent reads and works them (docs/design/ta-app-use.md 3): where the shell is, the parts of the
|
|
465
|
+
* screen that say what they are, and their actions. Newer than some Ta apps.
|
|
466
|
+
*/
|
|
467
|
+
readonly screen: WebScreen;
|
|
468
|
+
/**
|
|
469
|
+
* A React hook: a part of the screen of this extension says what it is while it is mounted, for an agent to read and
|
|
470
|
+
* work as the user does (ScreenPartSpec); mark its elements with `data-ta-part`, `data-ta-item` and `data-ta-action`.
|
|
471
|
+
* Newer than some Ta apps.
|
|
472
|
+
*/
|
|
473
|
+
useScreenPart(spec: ScreenPartSpec): void;
|
|
404
474
|
/**
|
|
405
475
|
* Opens what a link of an extension carries (`ta://open?source=…`, `#open=`, a link of the relay, `npm:<name>`)
|
|
406
476
|
* without installing it, once the user said so: it runs in the page with the whole of this API. Resolves whether
|
|
@@ -492,6 +562,11 @@ export interface WebExtensionUI {
|
|
|
492
562
|
readonly Markdown: React.ComponentType<{
|
|
493
563
|
text: string;
|
|
494
564
|
}>;
|
|
565
|
+
/**
|
|
566
|
+
* A conversation to read, drawn as those of the page are, with what extensions draw in them (cards, plots,
|
|
567
|
+
* 3D); nothing in it acts. Newer than some Ta apps: `pi.ui.Conversation ?? …`.
|
|
568
|
+
*/
|
|
569
|
+
readonly Conversation?: React.ComponentType<WebConversationViewProps>;
|
|
495
570
|
/**
|
|
496
571
|
* A React hook: a chat that scrolls as the conversations of the page do, the element of the returned ref
|
|
497
572
|
* being what scrolls and its first child (positioned) holding a row for each message. At the bottom it
|
|
@@ -514,6 +589,14 @@ export interface WebExtensionUI {
|
|
|
514
589
|
* Ta apps: `(pi.ui.useBusy ?? fallback)()`.
|
|
515
590
|
*/
|
|
516
591
|
useBusy(): [boolean, <T>(action: () => T | PromiseLike<T>) => Promise<T | undefined>];
|
|
592
|
+
/**
|
|
593
|
+
* A React hook for what the extension opens over the page (a menu, a dialog, a page it pushes, a panel): while
|
|
594
|
+
* `open`, the back of the system or the browser (Android's back, Safari's swipe back) calls `close`, the one
|
|
595
|
+
* opened last first, never what it is over. Returns whether it is the top one, the one whose own swipe may
|
|
596
|
+
* close it. `ui.Dialog`, `ui.Stack` and `ui.attachMenu` do it already. Newer than some Ta apps:
|
|
597
|
+
* `(pi.ui.useBackLayer ?? fallback)(open, close)`.
|
|
598
|
+
*/
|
|
599
|
+
useBackLayer(open: boolean, close: () => void): boolean;
|
|
517
600
|
/**
|
|
518
601
|
* The switch of the page's settings: an `onChange` that returns a promise shows the new state at once, its
|
|
519
602
|
* knob turning until done, and the old one again if it fails. Newer than some Ta apps: `pi.ui.Switch ?? fallback`.
|
|
@@ -6,6 +6,7 @@ import type { Game3DProps } from '../game/game3d-protocol.js';
|
|
|
6
6
|
import type { TaLinks } from '../links/links-protocol.js';
|
|
7
7
|
import type { TaNotices } from '../notices/notices-protocol.js';
|
|
8
8
|
import type { TaSessionNotices } from '../notices/session-notices.js';
|
|
9
|
+
import type { TaScreen } from '../screen/screen-protocol.js';
|
|
9
10
|
import type { TaSettings } from '../settings/settings-protocol.js';
|
|
10
11
|
import type { TaState } from '../state/state-protocol.js';
|
|
11
12
|
import type { TaWorkbench } from '../workbench-protocol.js';
|
|
@@ -28,6 +29,8 @@ export interface WebExtensionContextHost {
|
|
|
28
29
|
readonly sessionNotices: TaSessionNotices;
|
|
29
30
|
/** The state the page keeps (TaState): the pins of the lists. */
|
|
30
31
|
readonly persisted: TaState;
|
|
32
|
+
/** The parts of the screen and where the shell is (docs/design/ta-app-use.md 3). */
|
|
33
|
+
readonly screen: TaScreen;
|
|
31
34
|
/** What the extensions registered changed: the page shows it. */
|
|
32
35
|
publish(): void;
|
|
33
36
|
/** Runs what the extension gave, its failure logged rather than thrown. */
|
|
@@ -68,6 +71,8 @@ export declare class WebExtensionContext {
|
|
|
68
71
|
protected readonly listDirectory: (directory: string) => Promise<import("@celljs/ta-protocol").TaDirEntry[]>;
|
|
69
72
|
/** The message box, whose button of the directory lists those of the server. */
|
|
70
73
|
protected readonly composer: (props: WebComposerProps) => React.FunctionComponentElement<import("../components/web-composer.js").WebComposerHostProps>;
|
|
74
|
+
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
75
|
+
protected composerOf(run: WebExtensionRun): React.ComponentType<WebComposerProps>;
|
|
71
76
|
protected readonly holdToTalk: (props: WebHoldToTalkProps) => React.FunctionComponentElement<import("../components/hold-to-talk.js").HoldToTalkProps & {
|
|
72
77
|
notices: TaNotices;
|
|
73
78
|
}>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { TaMessageSource, } from '@celljs/ta-protocol';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { ReadAloud } from '../assistant/read-aloud.js';
|
|
3
4
|
import { useBusy } from '../components/busy.js';
|
|
4
5
|
import { ChatAskUtil, LET_GO_ASKS } from '../components/chat-asks.js';
|
|
5
|
-
import { PINNED } from '../components/chat-list.js';
|
|
6
|
+
import { PINNED } from '../components/chat-list-util.js';
|
|
6
7
|
import { CodeEditor } from '../components/code-editor.js';
|
|
8
|
+
import { ComposerTarget } from '../components/composer-target.js';
|
|
7
9
|
import { ContextMenuUtil, useContextMenu } from '../components/context-menu.js';
|
|
8
10
|
import { useConversationScroll } from '../components/conversation-scroll-hooks.js';
|
|
11
|
+
import { ConversationView } from '../components/conversation-view.js';
|
|
9
12
|
import { DiffEditor } from '../components/diff-editor.js';
|
|
10
13
|
import { EmptyState } from '../components/empty-state.js';
|
|
11
14
|
import { Face, GroupFace } from '../components/face.js';
|
|
@@ -26,9 +29,11 @@ import { SwipeRow } from '../components/swipe-row.js';
|
|
|
26
29
|
import { TaAvatar } from '../components/ta-avatar.js';
|
|
27
30
|
import { WebComposer } from '../components/web-composer.js';
|
|
28
31
|
import { WebDialog } from '../components/web-dialog.js';
|
|
32
|
+
import { useBackLayer } from '../device/back-stack.js';
|
|
29
33
|
import { CodeScan } from '../device/code-scan.js';
|
|
30
34
|
import { useDevice } from '../device/device.js';
|
|
31
35
|
import { Scanner } from '../device/scanner.js';
|
|
36
|
+
import { DraftPlaces } from '../drafts/drafts-protocol.js';
|
|
32
37
|
import { Game3DView, GameView } from '../game/game-view.js';
|
|
33
38
|
import { message as messageOf } from '../i18n/messages.js';
|
|
34
39
|
import { translator } from '../i18n/use-t.js';
|
|
@@ -68,8 +73,8 @@ export class WebExtensionContext {
|
|
|
68
73
|
this.voice = {
|
|
69
74
|
canListen: () => Voice.canListen(),
|
|
70
75
|
canSpeak: () => Voice.canSpeak(),
|
|
71
|
-
speak: (text, onEnd) =>
|
|
72
|
-
hush: () =>
|
|
76
|
+
speak: (text, onEnd) => ReadAloud.of(this.host.workbench).speak(text, this.host.settings.state.language, onEnd !== null && onEnd !== void 0 ? onEnd : (() => undefined), this.host.settings.state.settings.voice),
|
|
77
|
+
hush: () => ReadAloud.of(this.host.workbench).hush(),
|
|
73
78
|
};
|
|
74
79
|
this.modelPicker = (props) => React.createElement(SettingsModelPicker, { ...props, settings: this.host.workbench.settings });
|
|
75
80
|
this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(FolderPicker, {
|
|
@@ -112,6 +117,11 @@ export class WebExtensionContext {
|
|
|
112
117
|
}
|
|
113
118
|
return parts.join('/');
|
|
114
119
|
}
|
|
120
|
+
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
121
|
+
composerOf(run) {
|
|
122
|
+
const name = run.loaded.name;
|
|
123
|
+
return props => this.composer({ ...props, draft: props.draft === undefined ? undefined : DraftPlaces.extension(name, props.draft) });
|
|
124
|
+
}
|
|
115
125
|
create(run) {
|
|
116
126
|
const { host } = this;
|
|
117
127
|
const { workbench, files } = host;
|
|
@@ -171,7 +181,14 @@ export class WebExtensionContext {
|
|
|
171
181
|
storage: { ...this.storage(run), directory: cwd => this.storage(run, cwd) },
|
|
172
182
|
registerView: (name, view) => register(() => run.views.set(name, view)),
|
|
173
183
|
registerMessageRenderer: (customType, renderer) => register(() => run.renderers.set(customType, renderer)),
|
|
174
|
-
registerCodeRenderer: (language, renderer) => register(() =>
|
|
184
|
+
registerCodeRenderer: (language, renderer, options) => register(() => {
|
|
185
|
+
const key = language.trim().toLowerCase();
|
|
186
|
+
run.codeRenderers.set(key, WebExtensionContext.replying(renderer, mark));
|
|
187
|
+
if (options === null || options === void 0 ? void 0 : options.spoken) {
|
|
188
|
+
run.codeSpeech.set(key, options.spoken);
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
191
|
+
registerCallPartner: partner => register(() => run.callPartners.push(partner)),
|
|
175
192
|
registerAvatar: avatar => register(() => {
|
|
176
193
|
run.avatar = avatar;
|
|
177
194
|
}),
|
|
@@ -183,6 +200,7 @@ export class WebExtensionContext {
|
|
|
183
200
|
registerInitiative: initiative => register(() => run.initiatives.push(initiative)),
|
|
184
201
|
registerSearch: source => register(() => run.searches.push(source)),
|
|
185
202
|
registerComposerAddon: addon => register(() => run.composerAddons.push(addon)),
|
|
203
|
+
registerRoomAddon: addon => register(() => run.roomAddons.push(addon)),
|
|
186
204
|
registerSettings: section => register(() => run.settingsSections.push(section)),
|
|
187
205
|
registerSessionMenu: menu => register(() => run.sessionMenus.push(session => {
|
|
188
206
|
try {
|
|
@@ -234,9 +252,16 @@ export class WebExtensionContext {
|
|
|
234
252
|
const subscribe = (listener) => host.extensions.subscribe(listener);
|
|
235
253
|
return {
|
|
236
254
|
setWidget: (key, component, options = {}) => register(() => (component ? run.widgets.set(key, { component, options }) : run.widgets.delete(key))),
|
|
237
|
-
notify: (message, type = 'info') => {
|
|
255
|
+
notify: (message, type = 'info', options = {}) => {
|
|
238
256
|
if (!run.stopped) {
|
|
239
|
-
|
|
257
|
+
const { action, key, ta, changes } = options;
|
|
258
|
+
notices.notify(message, {
|
|
259
|
+
level: type,
|
|
260
|
+
...(action ? { action: { label: action.label, run: () => action.run() } } : {}),
|
|
261
|
+
...(key ? { key } : {}),
|
|
262
|
+
...(ta ? { ta: true } : {}),
|
|
263
|
+
...(Array.isArray(changes) && changes.length ? { changes: changes.slice(0, 6) } : {}),
|
|
264
|
+
});
|
|
240
265
|
}
|
|
241
266
|
},
|
|
242
267
|
notifySession: notice => {
|
|
@@ -264,6 +289,7 @@ export class WebExtensionContext {
|
|
|
264
289
|
desktop: DesktopUtil.fileManager(),
|
|
265
290
|
fileDrag: FILE_DRAG,
|
|
266
291
|
debugWebview: DesktopUtil.debugWebview(),
|
|
292
|
+
addToComposer: draft => !run.stopped && ComposerTarget.add(draft),
|
|
267
293
|
// An extension opens, closes and marks only tabs of its own.
|
|
268
294
|
openEditor: (editor, options) => !run.stopped && host.tabs.open({ ...editor, extension: run.loaded.id, preview: (options === null || options === void 0 ? void 0 : options.preview) === true }, (options === null || options === void 0 ? void 0 : options.preserveFocus) === true),
|
|
269
295
|
closeEditor: id => host.tabs.remove(editor => editor.id === id && editor.extension === run.loaded.id),
|
|
@@ -300,6 +326,11 @@ export class WebExtensionContext {
|
|
|
300
326
|
},
|
|
301
327
|
useDevice,
|
|
302
328
|
showView: id => (run.stopped ? Promise.resolve(false) : host.extensions.showView(id)),
|
|
329
|
+
showChats: options => {
|
|
330
|
+
if (!run.stopped) {
|
|
331
|
+
host.extensions.showChats(!!(options === null || options === void 0 ? void 0 : options.busy));
|
|
332
|
+
}
|
|
333
|
+
},
|
|
303
334
|
usePages: () => {
|
|
304
335
|
// Read again when the device or the navigation changes where a page is.
|
|
305
336
|
useDevice(device => device.handheld);
|
|
@@ -320,6 +351,21 @@ export class WebExtensionContext {
|
|
|
320
351
|
stopExtension: name => !run.stopped && host.extensions.stopExtension(name),
|
|
321
352
|
shareExtension: target => !run.stopped && host.extensions.share(target),
|
|
322
353
|
custom: component => WebExtensionRunUtil.track(run, () => host.extensions.showCustom(run.loaded.name, component)),
|
|
354
|
+
answer: (kind, handler) => WebExtensionRunUtil.track(run, () => workbench.pages.answer(`${run.loaded.name}/${kind}`, handler)),
|
|
355
|
+
screen: {
|
|
356
|
+
agent: host.screen.agent,
|
|
357
|
+
parts: () => host.screen.parts(),
|
|
358
|
+
act: (part, action, item, input, button) => host.screen.act(part, action, item, input, button),
|
|
359
|
+
element: (part, item, action) => host.screen.element(part, item, action),
|
|
360
|
+
where: () => host.screen.where(),
|
|
361
|
+
places: () => host.screen.places(),
|
|
362
|
+
go: to => (run.stopped ? Promise.resolve(false) : host.screen.go(to)),
|
|
363
|
+
},
|
|
364
|
+
useScreenPart: spec => {
|
|
365
|
+
const latest = React.useRef(spec);
|
|
366
|
+
latest.current = spec;
|
|
367
|
+
React.useEffect(() => host.screen.register(() => latest.current), []);
|
|
368
|
+
},
|
|
323
369
|
openShared: text => (run.stopped ? Promise.resolve(false) : host.extensions.openShared(text)),
|
|
324
370
|
connect: async (link) => {
|
|
325
371
|
if (run.stopped) {
|
|
@@ -338,6 +384,11 @@ export class WebExtensionContext {
|
|
|
338
384
|
forgetPage: id => !run.stopped && host.extensions.forgetPage(id),
|
|
339
385
|
useTasks: () => React.useSyncExternalStore(host.extensions.tasks.subscribe, host.extensions.tasks.tasks, host.extensions.tasks.tasks),
|
|
340
386
|
useHomeItems: () => React.useSyncExternalStore(host.extensions.home.subscribe, host.extensions.home.items, host.extensions.home.items),
|
|
387
|
+
useRoomAddons: () => {
|
|
388
|
+
const read = () => host.extensions.state.roomAddons;
|
|
389
|
+
const subscribe = React.useCallback((listener) => host.extensions.subscribe(listener), []);
|
|
390
|
+
return React.useSyncExternalStore(subscribe, read, read);
|
|
391
|
+
},
|
|
341
392
|
removeTasks: tasks => (run.stopped ? Promise.resolve(false) : WebTaskUtil.remove(tasks, notices, translator(settings.state.language))),
|
|
342
393
|
useView: id => this.useView(id),
|
|
343
394
|
Avatar: TaAvatar,
|
|
@@ -359,14 +410,16 @@ export class WebExtensionContext {
|
|
|
359
410
|
Stack: PhoneStack,
|
|
360
411
|
Face,
|
|
361
412
|
GroupFace,
|
|
362
|
-
Composer: this.
|
|
413
|
+
Composer: this.composerOf(run),
|
|
363
414
|
HoldToTalk: this.holdToTalk,
|
|
364
415
|
voice: this.voice,
|
|
365
416
|
Markdown,
|
|
417
|
+
Conversation: ConversationView,
|
|
366
418
|
useChatScroll: (sent, key) => useConversationScroll(sent, { sentTo: 'bottom', key }),
|
|
367
419
|
Empty: EmptyState,
|
|
368
420
|
Skeleton: ListSkeleton,
|
|
369
421
|
useBusy,
|
|
422
|
+
useBackLayer: (open, close) => useBackLayer(open, close).top,
|
|
370
423
|
Switch,
|
|
371
424
|
HostTag,
|
|
372
425
|
SwipeRow,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TaEvent, TaTemporaryFrom, TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { MessageId } from '../i18n/messages.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { BlockSpeech } from '../util/spoken.js';
|
|
5
|
+
import type { WebAvatarProps, WebCallPartner, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebIcon, WebImage, WebInitiative, WebLabel, WebMenuItem, WebOpener, WebPageGroup, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTool, WebToolRendererResolver, WebViewLocation, WebViewPreview, WidgetOptions } from './web-extension-api.js';
|
|
5
6
|
import type { WebHomeBoard } from './web-home.js';
|
|
6
7
|
import type { PageUsage, WebPageInfo } from './web-pages.js';
|
|
7
8
|
import type { WebTaskBoard } from './web-tasks.js';
|
|
@@ -62,6 +63,10 @@ export interface WebViewEntry {
|
|
|
62
63
|
pages?: string[];
|
|
63
64
|
/** Under Discover until the user pins it (WebView.discover). */
|
|
64
65
|
discover?: boolean;
|
|
66
|
+
/** Its group under Discover (WebView.group). */
|
|
67
|
+
group?: WebPageGroup;
|
|
68
|
+
/** Never in the navigation nor under Discover (WebView.navigation). */
|
|
69
|
+
navigation?: false;
|
|
65
70
|
menu?(): WebMenuItem[][];
|
|
66
71
|
preview?(): WebViewPreview | undefined;
|
|
67
72
|
/** WebView.mark. */
|
|
@@ -106,6 +111,8 @@ export interface WebExtensionsState {
|
|
|
106
111
|
widgets: WebWidgetEntry[];
|
|
107
112
|
/** What extensions add to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
|
|
108
113
|
composerAddons: WebComposerAddonEntry[];
|
|
114
|
+
/** What extensions add to the rooms (WebExtensionAPI.registerRoomAddon). */
|
|
115
|
+
roomAddons: WebRoomAddonEntry[];
|
|
109
116
|
/** The sections extensions add to the settings (WebExtensionAPI.registerSettings). */
|
|
110
117
|
settingsSections: WebSettingsEntry[];
|
|
111
118
|
renderers: Record<string, React.ComponentType<{
|
|
@@ -113,6 +120,10 @@ export interface WebExtensionsState {
|
|
|
113
120
|
}>>;
|
|
114
121
|
/** By language, in lower case: the first registered (WebExtensionAPI.registerCodeRenderer). */
|
|
115
122
|
codeRenderers: Record<string, React.ComponentType<WebCodeRendererProps>>;
|
|
123
|
+
/** By language, in lower case, how its blocks are said aloud (WebCodeRendererOptions.spoken): SpokenReply. */
|
|
124
|
+
codeSpeech: BlockSpeech;
|
|
125
|
+
/** Who answers in calls in place of the conversation (WebExtensionAPI.registerCallPartner): the first registered. */
|
|
126
|
+
callPartner?: WebCallPartner;
|
|
116
127
|
/** By the name of the extension, the group of the sessions it draws (WebExtensionAPI.registerAvatar). */
|
|
117
128
|
avatars: Record<string, React.ComponentType<WebAvatarProps>>;
|
|
118
129
|
/** The icons extensions give conversations of theirs (WebExtensionAPI.registerChatIcon), with the extension of each. */
|
|
@@ -152,6 +163,11 @@ export interface WebExtensionsState {
|
|
|
152
163
|
page: string;
|
|
153
164
|
/** Counts the pages shown, the same one again too: on a phone a page shown comes to the front. */
|
|
154
165
|
pageShown: number;
|
|
166
|
+
/** The list of chats asked for (ui.showChats), counted, the same again too; `busy` to show only those going on. */
|
|
167
|
+
chatsShown: {
|
|
168
|
+
count: number;
|
|
169
|
+
busy: boolean;
|
|
170
|
+
};
|
|
155
171
|
/** The extensions started on open, running or not, in the order of the server's list. */
|
|
156
172
|
onOpen: OnOpenExtension[];
|
|
157
173
|
/** The pages of those in the background: kept where they were, hidden, so that they show again as they were. */
|
|
@@ -232,6 +248,8 @@ export interface TaWebExtensions {
|
|
|
232
248
|
* name of one opens its first page. Resolves once it shows; false when there is no such view.
|
|
233
249
|
*/
|
|
234
250
|
showView(id: string): Promise<boolean>;
|
|
251
|
+
/** Shows the list of chats as `ui.showChats` does: the shell follows chatsShown. */
|
|
252
|
+
showChats(busy: boolean): void;
|
|
235
253
|
/** The page shown went out of sight, `page` left as it is (a phone's screen slid away): its extension goes to the background. */
|
|
236
254
|
hidePage(): void;
|
|
237
255
|
/** Every page there is, as `ui.usePages` lists them; the same array until one changes. */
|
|
@@ -9,9 +9,11 @@ export var WebExtensionsStateUtil;
|
|
|
9
9
|
views: [],
|
|
10
10
|
widgets: [],
|
|
11
11
|
composerAddons: [],
|
|
12
|
+
roomAddons: [],
|
|
12
13
|
settingsSections: [],
|
|
13
14
|
renderers: {},
|
|
14
15
|
codeRenderers: {},
|
|
16
|
+
codeSpeech: {},
|
|
15
17
|
avatars: {},
|
|
16
18
|
chatIcons: [],
|
|
17
19
|
initiatives: [],
|
|
@@ -26,6 +28,7 @@ export var WebExtensionsStateUtil;
|
|
|
26
28
|
loaded: false,
|
|
27
29
|
page: '',
|
|
28
30
|
pageShown: 0,
|
|
31
|
+
chatsShown: { count: 0, busy: false },
|
|
29
32
|
conversationShown: true,
|
|
30
33
|
onOpen: [],
|
|
31
34
|
kept: [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TaEvent } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import type { WebChatIconSource, WebComposerAddon, WebHomeSource, WebInitiative, WebOpener, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WidgetOptions } from './web-extension-api.js';
|
|
3
|
+
import type { WebCallPartner, WebChatIconSource, WebComposerAddon, WebHomeSource, WebInitiative, WebOpener, WebRoomAddon, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WidgetOptions } from './web-extension-api.js';
|
|
4
4
|
import type { LoadedWebExtension, WebExtensionsState } from './web-extension-protocol.js';
|
|
5
5
|
/** What an extension registered through its API: all of it goes when it stops. */
|
|
6
6
|
export interface WebRegistrations {
|
|
@@ -11,6 +11,8 @@ export interface WebRegistrations {
|
|
|
11
11
|
}>;
|
|
12
12
|
renderers: Map<string, WebExtensionsState['renderers'][string]>;
|
|
13
13
|
codeRenderers: Map<string, WebExtensionsState['codeRenderers'][string]>;
|
|
14
|
+
codeSpeech: Map<string, WebExtensionsState['codeSpeech'][string]>;
|
|
15
|
+
callPartners: WebCallPartner[];
|
|
14
16
|
avatar?: WebExtensionsState['avatars'][string];
|
|
15
17
|
chatIcons: WebChatIconSource[];
|
|
16
18
|
homeSources: WebHomeSource[];
|
|
@@ -24,6 +26,7 @@ export interface WebRegistrations {
|
|
|
24
26
|
taskSources: WebTaskSource[];
|
|
25
27
|
searches: WebSearchSource[];
|
|
26
28
|
composerAddons: WebComposerAddon[];
|
|
29
|
+
roomAddons: WebRoomAddon[];
|
|
27
30
|
settingsSections: WebSettingsSection[];
|
|
28
31
|
handlers: {
|
|
29
32
|
type: string;
|
|
@@ -51,5 +54,5 @@ export declare namespace WebExtensionRunUtil {
|
|
|
51
54
|
/** Subscribes for the extension: undone when it stops, or by the function returned. */
|
|
52
55
|
function track(run: WebExtensionRun, subscribe: () => () => void): () => void;
|
|
53
56
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
54
|
-
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'avatars' | 'chatIcons' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
57
|
+
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'roomAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'codeSpeech' | 'callPartner' | 'avatars' | 'chatIcons' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
55
58
|
}
|
|
@@ -8,6 +8,8 @@ export var WebExtensionRunUtil;
|
|
|
8
8
|
widgets: new Map(),
|
|
9
9
|
renderers: new Map(),
|
|
10
10
|
codeRenderers: new Map(),
|
|
11
|
+
codeSpeech: new Map(),
|
|
12
|
+
callPartners: [],
|
|
11
13
|
avatar: undefined,
|
|
12
14
|
chatIcons: [],
|
|
13
15
|
homeSources: [],
|
|
@@ -20,6 +22,7 @@ export var WebExtensionRunUtil;
|
|
|
20
22
|
taskSources: [],
|
|
21
23
|
searches: [],
|
|
22
24
|
composerAddons: [],
|
|
25
|
+
roomAddons: [],
|
|
23
26
|
settingsSections: [],
|
|
24
27
|
handlers: [],
|
|
25
28
|
};
|
|
@@ -53,9 +56,10 @@ export var WebExtensionRunUtil;
|
|
|
53
56
|
WebExtensionRunUtil.track = track;
|
|
54
57
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
55
58
|
function collect(runs, onOpen) {
|
|
56
|
-
var _a, _b;
|
|
59
|
+
var _a, _b, _c;
|
|
57
60
|
const renderers = {};
|
|
58
61
|
const codeRenderers = {};
|
|
62
|
+
const codeSpeech = {};
|
|
59
63
|
const avatars = {};
|
|
60
64
|
const tools = [];
|
|
61
65
|
for (const run of runs) {
|
|
@@ -68,6 +72,9 @@ export var WebExtensionRunUtil;
|
|
|
68
72
|
for (const [language, renderer] of run.codeRenderers) {
|
|
69
73
|
(_b = codeRenderers[language]) !== null && _b !== void 0 ? _b : (codeRenderers[language] = renderer);
|
|
70
74
|
}
|
|
75
|
+
for (const [language, spoken] of run.codeSpeech) {
|
|
76
|
+
(_c = codeSpeech[language]) !== null && _c !== void 0 ? _c : (codeSpeech[language] = spoken);
|
|
77
|
+
}
|
|
71
78
|
for (const tool of run.tools) {
|
|
72
79
|
if (!tools.some(other => other.name === tool.name)) {
|
|
73
80
|
tools.push(tool);
|
|
@@ -85,6 +92,8 @@ export var WebExtensionRunUtil;
|
|
|
85
92
|
head: view.head,
|
|
86
93
|
pages: view.pages,
|
|
87
94
|
discover: view.discover,
|
|
95
|
+
group: view.group,
|
|
96
|
+
...(view.navigation === false ? { navigation: false } : {}),
|
|
88
97
|
menu: (_a = view.menu) === null || _a === void 0 ? void 0 : _a.bind(view),
|
|
89
98
|
preview: (_b = view.preview) === null || _b === void 0 ? void 0 : _b.bind(view),
|
|
90
99
|
mark: view.mark,
|
|
@@ -107,9 +116,12 @@ export var WebExtensionRunUtil;
|
|
|
107
116
|
component,
|
|
108
117
|
}); })),
|
|
109
118
|
composerAddons: runs.flatMap(run => run.composerAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
|
|
119
|
+
roomAddons: runs.flatMap(run => run.roomAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
|
|
110
120
|
settingsSections: runs.flatMap(run => run.settingsSections.map((section, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, section }))),
|
|
111
121
|
renderers,
|
|
112
122
|
codeRenderers,
|
|
123
|
+
codeSpeech,
|
|
124
|
+
callPartner: runs.flatMap(run => run.callPartners)[0],
|
|
113
125
|
avatars,
|
|
114
126
|
chatIcons: runs.flatMap(run => run.chatIcons.map(source => ({ extension: run.loaded.name, source }))),
|
|
115
127
|
initiatives: runs.flatMap(run => run.initiatives),
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import { TaFiles } from '../files/files-protocol.js';
|
|
3
|
+
import { TaLinks } from '../links/links-protocol.js';
|
|
4
|
+
import { TaNotices } from '../notices/notices-protocol.js';
|
|
5
|
+
import { TaSessionNotices } from '../notices/session-notices.js';
|
|
6
|
+
import { TaScreen } from '../screen/screen-protocol.js';
|
|
7
|
+
import { TaSettings } from '../settings/settings-protocol.js';
|
|
8
|
+
import { TaState } from '../state/state-protocol.js';
|
|
9
|
+
import { TaWorkbench } from '../workbench-protocol.js';
|
|
10
|
+
import { WebEditorTabs } from './web-editor-tabs.js';
|
|
11
|
+
import type { WebExtensionFactory } from './web-extension-api.js';
|
|
12
|
+
import { WebExtensionCode } from './web-extension-code.js';
|
|
13
|
+
import type { WebExtensionContext } from './web-extension-context.js';
|
|
14
|
+
import { BuiltinWebExtension, type LoadedWebExtension, type WebExtensionConversation, type WebExtensionsState, type WebSessionSwitcher, type WebViewEntry } from './web-extension-protocol.js';
|
|
15
|
+
import { type WebExtensionRun } from './web-extension-run.js';
|
|
16
|
+
import { WebHomeBoard } from './web-home.js';
|
|
17
|
+
import { WebOnDemand } from './web-on-demand.js';
|
|
18
|
+
import { WebPageList } from './web-page-list.js';
|
|
19
|
+
import { WebTaskBoard } from './web-tasks.js';
|
|
20
|
+
/**
|
|
21
|
+
* The web extensions running: the built-ins and those of the computer's packages, loaded, started and
|
|
22
|
+
* stopped, and what they registered published.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class WebExtensionsRunning {
|
|
25
|
+
protected readonly workbench: TaWorkbench;
|
|
26
|
+
protected readonly settings: TaSettings;
|
|
27
|
+
protected readonly taFiles: TaFiles;
|
|
28
|
+
/** Detached: TaLinks asks the openers of the extensions. */
|
|
29
|
+
protected readonly links: TaLinks;
|
|
30
|
+
protected readonly notices: TaNotices;
|
|
31
|
+
protected readonly persisted: TaState;
|
|
32
|
+
protected readonly sessionNotices: TaSessionNotices;
|
|
33
|
+
protected readonly screen: TaScreen;
|
|
34
|
+
readonly builtins: BuiltinWebExtension[];
|
|
35
|
+
readonly tasks: WebTaskBoard;
|
|
36
|
+
readonly home: WebHomeBoard;
|
|
37
|
+
protected readonly tabs: WebEditorTabs;
|
|
38
|
+
/** The code read before, by its hash: a start reads only what changed. */
|
|
39
|
+
protected readonly code: WebExtensionCode;
|
|
40
|
+
protected current: WebExtensionsState;
|
|
41
|
+
protected readonly running: Map<string, WebExtensionRun>;
|
|
42
|
+
protected readonly listeners: Set<(state: WebExtensionsState) => void>;
|
|
43
|
+
protected conversation?: WebExtensionConversation;
|
|
44
|
+
protected switcher?: WebSessionSwitcher;
|
|
45
|
+
protected settingsOpener?: (section?: string) => void;
|
|
46
|
+
protected refreshing: Promise<boolean>;
|
|
47
|
+
/** The extensions of the list of the last time have started (startKept), once. */
|
|
48
|
+
protected keptStarted: boolean;
|
|
49
|
+
/** The views of the navigation kept from before (WebViewUtil.KEPT), in their places until the extensions have loaded once. */
|
|
50
|
+
protected placeholders?: WebViewEntry[];
|
|
51
|
+
protected started?: WebOnDemand;
|
|
52
|
+
protected readonly pageList: WebPageList;
|
|
53
|
+
get state(): WebExtensionsState;
|
|
54
|
+
protected init(): void;
|
|
55
|
+
/** The extensions started on open (ta-launcher.md). */
|
|
56
|
+
protected get onDemand(): WebOnDemand;
|
|
57
|
+
/** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
|
|
58
|
+
protected listedKinds(): Set<string>;
|
|
59
|
+
/** Loads and starts an extension started on open, as reconcile starts the others. */
|
|
60
|
+
protected launch(info: TaWebExtensionInfo): Promise<void>;
|
|
61
|
+
/** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
|
|
62
|
+
protected stopOnDemand(id: string): void;
|
|
63
|
+
protected reconcile(): Promise<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
66
|
+
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
67
|
+
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
68
|
+
* still the same and stops the others.
|
|
69
|
+
*/
|
|
70
|
+
protected startKept(host: string | undefined): Promise<boolean>;
|
|
71
|
+
/** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
|
|
72
|
+
protected stopUnless(keep: (run: WebExtensionRun) => boolean): boolean;
|
|
73
|
+
protected loadPackage(info: TaWebExtensionInfo): Promise<{
|
|
74
|
+
factory: WebExtensionFactory;
|
|
75
|
+
hash: string;
|
|
76
|
+
} | {
|
|
77
|
+
error: string;
|
|
78
|
+
}>;
|
|
79
|
+
protected startPackage(info: TaWebExtensionInfo, load: {
|
|
80
|
+
factory: WebExtensionFactory;
|
|
81
|
+
hash: string;
|
|
82
|
+
} | {
|
|
83
|
+
error: string;
|
|
84
|
+
}): void;
|
|
85
|
+
protected start(loaded: LoadedWebExtension, factory: WebExtensionFactory, hash?: string): void;
|
|
86
|
+
protected stop(run: WebExtensionRun): void;
|
|
87
|
+
protected guard(run: WebExtensionRun, action: () => void): void;
|
|
88
|
+
protected publish(): void;
|
|
89
|
+
protected update(change: Partial<WebExtensionsState>): void;
|
|
90
|
+
abstract openView(id: string, preserveFocus?: boolean): void;
|
|
91
|
+
abstract showView(id: string): Promise<boolean>;
|
|
92
|
+
protected abstract get context(): WebExtensionContext;
|
|
93
|
+
}
|