@celljs/ta-web 4.10.0 → 4.12.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 +48 -24
- 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 +23 -15
- 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 +84 -20
- 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 +15 -4
- package/esm/browser/components/composer-box.js +139 -77
- package/esm/browser/components/composer.d.ts +9 -6
- package/esm/browser/components/composer.js +32 -4
- package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
- package/esm/browser/components/conversation-scroll-hooks.js +98 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
- package/esm/browser/components/conversation-scroll-util.js +56 -0
- package/esm/browser/components/conversation-scroll.d.ts +52 -31
- package/esm/browser/components/conversation-scroll.js +170 -129
- 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/face.d.ts +24 -0
- package/esm/browser/components/face.js +42 -0
- 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 +73 -7
- package/esm/browser/components/message-actions.js +3 -0
- package/esm/browser/components/message-footer.d.ts +8 -0
- package/esm/browser/components/message-footer.js +20 -3
- package/esm/browser/components/message-list.d.ts +60 -7
- package/esm/browser/components/message-list.js +206 -58
- 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 +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 +2 -3
- package/esm/browser/components/session-settings.js +1 -0
- package/esm/browser/components/session-view.d.ts +3 -1
- package/esm/browser/components/session-view.js +35 -21
- 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/stop-times.d.ts +47 -0
- package/esm/browser/components/stop-times.js +81 -0
- 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/use-stop-times.d.ts +3 -0
- package/esm/browser/components/use-stop-times.js +17 -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/photo-picker.d.ts +14 -0
- package/esm/browser/device/photo-picker.js +48 -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.d.ts +2 -0
- package/esm/browser/device/row-swipe.js +14 -3
- package/esm/browser/device/sheet-swipe.d.ts +1 -1
- package/esm/browser/device/sheet-swipe.js +25 -4
- 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 +16 -2
- package/esm/browser/extension/web-api-components.d.ts +287 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +394 -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 +186 -565
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +354 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +57 -7
- package/esm/browser/extension/web-extension-protocol.js +34 -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 +121 -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 +92 -2
- package/esm/browser/i18n/messages.d.ts +91 -1
- package/esm/browser/i18n/messages.js +187 -7
- package/esm/browser/index.d.ts +9 -0
- package/esm/browser/index.js +9 -0
- package/esm/browser/links/links-protocol.d.ts +7 -0
- package/esm/browser/links/links.d.ts +24 -7
- package/esm/browser/links/links.js +64 -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 +45 -5
- package/esm/browser/style/device.js +15 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +192 -56
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +39 -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 +32 -6
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +21 -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 +2 -0
- package/esm/browser/util/frame.js +2 -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 +57 -3
- package/esm/browser/util/process.js +123 -11
- 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 +46 -22
- 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 +22 -14
- 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 +80 -16
- 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 +15 -4
- package/lib/browser/components/composer-box.js +136 -74
- package/lib/browser/components/composer.d.ts +9 -6
- package/lib/browser/components/composer.js +31 -3
- package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
- package/lib/browser/components/conversation-scroll-hooks.js +135 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
- package/lib/browser/components/conversation-scroll-util.js +60 -0
- package/lib/browser/components/conversation-scroll.d.ts +52 -31
- package/lib/browser/components/conversation-scroll.js +171 -164
- 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/face.d.ts +25 -0
- package/lib/browser/components/face.js +79 -0
- 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 +73 -7
- package/lib/browser/components/message-actions.js +3 -0
- package/lib/browser/components/message-footer.d.ts +8 -0
- package/lib/browser/components/message-footer.js +20 -2
- package/lib/browser/components/message-list.d.ts +60 -7
- package/lib/browser/components/message-list.js +206 -55
- 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 +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 +2 -3
- package/lib/browser/components/session-settings.js +1 -0
- package/lib/browser/components/session-view.d.ts +3 -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.js +43 -12
- package/lib/browser/components/stop-times.d.ts +48 -0
- package/lib/browser/components/stop-times.js +85 -0
- 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/use-stop-times.d.ts +4 -0
- package/lib/browser/components/use-stop-times.js +53 -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/photo-picker.d.ts +15 -0
- package/lib/browser/device/photo-picker.js +51 -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.d.ts +2 -0
- package/lib/browser/device/row-swipe.js +14 -3
- package/lib/browser/device/sheet-swipe.d.ts +1 -1
- package/lib/browser/device/sheet-swipe.js +25 -4
- 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 +15 -1
- package/lib/browser/extension/web-api-components.d.ts +288 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +395 -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 +186 -565
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +391 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +57 -7
- package/lib/browser/extension/web-extension-protocol.js +35 -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 +117 -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 +92 -2
- package/lib/browser/i18n/messages.d.ts +91 -1
- package/lib/browser/i18n/messages.js +187 -7
- package/lib/browser/index.d.ts +9 -0
- package/lib/browser/index.js +9 -0
- package/lib/browser/links/links-protocol.d.ts +7 -0
- package/lib/browser/links/links.d.ts +24 -7
- package/lib/browser/links/links.js +64 -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 +45 -5
- package/lib/browser/style/device.js +15 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +192 -56
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +39 -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 +32 -6
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +21 -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 +2 -0
- package/lib/browser/util/frame.js +2 -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 +57 -3
- package/lib/browser/util/process.js +125 -12
- 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,9 +1,10 @@
|
|
|
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>;
|
|
9
10
|
/** What can be done with a message sent from here that failed to go. */
|
|
@@ -16,31 +17,76 @@ export declare function TurnAvatar({ mood }: {
|
|
|
16
17
|
mood: Mood;
|
|
17
18
|
}): React.JSX.Element;
|
|
18
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
|
+
}
|
|
19
46
|
/**
|
|
20
47
|
* The images of a message of the user: one keeps its own shape at the size of a bubble, a few stand as
|
|
21
|
-
* squares of one size, and a click on any of them opens it full size over the page.
|
|
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).
|
|
22
51
|
*/
|
|
23
|
-
export declare function UserImages({ blocks }: {
|
|
52
|
+
export declare function UserImages({ blocks, timestamp }: {
|
|
24
53
|
blocks: Blocks;
|
|
54
|
+
timestamp?: number;
|
|
25
55
|
}): React.JSX.Element | null;
|
|
26
56
|
/**
|
|
27
57
|
* What the user said, in the bubble of a message of theirs, with the pictures they sent with it in the same
|
|
28
58
|
* bubble: the pictures first, the words under them. A message of pictures alone has no bubble of its own.
|
|
29
59
|
* `bubble` is the class of that bubble, which a conversation and the double have of their own.
|
|
30
60
|
*/
|
|
31
|
-
export declare function UserSaid({ blocks, text, bubble }: {
|
|
61
|
+
export declare function UserSaid({ blocks, text, bubble, timestamp }: {
|
|
32
62
|
blocks: Blocks;
|
|
33
63
|
text: string;
|
|
34
64
|
bubble?: string;
|
|
65
|
+
timestamp?: number;
|
|
35
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;
|
|
36
80
|
/**
|
|
37
81
|
* The head of a turn and its work: the work in one line, "N steps", open while ta is at it, then folded,
|
|
38
82
|
* so that a long conversation reads as what was asked and what came of it. Before the first step the
|
|
39
83
|
* line says what ta does. The avatar stays the same element from the turn's first frame to its last.
|
|
40
84
|
*/
|
|
41
|
-
export declare function Process({ steps, active, results, tools, leading, status, }: {
|
|
85
|
+
export declare function Process({ steps, active, results, tools, leading, status, stopped, }: {
|
|
42
86
|
steps: ProcessStep[];
|
|
43
87
|
active: boolean;
|
|
88
|
+
/** It ended before it was done (an error, cut off, no reply): its work stays open, the latest steps of it. */
|
|
89
|
+
stopped?: boolean;
|
|
44
90
|
results: Map<string, ToolOutput>;
|
|
45
91
|
tools: Record<string, ToolRun>;
|
|
46
92
|
/** Before the head, on its line: the avatar of the turn. */
|
|
@@ -50,10 +96,17 @@ export declare function Process({ steps, active, results, tools, leading, status
|
|
|
50
96
|
}): React.JSX.Element;
|
|
51
97
|
/** A turn that has shown nothing yet: what ta does goes on its head. */
|
|
52
98
|
export declare function quiet(item: ThreadItem | undefined): boolean;
|
|
53
|
-
/**
|
|
54
|
-
|
|
99
|
+
/**
|
|
100
|
+
* A turn that ends with its steps, no words after them: the line of what ta does is one more of its steps
|
|
101
|
+
* (.ta-run-steps). Said by the class, not by `:last-child` in `:has()`: WebKit does not style the line
|
|
102
|
+
* again when the words under the steps go into them, and it stayed out of line until something else drew.
|
|
103
|
+
*/
|
|
104
|
+
export declare function endsInSteps(item: ThreadItem | undefined): boolean;
|
|
105
|
+
/** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
|
|
106
|
+
export declare function MessageList({ state, outbox, rows }: {
|
|
55
107
|
state: SessionState;
|
|
56
108
|
outbox?: OutboxActions;
|
|
109
|
+
rows?: RowWindow;
|
|
57
110
|
}): React.JSX.Element;
|
|
58
111
|
export {};
|
|
59
112
|
//# sourceMappingURL=message-list.d.ts.map
|
|
@@ -33,18 +33,23 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ConversationSession = void 0;
|
|
36
|
+
exports.UserImageUtil = exports.MessageImages = exports.ConversationSession = void 0;
|
|
37
37
|
exports.TurnAvatar = TurnAvatar;
|
|
38
38
|
exports.UserImages = UserImages;
|
|
39
39
|
exports.UserSaid = UserSaid;
|
|
40
|
+
exports.userWords = userWords;
|
|
41
|
+
exports.SkillUse = SkillUse;
|
|
40
42
|
exports.Process = Process;
|
|
41
43
|
exports.quiet = quiet;
|
|
44
|
+
exports.endsInSteps = endsInSteps;
|
|
42
45
|
exports.MessageList = MessageList;
|
|
43
46
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
44
47
|
const lucide_react_1 = require("lucide-react");
|
|
45
48
|
const React = __importStar(require("react"));
|
|
46
49
|
const extension_view_1 = require("../extension/extension-view");
|
|
47
50
|
const use_t_1 = require("../i18n/use-t");
|
|
51
|
+
const code_renderers_1 = require("../markdown/code-renderers");
|
|
52
|
+
const lazy_1 = require("../markdown/lazy");
|
|
48
53
|
const message_1 = require("../util/message");
|
|
49
54
|
const process_1 = require("../util/process");
|
|
50
55
|
const tool_1 = require("../util/tool");
|
|
@@ -56,6 +61,7 @@ const markdown_1 = require("./markdown");
|
|
|
56
61
|
const message_footer_1 = require("./message-footer");
|
|
57
62
|
const message_menu_1 = require("./message-menu");
|
|
58
63
|
const run_status_1 = require("./run-status");
|
|
64
|
+
const said_text_1 = require("./said-text");
|
|
59
65
|
const ta_avatar_1 = require("./ta-avatar");
|
|
60
66
|
const tool_view_1 = require("./tool-view");
|
|
61
67
|
/** The session of the conversation: who answers in it may be drawn by the extension of its group. */
|
|
@@ -86,6 +92,8 @@ function TurnAvatar({ mood }) {
|
|
|
86
92
|
React.createElement(Avatar, { session: session, mood: mood, size: 24 })));
|
|
87
93
|
}
|
|
88
94
|
const TASK_UPDATE = /^<task_update id="[^"]+" title="([^"]*)" status="(\w+)">\n?([\s\S]*?)\n?<\/task_update>$/;
|
|
95
|
+
/** AssistantTaskUtil.renamedNote. */
|
|
96
|
+
const TASK_RENAMED = /^<task_renamed id="[^"]+" was="[^"]+"/;
|
|
89
97
|
/** What the double of the web client told ta about a task that ended: a note, not something the user said. */
|
|
90
98
|
function TaskUpdate({ title, status, result }) {
|
|
91
99
|
const t = (0, use_t_1.useT)();
|
|
@@ -96,53 +104,148 @@ function TaskUpdate({ title, status, result }) {
|
|
|
96
104
|
t(`ta.task.${status}`)),
|
|
97
105
|
React.createElement(markdown_1.Markdown, { text: result })));
|
|
98
106
|
}
|
|
99
|
-
/**
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Where the images of the messages of the user come from that the conversation gave without their bytes
|
|
109
|
+
* (TaShownImage): by the timestamp of the message and the index of the block. Without it they show as their place.
|
|
110
|
+
*/
|
|
111
|
+
exports.MessageImages = React.createContext(undefined);
|
|
112
|
+
/** The images shown lately, by message and block: drawn again at once, in this conversation or another view of it. */
|
|
113
|
+
const shownImages = new lazy_1.Recent(48);
|
|
114
|
+
/** The size of the images with their bytes, read once. */
|
|
115
|
+
const sizes = new WeakMap();
|
|
116
|
+
/** How large one image of a message is drawn, at most. */
|
|
117
|
+
const ONE_IMAGE = { width: 220, height: 280 };
|
|
118
|
+
var UserImageUtil;
|
|
119
|
+
(function (UserImageUtil) {
|
|
120
|
+
/** The images of a message the page can show, with their index among its blocks: with their bytes, or without (TaShownImage). */
|
|
121
|
+
function images(blocks) {
|
|
122
|
+
return blocks.flatMap((block, index) => { var _a; return block.type === 'image' && ((_a = block.mimeType) === null || _a === void 0 ? void 0 : _a.startsWith('image/')) && typeof block.data === 'string' ? [{ block: block, index }] : []; });
|
|
123
|
+
}
|
|
124
|
+
UserImageUtil.images = images;
|
|
125
|
+
/** Its size in pixels: given (TaShownImage), or read from its bytes. */
|
|
126
|
+
function size(block) {
|
|
127
|
+
if (block.width && block.height) {
|
|
128
|
+
return { width: block.width, height: block.height };
|
|
129
|
+
}
|
|
130
|
+
if (!block.data) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
if (!sizes.has(block)) {
|
|
134
|
+
sizes.set(block, ta_protocol_1.TaImageSize.of(block.data));
|
|
135
|
+
}
|
|
136
|
+
return sizes.get(block);
|
|
137
|
+
}
|
|
138
|
+
UserImageUtil.size = size;
|
|
139
|
+
/** The box of one image alone, its shape kept, before it loads: nothing moves when it comes. */
|
|
140
|
+
function box(size) {
|
|
141
|
+
if (!size) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
const scale = Math.min(1, ONE_IMAGE.width / size.width, ONE_IMAGE.height / size.height);
|
|
145
|
+
return { width: Math.max(1, Math.round(size.width * scale)), aspectRatio: `${size.width} / ${size.height}` };
|
|
146
|
+
}
|
|
147
|
+
UserImageUtil.box = box;
|
|
148
|
+
})(UserImageUtil || (exports.UserImageUtil = UserImageUtil = {}));
|
|
149
|
+
/** The URLs of the images of a message: those with their bytes at once, the others as `MessageImages` gives them. */
|
|
150
|
+
function useImageSources(images, timestamp) {
|
|
151
|
+
const load = React.useContext(exports.MessageImages);
|
|
152
|
+
const keyOf = (index) => (timestamp === undefined ? undefined : `${timestamp}:${index}`);
|
|
153
|
+
const own = images.map(({ block, index }) => {
|
|
154
|
+
const key = keyOf(index);
|
|
155
|
+
return block.data ? `data:${block.mimeType};base64,${block.data}` : key ? shownImages.get(key) : undefined;
|
|
156
|
+
});
|
|
157
|
+
const [loaded, setLoaded] = React.useState({});
|
|
158
|
+
const wanted = images.filter((image, at) => !own[at] && !loaded[image.index]).map(image => image.index);
|
|
159
|
+
const missing = wanted.join(',');
|
|
160
|
+
// Asked again only for other images: `missing` says which.
|
|
161
|
+
React.useEffect(() => {
|
|
162
|
+
if (!load || timestamp === undefined || !missing) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
let live = true;
|
|
166
|
+
for (const index of missing.split(',').map(Number)) {
|
|
167
|
+
load(timestamp, index).then(image => {
|
|
168
|
+
if (image === null || image === void 0 ? void 0 : image.data) {
|
|
169
|
+
const url = `data:${image.mimeType};base64,${image.data}`;
|
|
170
|
+
shownImages.set(`${timestamp}:${index}`, url);
|
|
171
|
+
if (live) {
|
|
172
|
+
setLoaded(current => ({ ...current, [index]: url }));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, () => undefined);
|
|
176
|
+
}
|
|
177
|
+
return () => {
|
|
178
|
+
live = false;
|
|
179
|
+
};
|
|
180
|
+
}, [load, timestamp, missing]);
|
|
181
|
+
// Those with their bytes are kept too: the same message given again without them (the conversation read again) shows them at once.
|
|
182
|
+
React.useEffect(() => {
|
|
183
|
+
images.forEach(({ block, index }, at) => {
|
|
184
|
+
const key = keyOf(index);
|
|
185
|
+
if (block.data && key && own[at]) {
|
|
186
|
+
shownImages.set(key, own[at]);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
return images.map(({ index }, at) => { var _a; return (_a = own[at]) !== null && _a !== void 0 ? _a : loaded[index]; });
|
|
102
191
|
}
|
|
103
192
|
/**
|
|
104
193
|
* The images of a message of the user: one keeps its own shape at the size of a bubble, a few stand as
|
|
105
|
-
* squares of one size, and a click on any of them opens it full size over the page.
|
|
194
|
+
* squares of one size, and a click on any of them opens it full size over the page. Each has its place
|
|
195
|
+
* before it loads (its size is known), so that nothing moves as it comes. `timestamp`: of the message,
|
|
196
|
+
* for those given without their bytes (MessageImages).
|
|
106
197
|
*/
|
|
107
|
-
function UserImages({ blocks }) {
|
|
198
|
+
function UserImages({ blocks, timestamp }) {
|
|
108
199
|
const t = (0, use_t_1.useT)();
|
|
109
200
|
const [open, setOpen] = React.useState();
|
|
110
|
-
const images =
|
|
201
|
+
const images = UserImageUtil.images(blocks);
|
|
202
|
+
const sources = useImageSources(images, timestamp);
|
|
111
203
|
if (images.length === 0) {
|
|
112
204
|
return null;
|
|
113
205
|
}
|
|
114
|
-
const
|
|
206
|
+
const single = images.length === 1 ? UserImageUtil.box(UserImageUtil.size(images[0].block)) : undefined;
|
|
207
|
+
const shown = open !== undefined ? sources[open] : undefined;
|
|
115
208
|
return (React.createElement("div", { className: "ta-user-images", "data-count": Math.min(images.length, 3) },
|
|
116
|
-
images.map((
|
|
117
|
-
|
|
118
|
-
open !== undefined && images[open] && React.createElement(lightbox_1.Lightbox, { src: src(images[open]), alt: "", onClose: () => setOpen(undefined) })));
|
|
209
|
+
images.map(({ index }, at) => (React.createElement("button", { key: index, type: "button", className: "ta-user-image", title: t('ta.markdown.enlarge'), disabled: !sources[at], onClick: () => setOpen(at) }, sources[at] ? (React.createElement("img", { className: "ta-thumb", src: sources[at], alt: "", style: single })) : (React.createElement("span", { className: "ta-thumb ta-thumb-waiting", style: single }))))),
|
|
210
|
+
open !== undefined && shown && (React.createElement(lightbox_1.Lightbox, { src: shown, alt: "", onClose: () => setOpen(undefined), onPrevious: open > 0 && sources[open - 1] ? () => setOpen(open - 1) : undefined, onNext: open < images.length - 1 && sources[open + 1] ? () => setOpen(open + 1) : undefined }))));
|
|
119
211
|
}
|
|
120
212
|
/**
|
|
121
213
|
* What the user said, in the bubble of a message of theirs, with the pictures they sent with it in the same
|
|
122
214
|
* bubble: the pictures first, the words under them. A message of pictures alone has no bubble of its own.
|
|
123
215
|
* `bubble` is the class of that bubble, which a conversation and the double have of their own.
|
|
124
216
|
*/
|
|
125
|
-
function UserSaid({ blocks, text, bubble = 'ta-bubble' }) {
|
|
126
|
-
if (
|
|
127
|
-
return text ? React.createElement("div", { className: bubble },
|
|
217
|
+
function UserSaid({ blocks, text, bubble = 'ta-bubble', timestamp }) {
|
|
218
|
+
if (UserImageUtil.images(blocks).length === 0) {
|
|
219
|
+
return text ? (React.createElement("div", { className: bubble },
|
|
220
|
+
React.createElement(said_text_1.SaidText, { text: text }))) : null;
|
|
128
221
|
}
|
|
129
222
|
return (React.createElement("div", { className: `${bubble} ta-bubble-media${text ? '' : ' ta-bubble-bare'}` },
|
|
130
|
-
React.createElement(UserImages, { blocks: blocks }),
|
|
131
|
-
text && React.createElement(
|
|
223
|
+
React.createElement(UserImages, { blocks: blocks, timestamp: timestamp }),
|
|
224
|
+
text && React.createElement(said_text_1.SaidText, { text: text, className: "ta-bubble-text" })));
|
|
132
225
|
}
|
|
133
226
|
function UserMessage({ message }) {
|
|
134
|
-
var _a;
|
|
135
227
|
const blocks = message_1.MessageUtil.blocks(message);
|
|
136
|
-
const
|
|
228
|
+
const said = message_1.MessageUtil.text(blocks).trim();
|
|
229
|
+
if (TASK_RENAMED.test(said)) {
|
|
230
|
+
// The double's conversation opened as a conversation: what told it a task's new id is for it only.
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
const update = TASK_UPDATE.exec(said);
|
|
137
234
|
if (update) {
|
|
138
235
|
return React.createElement(TaskUpdate, { title: update[1], status: update[2], result: update[3] });
|
|
139
236
|
}
|
|
140
|
-
const
|
|
237
|
+
const { text, copied, skill } = userWords(blocks);
|
|
238
|
+
return React.createElement(UserBubble, { message: message, blocks: blocks, text: text, copied: copied, skill: skill });
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* What a message of the user's shows, in a conversation and the double alike: without the context and the notes of
|
|
242
|
+
* pictures sent with it, a skill they ran (`/skill:name`) taken out of the words as the skill; `copied` is what they typed.
|
|
243
|
+
*/
|
|
244
|
+
function userWords(blocks) {
|
|
245
|
+
var _a;
|
|
246
|
+
const said = ta_protocol_1.TaImageNote.strip(ta_protocol_1.TaMessageContext.strip(message_1.MessageUtil.text(blocks))).trim();
|
|
141
247
|
const skill = ta_protocol_1.TaSkillUse.parse(said);
|
|
142
|
-
|
|
143
|
-
return React.createElement(UserBubble, { message: message, blocks: blocks, text: (_a = skill.message) !== null && _a !== void 0 ? _a : '', copied: ta_protocol_1.TaSkillUse.command(skill), skill: skill });
|
|
144
|
-
}
|
|
145
|
-
return React.createElement(UserBubble, { message: message, blocks: blocks, text: said, copied: said });
|
|
248
|
+
return skill ? { text: (_a = skill.message) !== null && _a !== void 0 ? _a : '', copied: ta_protocol_1.TaSkillUse.command(skill), skill } : { text: said, copied: said };
|
|
146
249
|
}
|
|
147
250
|
/** pi's first line of a skill it read, for the model: the path is in the title of the skill's line. */
|
|
148
251
|
const SKILL_BASE = /^References are relative to [^\n]*\n+/;
|
|
@@ -166,12 +269,12 @@ function UserBubble({ message, blocks, text, copied, skill, }) {
|
|
|
166
269
|
if (sent) {
|
|
167
270
|
// Not in the session yet: nothing to branch from or rewind to.
|
|
168
271
|
return (React.createElement("div", { className: `ta-message ta-user ${sent.failed ? 'ta-user-failed' : 'ta-user-sending'}` },
|
|
169
|
-
React.createElement(UserSaid, { blocks: blocks, text: text }),
|
|
272
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
|
|
170
273
|
sent.failed ? React.createElement(SendFailed, { sent: sent, actions: outbox.actions }) : React.createElement("div", { className: "ta-footer" })));
|
|
171
274
|
}
|
|
172
275
|
return (React.createElement("div", { className: "ta-message ta-user", onContextMenu: onContextMenu },
|
|
173
276
|
skill && React.createElement(SkillUse, { skill: skill }),
|
|
174
|
-
React.createElement(UserSaid, { blocks: blocks, text: text }),
|
|
277
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
|
|
175
278
|
React.createElement(message_footer_1.UserFooter, { message: message, text: copied }),
|
|
176
279
|
menu));
|
|
177
280
|
}
|
|
@@ -197,20 +300,33 @@ const SummaryStep = React.memo(function SummaryStep({ text }) {
|
|
|
197
300
|
React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-step-chevron" })),
|
|
198
301
|
open && React.createElement("div", { className: "ta-thinking-text" }, text)));
|
|
199
302
|
});
|
|
200
|
-
|
|
303
|
+
/** A request that failed on the way, the work going on after it: one quiet line, which opens to the error. */
|
|
304
|
+
const ErrorStep = React.memo(function ErrorStep({ text }) {
|
|
305
|
+
const t = (0, use_t_1.useT)();
|
|
306
|
+
const [open, setOpen] = React.useState(false);
|
|
307
|
+
return (React.createElement("div", { className: "ta-step-thinking ta-step-error" },
|
|
308
|
+
React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
|
|
309
|
+
React.createElement("span", { className: "ta-status ta-status-error" }),
|
|
310
|
+
React.createElement("span", { className: "ta-step-tag" }, t('ta.process.retried')),
|
|
311
|
+
!open && text && React.createElement("span", { className: "ta-step-preview" }, process_1.ProcessUtil.preview(text))),
|
|
312
|
+
open && text && React.createElement("div", { className: "ta-thinking-text" }, text)));
|
|
313
|
+
});
|
|
314
|
+
const TextStep = React.memo(function TextStep({ text, streaming }) {
|
|
201
315
|
return (React.createElement("div", { className: "ta-step-text" },
|
|
202
316
|
React.createElement("span", { className: "ta-status ta-status-thought" }),
|
|
203
|
-
React.createElement(markdown_1.Markdown, { text: text })));
|
|
317
|
+
React.createElement(markdown_1.Markdown, { text: text, streaming: streaming })));
|
|
204
318
|
});
|
|
205
|
-
function Step({ step, results, tools, tagged }) {
|
|
319
|
+
function Step({ step, results, tools, tagged, streaming, }) {
|
|
206
320
|
var _a;
|
|
207
321
|
switch (step.kind) {
|
|
208
322
|
case 'thinking':
|
|
209
323
|
return React.createElement(ThinkingStep, { text: step.text, tagged: tagged });
|
|
210
324
|
case 'text':
|
|
211
|
-
return React.createElement(TextStep, { text: step.text });
|
|
325
|
+
return React.createElement(TextStep, { text: step.text, streaming: streaming });
|
|
212
326
|
case 'summary':
|
|
213
327
|
return React.createElement(SummaryStep, { text: step.text });
|
|
328
|
+
case 'error':
|
|
329
|
+
return React.createElement(ErrorStep, { text: step.text });
|
|
214
330
|
default: {
|
|
215
331
|
const { id = '', name = '', arguments: args } = step.call;
|
|
216
332
|
return (React.createElement(tool_view_1.ToolView, { id: id, name: name, args: (_a = args) !== null && _a !== void 0 ? _a : {}, run: id ? tools[id] : undefined, message: id ? results.get(id) : undefined, runs: tools }));
|
|
@@ -276,17 +392,24 @@ function useFold(open, ref, slideOpen) {
|
|
|
276
392
|
* so that a long conversation reads as what was asked and what came of it. Before the first step the
|
|
277
393
|
* line says what ta does. The avatar stays the same element from the turn's first frame to its last.
|
|
278
394
|
*/
|
|
279
|
-
function Process({ steps, active, results, tools, leading, status, }) {
|
|
395
|
+
function Process({ steps, active, results, tools, leading, status, stopped, }) {
|
|
280
396
|
const t = (0, use_t_1.useT)();
|
|
281
397
|
const [manual, setManual] = React.useState();
|
|
282
398
|
const [showAll, setShowAll] = React.useState(false);
|
|
283
399
|
const id = React.useId();
|
|
284
400
|
const stepsRef = React.useRef(null);
|
|
285
401
|
const { steps: count, failed } = tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps), results, tools);
|
|
286
|
-
// Open while it works, then folded; a failed step says so on the head, quietly.
|
|
287
|
-
|
|
402
|
+
// Open while it works, then folded; a failed step says so on the head, quietly. A turn that stopped short keeps
|
|
403
|
+
// its work open: there is no reply, and its last steps say where it stopped.
|
|
404
|
+
const open = manual !== null && manual !== void 0 ? manual : (active || !!stopped);
|
|
288
405
|
const shown = useFold(open && steps.length > 0, stepsRef, !active);
|
|
289
|
-
const folded = process_1.ProcessUtil.fold(steps, active, showAll);
|
|
406
|
+
const folded = process_1.ProcessUtil.fold(steps, active || !!stopped, showAll);
|
|
407
|
+
// Folded, the cards on the way stay under the head: a choice asked in the middle is not hidden with the work.
|
|
408
|
+
const renderers = React.useContext(code_renderers_1.CodeRenderers);
|
|
409
|
+
const pinned = open ? [] : steps.filter(step => process_1.ProcessUtil.pinned(step, renderers));
|
|
410
|
+
const inline = pinned.length ? folded.steps.filter(step => !process_1.ProcessUtil.pinned(step, renderers)) : folded.steps;
|
|
411
|
+
// The earlier steps count as the head does: the calls among them, not the thoughts.
|
|
412
|
+
const earlier = folded.hidden ? tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps.slice(0, folded.hidden)), results, tools).steps : 0;
|
|
290
413
|
// Only thoughts: the head already says so, the steps need not say it again.
|
|
291
414
|
const thoughtOnly = steps.every(step => step.kind === 'thinking');
|
|
292
415
|
const title = count ? t(active ? 'ta.process.running' : 'ta.process.done', { count }) : t(active ? 'ta.process.thinking' : 'ta.process.thought');
|
|
@@ -300,21 +423,31 @@ function Process({ steps, active, results, tools, leading, status, }) {
|
|
|
300
423
|
t('ta.process.failed', { count: failed })),
|
|
301
424
|
React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-process-chevron" }))) : (status)),
|
|
302
425
|
shown && (React.createElement("div", { id: id, ref: stepsRef, className: "ta-process-steps" },
|
|
303
|
-
folded.hidden > 0 && (React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setShowAll(true) }, t('ta.process.earlier', { count:
|
|
304
|
-
|
|
426
|
+
folded.hidden > 0 && (React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setShowAll(true) }, earlier ? t('ta.process.earlier', { count: earlier }) : t('ta.process.showAll'))),
|
|
427
|
+
inline.map((step, index) => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly, streaming: active && index === inline.length - 1 }))))),
|
|
428
|
+
pinned.map(step => (React.createElement(markdown_1.Markdown, { key: step.key, text: step.text })))));
|
|
305
429
|
}
|
|
306
430
|
/** A turn that has shown nothing yet: what ta does goes on its head. */
|
|
307
431
|
function quiet(item) {
|
|
308
432
|
return (item === null || item === void 0 ? void 0 : item.kind) === 'turn' && item.active && !item.steps.length && !item.reply.some(text => text.trim());
|
|
309
433
|
}
|
|
434
|
+
/**
|
|
435
|
+
* A turn that ends with its steps, no words after them: the line of what ta does is one more of its steps
|
|
436
|
+
* (.ta-run-steps). Said by the class, not by `:last-child` in `:has()`: WebKit does not style the line
|
|
437
|
+
* again when the words under the steps go into them, and it stayed out of line until something else drew.
|
|
438
|
+
*/
|
|
439
|
+
function endsInSteps(item) {
|
|
440
|
+
return (item === null || item === void 0 ? void 0 : item.kind) === 'turn' && item.steps.length > 0 && !item.reply.length;
|
|
441
|
+
}
|
|
310
442
|
function Turn({ item, tools, mood, status, latest, }) {
|
|
311
443
|
var _a;
|
|
312
444
|
const t = (0, use_t_1.useT)();
|
|
313
445
|
const session = React.useContext(exports.ConversationSession);
|
|
314
446
|
const results = message_1.MessageUtil.results(item.messages);
|
|
315
447
|
const { errorMessage } = ((_a = item.last) !== null && _a !== void 0 ? _a : {});
|
|
316
|
-
const
|
|
448
|
+
const ending = process_1.ProcessUtil.ending(item);
|
|
317
449
|
const reply = item.reply.join('\n\n').trim();
|
|
450
|
+
const actions = React.useContext(message_footer_1.MessageActions);
|
|
318
451
|
const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({
|
|
319
452
|
kind: 'turn',
|
|
320
453
|
last: item.active ? undefined : item.last,
|
|
@@ -323,13 +456,25 @@ function Turn({ item, tools, mood, status, latest, }) {
|
|
|
323
456
|
messages: item.messages,
|
|
324
457
|
});
|
|
325
458
|
return (React.createElement("div", { className: `ta-message ta-assistant ${item.active ? 'ta-turn-live' : ''}`, onContextMenu: onContextMenu },
|
|
326
|
-
React.createElement(Process, { steps: item.steps, active: item.active, results: results, tools: tools, leading: React.createElement(TurnAvatar, { mood: mood }), status: status }),
|
|
459
|
+
React.createElement(Process, { steps: item.steps, active: item.active, stopped: ending !== undefined && ending !== 'aborted', results: results, tools: tools, leading: React.createElement(TurnAvatar, { mood: mood }), status: status }),
|
|
327
460
|
item.reply.map((text, index) => (React.createElement(markdown_1.Markdown, { key: index, text: text, streaming: item.active && index === item.reply.length - 1 }))),
|
|
328
|
-
|
|
329
|
-
|
|
461
|
+
ending && ending !== 'aborted' && (React.createElement(TurnEnd, { ending: ending, error: errorMessage, retries: item.steps.filter(step => step.kind === 'error').length, resume: latest && !(actions === null || actions === void 0 ? void 0 : actions.working) ? actions === null || actions === void 0 ? void 0 : actions.resume : undefined })),
|
|
462
|
+
ending === 'aborted' && React.createElement("div", { className: "ta-muted ta-small" }, t('ta.message.stopped')),
|
|
330
463
|
!item.active && React.createElement(message_footer_1.TurnFooter, { messages: item.messages, last: item.last, reply: reply, session: session, latest: latest }),
|
|
331
464
|
menu));
|
|
332
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* Why a turn stopped short, under it: the error (and that pi retried it, how many times), or that it was cut off,
|
|
468
|
+
* or ended without a word; the last turn has a button to go on, which says so to the agent.
|
|
469
|
+
*/
|
|
470
|
+
function TurnEnd({ ending, error, retries, resume }) {
|
|
471
|
+
const t = (0, use_t_1.useT)();
|
|
472
|
+
const action = resume && (React.createElement("button", { type: "button", className: "ta-button", onClick: resume }, t('ta.message.resume')));
|
|
473
|
+
if (ending === 'error') {
|
|
474
|
+
return (React.createElement(callout_1.Callout, { level: "error", detail: retries ? t('ta.message.retriedFailed', { count: retries }) : undefined, action: action }, (error === null || error === void 0 ? void 0 : error.trim()) || t('ta.message.failedUnknown')));
|
|
475
|
+
}
|
|
476
|
+
return (React.createElement(callout_1.Callout, { level: "warning", action: action }, t(ending === 'interrupted' ? 'ta.message.interrupted' : 'ta.message.silent')));
|
|
477
|
+
}
|
|
333
478
|
/** `!command` of a user, which pi records as its own kind of message. */
|
|
334
479
|
function BashMessage({ message }) {
|
|
335
480
|
const { command, output, exitCode } = message;
|
|
@@ -379,28 +524,33 @@ const ThreadRow = React.memo(function ThreadRow({ item, tools, mood, status, lat
|
|
|
379
524
|
(next.item.kind === 'message' || !next.item.active || previous.tools === next.tools));
|
|
380
525
|
/** The last rows, which change and are in view, are always laid out. */
|
|
381
526
|
const SETTLED_AFTER = 4;
|
|
382
|
-
/** The conversation; tool results show with the calls they answer. */
|
|
383
|
-
function MessageList({ state, outbox }) {
|
|
527
|
+
/** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
|
|
528
|
+
function MessageList({ state, outbox, rows }) {
|
|
384
529
|
var _a;
|
|
385
|
-
|
|
530
|
+
var _b;
|
|
386
531
|
const renderers = React.useContext(extension_view_1.MessageRenderers);
|
|
532
|
+
const items = React.useMemo(() => process_1.ProcessUtil.items(state.messages, state.working, state.start, renderers), [state.messages, state.working, state.start, renderers]);
|
|
387
533
|
const breaks = React.useMemo(() => process_1.ProcessUtil.timeBreaks(process_1.ProcessUtil.starts(items), index => process_1.ProcessUtil.shown(items[index], renderers)), [items, renderers]);
|
|
534
|
+
const models = React.useMemo(() => process_1.ProcessUtil.modelBreaks(items), [items]);
|
|
388
535
|
const sent = React.useMemo(() => { var _a; return ({ of: new Map(((_a = state.outbox) !== null && _a !== void 0 ? _a : []).map(message => [message.message, message])), actions: outbox }); }, [state.outbox, outbox]);
|
|
536
|
+
// The rows held back: those before the latest `rows.rows`.
|
|
537
|
+
const from = rows ? Math.max(0, items.length - rows.rows) : 0;
|
|
538
|
+
if (rows) {
|
|
539
|
+
rows.hidden.current = from;
|
|
540
|
+
}
|
|
389
541
|
// Rows of earlier messages put in front are laid out once before they may skip it (content-visibility):
|
|
390
542
|
// their height is then known, and the view does not move as they come near it.
|
|
391
|
-
const firstKey = React.useRef((_a = items[
|
|
392
|
-
const front = Math.max(
|
|
543
|
+
const firstKey = React.useRef((_a = items[from]) === null || _a === void 0 ? void 0 : _a.key);
|
|
544
|
+
const front = Math.max(from, items.findIndex(item => item.key === firstKey.current));
|
|
393
545
|
React.useLayoutEffect(() => {
|
|
394
546
|
var _a;
|
|
395
|
-
firstKey.current = (_a = items[
|
|
547
|
+
firstKey.current = (_a = items[from]) === null || _a === void 0 ? void 0 : _a.key;
|
|
396
548
|
});
|
|
397
|
-
// Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again,
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
count.current = items.length;
|
|
549
|
+
// Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again,
|
|
550
|
+
// and those already there when earlier messages come in front of them, still: by key, not by index.
|
|
551
|
+
const freshRows = React.useRef(undefined);
|
|
552
|
+
(_b = freshRows.current) !== null && _b !== void 0 ? _b : (freshRows.current = new process_1.FreshRows(items));
|
|
553
|
+
const fresh = freshRows.current.from(items);
|
|
404
554
|
let lastTurn = items.length - 1;
|
|
405
555
|
while (lastTurn >= 0 && items[lastTurn].kind !== 'turn') {
|
|
406
556
|
lastTurn--;
|
|
@@ -411,17 +561,18 @@ function MessageList({ state, outbox }) {
|
|
|
411
561
|
const status = state.working || state.compacting ? React.createElement(run_status_1.RunStatus, { state: state }) : undefined;
|
|
412
562
|
const onHead = status && quiet(last);
|
|
413
563
|
return (React.createElement(Outbox.Provider, { value: sent },
|
|
414
|
-
items.map((item, index) => (React.createElement("div", { key: item.key, className: [
|
|
564
|
+
items.map((item, index) => index < from ? null : (React.createElement("div", { key: item.key, className: [
|
|
415
565
|
'ta-thread-item',
|
|
416
566
|
index >= front && index < items.length - SETTLED_AFTER && 'ta-settled',
|
|
417
567
|
index === items.length - 1 && 'ta-thread-last',
|
|
418
|
-
index >=
|
|
568
|
+
index >= fresh && 'ta-thread-new',
|
|
419
569
|
item.kind === 'message' && item.message.role === 'user' && conversation_scroll_1.ASK_CLASS,
|
|
420
570
|
]
|
|
421
571
|
.filter(Boolean)
|
|
422
572
|
.join(' ') },
|
|
423
573
|
breaks[index] !== undefined && React.createElement(message_footer_1.TimeBreak, { timestamp: breaks[index] }),
|
|
574
|
+
models[index] && React.createElement(message_footer_1.ModelBreak, { model: models[index] }),
|
|
424
575
|
React.createElement(ThreadRow, { item: item, tools: state.tools, mood: item.kind === 'turn' ? process_1.ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn })))),
|
|
425
|
-
status && !onHead && React.createElement("div", { className:
|
|
576
|
+
status && !onHead && React.createElement("div", { className: `ta-run-line ${endsInSteps(last) ? 'ta-run-steps' : ''}` }, status)));
|
|
426
577
|
}
|
|
427
578
|
//# sourceMappingURL=message-list.js.map
|
|
@@ -73,7 +73,12 @@ function useMessageMenu(subject) {
|
|
|
73
73
|
const items = [];
|
|
74
74
|
const text = subject.kind === 'user' ? subject.text : subject.reply;
|
|
75
75
|
if (text) {
|
|
76
|
-
items.push({ label: t('ta.copy'), run: () => copy(text) }
|
|
76
|
+
items.push({ label: t('ta.copy'), run: () => copy(text) });
|
|
77
|
+
if (actions === null || actions === void 0 ? void 0 : actions.quote) {
|
|
78
|
+
const quote = actions.quote;
|
|
79
|
+
items.push({ label: t('ta.message.quote'), run: () => quote(text) });
|
|
80
|
+
}
|
|
81
|
+
items.push({ label: t('ta.message.selectText'), run: () => setSelecting(text) });
|
|
77
82
|
}
|
|
78
83
|
if (subject.kind === 'user' && branches) {
|
|
79
84
|
items.push('-', { label: t('ta.message.forkBefore'), run: () => actions.fork(subject.message, 'before') }, { label: t('ta.message.rewind'), run: () => actions.rewind(subject.message) });
|
|
@@ -99,6 +99,7 @@ var ModelPickerUtil;
|
|
|
99
99
|
key: 'model',
|
|
100
100
|
label: t('ta.session.model'),
|
|
101
101
|
icon: React.createElement(icon_1.Icon, { icon: lucide_react_1.Box, size: 16 }),
|
|
102
|
+
setting: true,
|
|
102
103
|
detail: value ? name(source, value) : t('ta.session.noModel'),
|
|
103
104
|
searchLabel: t('ta.model.search'),
|
|
104
105
|
items: options(source, value).map(option => ({ ...option, run: () => pick(option.key) })),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
1
2
|
import type { Hold } from '../device/hold';
|
|
2
3
|
import { type WebViewEntry } from '../extension/web-extension-protocol';
|
|
4
|
+
import { type WebPageInfo } from '../extension/web-pages';
|
|
3
5
|
import { type NavigationSetting } from '../settings/navigation';
|
|
4
6
|
import type { ContextMenuItem } from './context-menu';
|
|
5
7
|
import type { PhoneTab } from './phone-shell';
|
|
@@ -37,13 +39,30 @@ export interface Navigation {
|
|
|
37
39
|
/** Those in the navigation, and those under Discover (NavigationUtil.arrange). */
|
|
38
40
|
nav: WebViewEntry[];
|
|
39
41
|
discover: WebViewEntry[];
|
|
42
|
+
/**
|
|
43
|
+
* The pages of installed extensions started on open (ta-launcher.md): under Discover after `discover`,
|
|
44
|
+
* never in the navigation, their extensions loaded only when opened.
|
|
45
|
+
*/
|
|
46
|
+
onOpen: WebPageInfo[];
|
|
40
47
|
setting: NavigationSetting;
|
|
41
48
|
pin(id: string): void;
|
|
42
49
|
fold(id: string): void;
|
|
43
50
|
update(setting: NavigationSetting): void;
|
|
44
51
|
}
|
|
45
|
-
/**
|
|
46
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Where the pages of the rail go: the double's first when no sidebar view lists it, the rest as the user put them
|
|
54
|
+
* in the room there is. `own`: Discover lists pages of extensions started on open, so it is there in any case.
|
|
55
|
+
*/
|
|
56
|
+
export declare function places(views: WebViewEntry[], setting: NavigationSetting, handheld: boolean, own?: boolean): Pick<Navigation, 'home' | 'pages' | 'nav' | 'discover'>;
|
|
57
|
+
/**
|
|
58
|
+
* Where each page of the extensions is on this device (WebPageInfo.place): in the navigation, under Discover, or
|
|
59
|
+
* in a list; the pages of a kind that a page lists (the Games page) are only there.
|
|
60
|
+
*/
|
|
61
|
+
export declare function arrangeViews(views: readonly WebViewEntry[], onOpen: readonly {
|
|
62
|
+
info: TaWebExtensionInfo;
|
|
63
|
+
}[], setting: NavigationSetting, handheld: boolean, infoOf: (extensionId: string) => TaWebExtensionInfo | undefined, kinds: ReadonlySet<string>): (view: WebViewEntry) => 'navigation' | 'discover' | 'list';
|
|
64
|
+
/** Discover is in the navigation: some pages are under it. */
|
|
65
|
+
export declare function hasDiscover(navigation: Pick<Navigation, 'discover' | 'onOpen'>): boolean;
|
|
47
66
|
export interface PhoneTabLabels {
|
|
48
67
|
discover: string;
|
|
49
68
|
me: string;
|