@celljs/ta-web 4.10.0 → 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 +7 -7
- package/README.md +7 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +12 -0
- package/esm/browser/assistant/assistant-extension.js +5 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
- package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
- package/esm/browser/assistant/assistant-task-book.js +23 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
- package/esm/browser/assistant/assistant-task-source.js +5 -10
- package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
- package/esm/browser/assistant/assistant-task-util.js +59 -12
- package/esm/browser/assistant/assistant-view.js +44 -23
- package/esm/browser/assistant/assistant.d.ts +18 -4
- package/esm/browser/assistant/assistant.js +52 -17
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-protocol.d.ts +5 -0
- package/esm/browser/chat/chat-stores.d.ts +8 -5
- package/esm/browser/chat/chat-stores.js +17 -9
- package/esm/browser/chat/chat-view.js +18 -11
- package/esm/browser/chat/chat.d.ts +16 -8
- package/esm/browser/chat/chat.js +86 -51
- package/esm/browser/components/account-menu.d.ts +0 -2
- package/esm/browser/components/account-menu.js +1 -27
- package/esm/browser/components/agent-settings-view.d.ts +3 -2
- package/esm/browser/components/agent-settings-view.js +2 -1
- package/esm/browser/components/app-nav.d.ts +5 -2
- package/esm/browser/components/app-nav.js +22 -9
- package/esm/browser/components/app-shell-hooks.js +5 -3
- package/esm/browser/components/app-view.js +76 -16
- package/esm/browser/components/busy.d.ts +25 -0
- package/esm/browser/components/busy.js +52 -0
- package/esm/browser/components/chat-icon.d.ts +29 -0
- package/esm/browser/components/chat-icon.js +78 -0
- package/esm/browser/components/chat-list.d.ts +73 -6
- package/esm/browser/components/chat-list.js +295 -60
- package/esm/browser/components/chat-seen.d.ts +53 -0
- package/esm/browser/components/chat-seen.js +101 -0
- package/esm/browser/components/composer-box.d.ts +14 -4
- package/esm/browser/components/composer-box.js +104 -64
- package/esm/browser/components/composer.d.ts +6 -6
- package/esm/browser/components/composer.js +5 -3
- package/esm/browser/components/conversation-scroll.d.ts +7 -0
- package/esm/browser/components/conversation-scroll.js +46 -7
- package/esm/browser/components/custom-host.d.ts +3 -0
- package/esm/browser/components/custom-host.js +14 -0
- package/esm/browser/components/directory-commands.d.ts +6 -0
- package/esm/browser/components/directory-commands.js +34 -0
- package/esm/browser/components/discover-view.d.ts +11 -4
- package/esm/browser/components/discover-view.js +20 -11
- package/esm/browser/components/dismiss.d.ts +3 -0
- package/esm/browser/components/dismiss.js +29 -0
- package/esm/browser/components/earlier-messages.d.ts +34 -3
- package/esm/browser/components/earlier-messages.js +42 -8
- package/esm/browser/components/editor-area.d.ts +6 -22
- package/esm/browser/components/editor-area.js +10 -97
- package/esm/browser/components/fold-text.d.ts +20 -0
- package/esm/browser/components/fold-text.js +66 -0
- package/esm/browser/components/folder-picker.d.ts +1 -1
- package/esm/browser/components/folder-picker.js +1 -1
- package/esm/browser/components/full-screen.d.ts +9 -0
- package/esm/browser/components/full-screen.js +26 -0
- package/esm/browser/components/grow-box.d.ts +9 -0
- package/esm/browser/components/grow-box.js +50 -0
- package/esm/browser/components/hold-to-talk.d.ts +22 -0
- package/esm/browser/components/hold-to-talk.js +29 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +3 -1
- package/esm/browser/components/icon.js +4 -3
- package/esm/browser/components/image-viewer.d.ts +10 -2
- package/esm/browser/components/image-viewer.js +48 -11
- package/esm/browser/components/launcher-search-util.d.ts +4 -3
- package/esm/browser/components/launcher-search-util.js +12 -4
- package/esm/browser/components/lightbox.d.ts +5 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.js +36 -4
- package/esm/browser/components/media.js +19 -2
- package/esm/browser/components/message-actions.js +2 -0
- package/esm/browser/components/message-footer.d.ts +6 -0
- package/esm/browser/components/message-footer.js +20 -3
- package/esm/browser/components/message-list.d.ts +57 -6
- package/esm/browser/components/message-list.js +152 -36
- package/esm/browser/components/message-menu.js +6 -1
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +21 -2
- package/esm/browser/components/nav-places.js +20 -4
- package/esm/browser/components/notice-center.js +34 -0
- package/esm/browser/components/notice-face.d.ts +10 -0
- package/esm/browser/components/notice-face.js +28 -0
- package/esm/browser/components/phone-shell.d.ts +23 -1
- package/esm/browser/components/phone-shell.js +96 -9
- package/esm/browser/components/picture.d.ts +8 -1
- package/esm/browser/components/picture.js +12 -1
- package/esm/browser/components/plus-menu.d.ts +23 -0
- package/esm/browser/components/plus-menu.js +90 -0
- package/esm/browser/components/recent-shot.d.ts +15 -0
- package/esm/browser/components/recent-shot.js +174 -0
- package/esm/browser/components/relay-view.js +10 -3
- package/esm/browser/components/run-status.d.ts +1 -1
- package/esm/browser/components/run-status.js +17 -29
- package/esm/browser/components/said-text.d.ts +6 -0
- package/esm/browser/components/said-text.js +14 -0
- package/esm/browser/components/scan-screen.d.ts +10 -0
- package/esm/browser/components/scan-screen.js +230 -0
- package/esm/browser/components/search-page.js +10 -6
- package/esm/browser/components/session-settings.d.ts +2 -3
- package/esm/browser/components/session-settings.js +1 -0
- package/esm/browser/components/session-view.js +29 -19
- package/esm/browser/components/settings-choices.d.ts +1 -0
- package/esm/browser/components/settings-choices.js +3 -2
- package/esm/browser/components/settings-controls.d.ts +5 -3
- package/esm/browser/components/settings-controls.js +10 -1
- package/esm/browser/components/settings-parts.js +45 -14
- package/esm/browser/components/tool-view.js +7 -2
- package/esm/browser/components/unseen-drop.d.ts +39 -0
- package/esm/browser/components/unseen-drop.js +219 -0
- package/esm/browser/components/use-seen-chats.d.ts +8 -0
- package/esm/browser/components/use-seen-chats.js +49 -0
- package/esm/browser/components/voice-button.d.ts +7 -1
- package/esm/browser/components/voice-button.js +15 -2
- package/esm/browser/components/voice-picker.d.ts +6 -0
- package/esm/browser/components/voice-picker.js +53 -0
- package/esm/browser/components/voice-talk.d.ts +11 -3
- package/esm/browser/components/voice-talk.js +24 -4
- package/esm/browser/components/web-composer.d.ts +4 -2
- package/esm/browser/components/web-composer.js +8 -4
- package/esm/browser/components/workbench-tabs.d.ts +41 -0
- package/esm/browser/components/workbench-tabs.js +193 -0
- package/esm/browser/components/workbench-toggle.d.ts +0 -13
- package/esm/browser/components/workbench-toggle.js +1 -28
- package/esm/browser/device/code-scan.d.ts +55 -0
- package/esm/browser/device/code-scan.js +137 -0
- package/esm/browser/device/code-vision.d.ts +51 -0
- package/esm/browser/device/code-vision.js +100 -0
- package/esm/browser/device/hold.js +4 -6
- package/esm/browser/device/long-press.d.ts +10 -0
- package/esm/browser/device/long-press.js +28 -12
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/pull-down.js +3 -2
- package/esm/browser/device/recent-shots.d.ts +45 -0
- package/esm/browser/device/recent-shots.js +142 -0
- package/esm/browser/device/row-swipe.js +6 -1
- package/esm/browser/device/sheet-swipe.js +8 -1
- 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 +166 -565
- 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 +44 -6
- package/esm/browser/extension/web-extension-protocol.js +33 -0
- package/esm/browser/extension/web-extension-run.d.ts +54 -0
- package/esm/browser/extension/web-extension-run.js +120 -0
- package/esm/browser/extension/web-extensions.d.ts +29 -69
- package/esm/browser/extension/web-extensions.js +118 -516
- package/esm/browser/extension/web-home.d.ts +19 -0
- package/esm/browser/extension/web-home.js +72 -0
- package/esm/browser/extension/web-pages.d.ts +13 -3
- package/esm/browser/extension/web-pages.js +23 -3
- package/esm/browser/extension/web-session-notices.d.ts +36 -0
- package/esm/browser/extension/web-session-notices.js +174 -0
- package/esm/browser/extension/web-sharing.d.ts +2 -0
- package/esm/browser/extension/web-sharing.js +4 -0
- package/esm/browser/game/game-host.d.ts +27 -0
- package/esm/browser/game/game-host.js +127 -0
- package/esm/browser/game/game-loader.d.ts +10 -0
- package/esm/browser/game/game-loader.js +28 -0
- package/esm/browser/game/game-protocol.d.ts +49 -0
- package/esm/browser/game/game-protocol.js +2 -0
- package/esm/browser/game/game-runner.d.ts +27 -0
- package/esm/browser/game/game-runner.js +60 -0
- package/esm/browser/game/game-util.d.ts +29 -0
- package/esm/browser/game/game-util.js +180 -0
- package/esm/browser/game/game-view.d.ts +12 -0
- package/esm/browser/game/game-view.js +31 -0
- package/esm/browser/game/game3d-protocol.d.ts +51 -0
- package/esm/browser/game/game3d-protocol.js +2 -0
- package/esm/browser/game/game3d-runner.d.ts +27 -0
- package/esm/browser/game/game3d-runner.js +149 -0
- package/esm/browser/hooks.d.ts +5 -1
- package/esm/browser/hooks.js +13 -2
- package/esm/browser/i18n/locales.d.ts +82 -2
- package/esm/browser/i18n/messages.d.ts +81 -1
- package/esm/browser/i18n/messages.js +167 -7
- package/esm/browser/index.d.ts +9 -0
- package/esm/browser/index.js +9 -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 +17 -0
- package/esm/browser/notices/notices.d.ts +1 -1
- package/esm/browser/notices/notices.js +6 -2
- package/esm/browser/notices/session-notices.d.ts +69 -0
- package/esm/browser/notices/session-notices.js +92 -0
- package/esm/browser/offline/device-values.js +12 -3
- package/esm/browser/offline/offline-reads.js +3 -1
- package/esm/browser/settings/navigation.d.ts +3 -2
- package/esm/browser/settings/navigation.js +4 -3
- package/esm/browser/settings/settings-protocol.d.ts +15 -0
- package/esm/browser/settings/settings-protocol.js +18 -4
- package/esm/browser/state/state-protocol.d.ts +8 -1
- package/esm/browser/state/state.d.ts +2 -0
- package/esm/browser/state/state.js +21 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +27 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +43 -5
- package/esm/browser/style/device.js +15 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +189 -56
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +36 -1
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +15 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +30 -6
- 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/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +4 -1
- package/esm/browser/util/markdown.js +1 -1
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +14 -2
- package/esm/browser/util/process.js +39 -8
- package/esm/browser/util/progress.d.ts +19 -1
- package/esm/browser/util/progress.js +57 -4
- package/esm/browser/util/quote.d.ts +19 -0
- package/esm/browser/util/quote.js +58 -0
- package/esm/browser/util/tool.d.ts +19 -2
- package/esm/browser/util/tool.js +70 -2
- package/esm/browser/util/voice.d.ts +47 -7
- package/esm/browser/util/voice.js +269 -27
- package/esm/browser/workbench-calls.d.ts +6 -4
- package/esm/browser/workbench-calls.js +15 -10
- package/esm/browser/workbench-protocol.d.ts +31 -2
- package/esm/browser/workbench-util.d.ts +15 -4
- package/esm/browser/workbench-util.js +28 -5
- package/esm/browser/workbench.d.ts +33 -1
- package/esm/browser/workbench.js +142 -14
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +13 -0
- package/lib/browser/assistant/assistant-extension.js +5 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
- package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
- package/lib/browser/assistant/assistant-task-book.js +23 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
- package/lib/browser/assistant/assistant-task-source.js +5 -10
- package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
- package/lib/browser/assistant/assistant-task-util.js +59 -12
- package/lib/browser/assistant/assistant-view.js +42 -21
- package/lib/browser/assistant/assistant.d.ts +18 -4
- package/lib/browser/assistant/assistant.js +52 -17
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-protocol.d.ts +5 -0
- package/lib/browser/chat/chat-stores.d.ts +8 -5
- package/lib/browser/chat/chat-stores.js +17 -9
- package/lib/browser/chat/chat-view.js +17 -10
- package/lib/browser/chat/chat.d.ts +16 -8
- package/lib/browser/chat/chat.js +86 -51
- package/lib/browser/components/account-menu.d.ts +0 -2
- package/lib/browser/components/account-menu.js +2 -29
- package/lib/browser/components/agent-settings-view.d.ts +3 -2
- package/lib/browser/components/agent-settings-view.js +2 -1
- package/lib/browser/components/app-nav.d.ts +5 -2
- package/lib/browser/components/app-nav.js +18 -5
- package/lib/browser/components/app-shell-hooks.js +5 -3
- package/lib/browser/components/app-view.js +72 -12
- package/lib/browser/components/busy.d.ts +26 -0
- package/lib/browser/components/busy.js +91 -0
- package/lib/browser/components/chat-icon.d.ts +30 -0
- package/lib/browser/components/chat-icon.js +117 -0
- package/lib/browser/components/chat-list.d.ts +73 -6
- package/lib/browser/components/chat-list.js +295 -59
- package/lib/browser/components/chat-seen.d.ts +54 -0
- package/lib/browser/components/chat-seen.js +104 -0
- package/lib/browser/components/composer-box.d.ts +14 -4
- package/lib/browser/components/composer-box.js +102 -62
- package/lib/browser/components/composer.d.ts +6 -6
- package/lib/browser/components/composer.js +4 -2
- package/lib/browser/components/conversation-scroll.d.ts +7 -0
- package/lib/browser/components/conversation-scroll.js +46 -7
- package/lib/browser/components/custom-host.d.ts +4 -0
- package/lib/browser/components/custom-host.js +50 -0
- package/lib/browser/components/directory-commands.d.ts +7 -0
- package/lib/browser/components/directory-commands.js +70 -0
- package/lib/browser/components/discover-view.d.ts +11 -4
- package/lib/browser/components/discover-view.js +19 -10
- package/lib/browser/components/dismiss.d.ts +4 -0
- package/lib/browser/components/dismiss.js +65 -0
- package/lib/browser/components/earlier-messages.d.ts +34 -3
- package/lib/browser/components/earlier-messages.js +44 -9
- package/lib/browser/components/editor-area.d.ts +6 -22
- package/lib/browser/components/editor-area.js +11 -98
- package/lib/browser/components/fold-text.d.ts +21 -0
- package/lib/browser/components/fold-text.js +103 -0
- package/lib/browser/components/folder-picker.d.ts +1 -1
- package/lib/browser/components/folder-picker.js +1 -1
- package/lib/browser/components/full-screen.d.ts +10 -0
- package/lib/browser/components/full-screen.js +62 -0
- package/lib/browser/components/grow-box.d.ts +10 -0
- package/lib/browser/components/grow-box.js +86 -0
- package/lib/browser/components/hold-to-talk.d.ts +23 -0
- package/lib/browser/components/hold-to-talk.js +65 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +3 -1
- package/lib/browser/components/icon.js +4 -3
- package/lib/browser/components/image-viewer.d.ts +10 -2
- package/lib/browser/components/image-viewer.js +47 -10
- package/lib/browser/components/launcher-search-util.d.ts +4 -3
- package/lib/browser/components/launcher-search-util.js +12 -4
- package/lib/browser/components/lightbox.d.ts +5 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.js +36 -4
- package/lib/browser/components/media.js +19 -2
- package/lib/browser/components/message-actions.js +2 -0
- package/lib/browser/components/message-footer.d.ts +6 -0
- package/lib/browser/components/message-footer.js +20 -2
- package/lib/browser/components/message-list.d.ts +57 -6
- package/lib/browser/components/message-list.js +153 -34
- package/lib/browser/components/message-menu.js +6 -1
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +21 -2
- package/lib/browser/components/nav-places.js +22 -4
- package/lib/browser/components/notice-center.js +34 -0
- package/lib/browser/components/notice-face.d.ts +11 -0
- package/lib/browser/components/notice-face.js +64 -0
- package/lib/browser/components/phone-shell.d.ts +23 -1
- package/lib/browser/components/phone-shell.js +97 -10
- package/lib/browser/components/picture.d.ts +8 -1
- package/lib/browser/components/picture.js +13 -1
- package/lib/browser/components/plus-menu.d.ts +24 -0
- package/lib/browser/components/plus-menu.js +126 -0
- package/lib/browser/components/recent-shot.d.ts +16 -0
- package/lib/browser/components/recent-shot.js +210 -0
- package/lib/browser/components/relay-view.js +10 -3
- package/lib/browser/components/run-status.d.ts +1 -1
- package/lib/browser/components/run-status.js +17 -29
- package/lib/browser/components/said-text.d.ts +7 -0
- package/lib/browser/components/said-text.js +50 -0
- package/lib/browser/components/scan-screen.d.ts +11 -0
- package/lib/browser/components/scan-screen.js +266 -0
- package/lib/browser/components/search-page.js +10 -6
- package/lib/browser/components/session-settings.d.ts +2 -3
- package/lib/browser/components/session-settings.js +1 -0
- package/lib/browser/components/session-view.js +26 -16
- package/lib/browser/components/settings-choices.d.ts +1 -0
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-controls.d.ts +5 -3
- package/lib/browser/components/settings-controls.js +10 -1
- package/lib/browser/components/settings-parts.js +43 -12
- package/lib/browser/components/tool-view.js +7 -2
- package/lib/browser/components/unseen-drop.d.ts +40 -0
- package/lib/browser/components/unseen-drop.js +256 -0
- package/lib/browser/components/use-seen-chats.d.ts +9 -0
- package/lib/browser/components/use-seen-chats.js +85 -0
- package/lib/browser/components/voice-button.d.ts +7 -1
- package/lib/browser/components/voice-button.js +16 -2
- package/lib/browser/components/voice-picker.d.ts +7 -0
- package/lib/browser/components/voice-picker.js +89 -0
- package/lib/browser/components/voice-talk.d.ts +11 -3
- package/lib/browser/components/voice-talk.js +25 -4
- package/lib/browser/components/web-composer.d.ts +4 -2
- package/lib/browser/components/web-composer.js +7 -3
- package/lib/browser/components/workbench-tabs.d.ts +42 -0
- package/lib/browser/components/workbench-tabs.js +232 -0
- package/lib/browser/components/workbench-toggle.d.ts +0 -13
- package/lib/browser/components/workbench-toggle.js +1 -29
- package/lib/browser/device/code-scan.d.ts +56 -0
- package/lib/browser/device/code-scan.js +141 -0
- package/lib/browser/device/code-vision.d.ts +52 -0
- package/lib/browser/device/code-vision.js +103 -0
- package/lib/browser/device/hold.js +4 -6
- package/lib/browser/device/long-press.d.ts +10 -0
- package/lib/browser/device/long-press.js +28 -12
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/pull-down.js +3 -2
- package/lib/browser/device/recent-shots.d.ts +46 -0
- package/lib/browser/device/recent-shots.js +145 -0
- package/lib/browser/device/row-swipe.js +6 -1
- package/lib/browser/device/sheet-swipe.js +8 -1
- 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 +166 -565
- 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 +44 -6
- package/lib/browser/extension/web-extension-protocol.js +34 -1
- package/lib/browser/extension/web-extension-run.d.ts +55 -0
- package/lib/browser/extension/web-extension-run.js +123 -0
- package/lib/browser/extension/web-extensions.d.ts +29 -69
- package/lib/browser/extension/web-extensions.js +114 -545
- package/lib/browser/extension/web-home.d.ts +20 -0
- package/lib/browser/extension/web-home.js +76 -0
- package/lib/browser/extension/web-pages.d.ts +13 -3
- package/lib/browser/extension/web-pages.js +23 -3
- package/lib/browser/extension/web-session-notices.d.ts +37 -0
- package/lib/browser/extension/web-session-notices.js +177 -0
- package/lib/browser/extension/web-sharing.d.ts +2 -0
- package/lib/browser/extension/web-sharing.js +4 -0
- package/lib/browser/game/game-host.d.ts +28 -0
- package/lib/browser/game/game-host.js +163 -0
- package/lib/browser/game/game-loader.d.ts +11 -0
- package/lib/browser/game/game-loader.js +31 -0
- package/lib/browser/game/game-protocol.d.ts +50 -0
- package/lib/browser/game/game-protocol.js +3 -0
- package/lib/browser/game/game-runner.d.ts +28 -0
- package/lib/browser/game/game-runner.js +64 -0
- package/lib/browser/game/game-util.d.ts +30 -0
- package/lib/browser/game/game-util.js +183 -0
- package/lib/browser/game/game-view.d.ts +13 -0
- package/lib/browser/game/game-view.js +68 -0
- package/lib/browser/game/game3d-protocol.d.ts +52 -0
- package/lib/browser/game/game3d-protocol.js +3 -0
- package/lib/browser/game/game3d-runner.d.ts +28 -0
- package/lib/browser/game/game3d-runner.js +153 -0
- package/lib/browser/hooks.d.ts +5 -1
- package/lib/browser/hooks.js +14 -2
- package/lib/browser/i18n/locales.d.ts +82 -2
- package/lib/browser/i18n/messages.d.ts +81 -1
- package/lib/browser/i18n/messages.js +167 -7
- package/lib/browser/index.d.ts +9 -0
- package/lib/browser/index.js +9 -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 +17 -0
- package/lib/browser/notices/notices.d.ts +1 -1
- package/lib/browser/notices/notices.js +6 -2
- package/lib/browser/notices/session-notices.d.ts +70 -0
- package/lib/browser/notices/session-notices.js +96 -0
- package/lib/browser/offline/device-values.js +12 -3
- package/lib/browser/offline/offline-reads.js +3 -1
- package/lib/browser/settings/navigation.d.ts +3 -2
- package/lib/browser/settings/navigation.js +4 -3
- package/lib/browser/settings/settings-protocol.d.ts +15 -0
- package/lib/browser/settings/settings-protocol.js +19 -5
- package/lib/browser/state/state-protocol.d.ts +8 -1
- package/lib/browser/state/state.d.ts +2 -0
- package/lib/browser/state/state.js +21 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +27 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +43 -5
- package/lib/browser/style/device.js +15 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +189 -56
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +36 -1
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +15 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +30 -6
- 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/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +4 -1
- package/lib/browser/util/markdown.js +1 -1
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +14 -2
- package/lib/browser/util/process.js +39 -8
- package/lib/browser/util/progress.d.ts +19 -1
- package/lib/browser/util/progress.js +57 -4
- package/lib/browser/util/quote.d.ts +20 -0
- package/lib/browser/util/quote.js +61 -0
- package/lib/browser/util/tool.d.ts +19 -2
- package/lib/browser/util/tool.js +70 -2
- package/lib/browser/util/voice.d.ts +47 -7
- package/lib/browser/util/voice.js +269 -27
- package/lib/browser/workbench-calls.d.ts +6 -4
- package/lib/browser/workbench-calls.js +15 -10
- package/lib/browser/workbench-protocol.d.ts +31 -2
- package/lib/browser/workbench-util.d.ts +15 -4
- package/lib/browser/workbench-util.js +28 -5
- package/lib/browser/workbench.d.ts +33 -1
- package/lib/browser/workbench.js +140 -12
- package/package.json +11 -8
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import type { TaEvent, TaPackageServer, TaRemoteServer, TaServer, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
1
|
+
import type { TaEvent, TaPackageServer, TaRemoteServer, TaRoomEvent, TaRoomServer, TaServer, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { Mood } from '../avatar/dino-avatar.js';
|
|
4
4
|
import type { DeviceState } from '../device/device-protocol.js';
|
|
5
5
|
import type { TaFiles } from '../files/files-protocol.js';
|
|
6
|
+
import type { GameProps } from '../game/game-protocol.js';
|
|
7
|
+
import type { Game3DProps } from '../game/game3d-protocol.js';
|
|
6
8
|
import type { Language, Theme } from '../settings/settings-protocol.js';
|
|
9
|
+
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebDialogProps, WebEmptyProps, WebFolderPickerProps, WebFullScreenProps, WebHoldToTalkProps, WebImageViewerProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebSkeletonProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebVoice } from './web-api-components.js';
|
|
10
|
+
import type { WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebHomeEntry, WebHomeSource, WebMenuItem, WebSearchSource, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
|
|
11
|
+
import type { WebDesktop, WebFileDrag } from './web-api-desktop.js';
|
|
12
|
+
import type { WebTerminal, WebTerminalOptions } from './web-api-terminal.js';
|
|
7
13
|
import type { WebPageInfo } from './web-pages.js';
|
|
14
|
+
export type { Mood } from '../avatar/dino-avatar.js';
|
|
15
|
+
export type { DeviceLayout, DeviceState } from '../device/device-protocol.js';
|
|
16
|
+
export type { TaFileBytes, TaFiles } from '../files/files-protocol.js';
|
|
17
|
+
export type { GameColors, GameConfig, GameEngine, GameInstance, GamePage, GameProps } from '../game/game-protocol.js';
|
|
18
|
+
export type { Game3DContext, Game3DEngine, Game3DLoop, Game3DProps } from '../game/game3d-protocol.js';
|
|
19
|
+
export type { Language, Theme } from '../settings/settings-protocol.js';
|
|
20
|
+
export type * from './web-api-components.js';
|
|
21
|
+
export type * from './web-api-contributions.js';
|
|
22
|
+
export type * from './web-api-desktop.js';
|
|
23
|
+
export type * from './web-api-terminal.js';
|
|
8
24
|
export type { WebPageInfo, WebPageState } from './web-pages.js';
|
|
9
25
|
/**
|
|
10
26
|
* What a web extension gets: the web client's side of pi's extension API, with the same names where
|
|
@@ -32,6 +48,13 @@ export interface WebExtensionAPI {
|
|
|
32
48
|
readonly remote: TaRemoteServer;
|
|
33
49
|
/** pi's settings of ta (`settings.json`): `getSettings(cwd)` also lists the models with credentials, for a model picker. */
|
|
34
50
|
readonly settings: TaSettingsServer;
|
|
51
|
+
/**
|
|
52
|
+
* Rooms shared with other Ta through the relay, end to end (docs/design/ta-link.md 3): make one of a `kind` of the
|
|
53
|
+
* extension's own, invite by a link, send messages and keep a shared state with versions; what happens comes by
|
|
54
|
+
* {@link onRoomEvent}. Joining is asked of the owner, who answers in their own Ta: ask the user before `join`, and
|
|
55
|
+
* `answer` only for the user. Newer than some Ta apps: `pi.rooms?.…`.
|
|
56
|
+
*/
|
|
57
|
+
readonly rooms: WebRooms;
|
|
35
58
|
readonly ui: WebExtensionUI;
|
|
36
59
|
/** A view of its own: a page or a sidebar view, in the navigation on the left, or a tool of the workbench on the right. */
|
|
37
60
|
registerView(name: string, view: WebView): void;
|
|
@@ -39,13 +62,35 @@ export interface WebExtensionAPI {
|
|
|
39
62
|
registerMessageRenderer(customType: string, renderer: React.ComponentType<{
|
|
40
63
|
message: WebCustomMessage;
|
|
41
64
|
}>): void;
|
|
65
|
+
/**
|
|
66
|
+
* Draws the fenced blocks of a language (` ```name `) in replies and in `ui.Markdown` itself, as Mermaid is drawn:
|
|
67
|
+
* what a model writes to be seen rather than read, a card of its own. It gets the code as it streams (`closed`
|
|
68
|
+
* false until the fence ends); what throws shows as code. Newer than some Ta apps: `pi.registerCodeRenderer?.(…)`.
|
|
69
|
+
*/
|
|
70
|
+
registerCodeRenderer(language: string, renderer: React.ComponentType<WebCodeRendererProps>): void;
|
|
42
71
|
/**
|
|
43
72
|
* Who answers in the sessions of its group (TaOpenSessionOptions.group, the name of the extension's
|
|
44
73
|
* package), drawn at the head of each turn in place of ta.
|
|
45
74
|
*/
|
|
46
75
|
registerAvatar(avatar: React.ComponentType<WebAvatarProps>): void;
|
|
76
|
+
/**
|
|
77
|
+
* An icon for conversations of the extension that are no agent of a group (its brief, its questions), in the lists
|
|
78
|
+
* and on their notices, in place of the letter of their directory. Newer than some Ta apps: `pi.registerChatIcon?.(…)`.
|
|
79
|
+
*/
|
|
80
|
+
registerChatIcon(source: WebChatIconSource): void;
|
|
81
|
+
/**
|
|
82
|
+
* Rows of the double's home, under the double, which the page lists with `ui.useHomeItems`: what the user looks at
|
|
83
|
+
* each day (a daily brief). Newer than some Ta apps: `pi.registerHomeItems?.(…)`.
|
|
84
|
+
*/
|
|
85
|
+
registerHomeItems(source: WebHomeSource): void;
|
|
47
86
|
/** A tool of the conversations the page opens, run in the browser. */
|
|
48
87
|
registerTool(tool: WebTool): void;
|
|
88
|
+
/**
|
|
89
|
+
* How calls of tools read in conversations: a verb and what it is on, in place of the tool's name. As
|
|
90
|
+
* pi's `registerToolRenderer`, for any tool: one of the package's pi extension, of {@link registerTool},
|
|
91
|
+
* or of another; resolvers are asked in the order the extensions loaded.
|
|
92
|
+
*/
|
|
93
|
+
registerToolRenderer(resolver: WebToolRendererResolver): void;
|
|
49
94
|
/**
|
|
50
95
|
* Work done on the user's behalf, which the double lists with its own tasks (`ui.useTasks`): a team
|
|
51
96
|
* Ta built in a channel, a job of a schedule. What the user hands to the double they follow there.
|
|
@@ -67,7 +112,12 @@ export interface WebExtensionAPI {
|
|
|
67
112
|
* Openers are asked in the order they were registered; the first that returns true has opened it.
|
|
68
113
|
* Without one, a page opens in the browser of the system after the user said so.
|
|
69
114
|
*/
|
|
70
|
-
registerOpener(opener: WebOpener): void;
|
|
115
|
+
registerOpener(opener: WebOpener, options?: WebOpenerOptions): void;
|
|
116
|
+
/**
|
|
117
|
+
* Entries of the menu of a conversation where a list shows it (a right click or a held finger on its row), in a
|
|
118
|
+
* section of their own after Ta's: read each time the menu opens.
|
|
119
|
+
*/
|
|
120
|
+
registerSessionMenu(menu: WebSessionMenu): void;
|
|
71
121
|
/** The events of the conversation shown. */
|
|
72
122
|
on<T extends TaEvent['type']>(type: T, handler: (event: Extract<TaEvent, {
|
|
73
123
|
type: T;
|
|
@@ -103,9 +153,23 @@ export interface WebExtensionAPI {
|
|
|
103
153
|
openTemporary(source: string, from: 'market' | 'link' | 'agent'): Promise<string>;
|
|
104
154
|
/** Small JSON values the package keeps on the server, so they stay across browsers. */
|
|
105
155
|
readonly storage: WebPackageStorage;
|
|
156
|
+
/**
|
|
157
|
+
* What happens in the rooms: messages, changes of the shared state, who asks to join, `rooms` when the list, members or
|
|
158
|
+
* who is online changed (and after a reconnection: read them again). The page hears them while one listens; with
|
|
159
|
+
* `messages: false`, only `rooms` and `request` (for a list of rooms, not a game), which costs the page nothing while
|
|
160
|
+
* nothing happens; with `state` too, the state of the keys that start with one of them (`['chat:']`), not the
|
|
161
|
+
* messages, for a list that shows what was said last. Stops when the extension unloads. Newer than some Ta apps:
|
|
162
|
+
* `pi.onRoomEvent?.(…)`; a Ta of before `state` hears that state only with `messages`.
|
|
163
|
+
*/
|
|
164
|
+
onRoomEvent(listener: (event: TaRoomEvent) => void, options?: {
|
|
165
|
+
messages?: boolean;
|
|
166
|
+
state?: string[];
|
|
167
|
+
}): () => void;
|
|
106
168
|
/** Output of the terminals this page opened (terminals.openTerminal); with `exitCode`, the terminal ended. Stops when the extension unloads. */
|
|
107
169
|
onTerminalData(listener: (terminalId: string, data: string, exitCode?: number) => void): () => void;
|
|
108
170
|
}
|
|
171
|
+
/** The rooms of ta serve (TaRoomServer), which the page watches for the extensions that listen (`onRoomEvent`). */
|
|
172
|
+
export type WebRooms = Omit<TaRoomServer, 'watch' | 'unwatch'>;
|
|
109
173
|
/** Lines and columns of a file, from 1: a line, a place in it, or a range. */
|
|
110
174
|
export interface TextSelection {
|
|
111
175
|
startLine: number;
|
|
@@ -132,6 +196,25 @@ export type WebLink = {
|
|
|
132
196
|
};
|
|
133
197
|
/** True when it opened the link; false leaves it to the next opener. */
|
|
134
198
|
export type WebOpener = (link: WebLink) => boolean | Promise<boolean>;
|
|
199
|
+
export interface WebOpenerOptions {
|
|
200
|
+
/**
|
|
201
|
+
* It opens some links only, of its own (a link of a share): it is asked before the others, and for links that
|
|
202
|
+
* go out of Ta too (one scanned, opened with Cmd or Ctrl, pasted in Quick open), which the others are not.
|
|
203
|
+
*/
|
|
204
|
+
specific?: boolean;
|
|
205
|
+
}
|
|
206
|
+
/** A conversation as a list shows it: an open one has its session, one kept on the disk its file only. */
|
|
207
|
+
export interface WebSessionRef {
|
|
208
|
+
sessionId?: string;
|
|
209
|
+
sessionFile?: string;
|
|
210
|
+
cwd: string;
|
|
211
|
+
/** As the list names it. */
|
|
212
|
+
title: string;
|
|
213
|
+
/** TaSessionInfo.group. */
|
|
214
|
+
group?: string;
|
|
215
|
+
}
|
|
216
|
+
/** The entries an extension adds to the menu of a conversation of a list (registerSessionMenu); none for some. */
|
|
217
|
+
export type WebSessionMenu = (session: WebSessionRef) => WebMenuItem[];
|
|
135
218
|
/** What a session still opening is shown as (`switchSession`): the head of its conversation, till it comes. */
|
|
136
219
|
export interface WebSessionOpening {
|
|
137
220
|
title?: string;
|
|
@@ -175,6 +258,21 @@ export interface WebExtensionUI {
|
|
|
175
258
|
setWidget(key: string, widget: React.ComponentType | undefined, options?: WidgetOptions): void;
|
|
176
259
|
/** A notice in the corner of the page, as pi's: it goes by itself, an error later than the rest. */
|
|
177
260
|
notify(message: string, type?: 'info' | 'warning' | 'error'): void;
|
|
261
|
+
/**
|
|
262
|
+
* Tells the user what a conversation said, as a messenger tells of a message: nothing while they look at it
|
|
263
|
+
* (and nothing of a task the double follows, which tells of it, unless it asks); a banner with its face and
|
|
264
|
+
* name, a tap opening it, while the page is in front; a notice of the system otherwise, once the user allowed
|
|
265
|
+
* them, silent for `done`; without one, a banner that waits for the user's return when it asks or failed.
|
|
266
|
+
*/
|
|
267
|
+
notifySession(notice: WebSessionNotice): void;
|
|
268
|
+
/** A React hook: the rows extensions add to the double's home (registerHomeItems), in the order they loaded. */
|
|
269
|
+
useHomeItems(): readonly WebHomeEntry[];
|
|
270
|
+
/**
|
|
271
|
+
* Pins a conversation to the top of the lists (or unpins it), by its session file, as the user does with Pin: for
|
|
272
|
+
* one the extension made that the user looks at each day. Pin it once; the user may unpin it. Newer than some Ta
|
|
273
|
+
* apps: `pi.ui.pinChat?.(…)`.
|
|
274
|
+
*/
|
|
275
|
+
pinChat(sessionFile: string, pinned?: boolean): void;
|
|
178
276
|
/**
|
|
179
277
|
* Asks before going ahead, as pi's `confirm`: resolves with whether the user did. `confirmLabel` names
|
|
180
278
|
* the button that goes ahead; `danger` makes it red, for what cannot be undone.
|
|
@@ -293,12 +391,26 @@ export interface WebExtensionUI {
|
|
|
293
391
|
* cancelled. Undefined elsewhere (a browser has no scanner of its own).
|
|
294
392
|
*/
|
|
295
393
|
readonly scanCode?: (instructions: string) => Promise<string | undefined>;
|
|
394
|
+
/**
|
|
395
|
+
* In the Ta app: Scan, as WeChat's, the same as the page's own (Discover, the + of the first list): the camera,
|
|
396
|
+
* then what the code carries opens (a computer to connect to, a link of an extension, a page of the web; other
|
|
397
|
+
* text to copy), asking first. Undefined elsewhere. Use `scanCode` to read a code for yourself.
|
|
398
|
+
*/
|
|
399
|
+
readonly scan?: () => Promise<void>;
|
|
296
400
|
/**
|
|
297
401
|
* Hands an extension on: a dialog with its link as a QR code, to copy or send. A published one (`source` of npm
|
|
298
402
|
* or Git) by its source; another of this computer (`packageId`, of listPackages or of a web extension) through
|
|
299
403
|
* the relay, end to end and kept nowhere, while this computer runs Ta (TaRelayServer.sharePackage).
|
|
300
404
|
*/
|
|
301
405
|
shareExtension(target: WebShareTarget): void;
|
|
406
|
+
/**
|
|
407
|
+
* Shows a component of the extension over the page, wherever the user is (a list, a page, a conversation), as
|
|
408
|
+
* pi's `ctx.ui.custom` does in its terminal: a dialog it draws with {@link Dialog}. `close`, or the function
|
|
409
|
+
* returned, takes it away; it goes when the extension stops.
|
|
410
|
+
*/
|
|
411
|
+
custom(component: React.ComponentType<{
|
|
412
|
+
close(): void;
|
|
413
|
+
}>): () => void;
|
|
302
414
|
/**
|
|
303
415
|
* Opens what a link of an extension carries (`ta://open?source=…`, `#open=`, a link of the relay, `npm:<name>`)
|
|
304
416
|
* without installing it, once the user said so: it runs in the page with the whole of this API. Resolves whether
|
|
@@ -335,8 +447,43 @@ export interface WebExtensionUI {
|
|
|
335
447
|
* time one is made; what it shows stays while no view shows it (`attach` it to the next one).
|
|
336
448
|
*/
|
|
337
449
|
createTerminal(options?: WebTerminalOptions): WebTerminal;
|
|
450
|
+
/**
|
|
451
|
+
* A game, drawn by Phaser, the game engine of the page (docs/design/ta-games.md): it fills its parent (a
|
|
452
|
+
* column of flex, or an element with a size), sleeps while out of sight and ends when it unmounts. Phaser
|
|
453
|
+
* loads the first time a game starts; an extension never brings an engine of its own.
|
|
454
|
+
*/
|
|
455
|
+
readonly Game: React.ComponentType<GameProps>;
|
|
456
|
+
/**
|
|
457
|
+
* A 3D game, drawn by Three.js, the 3D engine of the page, with its OrbitControls: `setup` puts things in
|
|
458
|
+
* the scene it is given and returns what to do each frame. As `Game`, it fills its parent, sleeps while out
|
|
459
|
+
* of sight and ends when it unmounts, all of its scene disposed; Three.js loads the first time one starts.
|
|
460
|
+
*/
|
|
461
|
+
readonly Game3D: React.ComponentType<Game3DProps>;
|
|
462
|
+
/**
|
|
463
|
+
* What covers all of the page while it is mounted: the shell, its head and side columns, under the notch and
|
|
464
|
+
* the home bar (mind `env(safe-area-inset-*)`), below the title bar of the desktop app and above the keyboard.
|
|
465
|
+
* Its touches are all its own, even at an edge; leave the user a button out. For a game held sideways, a world
|
|
466
|
+
* to walk in; its children keep their state if they are always under it (mount it once, not around a toggle).
|
|
467
|
+
* Newer than some Ta apps: `pi.ui.FullScreen ?? fallback`.
|
|
468
|
+
*/
|
|
469
|
+
readonly FullScreen: React.ComponentType<WebFullScreenProps>;
|
|
470
|
+
/**
|
|
471
|
+
* A level of the page pushed over it, as a list pushes what was tapped in it (a room over the rooms): `top`
|
|
472
|
+
* slides in from the right while `open`, and the head of the page shows back in place of its own leading button;
|
|
473
|
+
* on a phone the swipe from the left edge and the back of the system close it too. `onClose` sets `open` false;
|
|
474
|
+
* keep `top` while it slides away. Newer than some Ta apps: `pi.ui.Stack ?? fallback`.
|
|
475
|
+
*/
|
|
476
|
+
readonly Stack: React.ComponentType<WebStackProps>;
|
|
338
477
|
/** The message box of the conversations of the page, with its + menu: one look for every conversation. */
|
|
339
478
|
readonly Composer: React.ComponentType<WebComposerProps>;
|
|
479
|
+
/**
|
|
480
|
+
* A button held to talk, as the bar of the message box on a phone (WeChat's): held, the page dims and listens
|
|
481
|
+
* with the page's recognizer (the app's own on iOS), 取消 and 编辑 to slide onto; let go, `onSend` gets the words.
|
|
482
|
+
* Renders nothing where the page cannot listen (`voice.canListen`). Never a SpeechRecognition of an extension's own.
|
|
483
|
+
*/
|
|
484
|
+
readonly HoldToTalk: React.ComponentType<WebHoldToTalkProps>;
|
|
485
|
+
/** Listening and reading aloud as the conversations of the page do: its recognizer, the voice of the settings. */
|
|
486
|
+
readonly voice: WebVoice;
|
|
340
487
|
/** Markdown as the conversations show it. */
|
|
341
488
|
readonly Markdown: React.ComponentType<{
|
|
342
489
|
text: string;
|
|
@@ -353,6 +500,21 @@ export interface WebExtensionUI {
|
|
|
353
500
|
readonly Empty: React.ComponentType<WebEmptyProps>;
|
|
354
501
|
/** What a list shows while its rows are on their way (its data not read yet), as the lists of the page show it: after a moment, never for a list that comes at once. */
|
|
355
502
|
readonly Skeleton: React.ComponentType<WebSkeletonProps>;
|
|
503
|
+
/**
|
|
504
|
+
* A React hook for what waits on something slow (ta serve, code to load), so that the user sees the click
|
|
505
|
+
* took: `[busy, run]`, `run(action)` busy until what `action` returns settles, running nothing else meanwhile
|
|
506
|
+
* (a second click). Mark what waits with the classes of the page, which say so only once it took a moment, so
|
|
507
|
+
* that what is quick does not flash: `ta-busy` on a button (`ta-button`, `ta-icon-button`) with
|
|
508
|
+
* `<span className="ta-spinner ta-busy-mark" />` in it, the spinner over its label; `ta-pending` on a row being
|
|
509
|
+
* taken away, which fades; `<span className="ta-spinner ta-later" />` a spinner of its own. Newer than some
|
|
510
|
+
* Ta apps: `(pi.ui.useBusy ?? fallback)()`.
|
|
511
|
+
*/
|
|
512
|
+
useBusy(): [boolean, <T>(action: () => T | PromiseLike<T>) => Promise<T | undefined>];
|
|
513
|
+
/**
|
|
514
|
+
* The switch of the page's settings: an `onChange` that returns a promise shows the new state at once, its
|
|
515
|
+
* knob turning until done, and the old one again if it fails. Newer than some Ta apps: `pi.ui.Switch ?? fallback`.
|
|
516
|
+
*/
|
|
517
|
+
readonly Switch: React.ComponentType<WebSwitchProps>;
|
|
356
518
|
/** The mark of what is on another machine, as the lists of the page show it: its host, short; nothing for a `location` of this machine. */
|
|
357
519
|
readonly HostTag: React.ComponentType<{
|
|
358
520
|
location?: string;
|
|
@@ -378,8 +540,8 @@ export interface WebExtensionUI {
|
|
|
378
540
|
/**
|
|
379
541
|
* A picture to look at closely, as the viewers of pictures: all of it at first (never larger than its own
|
|
380
542
|
* pixels), pinched by two fingers or a trackpad, zoomed by a wheel with Ctrl or ⌘ and by a double tap or
|
|
381
|
-
* click, dragged or scrolled once zoomed; with − / the scale / + /
|
|
382
|
-
* column of flex).
|
|
543
|
+
* click, dragged or scrolled once zoomed; with − / the scale / + / fit / actual size below it, and the
|
|
544
|
+
* pictures beside it at its sides when given (`onPrevious` / `onNext`). It fills its parent (a column of flex).
|
|
383
545
|
*/
|
|
384
546
|
readonly ImageViewer: React.ComponentType<WebImageViewerProps>;
|
|
385
547
|
/** A QR code of a text (a link to scan with a phone), black on white whatever the theme; `label` for a screen reader. */
|
|
@@ -394,566 +556,5 @@ export interface WebExtensionUI {
|
|
|
394
556
|
/** A field that picks a model, with the list of models of ta: under their providers, narrowed by typing. */
|
|
395
557
|
readonly ModelPicker: React.ComponentType<WebModelPickerProps>;
|
|
396
558
|
}
|
|
397
|
-
export interface WebDesktop {
|
|
398
|
-
/** Node's `process.platform` of the machine (`darwin`, `win32`, `linux`): what its file manager is called. */
|
|
399
|
-
readonly platform: string;
|
|
400
|
-
/** Opens the folder of an absolute path of this machine in the file manager, the item selected. */
|
|
401
|
-
showItemInFolder(path: string): Promise<void>;
|
|
402
|
-
/** The sign-ins of the user's browsers taken into the browser of Ta; macOS and Windows only. */
|
|
403
|
-
readonly browserData?: WebBrowserData;
|
|
404
|
-
}
|
|
405
|
-
/** A profile of the user's Chrome, Edge, Brave, Arc, Vivaldi or Chromium. */
|
|
406
|
-
export interface WebBrowserProfile {
|
|
407
|
-
/** What `import` takes. */
|
|
408
|
-
id: string;
|
|
409
|
-
/** The name of the browser, `Google Chrome`. */
|
|
410
|
-
browser: string;
|
|
411
|
-
/** The name of the profile, as the browser shows it. */
|
|
412
|
-
name: string;
|
|
413
|
-
}
|
|
414
|
-
/** The cookies an import took into the browser of Ta. */
|
|
415
|
-
export interface WebBrowserImport {
|
|
416
|
-
imported: number;
|
|
417
|
-
/** Those that could not be read or set. */
|
|
418
|
-
skipped: number;
|
|
419
|
-
/** Windows: those under Chrome's app-bound encryption, which only Chrome can read: sign in again. */
|
|
420
|
-
appBound: number;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Ta Desktop's browser of the workbench keeps its own sign-ins. These take those of the user's browser:
|
|
424
|
-
* its cookies, never its passwords or history, once the user said yes in a dialog of the app (on macOS,
|
|
425
|
-
* the Keychain asks too).
|
|
426
|
-
*/
|
|
427
|
-
export interface WebBrowserData {
|
|
428
|
-
/** The profiles with cookies of the browsers installed. */
|
|
429
|
-
profiles(): Promise<WebBrowserProfile[]>;
|
|
430
|
-
/** Takes the cookies of a profile; `undefined` when the user said no. */
|
|
431
|
-
import(profileId: string): Promise<WebBrowserImport | undefined>;
|
|
432
|
-
/** Forgets the cookies, storage and cache of the browser of Ta. */
|
|
433
|
-
clear(): Promise<void>;
|
|
434
|
-
}
|
|
435
|
-
/** Files of a directory on a drag. */
|
|
436
|
-
export interface WebDraggedFiles {
|
|
437
|
-
/** The directory they are of (`ui.useCwd()` or another): a path of the machine of ta serve, or `ssh://`. */
|
|
438
|
-
cwd: string;
|
|
439
|
-
/** Relative to `cwd`, with `/`. */
|
|
440
|
-
paths: string[];
|
|
441
|
-
}
|
|
442
|
-
export interface WebFileDrag {
|
|
443
|
-
set(dataTransfer: DataTransfer, files: WebDraggedFiles): void;
|
|
444
|
-
/** Whether a drag holds files: what `dragover` can tell, before the drop. */
|
|
445
|
-
has(dataTransfer: DataTransfer): boolean;
|
|
446
|
-
/** The files of a drop; undefined when it holds none. */
|
|
447
|
-
get(dataTransfer: DataTransfer): WebDraggedFiles | undefined;
|
|
448
|
-
/** Their absolute paths inside their machine. */
|
|
449
|
-
paths(files: WebDraggedFiles): string[];
|
|
450
|
-
}
|
|
451
|
-
export interface WebTerminalOptions {
|
|
452
|
-
/** Its size until a view fits it: the size the program started with. Default: 80 × 24. */
|
|
453
|
-
cols?: number;
|
|
454
|
-
rows?: number;
|
|
455
|
-
/**
|
|
456
|
-
* The directory of the program: paths of its output (`src/a.ts:10`) are read from there, and from the
|
|
457
|
-
* one a shell reports (OSC 7) once it does. URLs and paths are links, opened with Cmd or Ctrl + click
|
|
458
|
-
* as the links of a reply are (with Shift, a page in the browser of the system).
|
|
459
|
-
*/
|
|
460
|
-
cwd?: string;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Progress of a terminal's program (OSC 9;4): `value` from 0 to 100 when it knows how far it is;
|
|
464
|
-
* `busy` when it does not; `error` or `paused` with the value it stopped at.
|
|
465
|
-
*/
|
|
466
|
-
export interface WebTerminalProgress {
|
|
467
|
-
state: 'normal' | 'busy' | 'error' | 'paused';
|
|
468
|
-
value?: number;
|
|
469
|
-
}
|
|
470
|
-
/** Keys a soft keyboard lacks, which a terminal sends as its program expects (arrows in the mode it set). */
|
|
471
|
-
export type WebTerminalKey = 'Escape' | 'Tab' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
|
|
472
|
-
/**
|
|
473
|
-
* A terminal screen; the program behind it is the extension's (`pi.terminals` for a shell of the server).
|
|
474
|
-
* Its keys are a terminal's: Cmd + K clears it on macOS; elsewhere Ctrl + Shift + C and V copy and paste,
|
|
475
|
-
* and Ctrl + C copies when text is selected.
|
|
476
|
-
*/
|
|
477
|
-
export interface WebTerminal {
|
|
478
|
-
/** Its size in characters. */
|
|
479
|
-
readonly cols: number;
|
|
480
|
-
readonly rows: number;
|
|
481
|
-
/** The directory of the program: the one it started in, then the one a shell reports (OSC 7). */
|
|
482
|
-
readonly cwd?: string;
|
|
483
|
-
/** Output of the program, with its control sequences. */
|
|
484
|
-
write(data: string): void;
|
|
485
|
-
/** What the user types or pastes, and the mouse reports the program asked for, as a terminal sends them. */
|
|
486
|
-
onData(listener: (data: string) => void): () => void;
|
|
487
|
-
/** It fitted a view of another size: the program should know it (`resizeTerminal`). */
|
|
488
|
-
onResize(listener: (size: {
|
|
489
|
-
cols: number;
|
|
490
|
-
rows: number;
|
|
491
|
-
}) => void): () => void;
|
|
492
|
-
/** The shell reported another directory (OSC 7). */
|
|
493
|
-
onCwdChange(listener: (cwd: string) => void): () => void;
|
|
494
|
-
/**
|
|
495
|
-
* The title its program set, as terminals take it (OSC 0 or 2: `\x1b]0;title\x07`), which some
|
|
496
|
-
* update as they work (a coding agent's task and progress); undefined until one does, and for an empty one.
|
|
497
|
-
*/
|
|
498
|
-
readonly title?: string;
|
|
499
|
-
onTitleChange(listener: (title: string | undefined) => void): () => void;
|
|
500
|
-
/** The progress its program reports (OSC 9;4, as Windows Terminal, Ghostty and iTerm2 show it); undefined for none. */
|
|
501
|
-
readonly progress?: WebTerminalProgress;
|
|
502
|
-
onProgressChange(listener: (progress: WebTerminalProgress | undefined) => void): () => void;
|
|
503
|
-
/** Its program rang the bell or sent a notification (OSC 9 or OSC 777;notify), with the text of one. */
|
|
504
|
-
onAttention(listener: (message: string | undefined) => void): () => void;
|
|
505
|
-
/** Shows it in `element`, which it fills and follows in size; the function returned takes it out again. */
|
|
506
|
-
attach(element: HTMLElement): () => void;
|
|
507
|
-
focus(): void;
|
|
508
|
-
/** The text selected on its screen; empty when none is. */
|
|
509
|
-
getSelection(): string;
|
|
510
|
-
selectAll(): void;
|
|
511
|
-
/** Empties its screen and scrollback but the line of the cursor (the prompt), as Cmd + K does. */
|
|
512
|
-
clear(): void;
|
|
513
|
-
/** Text as pasted: bracketed for a program that asked for it, its line ends as a terminal sends them. */
|
|
514
|
-
paste(text: string): void;
|
|
515
|
-
/** A key the program hears as if it were pressed (`onData`). */
|
|
516
|
-
sendKey(key: WebTerminalKey): void;
|
|
517
|
-
/** Text the program hears as if it were typed, not pasted (`onData`). */
|
|
518
|
-
type(text: string): void;
|
|
519
|
-
dispose(): void;
|
|
520
|
-
}
|
|
521
|
-
export interface WebModelPickerProps {
|
|
522
|
-
/** The directory whose settings give the models and the default; default: that of ta serve. */
|
|
523
|
-
cwd?: string;
|
|
524
|
-
/** `<provider>/<model id>`, or `''` for the model of the settings. */
|
|
525
|
-
value: string;
|
|
526
|
-
onChange(value: string): void;
|
|
527
|
-
/** The entry for `''`; default: `Default (<the model of the settings>)`. */
|
|
528
|
-
defaultLabel?: string;
|
|
529
|
-
/** For a screen reader, when no label is beside it. */
|
|
530
|
-
label?: string;
|
|
531
|
-
disabled?: boolean;
|
|
532
|
-
}
|
|
533
|
-
export interface WebFolderPickerProps {
|
|
534
|
-
/** Where it opens; default: the directory of ta serve. */
|
|
535
|
-
initial?: string;
|
|
536
|
-
/** The directory picked; the dialog stays open until it returns, and closes with `onClose`. */
|
|
537
|
-
onPick(path: string): void | Promise<void>;
|
|
538
|
-
onClose(): void;
|
|
539
|
-
}
|
|
540
|
-
export interface CodeEditorProps {
|
|
541
|
-
/** The path of the file: its name tells the language (`.ts`, `Dockerfile`); another path is another editor. */
|
|
542
|
-
path: string;
|
|
543
|
-
/** The text shown; a different one replaces it, as an edit the user can undo. */
|
|
544
|
-
value: string;
|
|
545
|
-
readOnly?: boolean;
|
|
546
|
-
/** A line, 1 for the first, shown in the middle with the cursor at its start (at `column`, 1 for the first, when given). */
|
|
547
|
-
line?: number;
|
|
548
|
-
column?: number;
|
|
549
|
-
/** With `line` and `column`: the text up to this column of that line is selected, as a match of a search. */
|
|
550
|
-
endColumn?: number;
|
|
551
|
-
/** Lines or a place to select, shown in the middle; over `line`. */
|
|
552
|
-
selection?: TextSelection;
|
|
553
|
-
/** The user changed the text. */
|
|
554
|
-
onChange?(value: string): void;
|
|
555
|
-
/** Ctrl+S or Cmd+S. */
|
|
556
|
-
onSave?(value: string): void;
|
|
557
|
-
}
|
|
558
|
-
export interface DiffEditorProps {
|
|
559
|
-
/** The path of the file: its name tells the language. */
|
|
560
|
-
path: string;
|
|
561
|
-
/** The text before (left), as HEAD or the index has it. */
|
|
562
|
-
original: string;
|
|
563
|
-
/** The text after (right). */
|
|
564
|
-
modified: string;
|
|
565
|
-
/** Default: side by side, inline when it is narrow. */
|
|
566
|
-
inline?: boolean;
|
|
567
|
-
/** Default true; false lets the user change the right side, `onChange` and `onSave` hear it. */
|
|
568
|
-
readOnly?: boolean;
|
|
569
|
-
onChange?(value: string): void;
|
|
570
|
-
onSave?(value: string): void;
|
|
571
|
-
/** How many changes it found once it compared the texts, and how to go to the next or the one before. */
|
|
572
|
-
onDiff?(diff: {
|
|
573
|
-
changes: number;
|
|
574
|
-
next(): void;
|
|
575
|
-
previous(): void;
|
|
576
|
-
}): void;
|
|
577
|
-
}
|
|
578
|
-
export interface WebEmptyProps {
|
|
579
|
-
/** One short line: what is not there (`No chats yet`), without a full stop. */
|
|
580
|
-
title?: React.ReactNode;
|
|
581
|
-
/** At most one quieter line under it: how to get some. */
|
|
582
|
-
hint?: React.ReactNode;
|
|
583
|
-
/** In a menu, a picker or a dialog: a line of its own rather than the middle of the space. */
|
|
584
|
-
compact?: boolean;
|
|
585
|
-
/** It is there because something failed. */
|
|
586
|
-
tone?: 'error';
|
|
587
|
-
/** Above the text: a `Picture` of what will be there or how to get it; smaller when `compact`. */
|
|
588
|
-
picture?: React.ReactNode;
|
|
589
|
-
/** Under the text: a button. */
|
|
590
|
-
children?: React.ReactNode;
|
|
591
|
-
}
|
|
592
|
-
/** An action behind a row a finger swiped (WebExtensionUI.SwipeRow), or for the rows selected (SelectBar): a word, as WeChat's. */
|
|
593
|
-
export interface WebSwipeAction {
|
|
594
|
-
key: string;
|
|
595
|
-
label: string;
|
|
596
|
-
/** Red, as Delete. */
|
|
597
|
-
danger?: boolean;
|
|
598
|
-
run(): void;
|
|
599
|
-
}
|
|
600
|
-
export interface WebSwipeRowProps {
|
|
601
|
-
actions?: WebSwipeAction[];
|
|
602
|
-
/** Of the row; its content is `.ta-swipe-content`, which the finger moves. */
|
|
603
|
-
className?: string;
|
|
604
|
-
children?: React.ReactNode;
|
|
605
|
-
}
|
|
606
|
-
export interface WebSelectCheckProps {
|
|
607
|
-
checked: boolean;
|
|
608
|
-
/** A row that cannot be chosen (nothing to do with it): a faint mark. */
|
|
609
|
-
disabled?: boolean;
|
|
610
|
-
}
|
|
611
|
-
export interface WebSelectBarProps {
|
|
612
|
-
/** How many are chosen, of how many could be. */
|
|
613
|
-
count: number;
|
|
614
|
-
total: number;
|
|
615
|
-
/** Chooses every row (`true`), or none. */
|
|
616
|
-
onSelectAll(all: boolean): void;
|
|
617
|
-
/** The list stops selecting. */
|
|
618
|
-
onDone(): void;
|
|
619
|
-
/** What can be done with those chosen: disabled while none is. */
|
|
620
|
-
actions: WebSwipeAction[];
|
|
621
|
-
}
|
|
622
|
-
export interface WebSkeletonProps {
|
|
623
|
-
/** How many rows, at most 6; 6 unless told. */
|
|
624
|
-
rows?: number;
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* A small picture, 160 by 96 unless told: its shapes take the classes of the page so that they follow its
|
|
628
|
-
* theme. `ta-pic-pane` a surface, `ta-pic-line` a bar of text, `ta-pic-box` an outline (a field, a box to
|
|
629
|
-
* tick), `ta-pic-accent` what the picture is about (green, light), `ta-pic-mark` green, `ta-pic-soft` half
|
|
630
|
-
* of that, `ta-pic-dot` a quiet dot, `ta-pic-bad` red, `ta-pic-path` a dashed way between two things,
|
|
631
|
-
* `ta-pic-stroke` a green line (`ta-pic-thin` a grey one), `ta-pic-tick` a line drawn on green,
|
|
632
|
-
* `ta-pic-text` green letters of code.
|
|
633
|
-
*/
|
|
634
|
-
export interface WebPictureProps {
|
|
635
|
-
width?: number;
|
|
636
|
-
height?: number;
|
|
637
|
-
/** The rounded frame around it, default true; false for a picture that floats, such as a strip of things. */
|
|
638
|
-
frame?: boolean;
|
|
639
|
-
className?: string;
|
|
640
|
-
/** The shapes, in the coordinates of width by height. */
|
|
641
|
-
children?: React.ReactNode;
|
|
642
|
-
}
|
|
643
|
-
export interface WebPictureCard {
|
|
644
|
-
key: string;
|
|
645
|
-
/** A `Picture`. */
|
|
646
|
-
picture: React.ReactNode;
|
|
647
|
-
/** Two to six words. */
|
|
648
|
-
label: string;
|
|
649
|
-
/** A quieter line under the label: when, how. */
|
|
650
|
-
hint?: string;
|
|
651
|
-
/** Shown on hover: the whole of what picking it does. */
|
|
652
|
-
title?: string;
|
|
653
|
-
disabled?: boolean;
|
|
654
|
-
onPick(): void;
|
|
655
|
-
}
|
|
656
|
-
export interface WebImageViewerProps {
|
|
657
|
-
src: string;
|
|
658
|
-
alt?: string;
|
|
659
|
-
/** On its root, for the background behind the picture (a checkerboard for transparency). */
|
|
660
|
-
className?: string;
|
|
661
|
-
/** Once it loaded: its size in pixels. */
|
|
662
|
-
onLoad?(size: {
|
|
663
|
-
width: number;
|
|
664
|
-
height: number;
|
|
665
|
-
}): void;
|
|
666
|
-
/** A click or tap beside the picture. */
|
|
667
|
-
onBackground?(): void;
|
|
668
|
-
}
|
|
669
|
-
export interface WebPictureCardsProps {
|
|
670
|
-
cards: readonly WebPictureCard[];
|
|
671
|
-
/** Default as many as there are cards. */
|
|
672
|
-
columns?: number;
|
|
673
|
-
/** On a phone or a narrow window; default `columns`. */
|
|
674
|
-
compactColumns?: number;
|
|
675
|
-
}
|
|
676
|
-
export interface WebDialogProps {
|
|
677
|
-
title: string;
|
|
678
|
-
onClose(): void;
|
|
679
|
-
children?: React.ReactNode;
|
|
680
|
-
}
|
|
681
|
-
export interface WebComposerProps {
|
|
682
|
-
placeholder?: string;
|
|
683
|
-
/** Sends what was typed; when it fails, the text comes back into the box and the reason is a notice of the page. */
|
|
684
|
-
onSend(text: string): Promise<void> | void;
|
|
685
|
-
/** What `@` lists, by name; and the + menu entry that starts an `@`. */
|
|
686
|
-
mentions?: {
|
|
687
|
-
name: string;
|
|
688
|
-
detail?: string;
|
|
689
|
-
}[];
|
|
690
|
-
mentionLabel?: string;
|
|
691
|
-
/** More sections of the + menu, each set apart by a line. */
|
|
692
|
-
actions?: WebComposerAction[][];
|
|
693
|
-
/** The directory the conversation will work in, empty for that of ta serve: a button beside the + shows it. */
|
|
694
|
-
cwd?: string;
|
|
695
|
-
/** With it, the button beside the + picks another directory, as that of a new conversation does. */
|
|
696
|
-
onPickCwd?(cwd: string): void | Promise<void>;
|
|
697
|
-
}
|
|
698
|
-
/** An entry of the + menu of the message box. */
|
|
699
|
-
export interface WebComposerAction {
|
|
700
|
-
key: string;
|
|
701
|
-
label: string;
|
|
702
|
-
/** On the left: an icon of 16 pixels, or an avatar. */
|
|
703
|
-
icon?: React.ReactNode;
|
|
704
|
-
detail?: string;
|
|
705
|
-
disabled?: boolean;
|
|
706
|
-
/** Text the entry puts where the caret is, as `@name `; else `run` runs. */
|
|
707
|
-
insert?: string;
|
|
708
|
-
/** A list the menu shows in its place, as the models of a conversation. */
|
|
709
|
-
items?: WebComposerAction[];
|
|
710
|
-
/** In `items`: the entry picked now, checked on the right. */
|
|
711
|
-
checked?: boolean;
|
|
712
|
-
/** In `items`: the heading it is under. */
|
|
713
|
-
group?: string;
|
|
714
|
-
run?(): void;
|
|
715
|
-
}
|
|
716
|
-
/** A conversation as its message box knows it. */
|
|
717
|
-
export interface WebConversation {
|
|
718
|
-
sessionId: string;
|
|
719
|
-
/** pi's file of it: what stays when it is closed and opened again; none for one not kept. */
|
|
720
|
-
sessionFile?: string;
|
|
721
|
-
cwd?: string;
|
|
722
|
-
/** `double`: the double's own conversation; `chat`: any other, an agent's too (TaSessionInfo.group). */
|
|
723
|
-
kind: 'double' | 'chat';
|
|
724
|
-
/** The package that opened it for its work (TaOpenSessionOptions.group): `@celljs/ta-channels` for an agent. */
|
|
725
|
-
group?: string;
|
|
726
|
-
/** As the page names it: the name of the session, or of the double. */
|
|
727
|
-
title?: string;
|
|
728
|
-
}
|
|
729
|
-
/** A section an extension adds to the settings (WebExtensionAPI.registerSettings). */
|
|
730
|
-
export interface WebSettingsSection {
|
|
731
|
-
title: WebLabel;
|
|
732
|
-
/** Beside its title in the list of the sections; default: a puzzle piece. */
|
|
733
|
-
icon?: WebIcon;
|
|
734
|
-
rows: WebSettingRow[];
|
|
735
|
-
}
|
|
736
|
-
/** A row of the settings of an extension: a label and a description as Ta's rows have, and its control. */
|
|
737
|
-
export interface WebSettingRow {
|
|
738
|
-
key: string;
|
|
739
|
-
label: WebLabel;
|
|
740
|
-
description?: WebLabel;
|
|
741
|
-
/** The control, beside the label; with `stacked`, under it, for a wide one (a model picker, a list). */
|
|
742
|
-
render: React.ComponentType;
|
|
743
|
-
stacked?: boolean;
|
|
744
|
-
}
|
|
745
|
-
/** What an extension adds to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
|
|
746
|
-
export interface WebComposerAddon {
|
|
747
|
-
/** Entries of the + menu, a section of their own; read each time the conversation is drawn, and when `subscribe` says. */
|
|
748
|
-
actions?(conversation: WebConversation): WebComposerAction[];
|
|
749
|
-
/** What `actions` gives changed (the data it reads came): the message boxes read them again. */
|
|
750
|
-
subscribe?(listener: () => void): () => void;
|
|
751
|
-
/** Above the box of each conversation: what is connected to it, a dialog its entries opened. Nothing to show: `null`. */
|
|
752
|
-
above?: React.ComponentType<{
|
|
753
|
-
conversation: WebConversation;
|
|
754
|
-
}>;
|
|
755
|
-
}
|
|
756
|
-
export interface WebEditor {
|
|
757
|
-
id: string;
|
|
758
|
-
title: WebLabel;
|
|
759
|
-
icon?: WebIcon;
|
|
760
|
-
render: React.ComponentType;
|
|
761
|
-
/** The user closed the tab. */
|
|
762
|
-
onClose?(): void;
|
|
763
|
-
}
|
|
764
|
-
/** Words on the page; a function is read again when the language changes. */
|
|
765
|
-
export type WebLabel = string | (() => string);
|
|
766
|
-
export interface WidgetOptions {
|
|
767
|
-
/** Default: `aboveEditor`, as in pi. `panel`: a card in the cards tab of the workbench on the right, which opens when the first card comes. */
|
|
768
|
-
placement?: 'aboveEditor' | 'belowEditor' | 'panel';
|
|
769
|
-
/** The title of a card in the workbench. */
|
|
770
|
-
title?: WebLabel;
|
|
771
|
-
}
|
|
772
|
-
export interface WebView {
|
|
773
|
-
title: WebLabel;
|
|
774
|
-
render: React.ComponentType;
|
|
775
|
-
/** Its icon in the navigation or the workbench, drawn at `size` pixels in `currentColor`. */
|
|
776
|
-
icon?: WebIcon;
|
|
777
|
-
/**
|
|
778
|
-
* `page` (default): the main area. `sidebar`: the column beside the navigation, as the list of
|
|
779
|
-
* chats. `panel`: a tool of the workbench beside the conversation, as the explorer or the terminal
|
|
780
|
-
* of an IDE: its `+` and its empty state list it, and it opens as one of its tabs. `launcher`: a
|
|
781
|
-
* section of what a phone pulls down over its first tab (a button of the rail elsewhere), as Recent and
|
|
782
|
-
* Mine. `board`: a card of the board a phone brings out with a swipe to the left over its first tab (a
|
|
783
|
-
* button of the rail elsewhere), which the user takes off, puts back and orders (ta-launcher.md).
|
|
784
|
-
*/
|
|
785
|
-
location?: 'page' | 'sidebar' | 'panel' | 'launcher' | 'board';
|
|
786
|
-
/** Smaller first among those of its location; default 100. */
|
|
787
|
-
order?: number;
|
|
788
|
-
/**
|
|
789
|
-
* A page: its … where a list shows it (the sidebar view that leads to it), in sections set apart by
|
|
790
|
-
* a line; read each time the menu opens, so it can say what holds now.
|
|
791
|
-
*/
|
|
792
|
-
menu?(): WebMenuItem[][];
|
|
793
|
-
/**
|
|
794
|
-
* Its top bar, in place of the title: for a sidebar view, the row above it (a search, a button
|
|
795
|
-
* to add); for a page, the middle of the bar that has the menu and the button of the workbench.
|
|
796
|
-
*/
|
|
797
|
-
head?: React.ComponentType;
|
|
798
|
-
/**
|
|
799
|
-
* A sidebar view: the pages it leads to (`<extension name>/<view name>`, as `ui.showView` takes),
|
|
800
|
-
* which the navigation then leaves out, since the view lists them.
|
|
801
|
-
*/
|
|
802
|
-
pages?: string[];
|
|
803
|
-
/**
|
|
804
|
-
* A page not used every day, as scheduled tasks: under Discover until the user puts it in the
|
|
805
|
-
* navigation, instead of taking a place there by itself.
|
|
806
|
-
*/
|
|
807
|
-
discover?: boolean;
|
|
808
|
-
/** A page: the line a list shows under its name, as a messenger does — the last thing said there, and when. */
|
|
809
|
-
preview?(): WebViewPreview | undefined;
|
|
810
|
-
/** A page: whoever is there answers now; a list that shows it marks it so, as a conversation answering. */
|
|
811
|
-
busy?(): boolean;
|
|
812
|
-
/** What `preview` or `busy` gives changed: the lists read it again. */
|
|
813
|
-
subscribe?(listener: () => void): () => void;
|
|
814
|
-
}
|
|
815
|
-
export interface WebViewPreview {
|
|
816
|
-
text: string;
|
|
817
|
-
at: number;
|
|
818
|
-
}
|
|
819
|
-
/** What `ui.shareExtension` hands on. */
|
|
820
|
-
export interface WebShareTarget {
|
|
821
|
-
/** What the user calls it. */
|
|
822
|
-
title: string;
|
|
823
|
-
/** Where it comes from: `npm:<name>`, `git:…`; a link of it needs nothing else. */
|
|
824
|
-
source?: string;
|
|
825
|
-
/** Of a package of this computer (listPackages, or one of its web extensions), handed on through the relay. */
|
|
826
|
-
packageId?: string;
|
|
827
|
-
}
|
|
828
|
-
/** A section of the search of Quick open. */
|
|
829
|
-
export interface WebSearchSource {
|
|
830
|
-
key: string;
|
|
831
|
-
title: WebLabel;
|
|
832
|
-
/** Smaller first; the pages of the page are 0. Default 100. */
|
|
833
|
-
order?: number;
|
|
834
|
-
/**
|
|
835
|
-
* Asked after the user paused typing (a quarter of a second), and its answers come in when they do, an older
|
|
836
|
-
* one dropped: for what asks a server or the network. Without it, `search` is asked at each key and should
|
|
837
|
-
* answer at once.
|
|
838
|
-
*/
|
|
839
|
-
remote?: boolean;
|
|
840
|
-
/**
|
|
841
|
-
* The entries for `query` (`''` before anything is typed), from `offset`: `more` when there are others
|
|
842
|
-
* after them, which the user gets by scrolling to the end of the section.
|
|
843
|
-
*/
|
|
844
|
-
search(query: string, offset: number): WebSearchPage | Promise<WebSearchPage>;
|
|
845
|
-
/** Its entries changed (a package installed): the section asks again. */
|
|
846
|
-
subscribe?(listener: () => void): () => void;
|
|
847
|
-
}
|
|
848
|
-
export interface WebSearchPage {
|
|
849
|
-
items: readonly WebSearchItem[];
|
|
850
|
-
more?: boolean;
|
|
851
|
-
}
|
|
852
|
-
/** An entry of the search: a row with its icon, title and a quieter line. */
|
|
853
|
-
export interface WebSearchItem {
|
|
854
|
-
key: string;
|
|
855
|
-
title: string;
|
|
856
|
-
detail?: string;
|
|
857
|
-
icon?: WebIcon;
|
|
858
|
-
/** Tints the tile of the icon, the same for the same text (a name). */
|
|
859
|
-
tint?: string;
|
|
860
|
-
/** A small button at the end: Open, Install. */
|
|
861
|
-
action?: {
|
|
862
|
-
label: string;
|
|
863
|
-
run(): void | Promise<void>;
|
|
864
|
-
};
|
|
865
|
-
open(): void;
|
|
866
|
-
/** Its menu, for a right click or a held finger, in sections. */
|
|
867
|
-
menu?(): WebMenuItem[][];
|
|
868
|
-
}
|
|
869
|
-
/** An entry of the … of a page (WebView.menu). */
|
|
870
|
-
export interface WebMenuItem {
|
|
871
|
-
key: string;
|
|
872
|
-
label: string;
|
|
873
|
-
icon?: WebIcon;
|
|
874
|
-
disabled?: boolean;
|
|
875
|
-
/** Cannot be undone, as delete: drawn in red. */
|
|
876
|
-
danger?: boolean;
|
|
877
|
-
run(): void;
|
|
878
|
-
}
|
|
879
|
-
/** A view of any web extension, as `ui.useView` sees it. */
|
|
880
|
-
export interface WebViewInfo {
|
|
881
|
-
title: string;
|
|
882
|
-
location: 'page' | 'sidebar' | 'panel' | 'launcher' | 'board';
|
|
883
|
-
/** The page is in the main area, or the tool is the tab shown in the workbench. */
|
|
884
|
-
shown: boolean;
|
|
885
|
-
/** WebView.menu: the list that shows the page draws a … with it. */
|
|
886
|
-
menu?(): WebMenuItem[][];
|
|
887
|
-
/** WebView.preview. */
|
|
888
|
-
preview?: WebViewPreview;
|
|
889
|
-
/** WebView.busy. */
|
|
890
|
-
busy: boolean;
|
|
891
|
-
}
|
|
892
|
-
export interface WebTool {
|
|
893
|
-
/** Letters, digits, `_` and `-`, starting with a letter. */
|
|
894
|
-
name: string;
|
|
895
|
-
description: string;
|
|
896
|
-
/** JSON schema of an object. */
|
|
897
|
-
parameters: Record<string, unknown>;
|
|
898
|
-
/** What the model reads; throwing fails the call with the message. */
|
|
899
|
-
execute(toolCallId: string, params: Record<string, unknown>): string | Promise<string>;
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* A piece of work handed out on the user's behalf. `waiting`: it cannot go on without the user (a question,
|
|
903
|
-
* its turn in a channel); what has ended is `done`, `failed` or `stopped`.
|
|
904
|
-
*/
|
|
905
|
-
export interface WebTask {
|
|
906
|
-
/** Unique among those of its source. */
|
|
907
|
-
id: string;
|
|
908
|
-
title: string;
|
|
909
|
-
status: 'running' | 'waiting' | 'done' | 'failed' | 'stopped';
|
|
910
|
-
/** What goes on now, or how it ended: a few words. */
|
|
911
|
-
detail?: string;
|
|
912
|
-
startedAt: number;
|
|
913
|
-
endedAt?: number;
|
|
914
|
-
/** The conversation it was handed out from (TaSessionInfo.sessionFile): the double shows it in the turn that started it. */
|
|
915
|
-
origin?: string;
|
|
916
|
-
/** Who does it, drawn at `size` pixels: an agent's face, the faces of a channel. */
|
|
917
|
-
icon?: React.ComponentType<{
|
|
918
|
-
size: number;
|
|
919
|
-
}>;
|
|
920
|
-
/** Shows where it is done: in the workbench, beside the conversation. */
|
|
921
|
-
open(): void;
|
|
922
|
-
/** Its …, read each time it opens: stop it, take it over, keep its agents. */
|
|
923
|
-
menu?(): WebMenuItem[][];
|
|
924
|
-
/**
|
|
925
|
-
* Deletes it without asking, a running one stopped first: what its delete in `menu` does once the user
|
|
926
|
-
* agreed. The lists ask (`ui.removeTasks`) and call it, for a row swiped on a phone or for many selected.
|
|
927
|
-
*/
|
|
928
|
-
remove?(): Promise<void>;
|
|
929
|
-
/** What deleting it does besides, said when the user is asked: what stays, and where. */
|
|
930
|
-
removeHint?: string;
|
|
931
|
-
}
|
|
932
|
-
/** What deleting a task reads of it: its menu deletes it this way too, before it is listed. */
|
|
933
|
-
export type WebTaskRemoval = Pick<WebTask, 'title' | 'remove' | 'removeHint'>;
|
|
934
|
-
/** The tasks of an extension. `tasks` gives the same objects for what did not change, and is called again after `subscribe`'s listener. */
|
|
935
|
-
export interface WebTaskSource {
|
|
936
|
-
tasks(): readonly WebTask[];
|
|
937
|
-
subscribe(listener: () => void): () => void;
|
|
938
|
-
}
|
|
939
|
-
/** A task as `ui.useTasks` lists it. */
|
|
940
|
-
export interface WebTaskEntry extends WebTask {
|
|
941
|
-
/** `<extension name>/<id>`. */
|
|
942
|
-
key: string;
|
|
943
|
-
/** The name of the extension it is of. */
|
|
944
|
-
extension: string;
|
|
945
|
-
}
|
|
946
|
-
/** pi's custom message, as the conversation holds it. */
|
|
947
|
-
export interface WebCustomMessage {
|
|
948
|
-
role: 'custom';
|
|
949
|
-
customType: string;
|
|
950
|
-
content: string | {
|
|
951
|
-
type: string;
|
|
952
|
-
text?: string;
|
|
953
|
-
}[];
|
|
954
|
-
display: boolean;
|
|
955
|
-
details?: unknown;
|
|
956
|
-
timestamp: number;
|
|
957
|
-
}
|
|
958
559
|
/** The default export of a web extension. The function it returns, if any, runs when it unloads. */
|
|
959
560
|
export type WebExtensionFactory = (pi: WebExtensionAPI) => (() => void) | undefined;
|