@celljs/ta-web 4.15.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Process = Process;
|
|
37
|
+
const lucide_react_1 = require("lucide-react");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const use_t_1 = require("../i18n/use-t");
|
|
40
|
+
const code_renderers_1 = require("../markdown/code-renderers");
|
|
41
|
+
const message_1 = require("../util/message");
|
|
42
|
+
const process_1 = require("../util/process");
|
|
43
|
+
const tool_1 = require("../util/tool");
|
|
44
|
+
const icon_1 = require("./icon");
|
|
45
|
+
const markdown_1 = require("./markdown");
|
|
46
|
+
const message_user_1 = require("./message-user");
|
|
47
|
+
const tool_view_1 = require("./tool-view");
|
|
48
|
+
/** A thought folded into one line; it opens to the whole text. Drawn again only when its text changes. */
|
|
49
|
+
const ThinkingStep = React.memo(function ThinkingStep({ text, tagged = true }) {
|
|
50
|
+
const t = (0, use_t_1.useT)();
|
|
51
|
+
const [open, setOpen] = React.useState(false);
|
|
52
|
+
return (React.createElement("div", { className: "ta-step-thinking" },
|
|
53
|
+
React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
|
|
54
|
+
React.createElement("span", { className: "ta-status ta-status-thought" }),
|
|
55
|
+
tagged && React.createElement("span", { className: "ta-step-tag" }, t('ta.message.thinking')),
|
|
56
|
+
!open && React.createElement("span", { className: "ta-step-preview" }, process_1.ProcessUtil.preview(text))),
|
|
57
|
+
open && React.createElement("div", { className: "ta-thinking-text" }, text)));
|
|
58
|
+
});
|
|
59
|
+
/** The summary an agent compacted its context to: folded into one line, it opens to the whole summary. */
|
|
60
|
+
const SummaryStep = React.memo(function SummaryStep({ text }) {
|
|
61
|
+
const t = (0, use_t_1.useT)();
|
|
62
|
+
const [open, setOpen] = React.useState(false);
|
|
63
|
+
return (React.createElement("div", { className: "ta-step-summary" },
|
|
64
|
+
React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
|
|
65
|
+
React.createElement("span", { className: "ta-status ta-status-thought" }),
|
|
66
|
+
React.createElement("span", { className: "ta-step-tag" }, t('ta.message.compacted')),
|
|
67
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-step-chevron" })),
|
|
68
|
+
open && React.createElement("div", { className: "ta-thinking-text" }, text)));
|
|
69
|
+
});
|
|
70
|
+
/** A request that failed on the way, the work going on after it: one quiet line, which opens to the error. */
|
|
71
|
+
const ErrorStep = React.memo(function ErrorStep({ text }) {
|
|
72
|
+
const t = (0, use_t_1.useT)();
|
|
73
|
+
const [open, setOpen] = React.useState(false);
|
|
74
|
+
return (React.createElement("div", { className: "ta-step-thinking ta-step-error" },
|
|
75
|
+
React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
|
|
76
|
+
React.createElement("span", { className: "ta-status ta-status-error" }),
|
|
77
|
+
React.createElement("span", { className: "ta-step-tag" }, t('ta.process.requestFailed')),
|
|
78
|
+
!open && text && React.createElement("span", { className: "ta-step-preview" }, process_1.ProcessUtil.preview(text))),
|
|
79
|
+
open && text && React.createElement("div", { className: "ta-thinking-text" }, text)));
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* What the user said while the agent worked (steering), where in its work it read it: a small bubble on the string of
|
|
83
|
+
* the steps, marked as said on the way, with where it came from when not typed. It stays in sight when the steps fold.
|
|
84
|
+
*/
|
|
85
|
+
const SaidStep = React.memo(function SaidStep({ message }) {
|
|
86
|
+
const t = (0, use_t_1.useT)();
|
|
87
|
+
const blocks = message_1.MessageUtil.blocks(message);
|
|
88
|
+
const { text } = (0, message_user_1.userWords)(blocks);
|
|
89
|
+
return (React.createElement("div", { className: "ta-step-said" },
|
|
90
|
+
React.createElement("span", { className: "ta-status ta-status-said" }),
|
|
91
|
+
React.createElement("div", { className: "ta-said-head", title: t('ta.message.steeredTitle') },
|
|
92
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.CornerDownRight, size: 12 }),
|
|
93
|
+
React.createElement("span", null, t('ta.message.steered')),
|
|
94
|
+
React.createElement(message_user_1.MessageOrigin, { blocks: blocks })),
|
|
95
|
+
React.createElement(message_user_1.UserSaid, { blocks: blocks, text: text, bubble: "ta-said-bubble", timestamp: message.timestamp })));
|
|
96
|
+
});
|
|
97
|
+
const TextStep = React.memo(function TextStep({ text, streaming }) {
|
|
98
|
+
return (React.createElement("div", { className: "ta-step-text" },
|
|
99
|
+
React.createElement("span", { className: "ta-status ta-status-thought" }),
|
|
100
|
+
React.createElement(markdown_1.Markdown, { text: text, streaming: streaming })));
|
|
101
|
+
});
|
|
102
|
+
function Step({ step, results, tools, tagged, streaming, }) {
|
|
103
|
+
var _a;
|
|
104
|
+
switch (step.kind) {
|
|
105
|
+
case 'thinking':
|
|
106
|
+
return React.createElement(ThinkingStep, { text: step.text, tagged: tagged });
|
|
107
|
+
case 'text':
|
|
108
|
+
return React.createElement(TextStep, { text: step.text, streaming: streaming });
|
|
109
|
+
case 'summary':
|
|
110
|
+
return React.createElement(SummaryStep, { text: step.text });
|
|
111
|
+
case 'error':
|
|
112
|
+
return React.createElement(ErrorStep, { text: step.text });
|
|
113
|
+
case 'said':
|
|
114
|
+
return React.createElement(SaidStep, { message: step.message });
|
|
115
|
+
default: {
|
|
116
|
+
const { id = '', name = '', arguments: args } = step.call;
|
|
117
|
+
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 }));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** How long the steps of a turn take to fold or open, and how. */
|
|
122
|
+
const FOLD_MS = 220;
|
|
123
|
+
const FOLD_EASE = 'cubic-bezier(0.2, 0.8, 0.2, 1)';
|
|
124
|
+
/**
|
|
125
|
+
* Whether the steps of `ref` are in the page: they fold and open in a motion, so that what is under them
|
|
126
|
+
* slides to its place rather than jumps there (as when a turn ends and its steps fold under the eyes of
|
|
127
|
+
* the user). While they fold they stay; without motion they come and go at once. `slideOpen`: they open in
|
|
128
|
+
* a motion too (opened by the user); steps that come while ta works come in as steps do, without it.
|
|
129
|
+
*/
|
|
130
|
+
function useFold(open, ref, slideOpen) {
|
|
131
|
+
const [closing, setClosing] = React.useState(false);
|
|
132
|
+
const [was, setWas] = React.useState(open);
|
|
133
|
+
if (was !== open) {
|
|
134
|
+
setWas(open);
|
|
135
|
+
setClosing(!open);
|
|
136
|
+
}
|
|
137
|
+
const opened = React.useRef(open);
|
|
138
|
+
React.useLayoutEffect(() => {
|
|
139
|
+
const opening = open && !opened.current && slideOpen;
|
|
140
|
+
opened.current = open;
|
|
141
|
+
const element = ref.current;
|
|
142
|
+
if (!opening && !closing) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (!element || typeof element.animate !== 'function' || document.documentElement.hasAttribute('data-reduce-motion')) {
|
|
146
|
+
setClosing(false);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const style = getComputedStyle(element);
|
|
150
|
+
const full = {
|
|
151
|
+
height: `${element.offsetHeight}px`,
|
|
152
|
+
paddingTop: style.paddingTop,
|
|
153
|
+
paddingBottom: style.paddingBottom,
|
|
154
|
+
marginTop: style.marginTop,
|
|
155
|
+
marginBottom: style.marginBottom,
|
|
156
|
+
opacity: 1,
|
|
157
|
+
};
|
|
158
|
+
const none = { height: '0px', paddingTop: '0px', paddingBottom: '0px', marginTop: '0px', marginBottom: '0px', opacity: 0 };
|
|
159
|
+
element.style.overflow = 'hidden';
|
|
160
|
+
// Folded, the steps stay at no height until they go: not drawn whole again for the frame before.
|
|
161
|
+
const animation = element.animate(opening ? [none, full] : [full, none], { duration: FOLD_MS, easing: FOLD_EASE, fill: opening ? 'none' : 'forwards' });
|
|
162
|
+
animation.onfinish = () => {
|
|
163
|
+
element.style.overflow = '';
|
|
164
|
+
if (!opening) {
|
|
165
|
+
setClosing(false);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
return () => {
|
|
169
|
+
animation.cancel();
|
|
170
|
+
element.style.overflow = '';
|
|
171
|
+
};
|
|
172
|
+
}, [open, closing, ref, slideOpen]);
|
|
173
|
+
return open || closing;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The head of a turn and its work: the work in one line, "N steps", open while ta is at it, then folded,
|
|
177
|
+
* so that a long conversation reads as what was asked and what came of it. Before the first step the
|
|
178
|
+
* line says what ta does. The avatar stays the same element from the turn's first frame to its last.
|
|
179
|
+
*/
|
|
180
|
+
function Process({ steps, active, results, tools, leading, status, stopped, }) {
|
|
181
|
+
const t = (0, use_t_1.useT)();
|
|
182
|
+
const [manual, setManual] = React.useState();
|
|
183
|
+
const [showAll, setShowAll] = React.useState(false);
|
|
184
|
+
const id = React.useId();
|
|
185
|
+
const stepsRef = React.useRef(null);
|
|
186
|
+
const { steps: count, failed } = tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps), results, tools);
|
|
187
|
+
// Open while it works, then folded; a failed step says so on the head, quietly. A turn that stopped short keeps
|
|
188
|
+
// its work open: there is no reply, and its last steps say where it stopped.
|
|
189
|
+
const open = manual !== null && manual !== void 0 ? manual : (active || !!stopped);
|
|
190
|
+
const shown = useFold(open && steps.length > 0, stepsRef, !active);
|
|
191
|
+
const folded = process_1.ProcessUtil.fold(steps, active || !!stopped, showAll);
|
|
192
|
+
// Folded, the cards on the way stay under the head: a choice asked in the middle is not hidden with the work.
|
|
193
|
+
const renderers = React.useContext(code_renderers_1.CodeRenderers);
|
|
194
|
+
const pinned = open ? [] : steps.filter(step => process_1.ProcessUtil.pinned(step, renderers));
|
|
195
|
+
const inline = pinned.length ? folded.steps.filter(step => !process_1.ProcessUtil.pinned(step, renderers)) : folded.steps;
|
|
196
|
+
// Folded, what the user said on the way stays too: their words do not go into the work.
|
|
197
|
+
const said = open ? [] : steps.filter(step => step.kind === 'said');
|
|
198
|
+
// The earlier steps count as the head does: the calls among them, not the thoughts.
|
|
199
|
+
const earlier = folded.hidden ? tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps.slice(0, folded.hidden)), results, tools).steps : 0;
|
|
200
|
+
// Only thoughts: the head already says so, the steps need not say it again.
|
|
201
|
+
const thoughtOnly = steps.every(step => step.kind === 'thinking');
|
|
202
|
+
const title = count ? t(active ? 'ta.process.running' : 'ta.process.done', { count }) : t(active ? 'ta.process.thinking' : 'ta.process.thought');
|
|
203
|
+
return (React.createElement("div", { className: `ta-process ${active ? 'ta-process-active' : ''}` },
|
|
204
|
+
React.createElement("div", { className: "ta-turn-head" },
|
|
205
|
+
leading,
|
|
206
|
+
steps.length > 0 ? (React.createElement("button", { type: "button", className: "ta-process-head", "aria-expanded": open, "aria-controls": id, onClick: () => setManual(!open) },
|
|
207
|
+
React.createElement("span", null, title),
|
|
208
|
+
failed > 0 && React.createElement("span", { className: "ta-process-failed" },
|
|
209
|
+
"\u00B7 ",
|
|
210
|
+
t('ta.process.failed', { count: failed })),
|
|
211
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-process-chevron" }))) : (status)),
|
|
212
|
+
shown && (React.createElement("div", { id: id, ref: stepsRef, className: "ta-process-steps" },
|
|
213
|
+
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'))),
|
|
214
|
+
inline.map((step, index) => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly, streaming: active && index === inline.length - 1 }))))),
|
|
215
|
+
said.length > 0 && (React.createElement("div", { className: "ta-process-steps ta-said-folded" }, said.map(step => (React.createElement(SaidStep, { key: step.key, message: step.message }))))),
|
|
216
|
+
pinned.map(step => (React.createElement(markdown_1.Markdown, { key: step.key, text: step.text })))));
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=message-steps.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { OutboxMessage, SessionMessage } from '@celljs/ta-client';
|
|
2
|
+
import { TaSkillUse } from '@celljs/ta-protocol';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { type Blocks } from './message-images';
|
|
5
|
+
/** What can be done with a message sent from here that failed to go. */
|
|
6
|
+
export interface OutboxActions {
|
|
7
|
+
resend(id: string): void;
|
|
8
|
+
discard(id: string): void;
|
|
9
|
+
}
|
|
10
|
+
/** The messages of the conversation still on their way from here, by message, with what can be done with those that failed. */
|
|
11
|
+
export declare const Outbox: React.Context<{
|
|
12
|
+
of: Map<SessionMessage, OutboxMessage>;
|
|
13
|
+
actions?: OutboxActions;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* What the user said, in the bubble of a message of theirs, with the pictures they sent with it in the same
|
|
17
|
+
* bubble: the pictures first, the words under them. A message of pictures alone has no bubble of its own.
|
|
18
|
+
* `bubble` is the class of that bubble, which a conversation and the double have of their own.
|
|
19
|
+
*/
|
|
20
|
+
export declare function UserSaid({ blocks, text, bubble, timestamp }: {
|
|
21
|
+
blocks: Blocks;
|
|
22
|
+
text: string;
|
|
23
|
+
bubble?: string;
|
|
24
|
+
timestamp?: number;
|
|
25
|
+
}): React.JSX.Element | null;
|
|
26
|
+
/**
|
|
27
|
+
* Where a message of the user came from when not from what they typed (TaMessageSource): the package that sent it, as
|
|
28
|
+
* the user calls it, with what it says besides (the channel and who spoke); the double. None for what they typed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function MessageOrigin({ blocks }: {
|
|
31
|
+
blocks: Blocks;
|
|
32
|
+
}): React.JSX.Element | null;
|
|
33
|
+
export declare function UserMessage({ message, queued }: {
|
|
34
|
+
message: SessionMessage;
|
|
35
|
+
queued?: boolean;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* What a message of the user's shows, in a conversation and the double alike: without the context and the notes of
|
|
39
|
+
* pictures sent with it, a skill they ran (`/skill:name`) taken out of the words as the skill; `copied` is what they typed.
|
|
40
|
+
*/
|
|
41
|
+
export declare function userWords(blocks: Blocks): {
|
|
42
|
+
text: string;
|
|
43
|
+
copied: string;
|
|
44
|
+
skill?: TaSkillUse;
|
|
45
|
+
};
|
|
46
|
+
/** A skill the user ran: one line with its name, which opens to the skill's file, as a tool call opens. */
|
|
47
|
+
export declare function SkillUse({ skill }: {
|
|
48
|
+
skill: TaSkillUse;
|
|
49
|
+
}): React.JSX.Element;
|
|
50
|
+
/** Above a message of the user: where it came from, and that it waited for a reply; nothing for one typed and sent at once. */
|
|
51
|
+
export declare function UserMarks({ blocks, queued }: {
|
|
52
|
+
blocks: Blocks;
|
|
53
|
+
queued?: boolean;
|
|
54
|
+
}): React.JSX.Element | null;
|
|
55
|
+
//# sourceMappingURL=message-user.d.ts.map
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Outbox = void 0;
|
|
37
|
+
exports.UserSaid = UserSaid;
|
|
38
|
+
exports.MessageOrigin = MessageOrigin;
|
|
39
|
+
exports.UserMessage = UserMessage;
|
|
40
|
+
exports.userWords = userWords;
|
|
41
|
+
exports.SkillUse = SkillUse;
|
|
42
|
+
exports.UserMarks = UserMarks;
|
|
43
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
44
|
+
const lucide_react_1 = require("lucide-react");
|
|
45
|
+
const React = __importStar(require("react"));
|
|
46
|
+
const assistant_task_util_1 = require("../assistant/assistant-task-util");
|
|
47
|
+
const extension_view_1 = require("../extension/extension-view");
|
|
48
|
+
const icons_1 = require("../extension/icons");
|
|
49
|
+
const use_t_1 = require("../i18n/use-t");
|
|
50
|
+
const message_1 = require("../util/message");
|
|
51
|
+
const face_1 = require("./face");
|
|
52
|
+
const icon_1 = require("./icon");
|
|
53
|
+
const markdown_1 = require("./markdown");
|
|
54
|
+
const message_footer_1 = require("./message-footer");
|
|
55
|
+
const message_images_1 = require("./message-images");
|
|
56
|
+
const message_menu_1 = require("./message-menu");
|
|
57
|
+
const people_1 = require("./people");
|
|
58
|
+
const said_text_1 = require("./said-text");
|
|
59
|
+
/** The messages of the conversation still on their way from here, by message, with what can be done with those that failed. */
|
|
60
|
+
exports.Outbox = React.createContext({ of: new Map() });
|
|
61
|
+
/** A message that did not go: marked as such, with a way to send it again or take it back, as in a messenger. */
|
|
62
|
+
function SendFailed({ sent, actions }) {
|
|
63
|
+
const t = (0, use_t_1.useT)();
|
|
64
|
+
return (React.createElement("div", { className: "ta-send-failed", title: sent.failed },
|
|
65
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.CircleAlert, size: 14 }),
|
|
66
|
+
React.createElement("span", null, t('ta.message.sendFailed')),
|
|
67
|
+
actions && (React.createElement(React.Fragment, null,
|
|
68
|
+
React.createElement("button", { type: "button", className: "ta-link-button", onClick: () => actions.resend(sent.id) }, t('ta.message.resend')),
|
|
69
|
+
React.createElement("button", { type: "button", className: "ta-link-button", onClick: () => actions.discard(sent.id) }, t('ta.message.discard'))))));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* What the double of the web client told ta about a task: a note, not something the user said. How one ended opens to
|
|
73
|
+
* what it said; that the user handed it one is its line alone, what the double read of it being for the double.
|
|
74
|
+
*/
|
|
75
|
+
function TaskNote({ note }) {
|
|
76
|
+
const t = (0, use_t_1.useT)();
|
|
77
|
+
const line = assistant_task_util_1.AssistantTaskUtil.noteLine(note, t);
|
|
78
|
+
if (note.kind !== 'update') {
|
|
79
|
+
return line ? React.createElement("div", { className: "ta-summary ta-summary-line" }, line) : null;
|
|
80
|
+
}
|
|
81
|
+
return (React.createElement("details", { className: "ta-summary" },
|
|
82
|
+
React.createElement("summary", null, line),
|
|
83
|
+
React.createElement(markdown_1.Markdown, { text: note.body })));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* What the user said, in the bubble of a message of theirs, with the pictures they sent with it in the same
|
|
87
|
+
* bubble: the pictures first, the words under them. A message of pictures alone has no bubble of its own.
|
|
88
|
+
* `bubble` is the class of that bubble, which a conversation and the double have of their own.
|
|
89
|
+
*/
|
|
90
|
+
function UserSaid({ blocks, text, bubble = 'ta-bubble', timestamp }) {
|
|
91
|
+
if (message_images_1.UserImageUtil.images(blocks).length === 0) {
|
|
92
|
+
return text ? (React.createElement("div", { className: bubble },
|
|
93
|
+
React.createElement(said_text_1.SaidText, { text: text }))) : null;
|
|
94
|
+
}
|
|
95
|
+
return (React.createElement("div", { className: `${bubble} ta-bubble-media${text ? '' : ' ta-bubble-bare'}` },
|
|
96
|
+
React.createElement(message_images_1.UserImages, { blocks: blocks, timestamp: timestamp }),
|
|
97
|
+
text && React.createElement(said_text_1.SaidText, { text: text, className: "ta-bubble-text" })));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Where a message of the user came from when not from what they typed (TaMessageSource): the package that sent it, as
|
|
101
|
+
* the user calls it, with what it says besides (the channel and who spoke); the double. None for what they typed.
|
|
102
|
+
*/
|
|
103
|
+
function MessageOrigin({ blocks }) {
|
|
104
|
+
var _a;
|
|
105
|
+
var _b;
|
|
106
|
+
const t = (0, use_t_1.useT)();
|
|
107
|
+
const language = (0, use_t_1.useLanguage)();
|
|
108
|
+
const extensions = React.useContext(extension_view_1.LoadedExtensions);
|
|
109
|
+
const source = ta_protocol_1.TaMessageSource.of(message_1.MessageUtil.text(blocks));
|
|
110
|
+
if (!source) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const info = (_a = extensions.find(extension => extension.name === source.from)) === null || _a === void 0 ? void 0 : _a.info;
|
|
114
|
+
const double = source.from === ta_protocol_1.TaMessageSource.DOUBLE;
|
|
115
|
+
const name = double ? t('ta.assistant.me') : ((_b = ta_protocol_1.TaPackageTextUtil.pick(info === null || info === void 0 ? void 0 : info.title, language)) !== null && _b !== void 0 ? _b : source.from.replace(/^@[^/]+\//, ''));
|
|
116
|
+
const glyph = double ? lucide_react_1.Bot : ((info === null || info === void 0 ? void 0 : info.icon) && icons_1.WEB_ICONS[info.icon]) || lucide_react_1.Puzzle;
|
|
117
|
+
return (React.createElement("span", { className: "ta-origin", title: source.from },
|
|
118
|
+
React.createElement(icon_1.Icon, { icon: glyph, size: 12 }),
|
|
119
|
+
React.createElement("span", { className: "ta-origin-name" }, name),
|
|
120
|
+
source.detail && React.createElement("span", { className: "ta-origin-detail" }, source.detail)));
|
|
121
|
+
}
|
|
122
|
+
/** Written while the agent was at its reply, sent once it answered (MessageItem.queued). */
|
|
123
|
+
function QueuedMark() {
|
|
124
|
+
const t = (0, use_t_1.useT)();
|
|
125
|
+
return (React.createElement("span", { className: "ta-origin ta-origin-queued", title: t('ta.message.queuedTitle') },
|
|
126
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Clock3, size: 12 }),
|
|
127
|
+
React.createElement("span", { className: "ta-origin-name" }, t('ta.message.queued'))));
|
|
128
|
+
}
|
|
129
|
+
function UserMessage({ message, queued }) {
|
|
130
|
+
const blocks = message_1.MessageUtil.blocks(message);
|
|
131
|
+
const said = message_1.MessageUtil.text(blocks).trim();
|
|
132
|
+
const note = ta_protocol_1.TaTaskNote.parse(said);
|
|
133
|
+
if (note) {
|
|
134
|
+
// The double's conversation opened as a conversation.
|
|
135
|
+
return React.createElement(TaskNote, { note: note });
|
|
136
|
+
}
|
|
137
|
+
const { text, copied, skill } = userWords(blocks);
|
|
138
|
+
return React.createElement(UserBubble, { message: message, blocks: blocks, text: text, copied: copied, skill: skill, queued: queued });
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* What a message of the user's shows, in a conversation and the double alike: without the context and the notes of
|
|
142
|
+
* pictures sent with it, a skill they ran (`/skill:name`) taken out of the words as the skill; `copied` is what they typed.
|
|
143
|
+
*/
|
|
144
|
+
function userWords(blocks) {
|
|
145
|
+
var _a;
|
|
146
|
+
const said = ta_protocol_1.TaImageNote.strip(ta_protocol_1.TaMessageContext.strip(message_1.MessageUtil.text(blocks))).trim();
|
|
147
|
+
const skill = ta_protocol_1.TaSkillUse.parse(said);
|
|
148
|
+
return skill ? { text: (_a = skill.message) !== null && _a !== void 0 ? _a : '', copied: ta_protocol_1.TaSkillUse.command(skill), skill } : { text: said, copied: said };
|
|
149
|
+
}
|
|
150
|
+
/** pi's first line of a skill it read, for the model: the path is in the title of the skill's line. */
|
|
151
|
+
const SKILL_BASE = /^References are relative to [^\n]*\n+/;
|
|
152
|
+
/** A skill the user ran: one line with its name, which opens to the skill's file, as a tool call opens. */
|
|
153
|
+
function SkillUse({ skill }) {
|
|
154
|
+
const t = (0, use_t_1.useT)();
|
|
155
|
+
const [open, setOpen] = React.useState(false);
|
|
156
|
+
return (React.createElement("div", { className: "ta-skill-use" },
|
|
157
|
+
React.createElement("button", { type: "button", className: "ta-skill-head", "aria-expanded": open, title: skill.location, onClick: () => setOpen(!open) },
|
|
158
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Sparkles, size: 14 }),
|
|
159
|
+
React.createElement("span", { className: "ta-skill-tag" }, t('ta.message.skill')),
|
|
160
|
+
React.createElement("span", { className: "ta-skill-name" }, skill.name),
|
|
161
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-process-chevron" })),
|
|
162
|
+
open && (React.createElement("div", { className: "ta-skill-body" },
|
|
163
|
+
React.createElement(markdown_1.Markdown, { text: skill.content.replace(SKILL_BASE, '') })))));
|
|
164
|
+
}
|
|
165
|
+
/** Above a message of the user: where it came from, and that it waited for a reply; nothing for one typed and sent at once. */
|
|
166
|
+
function UserMarks({ blocks, queued }) {
|
|
167
|
+
const origin = React.createElement(MessageOrigin, { blocks: blocks });
|
|
168
|
+
if (!queued && !ta_protocol_1.TaMessageSource.of(message_1.MessageUtil.text(blocks))) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return (React.createElement("div", { className: "ta-user-marks" },
|
|
172
|
+
origin,
|
|
173
|
+
queued && React.createElement(QueuedMark, null)));
|
|
174
|
+
}
|
|
175
|
+
function UserBubble({ message, blocks, text, copied, skill, queued, }) {
|
|
176
|
+
var _a, _b;
|
|
177
|
+
const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({ kind: 'user', message, text: copied });
|
|
178
|
+
const marks = React.createElement(UserMarks, { blocks: blocks, queued: queued });
|
|
179
|
+
const outbox = React.useContext(exports.Outbox);
|
|
180
|
+
const people = React.useContext(people_1.MessagePeople);
|
|
181
|
+
const sent = outbox.of.get(message);
|
|
182
|
+
// Someone else's in the same Ta (TaMessageAuthor): on the left with their face and name, as in a group chat.
|
|
183
|
+
const author = sent ? undefined : ta_protocol_1.TaMessageAuthor.of(message_1.MessageUtil.text(blocks));
|
|
184
|
+
const by = (_a = author === null || author === void 0 ? void 0 : author.id) !== null && _a !== void 0 ? _a : ta_protocol_1.TA_OWNER;
|
|
185
|
+
if (!sent && by !== people.me) {
|
|
186
|
+
return (React.createElement("div", { className: "ta-message ta-user ta-user-other", onContextMenu: onContextMenu },
|
|
187
|
+
React.createElement("div", { className: "ta-user-by" },
|
|
188
|
+
React.createElement(face_1.Face, { seed: by, size: 30, double: by === ta_protocol_1.TA_OWNER }),
|
|
189
|
+
React.createElement("div", { className: "ta-user-by-body" },
|
|
190
|
+
React.createElement("span", { className: "ta-user-by-name" }, (_b = author === null || author === void 0 ? void 0 : author.name) !== null && _b !== void 0 ? _b : people.ownerName),
|
|
191
|
+
marks,
|
|
192
|
+
skill && React.createElement(SkillUse, { skill: skill }),
|
|
193
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }))),
|
|
194
|
+
React.createElement(message_footer_1.UserFooter, { message: message, text: copied }),
|
|
195
|
+
menu));
|
|
196
|
+
}
|
|
197
|
+
if (sent) {
|
|
198
|
+
// Not in the session yet: nothing to branch from or rewind to.
|
|
199
|
+
return (React.createElement("div", { className: `ta-message ta-user ${sent.failed ? 'ta-user-failed' : 'ta-user-sending'}` },
|
|
200
|
+
marks,
|
|
201
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
|
|
202
|
+
sent.failed ? React.createElement(SendFailed, { sent: sent, actions: outbox.actions }) : React.createElement("div", { className: "ta-footer" })));
|
|
203
|
+
}
|
|
204
|
+
return (React.createElement("div", { className: "ta-message ta-user", onContextMenu: onContextMenu },
|
|
205
|
+
marks,
|
|
206
|
+
skill && React.createElement(SkillUse, { skill: skill }),
|
|
207
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
|
|
208
|
+
React.createElement(message_footer_1.UserFooter, { message: message, text: copied }),
|
|
209
|
+
menu));
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=message-user.js.map
|
|
@@ -2,7 +2,7 @@ import type { TaSettingsServer, TaSettingsSnapshot } from '@celljs/ta-protocol';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { WebModelPickerProps } from '../extension/web-extension-api';
|
|
4
4
|
import { type Translate } from '../i18n/use-t';
|
|
5
|
-
import type { ComposerAction } from './composer-box';
|
|
5
|
+
import type { ComposerAction } from './composer-box-protocol';
|
|
6
6
|
import { type OptionItem } from './option-list';
|
|
7
7
|
/** The models to pick from, as the settings give them: a TaSettingsSnapshot is one. */
|
|
8
8
|
export type ModelSource = Pick<TaSettingsSnapshot, 'models' | 'modelNames' | 'providerNames'>;
|
|
@@ -40,6 +40,7 @@ exports.SettingsModelPicker = SettingsModelPicker;
|
|
|
40
40
|
const lucide_react_1 = require("lucide-react");
|
|
41
41
|
const React = __importStar(require("react"));
|
|
42
42
|
const react_dom_1 = require("react-dom");
|
|
43
|
+
const back_stack_1 = require("../device/back-stack");
|
|
43
44
|
const use_t_1 = require("../i18n/use-t");
|
|
44
45
|
const icon_1 = require("./icon");
|
|
45
46
|
const option_list_1 = require("./option-list");
|
|
@@ -153,6 +154,7 @@ function ModelPicker({ source, value, onChange, defaultLabel, label, disabled })
|
|
|
153
154
|
(_a = field.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
154
155
|
}
|
|
155
156
|
};
|
|
157
|
+
(0, back_stack_1.useBackLayer)(!!place, () => close(false));
|
|
156
158
|
React.useEffect(() => {
|
|
157
159
|
if (!place) {
|
|
158
160
|
return;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TaServer } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Over the message box of a conversation whose directory is gone (TaSessionInfo.movedFrom), as pi asks Continue or
|
|
5
|
+
* Fork: it goes on where it is now; or a copy of it is made there for good (TaServer.forkHere), and shown; or the user
|
|
6
|
+
* picks where the directory is now, and it and every conversation of it work there (TaServer.relocateDirectory).
|
|
7
|
+
*/
|
|
8
|
+
export declare function MovedNotice({ server, sessionId, sessionFile, movedFrom, cwd, }: {
|
|
9
|
+
server: TaServer;
|
|
10
|
+
sessionId: string;
|
|
11
|
+
sessionFile?: string;
|
|
12
|
+
movedFrom: string;
|
|
13
|
+
cwd: string;
|
|
14
|
+
}): React.JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=moved-notice.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.MovedNotice = MovedNotice;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
38
|
+
const lucide_react_1 = require("lucide-react");
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const chat_protocol_1 = require("../chat/chat-protocol");
|
|
41
|
+
const hooks_1 = require("../hooks");
|
|
42
|
+
const use_t_1 = require("../i18n/use-t");
|
|
43
|
+
const message_1 = require("../util/message");
|
|
44
|
+
const busy_1 = require("./busy");
|
|
45
|
+
const callout_1 = require("./callout");
|
|
46
|
+
const folder_picker_1 = require("./folder-picker");
|
|
47
|
+
const icon_1 = require("./icon");
|
|
48
|
+
/**
|
|
49
|
+
* Over the message box of a conversation whose directory is gone (TaSessionInfo.movedFrom), as pi asks Continue or
|
|
50
|
+
* Fork: it goes on where it is now; or a copy of it is made there for good (TaServer.forkHere), and shown; or the user
|
|
51
|
+
* picks where the directory is now, and it and every conversation of it work there (TaServer.relocateDirectory).
|
|
52
|
+
*/
|
|
53
|
+
function MovedNotice({ server, sessionId, sessionFile, movedFrom, cwd, }) {
|
|
54
|
+
var _a;
|
|
55
|
+
const t = (0, use_t_1.useT)();
|
|
56
|
+
const chat = (0, react_1.useInject)(chat_protocol_1.TaChat);
|
|
57
|
+
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
58
|
+
const [, notices] = (0, hooks_1.useNotices)();
|
|
59
|
+
const [closed, setClosed] = React.useState(false);
|
|
60
|
+
const [picking, setPicking] = React.useState(false);
|
|
61
|
+
const [busy, run] = (0, busy_1.useBusy)();
|
|
62
|
+
const list = React.useCallback((directory) => bench.workspace.listDirectory('.', directory), [bench]);
|
|
63
|
+
if (closed) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const copy = () => void run(async () => {
|
|
67
|
+
const { sessionFile } = await server.forkHere(sessionId);
|
|
68
|
+
if (sessionFile) {
|
|
69
|
+
await chat.resume(sessionFile);
|
|
70
|
+
}
|
|
71
|
+
}).catch(cause => notices.error(cause));
|
|
72
|
+
const relocate = async (path) => {
|
|
73
|
+
try {
|
|
74
|
+
const result = await server.relocateDirectory(movedFrom, path);
|
|
75
|
+
setPicking(false);
|
|
76
|
+
notices.notify(t('ta.session.movedDone', { n: result.conversations, dir: path }), { level: 'success' });
|
|
77
|
+
if (result.busy) {
|
|
78
|
+
notices.notify(t('ta.session.movedBusy', { n: result.busy }), { level: 'warning' });
|
|
79
|
+
}
|
|
80
|
+
const next = sessionFile ? result.files[sessionFile] : undefined;
|
|
81
|
+
if (next) {
|
|
82
|
+
await chat.resume(next);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
notices.error(error);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return (React.createElement(callout_1.Callout, { level: "warning", className: "ta-moved", detail: React.createElement("span", { title: cwd }, t('ta.session.movedDetail', { cwd: message_1.MessageUtil.basename(cwd) || cwd })), action: React.createElement("span", { className: "ta-moved-actions" },
|
|
90
|
+
React.createElement("button", { type: "button", className: "ta-button ta-small ta-primary", disabled: busy, onClick: () => setPicking(true) }, t('ta.session.movedPick')),
|
|
91
|
+
React.createElement("button", { type: "button", className: "ta-button ta-small", disabled: busy, onClick: copy }, t('ta.session.movedCopy')),
|
|
92
|
+
React.createElement(icon_1.IconButton, { icon: lucide_react_1.X, label: t('ta.session.movedKeep'), onClick: () => setClosed(true) })) },
|
|
93
|
+
React.createElement("span", { title: movedFrom }, t('ta.session.moved', { dir: message_1.MessageUtil.basename(movedFrom) || movedFrom })),
|
|
94
|
+
picking && (React.createElement(folder_picker_1.FolderPicker, { list: list, initial: cwd || ((_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.', remote: bench, onPick: relocate, onClose: () => setPicking(false) }))));
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=moved-notice.js.map
|