@celljs/ta-web 4.9.1 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +8 -7
- package/README.md +8 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +20 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +25 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +5 -2
- package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
- package/esm/browser/assistant/assistant-task-book.js +23 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
- package/esm/browser/assistant/assistant-task-source.js +5 -10
- package/esm/browser/assistant/assistant-task-util.d.ts +14 -2
- package/esm/browser/assistant/assistant-task-util.js +62 -13
- package/esm/browser/assistant/assistant-view.js +117 -71
- package/esm/browser/assistant/assistant.d.ts +28 -5
- package/esm/browser/assistant/assistant.js +96 -22
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +28 -1
- package/esm/browser/chat/chat-stores.d.ts +62 -0
- package/esm/browser/chat/chat-stores.js +129 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +45 -17
- package/esm/browser/chat/chat.d.ts +41 -41
- package/esm/browser/chat/chat.js +276 -190
- package/esm/browser/components/account-menu.d.ts +0 -2
- package/esm/browser/components/account-menu.js +1 -27
- package/esm/browser/components/agent-settings-view.d.ts +3 -2
- package/esm/browser/components/agent-settings-view.js +2 -1
- package/esm/browser/components/app-nav.d.ts +11 -5
- package/esm/browser/components/app-nav.js +39 -17
- package/esm/browser/components/app-shell-hooks.d.ts +2 -2
- package/esm/browser/components/app-shell-hooks.js +12 -6
- package/esm/browser/components/app-view.js +150 -36
- package/esm/browser/components/busy.d.ts +25 -0
- package/esm/browser/components/busy.js +52 -0
- package/esm/browser/components/chat-icon.d.ts +29 -0
- package/esm/browser/components/chat-icon.js +78 -0
- package/esm/browser/components/chat-list.d.ts +93 -8
- package/esm/browser/components/chat-list.js +411 -60
- package/esm/browser/components/chat-seen.d.ts +53 -0
- package/esm/browser/components/chat-seen.js +101 -0
- package/esm/browser/components/composer-box.d.ts +18 -8
- package/esm/browser/components/composer-box.js +199 -52
- package/esm/browser/components/composer.d.ts +13 -6
- package/esm/browser/components/composer.js +8 -5
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +136 -6
- package/esm/browser/components/conversation-scroll.js +467 -108
- package/esm/browser/components/custom-host.d.ts +3 -0
- package/esm/browser/components/custom-host.js +14 -0
- package/esm/browser/components/directory-commands.d.ts +6 -0
- package/esm/browser/components/directory-commands.js +34 -0
- package/esm/browser/components/discover-view.d.ts +11 -4
- package/esm/browser/components/discover-view.js +20 -11
- package/esm/browser/components/dismiss.d.ts +3 -0
- package/esm/browser/components/dismiss.js +29 -0
- package/esm/browser/components/earlier-messages.d.ts +34 -2
- package/esm/browser/components/earlier-messages.js +42 -23
- package/esm/browser/components/editor-area.d.ts +6 -20
- package/esm/browser/components/editor-area.js +10 -96
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/fold-text.d.ts +20 -0
- package/esm/browser/components/fold-text.js +66 -0
- package/esm/browser/components/folder-picker.d.ts +6 -3
- package/esm/browser/components/folder-picker.js +27 -9
- package/esm/browser/components/full-screen.d.ts +9 -0
- package/esm/browser/components/full-screen.js +26 -0
- package/esm/browser/components/grow-box.d.ts +9 -0
- package/esm/browser/components/grow-box.js +50 -0
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/hold-to-talk.d.ts +22 -0
- package/esm/browser/components/hold-to-talk.js +29 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +5 -3
- package/esm/browser/components/icon.js +9 -9
- package/esm/browser/components/image-viewer.d.ts +132 -0
- package/esm/browser/components/image-viewer.js +434 -0
- package/esm/browser/components/launcher-search-util.d.ts +4 -3
- package/esm/browser/components/launcher-search-util.js +12 -4
- package/esm/browser/components/lightbox.d.ts +14 -0
- package/esm/browser/components/lightbox.js +25 -0
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +60 -14
- package/esm/browser/components/media.js +20 -12
- package/esm/browser/components/message-actions.js +2 -0
- package/esm/browser/components/message-footer.d.ts +22 -2
- package/esm/browser/components/message-footer.js +47 -13
- package/esm/browser/components/message-list.d.ts +78 -6
- package/esm/browser/components/message-list.js +281 -36
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +24 -4
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +37 -3
- package/esm/browser/components/nav-places.js +32 -7
- package/esm/browser/components/notice-center.js +34 -0
- package/esm/browser/components/notice-face.d.ts +10 -0
- package/esm/browser/components/notice-face.js +28 -0
- package/esm/browser/components/phone-shell.d.ts +27 -2
- package/esm/browser/components/phone-shell.js +98 -9
- package/esm/browser/components/picture.d.ts +8 -1
- package/esm/browser/components/picture.js +12 -1
- package/esm/browser/components/plus-menu.d.ts +23 -0
- package/esm/browser/components/plus-menu.js +90 -0
- package/esm/browser/components/recent-shot.d.ts +15 -0
- package/esm/browser/components/recent-shot.js +174 -0
- package/esm/browser/components/relay-view.js +10 -3
- package/esm/browser/components/run-status.d.ts +1 -1
- package/esm/browser/components/run-status.js +17 -29
- package/esm/browser/components/said-text.d.ts +6 -0
- package/esm/browser/components/said-text.js +14 -0
- package/esm/browser/components/scan-screen.d.ts +10 -0
- package/esm/browser/components/scan-screen.js +230 -0
- package/esm/browser/components/search-page.js +10 -6
- package/esm/browser/components/session-settings.d.ts +8 -3
- package/esm/browser/components/session-settings.js +15 -1
- package/esm/browser/components/session-view.js +36 -22
- package/esm/browser/components/settings-choices.d.ts +1 -0
- package/esm/browser/components/settings-choices.js +3 -2
- package/esm/browser/components/settings-controls.d.ts +5 -3
- package/esm/browser/components/settings-controls.js +10 -1
- package/esm/browser/components/settings-parts.d.ts +2 -2
- package/esm/browser/components/settings-parts.js +69 -15
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +21 -14
- package/esm/browser/components/unseen-drop.d.ts +39 -0
- package/esm/browser/components/unseen-drop.js +219 -0
- package/esm/browser/components/use-seen-chats.d.ts +8 -0
- package/esm/browser/components/use-seen-chats.js +49 -0
- package/esm/browser/components/voice-button.d.ts +7 -1
- package/esm/browser/components/voice-button.js +15 -2
- package/esm/browser/components/voice-picker.d.ts +6 -0
- package/esm/browser/components/voice-picker.js +53 -0
- package/esm/browser/components/voice-talk.d.ts +51 -0
- package/esm/browser/components/voice-talk.js +242 -0
- package/esm/browser/components/web-composer.d.ts +4 -2
- package/esm/browser/components/web-composer.js +8 -4
- package/esm/browser/components/workbench-tabs.d.ts +41 -0
- package/esm/browser/components/workbench-tabs.js +193 -0
- package/esm/browser/components/workbench-toggle.d.ts +0 -13
- package/esm/browser/components/workbench-toggle.js +1 -28
- package/esm/browser/device/code-scan.d.ts +55 -0
- package/esm/browser/device/code-scan.js +137 -0
- package/esm/browser/device/code-vision.d.ts +51 -0
- package/esm/browser/device/code-vision.js +100 -0
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +134 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +12 -0
- package/esm/browser/device/long-press.js +44 -13
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +67 -78
- package/esm/browser/device/recent-shots.d.ts +45 -0
- package/esm/browser/device/recent-shots.js +142 -0
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +154 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +414 -108
- package/esm/browser/extension/extension-view.d.ts +10 -0
- package/esm/browser/extension/extension-view.js +6 -0
- package/esm/browser/extension/icons.js +15 -2
- package/esm/browser/extension/web-api-components.d.ts +269 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +385 -0
- package/esm/browser/extension/web-api-contributions.js +2 -0
- package/esm/browser/extension/web-api-desktop.d.ts +55 -0
- package/esm/browser/extension/web-api-desktop.js +2 -0
- package/esm/browser/extension/web-api-terminal.d.ts +71 -0
- package/esm/browser/extension/web-api-terminal.js +2 -0
- package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
- package/esm/browser/extension/web-editor-tabs.js +137 -0
- package/esm/browser/extension/web-extension-api.d.ts +218 -521
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +346 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +66 -6
- package/esm/browser/extension/web-extension-protocol.js +41 -0
- package/esm/browser/extension/web-extension-run.d.ts +54 -0
- package/esm/browser/extension/web-extension-run.js +120 -0
- package/esm/browser/extension/web-extensions.d.ts +41 -68
- package/esm/browser/extension/web-extensions.js +188 -487
- package/esm/browser/extension/web-home.d.ts +19 -0
- package/esm/browser/extension/web-home.js +72 -0
- package/esm/browser/extension/web-pages.d.ts +13 -3
- package/esm/browser/extension/web-pages.js +23 -3
- package/esm/browser/extension/web-session-notices.d.ts +36 -0
- package/esm/browser/extension/web-session-notices.js +174 -0
- package/esm/browser/extension/web-sharing.d.ts +2 -0
- package/esm/browser/extension/web-sharing.js +4 -0
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/game/game-host.d.ts +27 -0
- package/esm/browser/game/game-host.js +127 -0
- package/esm/browser/game/game-loader.d.ts +10 -0
- package/esm/browser/game/game-loader.js +28 -0
- package/esm/browser/game/game-protocol.d.ts +49 -0
- package/esm/browser/game/game-protocol.js +2 -0
- package/esm/browser/game/game-runner.d.ts +27 -0
- package/esm/browser/game/game-runner.js +60 -0
- package/esm/browser/game/game-util.d.ts +29 -0
- package/esm/browser/game/game-util.js +180 -0
- package/esm/browser/game/game-view.d.ts +12 -0
- package/esm/browser/game/game-view.js +31 -0
- package/esm/browser/game/game3d-protocol.d.ts +51 -0
- package/esm/browser/game/game3d-protocol.js +2 -0
- package/esm/browser/game/game3d-runner.d.ts +27 -0
- package/esm/browser/game/game3d-runner.js +149 -0
- package/esm/browser/hooks.d.ts +5 -1
- package/esm/browser/hooks.js +13 -2
- package/esm/browser/i18n/locales.d.ts +105 -3
- package/esm/browser/i18n/messages.d.ts +104 -2
- package/esm/browser/i18n/messages.js +215 -11
- package/esm/browser/index.d.ts +15 -0
- package/esm/browser/index.js +15 -0
- package/esm/browser/links/links-protocol.d.ts +5 -0
- package/esm/browser/links/links.d.ts +19 -7
- package/esm/browser/links/links.js +57 -11
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/notices/notices-protocol.d.ts +26 -1
- package/esm/browser/notices/notices.d.ts +3 -1
- package/esm/browser/notices/notices.js +26 -12
- package/esm/browser/notices/session-notices.d.ts +69 -0
- package/esm/browser/notices/session-notices.js +92 -0
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +151 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +109 -0
- package/esm/browser/settings/navigation.d.ts +3 -2
- package/esm/browser/settings/navigation.js +4 -3
- package/esm/browser/settings/settings-protocol.d.ts +17 -0
- package/esm/browser/settings/settings-protocol.js +20 -4
- package/esm/browser/state/state-protocol.d.ts +8 -1
- package/esm/browser/state/state.d.ts +2 -0
- package/esm/browser/state/state.js +21 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +27 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +95 -17
- package/esm/browser/style/device.js +42 -5
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +252 -67
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +38 -2
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +15 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +76 -9
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +2 -2
- package/esm/browser/style/tints.d.ts +27 -0
- package/esm/browser/style/tints.js +56 -0
- package/esm/browser/style.js +13 -1
- package/esm/browser/util/composer.d.ts +6 -0
- package/esm/browser/util/composer.js +16 -0
- package/esm/browser/util/desktop.d.ts +19 -1
- package/esm/browser/util/desktop.js +15 -0
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +22 -2
- package/esm/browser/util/markdown.js +120 -6
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +35 -2
- package/esm/browser/util/process.js +79 -4
- package/esm/browser/util/progress.d.ts +19 -1
- package/esm/browser/util/progress.js +57 -4
- package/esm/browser/util/quote.d.ts +19 -0
- package/esm/browser/util/quote.js +58 -0
- package/esm/browser/util/tool.d.ts +19 -2
- package/esm/browser/util/tool.js +70 -2
- package/esm/browser/util/voice.d.ts +49 -6
- package/esm/browser/util/voice.js +271 -26
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +61 -0
- package/esm/browser/workbench-calls.js +146 -0
- package/esm/browser/workbench-protocol.d.ts +36 -3
- package/esm/browser/workbench-util.d.ts +22 -4
- package/esm/browser/workbench-util.js +37 -7
- package/esm/browser/workbench.d.ts +47 -6
- package/esm/browser/workbench.js +191 -43
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +21 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +25 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +5 -2
- package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
- package/lib/browser/assistant/assistant-task-book.js +23 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
- package/lib/browser/assistant/assistant-task-source.js +5 -10
- package/lib/browser/assistant/assistant-task-util.d.ts +14 -2
- package/lib/browser/assistant/assistant-task-util.js +62 -13
- package/lib/browser/assistant/assistant-view.js +113 -67
- package/lib/browser/assistant/assistant.d.ts +28 -5
- package/lib/browser/assistant/assistant.js +96 -22
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +28 -1
- package/lib/browser/chat/chat-stores.d.ts +63 -0
- package/lib/browser/chat/chat-stores.js +133 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +44 -16
- package/lib/browser/chat/chat.d.ts +41 -41
- package/lib/browser/chat/chat.js +277 -191
- package/lib/browser/components/account-menu.d.ts +0 -2
- package/lib/browser/components/account-menu.js +2 -29
- package/lib/browser/components/agent-settings-view.d.ts +3 -2
- package/lib/browser/components/agent-settings-view.js +2 -1
- package/lib/browser/components/app-nav.d.ts +11 -5
- package/lib/browser/components/app-nav.js +35 -13
- package/lib/browser/components/app-shell-hooks.d.ts +2 -2
- package/lib/browser/components/app-shell-hooks.js +12 -6
- package/lib/browser/components/app-view.js +145 -31
- package/lib/browser/components/busy.d.ts +26 -0
- package/lib/browser/components/busy.js +91 -0
- package/lib/browser/components/chat-icon.d.ts +30 -0
- package/lib/browser/components/chat-icon.js +117 -0
- package/lib/browser/components/chat-list.d.ts +93 -8
- package/lib/browser/components/chat-list.js +412 -60
- package/lib/browser/components/chat-seen.d.ts +54 -0
- package/lib/browser/components/chat-seen.js +104 -0
- package/lib/browser/components/composer-box.d.ts +18 -8
- package/lib/browser/components/composer-box.js +198 -51
- package/lib/browser/components/composer.d.ts +13 -6
- package/lib/browser/components/composer.js +7 -4
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +136 -6
- package/lib/browser/components/conversation-scroll.js +469 -109
- package/lib/browser/components/custom-host.d.ts +4 -0
- package/lib/browser/components/custom-host.js +50 -0
- package/lib/browser/components/directory-commands.d.ts +7 -0
- package/lib/browser/components/directory-commands.js +70 -0
- package/lib/browser/components/discover-view.d.ts +11 -4
- package/lib/browser/components/discover-view.js +19 -10
- package/lib/browser/components/dismiss.d.ts +4 -0
- package/lib/browser/components/dismiss.js +65 -0
- package/lib/browser/components/earlier-messages.d.ts +34 -2
- package/lib/browser/components/earlier-messages.js +44 -24
- package/lib/browser/components/editor-area.d.ts +6 -20
- package/lib/browser/components/editor-area.js +11 -97
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/fold-text.d.ts +21 -0
- package/lib/browser/components/fold-text.js +103 -0
- package/lib/browser/components/folder-picker.d.ts +6 -3
- package/lib/browser/components/folder-picker.js +27 -9
- package/lib/browser/components/full-screen.d.ts +10 -0
- package/lib/browser/components/full-screen.js +62 -0
- package/lib/browser/components/grow-box.d.ts +10 -0
- package/lib/browser/components/grow-box.js +86 -0
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/hold-to-talk.d.ts +23 -0
- package/lib/browser/components/hold-to-talk.js +65 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +5 -3
- package/lib/browser/components/icon.js +11 -9
- package/lib/browser/components/image-viewer.d.ts +133 -0
- package/lib/browser/components/image-viewer.js +472 -0
- package/lib/browser/components/launcher-search-util.d.ts +4 -3
- package/lib/browser/components/launcher-search-util.js +12 -4
- package/lib/browser/components/lightbox.d.ts +15 -0
- package/lib/browser/components/lightbox.js +61 -0
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +60 -14
- package/lib/browser/components/media.js +21 -13
- package/lib/browser/components/message-actions.js +2 -0
- package/lib/browser/components/message-footer.d.ts +22 -2
- package/lib/browser/components/message-footer.js +49 -12
- package/lib/browser/components/message-list.d.ts +78 -6
- package/lib/browser/components/message-list.js +281 -32
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +23 -3
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +37 -3
- package/lib/browser/components/nav-places.js +35 -7
- package/lib/browser/components/notice-center.js +34 -0
- package/lib/browser/components/notice-face.d.ts +11 -0
- package/lib/browser/components/notice-face.js +64 -0
- package/lib/browser/components/phone-shell.d.ts +27 -2
- package/lib/browser/components/phone-shell.js +99 -10
- package/lib/browser/components/picture.d.ts +8 -1
- package/lib/browser/components/picture.js +13 -1
- package/lib/browser/components/plus-menu.d.ts +24 -0
- package/lib/browser/components/plus-menu.js +126 -0
- package/lib/browser/components/recent-shot.d.ts +16 -0
- package/lib/browser/components/recent-shot.js +210 -0
- package/lib/browser/components/relay-view.js +10 -3
- package/lib/browser/components/run-status.d.ts +1 -1
- package/lib/browser/components/run-status.js +17 -29
- package/lib/browser/components/said-text.d.ts +7 -0
- package/lib/browser/components/said-text.js +50 -0
- package/lib/browser/components/scan-screen.d.ts +11 -0
- package/lib/browser/components/scan-screen.js +266 -0
- package/lib/browser/components/search-page.js +10 -6
- package/lib/browser/components/session-settings.d.ts +8 -3
- package/lib/browser/components/session-settings.js +15 -1
- package/lib/browser/components/session-view.js +32 -18
- package/lib/browser/components/settings-choices.d.ts +1 -0
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-controls.d.ts +5 -3
- package/lib/browser/components/settings-controls.js +10 -1
- package/lib/browser/components/settings-parts.d.ts +2 -2
- package/lib/browser/components/settings-parts.js +67 -13
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +21 -14
- package/lib/browser/components/unseen-drop.d.ts +40 -0
- package/lib/browser/components/unseen-drop.js +256 -0
- package/lib/browser/components/use-seen-chats.d.ts +9 -0
- package/lib/browser/components/use-seen-chats.js +85 -0
- package/lib/browser/components/voice-button.d.ts +7 -1
- package/lib/browser/components/voice-button.js +16 -2
- package/lib/browser/components/voice-picker.d.ts +7 -0
- package/lib/browser/components/voice-picker.js +89 -0
- package/lib/browser/components/voice-talk.d.ts +52 -0
- package/lib/browser/components/voice-talk.js +281 -0
- package/lib/browser/components/web-composer.d.ts +4 -2
- package/lib/browser/components/web-composer.js +7 -3
- package/lib/browser/components/workbench-tabs.d.ts +42 -0
- package/lib/browser/components/workbench-tabs.js +232 -0
- package/lib/browser/components/workbench-toggle.d.ts +0 -13
- package/lib/browser/components/workbench-toggle.js +1 -29
- package/lib/browser/device/code-scan.d.ts +56 -0
- package/lib/browser/device/code-scan.js +141 -0
- package/lib/browser/device/code-vision.d.ts +52 -0
- package/lib/browser/device/code-vision.js +103 -0
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +171 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +12 -0
- package/lib/browser/device/long-press.js +44 -13
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +66 -77
- package/lib/browser/device/recent-shots.d.ts +46 -0
- package/lib/browser/device/recent-shots.js +145 -0
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +153 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +418 -109
- package/lib/browser/extension/extension-view.d.ts +10 -0
- package/lib/browser/extension/extension-view.js +7 -1
- package/lib/browser/extension/icons.js +14 -1
- package/lib/browser/extension/web-api-components.d.ts +270 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +386 -0
- package/lib/browser/extension/web-api-contributions.js +3 -0
- package/lib/browser/extension/web-api-desktop.d.ts +56 -0
- package/lib/browser/extension/web-api-desktop.js +3 -0
- package/lib/browser/extension/web-api-terminal.d.ts +72 -0
- package/lib/browser/extension/web-api-terminal.js +3 -0
- package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
- package/lib/browser/extension/web-editor-tabs.js +141 -0
- package/lib/browser/extension/web-extension-api.d.ts +218 -521
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +383 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +66 -6
- package/lib/browser/extension/web-extension-protocol.js +42 -1
- package/lib/browser/extension/web-extension-run.d.ts +55 -0
- package/lib/browser/extension/web-extension-run.js +123 -0
- package/lib/browser/extension/web-extensions.d.ts +41 -68
- package/lib/browser/extension/web-extensions.js +184 -516
- package/lib/browser/extension/web-home.d.ts +20 -0
- package/lib/browser/extension/web-home.js +76 -0
- package/lib/browser/extension/web-pages.d.ts +13 -3
- package/lib/browser/extension/web-pages.js +23 -3
- package/lib/browser/extension/web-session-notices.d.ts +37 -0
- package/lib/browser/extension/web-session-notices.js +177 -0
- package/lib/browser/extension/web-sharing.d.ts +2 -0
- package/lib/browser/extension/web-sharing.js +4 -0
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/game/game-host.d.ts +28 -0
- package/lib/browser/game/game-host.js +163 -0
- package/lib/browser/game/game-loader.d.ts +11 -0
- package/lib/browser/game/game-loader.js +31 -0
- package/lib/browser/game/game-protocol.d.ts +50 -0
- package/lib/browser/game/game-protocol.js +3 -0
- package/lib/browser/game/game-runner.d.ts +28 -0
- package/lib/browser/game/game-runner.js +64 -0
- package/lib/browser/game/game-util.d.ts +30 -0
- package/lib/browser/game/game-util.js +183 -0
- package/lib/browser/game/game-view.d.ts +13 -0
- package/lib/browser/game/game-view.js +68 -0
- package/lib/browser/game/game3d-protocol.d.ts +52 -0
- package/lib/browser/game/game3d-protocol.js +3 -0
- package/lib/browser/game/game3d-runner.d.ts +28 -0
- package/lib/browser/game/game3d-runner.js +153 -0
- package/lib/browser/hooks.d.ts +5 -1
- package/lib/browser/hooks.js +14 -2
- package/lib/browser/i18n/locales.d.ts +105 -3
- package/lib/browser/i18n/messages.d.ts +104 -2
- package/lib/browser/i18n/messages.js +215 -11
- package/lib/browser/index.d.ts +15 -0
- package/lib/browser/index.js +15 -0
- package/lib/browser/links/links-protocol.d.ts +5 -0
- package/lib/browser/links/links.d.ts +19 -7
- package/lib/browser/links/links.js +57 -11
- package/lib/browser/markdown/code-renderers.d.ts +5 -0
- package/lib/browser/markdown/code-renderers.js +40 -0
- package/lib/browser/notices/notices-protocol.d.ts +26 -1
- package/lib/browser/notices/notices.d.ts +3 -1
- package/lib/browser/notices/notices.js +26 -12
- package/lib/browser/notices/session-notices.d.ts +70 -0
- package/lib/browser/notices/session-notices.js +96 -0
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +157 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +113 -0
- package/lib/browser/settings/navigation.d.ts +3 -2
- package/lib/browser/settings/navigation.js +4 -3
- package/lib/browser/settings/settings-protocol.d.ts +17 -0
- package/lib/browser/settings/settings-protocol.js +21 -5
- package/lib/browser/state/state-protocol.d.ts +8 -1
- package/lib/browser/state/state.d.ts +2 -0
- package/lib/browser/state/state.js +21 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +27 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +95 -17
- package/lib/browser/style/device.js +42 -5
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +252 -67
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +38 -2
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +15 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +76 -9
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +2 -2
- package/lib/browser/style/tints.d.ts +28 -0
- package/lib/browser/style/tints.js +59 -0
- package/lib/browser/style.js +13 -1
- package/lib/browser/util/composer.d.ts +6 -0
- package/lib/browser/util/composer.js +16 -0
- package/lib/browser/util/desktop.d.ts +19 -1
- package/lib/browser/util/desktop.js +15 -0
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +22 -2
- package/lib/browser/util/markdown.js +120 -6
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +35 -2
- package/lib/browser/util/process.js +80 -5
- package/lib/browser/util/progress.d.ts +19 -1
- package/lib/browser/util/progress.js +57 -4
- package/lib/browser/util/quote.d.ts +20 -0
- package/lib/browser/util/quote.js +61 -0
- package/lib/browser/util/tool.d.ts +19 -2
- package/lib/browser/util/tool.js +70 -2
- package/lib/browser/util/voice.d.ts +49 -6
- package/lib/browser/util/voice.js +271 -26
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +62 -0
- package/lib/browser/workbench-calls.js +150 -0
- package/lib/browser/workbench-protocol.d.ts +36 -3
- package/lib/browser/workbench-util.d.ts +22 -4
- package/lib/browser/workbench-util.js +38 -8
- package/lib/browser/workbench.d.ts +47 -6
- package/lib/browser/workbench.js +189 -41
- package/package.json +14 -11
- package/public/launch.svg +46 -42
|
@@ -3,8 +3,12 @@ export declare function CodeBlock({ code }: {
|
|
|
3
3
|
code: string;
|
|
4
4
|
language?: string;
|
|
5
5
|
}): React.JSX.Element;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Markdown as React elements; drawn again only when its text changes, and then only the blocks that did.
|
|
8
|
+
* `streaming`: the text is a reply still coming, which shows nothing that is about to turn into something else.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Markdown({ text, streaming }: {
|
|
8
11
|
text: string;
|
|
12
|
+
streaming?: boolean;
|
|
9
13
|
}): React.JSX.Element;
|
|
10
14
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -38,6 +38,7 @@ exports.Markdown = Markdown;
|
|
|
38
38
|
const lucide_react_1 = require("lucide-react");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const use_t_1 = require("../i18n/use-t");
|
|
41
|
+
const code_renderers_1 = require("../markdown/code-renderers");
|
|
41
42
|
const mermaid_1 = require("../markdown/mermaid");
|
|
42
43
|
const markdown_1 = require("../util/markdown");
|
|
43
44
|
const icon_1 = require("./icon");
|
|
@@ -87,15 +88,46 @@ function CodeBlock({ code }) {
|
|
|
87
88
|
React.createElement("pre", null,
|
|
88
89
|
React.createElement("code", null, code))));
|
|
89
90
|
}
|
|
91
|
+
/** What a code renderer draws: when it throws, the code itself. */
|
|
92
|
+
class CodeBoundary extends React.Component {
|
|
93
|
+
constructor() {
|
|
94
|
+
super(...arguments);
|
|
95
|
+
this.state = { failed: false };
|
|
96
|
+
}
|
|
97
|
+
static getDerivedStateFromError() {
|
|
98
|
+
return { failed: true };
|
|
99
|
+
}
|
|
100
|
+
componentDidCatch(error) {
|
|
101
|
+
console.error('A code renderer failed:', error);
|
|
102
|
+
}
|
|
103
|
+
componentDidUpdate(previous) {
|
|
104
|
+
if (this.state.failed && previous.retry !== this.props.retry) {
|
|
105
|
+
this.setState({ failed: false });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
return this.state.failed ? this.props.fallback : this.props.children;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** A fenced block: as a web extension draws its language, a Mermaid diagram, or code. */
|
|
113
|
+
function CodeView({ language, code, closed }) {
|
|
114
|
+
const Renderer = React.useContext(code_renderers_1.CodeRenderers)[language.trim().toLowerCase()];
|
|
115
|
+
const plain = React.createElement(CodeBlock, { code: code, language: language });
|
|
116
|
+
if (Renderer) {
|
|
117
|
+
return (React.createElement(CodeBoundary, { retry: closed, fallback: plain },
|
|
118
|
+
React.createElement(Renderer, { code: code, language: language, closed: closed })));
|
|
119
|
+
}
|
|
120
|
+
if (mermaid_1.MermaidUtil.isDiagram(language, code)) {
|
|
121
|
+
return React.createElement(mermaid_view_1.MermaidView, { code: code, fallback: plain });
|
|
122
|
+
}
|
|
123
|
+
return plain;
|
|
124
|
+
}
|
|
90
125
|
const Block = React.memo(function Block({ block }) {
|
|
91
126
|
switch (block.type) {
|
|
92
127
|
case 'heading':
|
|
93
128
|
return React.createElement(`h${Math.min(block.level + 2, 6)}`, null, React.createElement(Text, { text: block.text }));
|
|
94
129
|
case 'code':
|
|
95
|
-
|
|
96
|
-
return React.createElement(mermaid_view_1.MermaidView, { code: block.code, fallback: React.createElement(CodeBlock, { code: block.code, language: block.language }) });
|
|
97
|
-
}
|
|
98
|
-
return React.createElement(CodeBlock, { code: block.code, language: block.language });
|
|
130
|
+
return React.createElement(CodeView, { language: block.language, code: block.code, closed: block.closed });
|
|
99
131
|
case 'math':
|
|
100
132
|
return React.createElement(math_1.MathView, { tex: block.tex, display: true, closed: block.closed });
|
|
101
133
|
case 'quote':
|
|
@@ -107,12 +139,13 @@ const Block = React.memo(function Block({ block }) {
|
|
|
107
139
|
return block.ordered ? React.createElement("ol", null, items) : React.createElement("ul", null, items);
|
|
108
140
|
}
|
|
109
141
|
case 'table':
|
|
142
|
+
// Short cells keep to one line and long ones wrap: a table wider than the page scrolls in its frame.
|
|
110
143
|
return (React.createElement("div", { className: "ta-table" },
|
|
111
144
|
React.createElement("table", null,
|
|
112
145
|
React.createElement("thead", null,
|
|
113
|
-
React.createElement("tr", null, block.header.map((cell, index) => (React.createElement("th", { key: index },
|
|
146
|
+
React.createElement("tr", null, block.header.map((cell, index) => (React.createElement("th", { key: index, "data-align": block.align[index] || undefined },
|
|
114
147
|
React.createElement(Text, { text: cell })))))),
|
|
115
|
-
React.createElement("tbody", null, block.rows.map((row, index) => (React.createElement("tr", { key: index }, row.map((cell, column) => (React.createElement("td", { key: column },
|
|
148
|
+
React.createElement("tbody", null, block.rows.map((row, index) => (React.createElement("tr", { key: index }, row.map((cell, column) => (React.createElement("td", { key: column, className: markdown_1.MarkdownUtil.longCell(cell) ? 'ta-cell-long' : undefined, "data-align": block.align[column] || undefined },
|
|
116
149
|
React.createElement(Text, { text: cell })))))))))));
|
|
117
150
|
case 'rule':
|
|
118
151
|
return React.createElement("hr", null);
|
|
@@ -120,16 +153,29 @@ const Block = React.memo(function Block({ block }) {
|
|
|
120
153
|
return (React.createElement("p", null,
|
|
121
154
|
React.createElement(Text, { text: block.text })));
|
|
122
155
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* The blocks of `text`, those that did not change the same objects as before: a block draws again only when it
|
|
159
|
+
* changed, and the blocks are not compared again as they draw.
|
|
160
|
+
*/
|
|
161
|
+
function useBlocks(text, streaming) {
|
|
162
|
+
const previous = React.useRef([]);
|
|
163
|
+
return React.useMemo(() => {
|
|
164
|
+
const blocks = streaming ? markdown_1.MarkdownUtil.streaming(text) : markdown_1.MarkdownUtil.blocks(text);
|
|
165
|
+
const kept = blocks.map((block, index) => (markdown_1.MarkdownUtil.same(previous.current[index], block) ? previous.current[index] : block));
|
|
166
|
+
previous.current = kept;
|
|
167
|
+
return kept;
|
|
168
|
+
}, [text, streaming]);
|
|
126
169
|
}
|
|
127
|
-
const MarkdownBody = React.memo(function MarkdownBody({ text }) {
|
|
128
|
-
const blocks =
|
|
170
|
+
const MarkdownBody = React.memo(function MarkdownBody({ text, streaming }) {
|
|
171
|
+
const blocks = useBlocks(text, streaming);
|
|
129
172
|
return (React.createElement("div", { className: "ta-markdown" }, blocks.map((block, index) => (React.createElement(Block, { key: index, block: block })))));
|
|
130
173
|
});
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Markdown as React elements; drawn again only when its text changes, and then only the blocks that did.
|
|
176
|
+
* `streaming`: the text is a reply still coming, which shows nothing that is about to turn into something else.
|
|
177
|
+
*/
|
|
178
|
+
function Markdown({ text, streaming = false }) {
|
|
179
|
+
return React.createElement(MarkdownBody, { text: text, streaming: streaming });
|
|
134
180
|
}
|
|
135
181
|
//# sourceMappingURL=markdown.js.map
|
|
@@ -38,13 +38,22 @@ exports.MediaView = MediaView;
|
|
|
38
38
|
const lucide_react_1 = require("lucide-react");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const use_t_1 = require("../i18n/use-t");
|
|
41
|
+
const lazy_1 = require("../markdown/lazy");
|
|
41
42
|
const markdown_1 = require("../util/markdown");
|
|
42
43
|
const icon_1 = require("./icon");
|
|
44
|
+
const lightbox_1 = require("./lightbox");
|
|
43
45
|
/**
|
|
44
46
|
* Where the page loads a file of the workspace from (TaWorkspaceServer.fileUrl), in the directory of the
|
|
45
47
|
* conversation that shows it; without it, files of the workspace do not show.
|
|
46
48
|
*/
|
|
47
49
|
exports.FileUrls = React.createContext(undefined);
|
|
50
|
+
/**
|
|
51
|
+
* The size of the images replies showed, by their target: shown again (the conversation opened again, its rows
|
|
52
|
+
* drawn as they come near), an image has its place before it loads, and nothing under it moves.
|
|
53
|
+
*/
|
|
54
|
+
const imageSizes = new lazy_1.Recent(200);
|
|
55
|
+
/** The max-height of an image of a reply (style/conversation.ts). */
|
|
56
|
+
const MEDIA_MAX_HEIGHT = 420;
|
|
48
57
|
/** The URL of a target: as it is, or for a path, the URL of the file; null when it cannot show. */
|
|
49
58
|
function useUrl(src) {
|
|
50
59
|
const fileUrl = React.useContext(exports.FileUrls);
|
|
@@ -67,16 +76,6 @@ function useUrl(src) {
|
|
|
67
76
|
}, [fileUrl, path, src]);
|
|
68
77
|
return url;
|
|
69
78
|
}
|
|
70
|
-
/** An image at its full size over the page; a click or Escape closes it. In the top layer, so no container clips it. */
|
|
71
|
-
function Lightbox({ src, alt, onClose }) {
|
|
72
|
-
const dialog = React.useRef(null);
|
|
73
|
-
React.useEffect(() => {
|
|
74
|
-
var _a, _b;
|
|
75
|
-
(_b = (_a = dialog.current) === null || _a === void 0 ? void 0 : _a.showModal) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
76
|
-
}, []);
|
|
77
|
-
return (React.createElement("dialog", { ref: dialog, className: "ta-lightbox", onClose: onClose, onClick: () => { var _a; return (_a = dialog.current) === null || _a === void 0 ? void 0 : _a.close(); } },
|
|
78
|
-
React.createElement("img", { src: src, alt: alt })));
|
|
79
|
-
}
|
|
80
79
|
/** An image, a video or a sound a reply shows: from the web, a data URL, or a file of the workspace. */
|
|
81
80
|
function MediaView({ src, alt }) {
|
|
82
81
|
var _a;
|
|
@@ -87,8 +86,17 @@ function MediaView({ src, alt }) {
|
|
|
87
86
|
const failed = !!url && url === failedUrl;
|
|
88
87
|
const setFailed = () => setFailedUrl(url !== null && url !== void 0 ? url : undefined);
|
|
89
88
|
const kind = (_a = markdown_1.MarkdownUtil.media(src)) !== null && _a !== void 0 ? _a : 'image';
|
|
89
|
+
const size = kind === 'image' ? imageSizes.get(src) : undefined;
|
|
90
|
+
// Of the size it had when known: its place does not change as it loads.
|
|
91
|
+
const box = size &&
|
|
92
|
+
// As tall as an image shows at most (.ta-media-image img), its shape kept.
|
|
93
|
+
{
|
|
94
|
+
aspectRatio: `${size.width} / ${size.height}`,
|
|
95
|
+
width: Math.round(Math.min(size.width, (size.width * MEDIA_MAX_HEIGHT) / size.height)),
|
|
96
|
+
height: 'auto',
|
|
97
|
+
};
|
|
90
98
|
if (url === undefined) {
|
|
91
|
-
return React.createElement("span", { className: `ta-media-loading ta-media-${kind}`, title: alt || src });
|
|
99
|
+
return React.createElement("span", { className: `ta-media-loading ta-media-${kind}`, title: alt || src, style: box || undefined });
|
|
92
100
|
}
|
|
93
101
|
if (url === null || failed) {
|
|
94
102
|
const name = alt || src.split(/[?#]/)[0].split('/').pop() || src;
|
|
@@ -106,8 +114,8 @@ function MediaView({ src, alt }) {
|
|
|
106
114
|
default:
|
|
107
115
|
return (React.createElement(React.Fragment, null,
|
|
108
116
|
React.createElement("button", { type: "button", className: "ta-media ta-media-image", title: t('ta.markdown.enlarge'), onClick: () => setOpen(true) },
|
|
109
|
-
React.createElement("img", { src: url, alt: alt, loading: "lazy", onError: setFailed })),
|
|
110
|
-
open && React.createElement(Lightbox, { src: url, alt: alt, onClose: () => setOpen(false) })));
|
|
117
|
+
React.createElement("img", { src: url, alt: alt, loading: "lazy", width: size === null || size === void 0 ? void 0 : size.width, height: size === null || size === void 0 ? void 0 : size.height, style: box || undefined, onLoad: event => imageSizes.set(src, { width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight }), onError: setFailed })),
|
|
118
|
+
open && React.createElement(lightbox_1.Lightbox, { src: url, alt: alt, onClose: () => setOpen(false) })));
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
//# sourceMappingURL=media.js.map
|
|
@@ -43,6 +43,7 @@ const messages_1 = require("../i18n/messages");
|
|
|
43
43
|
const use_t_1 = require("../i18n/use-t");
|
|
44
44
|
const settings_protocol_1 = require("../settings/settings-protocol");
|
|
45
45
|
const message_1 = require("../util/message");
|
|
46
|
+
const quote_1 = require("../util/quote");
|
|
46
47
|
const fork_view_1 = require("./fork-view");
|
|
47
48
|
let forks = 0;
|
|
48
49
|
/**
|
|
@@ -86,6 +87,7 @@ function useMessageActions(store, server, working, cwd, composer, done) {
|
|
|
86
87
|
});
|
|
87
88
|
}, failed);
|
|
88
89
|
},
|
|
90
|
+
quote: text => { var _a; return (_a = composer.current) === null || _a === void 0 ? void 0 : _a.setText(quote_1.QuoteUtil.add(composer.current.text(), text)); },
|
|
89
91
|
rewind: message => {
|
|
90
92
|
notices
|
|
91
93
|
.confirm({
|
|
@@ -11,22 +11,42 @@ export interface MessageActionHandlers {
|
|
|
11
11
|
rewind(message: SessionMessage): void;
|
|
12
12
|
/** Says something done for a moment (copied, from the menu of a message, which closes at once). */
|
|
13
13
|
notify?(message: string): void;
|
|
14
|
+
/** Quotes what was said in the message box (WeChat's 引用), to ask about that part. */
|
|
15
|
+
quote?(text: string): void;
|
|
14
16
|
}
|
|
15
17
|
export declare const MessageActions: React.Context<MessageActionHandlers | undefined>;
|
|
16
18
|
export declare namespace MessageFooterUtil {
|
|
17
19
|
/** What to paste into an issue: where the message is, and what the model said of it. */
|
|
18
20
|
function debugInfo(message: SessionMessage, session: TaSessionInfo | undefined): string;
|
|
19
21
|
}
|
|
22
|
+
/** When, as a person says it: the time today, "Yesterday" and the time, else the date and the time. */
|
|
23
|
+
export declare function useTimeLabel(): (timestamp: number) => string;
|
|
24
|
+
/**
|
|
25
|
+
* The time between two messages far apart (ProcessUtil.timeBreaks), as WeChat shows it: on a touch screen,
|
|
26
|
+
* where the footers of the messages, which carry their times, are not shown.
|
|
27
|
+
*/
|
|
28
|
+
export declare function TimeBreak({ timestamp }: {
|
|
29
|
+
timestamp?: number;
|
|
30
|
+
}): React.JSX.Element;
|
|
31
|
+
/** Above the first turn of another model (ProcessUtil.modelBreaks): the conversation goes on with it. */
|
|
32
|
+
export declare function ModelBreak({ model }: {
|
|
33
|
+
model: string;
|
|
34
|
+
}): React.JSX.Element;
|
|
20
35
|
/** Under a message of the user: when, copy, a new conversation from here, back to here. */
|
|
21
36
|
export declare function UserFooter({ message, text }: {
|
|
22
37
|
message: SessionMessage;
|
|
23
38
|
text: string;
|
|
24
39
|
}): React.JSX.Element;
|
|
25
|
-
/**
|
|
26
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Under a turn that ended: copy the reply, a new conversation from it, what to report, when, what it took.
|
|
42
|
+
* `latest`: the last turn of the conversation, whose footer a touch screen keeps (only its copy and fork;
|
|
43
|
+
* the rest, and the footers of the others, are in the menu of a held message).
|
|
44
|
+
*/
|
|
45
|
+
export declare function TurnFooter({ messages, last, reply, session, latest, }: {
|
|
27
46
|
messages: SessionMessage[];
|
|
28
47
|
last?: SessionMessage;
|
|
29
48
|
reply: string;
|
|
30
49
|
session?: TaSessionInfo;
|
|
50
|
+
latest?: boolean;
|
|
31
51
|
}): React.JSX.Element;
|
|
32
52
|
//# sourceMappingURL=message-footer.d.ts.map
|
|
@@ -34,6 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.MessageFooterUtil = exports.MessageActions = void 0;
|
|
37
|
+
exports.useTimeLabel = useTimeLabel;
|
|
38
|
+
exports.TimeBreak = TimeBreak;
|
|
39
|
+
exports.ModelBreak = ModelBreak;
|
|
37
40
|
exports.UserFooter = UserFooter;
|
|
38
41
|
exports.TurnFooter = TurnFooter;
|
|
39
42
|
const lucide_react_1 = require("lucide-react");
|
|
@@ -41,6 +44,7 @@ const React = __importStar(require("react"));
|
|
|
41
44
|
const use_t_1 = require("../i18n/use-t");
|
|
42
45
|
const message_1 = require("../util/message");
|
|
43
46
|
const progress_1 = require("../util/progress");
|
|
47
|
+
const quote_1 = require("../util/quote");
|
|
44
48
|
const icon_1 = require("./icon");
|
|
45
49
|
exports.MessageActions = React.createContext(undefined);
|
|
46
50
|
var MessageFooterUtil;
|
|
@@ -63,12 +67,12 @@ var MessageFooterUtil;
|
|
|
63
67
|
}
|
|
64
68
|
MessageFooterUtil.debugInfo = debugInfo;
|
|
65
69
|
})(MessageFooterUtil || (exports.MessageFooterUtil = MessageFooterUtil = {}));
|
|
66
|
-
function FooterButton({ icon, label, onClick }) {
|
|
67
|
-
return (React.createElement("button", { type: "button", className:
|
|
70
|
+
function FooterButton({ icon, label, onClick, onMouseDown, className, }) {
|
|
71
|
+
return (React.createElement("button", { type: "button", className: className ? `ta-footer-button ${className}` : 'ta-footer-button', title: label, "aria-label": label, onClick: onClick, onMouseDown: onMouseDown },
|
|
68
72
|
React.createElement(icon_1.Icon, { icon: icon, size: 14 })));
|
|
69
73
|
}
|
|
70
74
|
/** Copies, and says so on the button for a moment. */
|
|
71
|
-
function CopyButton({ text, icon, label, done }) {
|
|
75
|
+
function CopyButton({ text, icon, label, done, className }) {
|
|
72
76
|
const t = (0, use_t_1.useT)();
|
|
73
77
|
const [copied, setCopied] = React.useState(false);
|
|
74
78
|
React.useEffect(() => {
|
|
@@ -78,16 +82,44 @@ function CopyButton({ text, icon, label, done }) {
|
|
|
78
82
|
}
|
|
79
83
|
}, [copied]);
|
|
80
84
|
const copy = () => { var _a; return void ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(text()).then(() => setCopied(true))); };
|
|
81
|
-
return React.createElement(FooterButton, { icon: copied ? lucide_react_1.Check : icon, label: t(copied ? done : label), onClick: copy });
|
|
85
|
+
return React.createElement(FooterButton, { icon: copied ? lucide_react_1.Check : icon, label: t(copied ? done : label), onClick: copy, className: className });
|
|
82
86
|
}
|
|
83
|
-
|
|
87
|
+
/** When, as a person says it: the time today, "Yesterday" and the time, else the date and the time. */
|
|
88
|
+
function useTimeLabel() {
|
|
84
89
|
const t = (0, use_t_1.useT)();
|
|
90
|
+
return timestamp => {
|
|
91
|
+
const { day, time, date } = message_1.MessageUtil.when(timestamp);
|
|
92
|
+
return day === 'today' ? time : day === 'date' ? `${date} ${time}` : `${t(day === 'yesterday' ? 'ta.time.yesterday' : 'ta.time.dayBefore')} ${time}`;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function Time({ timestamp, className = 'ta-footer-time' }) {
|
|
96
|
+
const label = useTimeLabel();
|
|
85
97
|
if (timestamp === undefined) {
|
|
86
98
|
return null;
|
|
87
99
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
return (React.createElement("time", { className: className, dateTime: new Date(timestamp).toISOString(), title: new Date(timestamp).toLocaleString() }, label(timestamp)));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The time between two messages far apart (ProcessUtil.timeBreaks), as WeChat shows it: on a touch screen,
|
|
104
|
+
* where the footers of the messages, which carry their times, are not shown.
|
|
105
|
+
*/
|
|
106
|
+
function TimeBreak({ timestamp }) {
|
|
107
|
+
return React.createElement(Time, { timestamp: timestamp, className: "ta-time-break" });
|
|
108
|
+
}
|
|
109
|
+
/** Above the first turn of another model (ProcessUtil.modelBreaks): the conversation goes on with it. */
|
|
110
|
+
function ModelBreak({ model }) {
|
|
111
|
+
const t = (0, use_t_1.useT)();
|
|
112
|
+
return (React.createElement("div", { className: "ta-model-break", title: model },
|
|
113
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ArrowRightLeft, size: 12 }),
|
|
114
|
+
React.createElement("span", null, t('ta.message.modelSwitched', { model: model.slice(model.indexOf('/') + 1) }))));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Quotes the reply in the message box, or the part of it selected: the button keeps the selection (no focus on
|
|
118
|
+
* a press), and takes it when it is in the same message.
|
|
119
|
+
*/
|
|
120
|
+
function QuoteButton({ text, quote }) {
|
|
121
|
+
const t = (0, use_t_1.useT)();
|
|
122
|
+
return (React.createElement(FooterButton, { icon: lucide_react_1.TextQuote, label: t('ta.message.quote'), onMouseDown: event => event.preventDefault(), onClick: event => { var _a; return quote((_a = quote_1.QuoteUtil.selected(event.currentTarget.closest('.ta-message'))) !== null && _a !== void 0 ? _a : text); } }));
|
|
91
123
|
}
|
|
92
124
|
/** Under a message of the user: when, copy, a new conversation from here, back to here. */
|
|
93
125
|
function UserFooter({ message, text }) {
|
|
@@ -100,16 +132,21 @@ function UserFooter({ message, text }) {
|
|
|
100
132
|
branches && React.createElement(FooterButton, { icon: lucide_react_1.GitFork, label: t('ta.message.forkBefore'), onClick: () => actions.fork(message, 'before') }),
|
|
101
133
|
branches && React.createElement(FooterButton, { icon: lucide_react_1.Undo2, label: t('ta.message.rewind'), onClick: () => actions.rewind(message) })));
|
|
102
134
|
}
|
|
103
|
-
/**
|
|
104
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Under a turn that ended: copy the reply, a new conversation from it, what to report, when, what it took.
|
|
137
|
+
* `latest`: the last turn of the conversation, whose footer a touch screen keeps (only its copy and fork;
|
|
138
|
+
* the rest, and the footers of the others, are in the menu of a held message).
|
|
139
|
+
*/
|
|
140
|
+
function TurnFooter({ messages, last, reply, session, latest, }) {
|
|
105
141
|
const t = (0, use_t_1.useT)();
|
|
106
142
|
const actions = React.useContext(exports.MessageActions);
|
|
107
143
|
const usage = React.useMemo(() => message_1.MessageUtil.usage(messages), [messages]);
|
|
108
144
|
const used = usage.input > 0 || usage.output > 0;
|
|
109
|
-
return (React.createElement("div", { className:
|
|
145
|
+
return (React.createElement("div", { className: latest ? 'ta-footer ta-footer-latest' : 'ta-footer' },
|
|
110
146
|
reply && React.createElement(CopyButton, { text: () => reply, icon: lucide_react_1.Copy, label: "ta.copy", done: "ta.copied" }),
|
|
147
|
+
reply && (actions === null || actions === void 0 ? void 0 : actions.quote) && React.createElement(QuoteButton, { text: reply, quote: actions.quote }),
|
|
111
148
|
last && actions && !actions.working && React.createElement(FooterButton, { icon: lucide_react_1.GitFork, label: t('ta.message.forkAt'), onClick: () => actions.fork(last, 'at') }),
|
|
112
|
-
last && React.createElement(CopyButton, { text: () => MessageFooterUtil.debugInfo(last, session), icon: lucide_react_1.Bug, label: "ta.message.debug", done: "ta.message.debugCopied" }),
|
|
149
|
+
last && (React.createElement(CopyButton, { text: () => MessageFooterUtil.debugInfo(last, session), icon: lucide_react_1.Bug, label: "ta.message.debug", done: "ta.message.debugCopied", className: "ta-footer-debug" })),
|
|
113
150
|
React.createElement(Time, { timestamp: last === null || last === void 0 ? void 0 : last.timestamp }),
|
|
114
151
|
used && (React.createElement("span", { className: "ta-footer-usage", title: t('ta.message.usageTitle', { input: usage.input, output: usage.output }) },
|
|
115
152
|
React.createElement("span", null, t('ta.message.used')),
|
|
@@ -1,19 +1,82 @@
|
|
|
1
1
|
import type { SessionState, ToolRun } from '@celljs/ta-client';
|
|
2
|
-
import { type TaSessionInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import { type ImageContent, type TaSessionInfo, TaSkillUse } from '@celljs/ta-protocol';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import type { Mood } from '../avatar/dino-avatar';
|
|
5
5
|
import { MessageUtil, type ToolOutput } from '../util/message';
|
|
6
6
|
import { type ProcessStep, type ThreadItem } from '../util/process';
|
|
7
|
+
import type { RowWindow } from './earlier-messages';
|
|
7
8
|
/** The session of the conversation: who answers in it may be drawn by the extension of its group. */
|
|
8
9
|
export declare const ConversationSession: React.Context<TaSessionInfo | undefined>;
|
|
10
|
+
/** What can be done with a message sent from here that failed to go. */
|
|
11
|
+
export interface OutboxActions {
|
|
12
|
+
resend(id: string): void;
|
|
13
|
+
discard(id: string): void;
|
|
14
|
+
}
|
|
9
15
|
/** Who answers, at the head of a turn: ta, or the avatar the extension of the session's group draws. */
|
|
10
16
|
export declare function TurnAvatar({ mood }: {
|
|
11
17
|
mood: Mood;
|
|
12
18
|
}): React.JSX.Element;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
type Blocks = ReturnType<typeof MessageUtil.blocks>;
|
|
20
|
+
type ImageBlock = Blocks[number] & {
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Where the images of the messages of the user come from that the conversation gave without their bytes
|
|
26
|
+
* (TaShownImage): by the timestamp of the message and the index of the block. Without it they show as their place.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MessageImages: React.Context<((timestamp: number, index: number) => Promise<ImageContent | undefined>) | undefined>;
|
|
29
|
+
export declare namespace UserImageUtil {
|
|
30
|
+
/** The images of a message the page can show, with their index among its blocks: with their bytes, or without (TaShownImage). */
|
|
31
|
+
function images(blocks: Blocks): {
|
|
32
|
+
block: ImageBlock;
|
|
33
|
+
index: number;
|
|
34
|
+
}[];
|
|
35
|
+
/** Its size in pixels: given (TaShownImage), or read from its bytes. */
|
|
36
|
+
function size(block: ImageBlock): {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
/** The box of one image alone, its shape kept, before it loads: nothing moves when it comes. */
|
|
41
|
+
function box(size: {
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
} | undefined): React.CSSProperties | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The images of a message of the user: one keeps its own shape at the size of a bubble, a few stand as
|
|
48
|
+
* squares of one size, and a click on any of them opens it full size over the page. Each has its place
|
|
49
|
+
* before it loads (its size is known), so that nothing moves as it comes. `timestamp`: of the message,
|
|
50
|
+
* for those given without their bytes (MessageImages).
|
|
51
|
+
*/
|
|
52
|
+
export declare function UserImages({ blocks, timestamp }: {
|
|
53
|
+
blocks: Blocks;
|
|
54
|
+
timestamp?: number;
|
|
55
|
+
}): React.JSX.Element | null;
|
|
56
|
+
/**
|
|
57
|
+
* What the user said, in the bubble of a message of theirs, with the pictures they sent with it in the same
|
|
58
|
+
* bubble: the pictures first, the words under them. A message of pictures alone has no bubble of its own.
|
|
59
|
+
* `bubble` is the class of that bubble, which a conversation and the double have of their own.
|
|
60
|
+
*/
|
|
61
|
+
export declare function UserSaid({ blocks, text, bubble, timestamp }: {
|
|
62
|
+
blocks: Blocks;
|
|
63
|
+
text: string;
|
|
64
|
+
bubble?: string;
|
|
65
|
+
timestamp?: number;
|
|
16
66
|
}): React.JSX.Element | null;
|
|
67
|
+
/**
|
|
68
|
+
* What a message of the user's shows, in a conversation and the double alike: without the context and the notes of
|
|
69
|
+
* pictures sent with it, a skill they ran (`/skill:name`) taken out of the words as the skill; `copied` is what they typed.
|
|
70
|
+
*/
|
|
71
|
+
export declare function userWords(blocks: Blocks): {
|
|
72
|
+
text: string;
|
|
73
|
+
copied: string;
|
|
74
|
+
skill?: TaSkillUse;
|
|
75
|
+
};
|
|
76
|
+
/** A skill the user ran: one line with its name, which opens to the skill's file, as a tool call opens. */
|
|
77
|
+
export declare function SkillUse({ skill }: {
|
|
78
|
+
skill: TaSkillUse;
|
|
79
|
+
}): React.JSX.Element;
|
|
17
80
|
/**
|
|
18
81
|
* The head of a turn and its work: the work in one line, "N steps", open while ta is at it, then folded,
|
|
19
82
|
* so that a long conversation reads as what was asked and what came of it. Before the first step the
|
|
@@ -31,8 +94,17 @@ export declare function Process({ steps, active, results, tools, leading, status
|
|
|
31
94
|
}): React.JSX.Element;
|
|
32
95
|
/** A turn that has shown nothing yet: what ta does goes on its head. */
|
|
33
96
|
export declare function quiet(item: ThreadItem | undefined): boolean;
|
|
34
|
-
/**
|
|
35
|
-
|
|
97
|
+
/**
|
|
98
|
+
* A turn that ends with its steps, no words after them: the line of what ta does is one more of its steps
|
|
99
|
+
* (.ta-run-steps). Said by the class, not by `:last-child` in `:has()`: WebKit does not style the line
|
|
100
|
+
* again when the words under the steps go into them, and it stayed out of line until something else drew.
|
|
101
|
+
*/
|
|
102
|
+
export declare function endsInSteps(item: ThreadItem | undefined): boolean;
|
|
103
|
+
/** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
|
|
104
|
+
export declare function MessageList({ state, outbox, rows }: {
|
|
36
105
|
state: SessionState;
|
|
106
|
+
outbox?: OutboxActions;
|
|
107
|
+
rows?: RowWindow;
|
|
37
108
|
}): React.JSX.Element;
|
|
109
|
+
export {};
|
|
38
110
|
//# sourceMappingURL=message-list.d.ts.map
|