@celljs/ta-web 4.16.0 → 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 +121 -333
- 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 +9 -148
- package/esm/browser/components/chat-list.js +277 -513
- package/esm/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +89 -19
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- 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 +7 -6
- 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 +3 -1
- 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 +1 -11
- package/esm/browser/gateway/console-parts.js +38 -128
- package/esm/browser/gateway/console-tenant.js +2 -1
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-view.js +39 -1
- package/esm/browser/i18n/locales.d.ts +143 -6
- package/esm/browser/i18n/messages-ja.js +144 -7
- package/esm/browser/i18n/messages-zh-tw.js +144 -7
- package/esm/browser/i18n/messages.d.ts +140 -3
- package/esm/browser/i18n/messages.js +288 -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 +9 -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 +114 -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 +9 -148
- package/lib/browser/components/chat-list.js +294 -532
- package/lib/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +88 -18
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- 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 +8 -6
- 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 +2 -0
- 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 +1 -11
- package/lib/browser/gateway/console-parts.js +38 -129
- package/lib/browser/gateway/console-tenant.js +2 -1
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-view.js +39 -1
- package/lib/browser/i18n/locales.d.ts +143 -6
- package/lib/browser/i18n/messages-ja.js +144 -7
- package/lib/browser/i18n/messages-zh-tw.js +144 -7
- package/lib/browser/i18n/messages.d.ts +140 -3
- package/lib/browser/i18n/messages.js +288 -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 +9 -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
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { useInject } from '@celljs/react';
|
|
2
1
|
import { ChevronLeft } from 'lucide-react';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
import { AssistantChatList
|
|
5
|
-
import {
|
|
6
|
-
import { ChatView, useChat } from '../chat/chat-view.js';
|
|
7
|
-
import { useDevice } from '../device/device.js';
|
|
3
|
+
import { AssistantChatList } from '../assistant/assistant-chat-list.js';
|
|
4
|
+
import { ChatView } from '../chat/chat-view.js';
|
|
8
5
|
import { LaunchScreenUtil } from '../device/launch-screen.js';
|
|
9
6
|
import { LoadedExtensions, MessageRenderers, SessionAvatars, SessionMenus, ToolRenderers } from '../extension/extension-view.js';
|
|
10
|
-
import { WebCwdUtil } from '../extension/web-extension-protocol.js';
|
|
11
|
-
import {
|
|
12
|
-
import { useCodeScan, useNotices, useOpenLink, usePersisted, useSettings, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
13
|
-
import { useT } from '../i18n/use-t.js';
|
|
7
|
+
import { WebCwdUtil, WebLabelUtil } from '../extension/web-extension-protocol.js';
|
|
8
|
+
import { usePersisted } from '../hooks.js';
|
|
14
9
|
import { CodeRenderers } from '../markdown/code-renderers.js';
|
|
15
10
|
import { SIGN_IN_EVENT } from '../notices/notices.js';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
11
|
+
import { SharedPageUtil } from '../share/shared-link.js';
|
|
12
|
+
import { SharedPage } from '../share/shared-page.js';
|
|
18
13
|
import { Voice } from '../util/voice.js';
|
|
19
14
|
import { WorkbenchUtil } from '../workbench-util.js';
|
|
20
|
-
import { PageView, Rail, SidebarView
|
|
21
|
-
import {
|
|
15
|
+
import { PageView, Rail, SidebarView } from './app-nav.js';
|
|
16
|
+
import { LOGIN_LATER, RAIL } from './app-shell-hooks.js';
|
|
17
|
+
import { useAppShell } from './app-shell-state.js';
|
|
22
18
|
import { AuthUtil, LoginPage, useAuthProviders } from './auth-view.js';
|
|
23
|
-
import { BoardSurface
|
|
24
|
-
import { ChatAskUtil
|
|
19
|
+
import { BoardSurface } from './board.js';
|
|
20
|
+
import { ChatAskUtil } from './chat-asks.js';
|
|
25
21
|
import { ChatIconsProvider, ChatIconUtil } from './chat-icon.js';
|
|
26
|
-
import {
|
|
22
|
+
import { ChatListUtil } from './chat-list-util.js';
|
|
27
23
|
import { ChatSeenUtil, SEEN_CHATS } from './chat-seen.js';
|
|
28
24
|
import { ConnectionBar } from './connection-bar.js';
|
|
29
25
|
import { CustomHost } from './custom-host.js';
|
|
@@ -46,15 +42,16 @@ import { NoticeCenter } from './notice-center.js';
|
|
|
46
42
|
import { PhoneShell } from './phone-shell.js';
|
|
47
43
|
import { RemotePrompts } from './remote-prompts.js';
|
|
48
44
|
import { ScanHost } from './scan-screen.js';
|
|
45
|
+
import { useScreenNavigator } from './screen-navigator.js';
|
|
46
|
+
import { ScreenNavigatorUtil } from './screen-navigator-util.js';
|
|
49
47
|
import { ServeRestartNotices } from './serve-restart.js';
|
|
50
48
|
import { SettingsView } from './settings-view.js';
|
|
51
49
|
import { ShareHost } from './share-dialog.js';
|
|
52
|
-
import { DOUBLE_PAGE
|
|
53
|
-
import { paneStyle, Sash
|
|
50
|
+
import { DOUBLE_PAGE } from './side-lists.js';
|
|
51
|
+
import { paneStyle, Sash } from './split-pane.js';
|
|
54
52
|
import { SurfaceFlyout } from './surface-flyout.js';
|
|
55
|
-
import { usePageVisible } from './use-seen-chats.js';
|
|
56
53
|
import { WorkbenchToggleContext } from './workbench-toggle.js';
|
|
57
|
-
import { SignIn
|
|
54
|
+
import { SignIn } from './workbench-view.js';
|
|
58
55
|
/**
|
|
59
56
|
* ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
|
|
60
57
|
* extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
|
|
@@ -65,300 +62,7 @@ import { SignIn, useDocument } from './workbench-view.js';
|
|
|
65
62
|
function AppShell() {
|
|
66
63
|
var _a, _b, _c, _d;
|
|
67
64
|
var _e, _f, _g, _h;
|
|
68
|
-
const t =
|
|
69
|
-
const [workbench, bench] = useWorkbench();
|
|
70
|
-
const [extensions, host] = useWebExtensions();
|
|
71
|
-
const [{ store, pending }, chat] = useChat();
|
|
72
|
-
const [sideId, setSideId] = usePersisted(SIDE);
|
|
73
|
-
const [removedChats] = usePersisted(REMOVED_CHATS);
|
|
74
|
-
const [chatsByDirectory, setChatsByDirectory] = usePersisted(BY_DIRECTORY);
|
|
75
|
-
const [foldedChats, setFoldedChats] = usePersisted(FOLDED);
|
|
76
|
-
const [pinnedChats, setPinnedChats] = usePersisted(PINNED);
|
|
77
|
-
const [letGoAsks, setLetGoAsks] = usePersisted(LET_GO_ASKS);
|
|
78
|
-
const [navOpen, setNavOpen] = React.useState(false);
|
|
79
|
-
const layout = useDevice(device => device.layout);
|
|
80
|
-
const touch = useDevice(device => device.touch);
|
|
81
|
-
// A phone: tabs at the bottom, and the conversation or a page over them, a screen of its own (phone-shell.tsx).
|
|
82
|
-
const phone = useDevice(device => device.handheld);
|
|
83
|
-
const [screenOpen, setScreenOpen] = React.useState(false);
|
|
84
|
-
// The launcher or the board, over the first tab of a phone or in a flyout of the rail (ta-launcher.md).
|
|
85
|
-
const [surface, setSurface] = React.useState();
|
|
86
|
-
const closing = React.useRef(undefined);
|
|
87
|
-
const surfaces = useSurfaces();
|
|
88
|
-
// It opens on its first tab, as those apps do, whatever this tab of the browser showed before.
|
|
89
|
-
const opened = React.useRef(false);
|
|
90
|
-
React.useEffect(() => {
|
|
91
|
-
if (phone && !opened.current) {
|
|
92
|
-
opened.current = true;
|
|
93
|
-
setSideId(FIRST_SIDE);
|
|
94
|
-
host.showPage('');
|
|
95
|
-
}
|
|
96
|
-
}, [phone, setSideId, host]);
|
|
97
|
-
/**
|
|
98
|
-
* The settings view is shown in place of the conversation or the page, at that section (`''`: the first); on a
|
|
99
|
-
* phone it is a screen over Me, which stays while it slides away, until another screen takes its place.
|
|
100
|
-
*/
|
|
101
|
-
const [settings, setSettings] = React.useState();
|
|
102
|
-
// Each opening of the settings on a phone starts afresh: no search or section left from the last.
|
|
103
|
-
const [settingsOpened, setSettingsOpened] = React.useState(0);
|
|
104
|
-
const [tabPage, setTabPage] = React.useState();
|
|
105
|
-
const openSettings = React.useCallback((section) => {
|
|
106
|
-
setSettings(section !== null && section !== void 0 ? section : '');
|
|
107
|
-
setSettingsOpened(count => count + 1);
|
|
108
|
-
setNavOpen(false);
|
|
109
|
-
setScreenOpen(phone);
|
|
110
|
-
}, [phone]);
|
|
111
|
-
const closeSettings = React.useCallback(() => (phone ? setScreenOpen(false) : setSettings(undefined)), [phone]);
|
|
112
|
-
const settingsShown = settings !== undefined && (!phone || screenOpen);
|
|
113
|
-
const [rightOpen, toggleRight, revealRight, uncoverRight] = useRight();
|
|
114
|
-
const [maximized, setMaximized] = React.useState(false);
|
|
115
|
-
const [{ theme, language, settings: chatSettings }] = useSettings();
|
|
116
|
-
const readArchived = React.useCallback(() => void bench.readArchived().catch(() => undefined), [bench]);
|
|
117
|
-
React.useEffect(() => bench.setArchiveDays(chatSettings.chatArchiveDays), [bench, chatSettings.chatArchiveDays]);
|
|
118
|
-
const sidebar = usePane(SIDEBAR);
|
|
119
|
-
const editor = usePane(EDITOR);
|
|
120
|
-
const online = workbench.status === 'online';
|
|
121
|
-
// Files named in replies outside a conversation (channels, pages) are in the server's directory.
|
|
122
|
-
const files = useInject(TaFiles);
|
|
123
|
-
const fileUrl = React.useCallback(async (path, box) => files.loadable(ThumbnailUtil.boxed(await bench.workspace.fileUrl(path), box)), [bench, files]);
|
|
124
|
-
const openLink = useOpenLink(undefined);
|
|
125
|
-
useDocument();
|
|
126
|
-
useRefresh(online);
|
|
127
|
-
// What the server and its packages say (errors, questions) is in the language of the page.
|
|
128
|
-
React.useEffect(() => {
|
|
129
|
-
if (online) {
|
|
130
|
-
bench.settings.setLanguage(language).catch(() => undefined);
|
|
131
|
-
}
|
|
132
|
-
}, [online, language, bench]);
|
|
133
|
-
React.useEffect(() => {
|
|
134
|
-
void bench.start();
|
|
135
|
-
}, [bench]);
|
|
136
|
-
// The computer cannot be reached from the start: the web extensions of the last time start anyway (from
|
|
137
|
-
// the code this device kept) and show what they read last; online, `chat.start` loads them.
|
|
138
|
-
const offline = workbench.status === 'offline';
|
|
139
|
-
const startedOffline = React.useRef(false);
|
|
140
|
-
React.useEffect(() => {
|
|
141
|
-
if (offline && !startedOffline.current) {
|
|
142
|
-
startedOffline.current = true;
|
|
143
|
-
void host.refresh().catch(() => undefined);
|
|
144
|
-
}
|
|
145
|
-
}, [offline, host]);
|
|
146
|
-
/** The conversation the page opens with is shown: those shown after are the user's doing. */
|
|
147
|
-
const started = React.useRef(false);
|
|
148
|
-
React.useEffect(() => {
|
|
149
|
-
if (online) {
|
|
150
|
-
void chat.start().then(() => {
|
|
151
|
-
started.current = true;
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
}, [online, chat]);
|
|
155
|
-
// A tab a web extension opens is meant to be seen, unless it opens again behind the others as the page loads.
|
|
156
|
-
const { activeEditor, focus } = extensions;
|
|
157
|
-
const revealEditor = editor.reveal;
|
|
158
|
-
React.useEffect(() => {
|
|
159
|
-
if (focus > 0) {
|
|
160
|
-
revealRight();
|
|
161
|
-
revealEditor();
|
|
162
|
-
// Opened from the launcher or the board: the workbench comes in their place.
|
|
163
|
-
setSurface(undefined);
|
|
164
|
-
}
|
|
165
|
-
}, [focus, revealRight, revealEditor]);
|
|
166
|
-
React.useEffect(() => {
|
|
167
|
-
host.setSettingsOpener(openSettings);
|
|
168
|
-
return () => host.setSettingsOpener(undefined);
|
|
169
|
-
}, [host, openSettings]);
|
|
170
|
-
// A web extension shows another conversation: the conversation, not a page, a drawer or the workbench over it, is then in front.
|
|
171
|
-
React.useEffect(() => {
|
|
172
|
-
host.setSessionSwitcher(async (session, opening) => {
|
|
173
|
-
// In front at once, while it opens.
|
|
174
|
-
const shown = typeof session === 'object' && 'sessionFile' in session ? chat.resume(session.sessionFile) : chat.show(session, opening);
|
|
175
|
-
setNavOpen(false);
|
|
176
|
-
setSurface(undefined);
|
|
177
|
-
setSettings(undefined);
|
|
178
|
-
setScreenOpen(true);
|
|
179
|
-
setMaximized(false);
|
|
180
|
-
uncoverRight();
|
|
181
|
-
try {
|
|
182
|
-
await shown;
|
|
183
|
-
}
|
|
184
|
-
catch (error) {
|
|
185
|
-
// A phone goes back to the list it came from, rather than showing the conversation of before.
|
|
186
|
-
if (phone && chat.state.pending === undefined) {
|
|
187
|
-
setScreenOpen(false);
|
|
188
|
-
}
|
|
189
|
-
throw error;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
return () => host.setSessionSwitcher(undefined);
|
|
193
|
-
}, [host, chat, uncoverRight, phone]);
|
|
194
|
-
// A page shown from the sidebar on a phone: the drawer goes; so do the settings, for the page or the conversation shown.
|
|
195
|
-
const { page } = extensions;
|
|
196
|
-
const shownSession = store === null || store === void 0 ? void 0 : store.sessionId;
|
|
197
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the page
|
|
198
|
-
React.useEffect(() => setNavOpen(false), [page]);
|
|
199
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows what the main area shows
|
|
200
|
-
React.useEffect(() => {
|
|
201
|
-
setSettings(undefined);
|
|
202
|
-
// A phone keeps the tab under what came over it.
|
|
203
|
-
if (!phone) {
|
|
204
|
-
setTabPage(undefined);
|
|
205
|
-
}
|
|
206
|
-
}, [page, shownSession]);
|
|
207
|
-
// Another conversation shown that no sidebar view lists (not that of an agent, which is in a group), by a page,
|
|
208
|
-
// a link or a fork: the sidebar turns to the chats, where it is selected, to be found again. Not the one the page opens with,
|
|
209
|
-
// nor one the list does not have yet: it may be an agent's.
|
|
210
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the conversation shown
|
|
211
|
-
React.useEffect(() => {
|
|
212
|
-
if (!shownSession || !started.current || phone) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
const info = workbench.sessions.find(session => session.sessionId === shownSession);
|
|
216
|
-
if (info && !info.group) {
|
|
217
|
-
setSideId('');
|
|
218
|
-
}
|
|
219
|
-
}, [shownSession]);
|
|
220
|
-
const { hasCards, openCards, cardsTool } = useWorkbenchCards(rightOpen && !editor.collapsed);
|
|
221
|
-
const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
|
|
222
|
-
const sideViews = SideListUtil.sidebarViews(extensions.views);
|
|
223
|
-
const sideView = sideId === FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
|
|
224
|
-
// The first start, nothing kept: the double's list may still come, rather than the chats shown a moment before it.
|
|
225
|
-
const sideComing = sideId === FIRST_SIDE && !sideView && !extensions.loaded;
|
|
226
|
-
const side = sideView ? sideView.id : sideComing ? FIRST_SIDE : '';
|
|
227
|
-
const showPage = (id) => {
|
|
228
|
-
host.showPage(id);
|
|
229
|
-
setNavOpen(false);
|
|
230
|
-
setSettings(undefined);
|
|
231
|
-
setTabPage(undefined);
|
|
232
|
-
};
|
|
233
|
-
const lists = SideListUtil.of(sideViews, t('ta.chat'));
|
|
234
|
-
const tools = [...(hasCards ? [cardsTool] : []), ...extensions.views.filter(candidate => candidate.location === 'panel')];
|
|
235
|
-
const openTool = (id) => (id === CARDS_ID ? openCards() : host.openView(id));
|
|
236
|
-
// The workbench: the tabs open, or the tools that open there.
|
|
237
|
-
const editors = extensions.editors.length > 0 || tools.length > 0;
|
|
238
|
-
// The settings take the place of the conversation and of the workbench, as a page of their own.
|
|
239
|
-
const showEditors = rightOpen && editors && !editor.collapsed && !settingsShown;
|
|
240
|
-
// Over the conversation of a narrow screen, closing the last tab goes back to the conversation.
|
|
241
|
-
const tabCount = extensions.editors.length;
|
|
242
|
-
const tabsBefore = React.useRef(tabCount);
|
|
243
|
-
React.useEffect(() => {
|
|
244
|
-
if (tabsBefore.current > 0 && tabCount === 0 && showEditors && layout !== 'expanded') {
|
|
245
|
-
toggleRight();
|
|
246
|
-
}
|
|
247
|
-
tabsBefore.current = tabCount;
|
|
248
|
-
}, [tabCount, showEditors, toggleRight, layout]);
|
|
249
|
-
useDrawerSwipe(touch && layout === 'compact' && !phone && !showEditors, navOpen, setNavOpen);
|
|
250
|
-
// The pages of the rail: in the navigation, or under Discover.
|
|
251
|
-
const navigation = useNavigation(extensions.views);
|
|
252
|
-
const codeScan = useCodeScan();
|
|
253
|
-
const [, notices] = useNotices();
|
|
254
|
-
// Without a sidebar view that lists the double, its page is the first tab: it opens there, once the views are in.
|
|
255
|
-
const homeOpened = React.useRef(false);
|
|
256
|
-
const homeId = phone && extensions.views.length > 0 ? (_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id : undefined;
|
|
257
|
-
React.useEffect(() => {
|
|
258
|
-
if (homeId && !homeOpened.current) {
|
|
259
|
-
homeOpened.current = true;
|
|
260
|
-
if (!host.state.page) {
|
|
261
|
-
host.showPage(homeId);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}, [homeId, host]);
|
|
265
|
-
// A page of an extension started on open that Discover lists: shown as those of Discover are.
|
|
266
|
-
const discoveredOnOpen = !!(view === null || view === void 0 ? void 0 : view.onOpen) && navigation.onOpen.some(entry => entry.state === 'shown');
|
|
267
|
-
const railView = view && (view === navigation.home || navigation.pages.includes(view) || discoveredOnOpen) ? view : undefined;
|
|
268
|
-
// On a phone a page of a list (a channel, the double) or of Discover comes in front of the tabs; one of the navigation is a tab.
|
|
269
|
-
const tabView = view && (view === navigation.home || navigation.nav.includes(view)) ? view : undefined;
|
|
270
|
-
// A page of the screen, and those in the background beside it, kept as they were.
|
|
271
|
-
const screenPage = settings === undefined && view && !tabView ? view : undefined;
|
|
272
|
-
// The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
|
|
273
|
-
const conversationShown = phone ? screenOpen && settings === undefined && !screenPage : settings === undefined && tabPage !== 'discover' && !view;
|
|
274
|
-
React.useEffect(() => host.setConversationShown(conversationShown), [host, conversationShown]);
|
|
275
|
-
// What the user has seen is kept here, whichever list or tab is out: one read from the agents' list is seen too.
|
|
276
|
-
const { seen: seenChats, looking } = useSeenConversations(workbench.sessions, conversationShown ? store === null || store === void 0 ? void 0 : store.sessionId : undefined, (view === null || view === void 0 ? void 0 : view.id) === DOUBLE_PAGE && settings === undefined && (!phone || screenOpen || view === tabView));
|
|
277
|
-
// The others in the same Ta see who looks at a conversation with them (TaSessionInfo.people), while the page is seen.
|
|
278
|
-
const pageVisible = usePageVisible();
|
|
279
|
-
React.useEffect(() => bench.presence.look(pageVisible ? looking : undefined), [bench, pageVisible, looking]);
|
|
280
|
-
const state = useInject(TaState);
|
|
281
|
-
const { pageShown } = extensions;
|
|
282
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the pages shown
|
|
283
|
-
React.useEffect(() => {
|
|
284
|
-
// A page that slides in over it: the launcher or the board goes once covered, not under the page as it comes.
|
|
285
|
-
if (phone && surface && view && !tabView) {
|
|
286
|
-
const timer = setTimeout(() => setSurface(undefined), 420);
|
|
287
|
-
closing.current = () => clearTimeout(timer);
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
setSurface(undefined);
|
|
291
|
-
}
|
|
292
|
-
// A page shown from the workbench over it (Open in the main area of a channel): the workbench goes, as for a conversation.
|
|
293
|
-
if (pageShown > 0 && view) {
|
|
294
|
-
setSettings(undefined);
|
|
295
|
-
setScreenOpen(!tabView);
|
|
296
|
-
setMaximized(false);
|
|
297
|
-
uncoverRight();
|
|
298
|
-
}
|
|
299
|
-
}, [pageShown]);
|
|
300
|
-
React.useEffect(() => () => { var _a; return (_a = closing.current) === null || _a === void 0 ? void 0 : _a.call(closing); }, []);
|
|
301
|
-
React.useEffect(() => {
|
|
302
|
-
if (layout !== 'compact') {
|
|
303
|
-
setNavOpen(false);
|
|
304
|
-
}
|
|
305
|
-
}, [layout]);
|
|
306
|
-
// The settings and the pages of the rail take the place of the sidebar too, as on their own; in the drawer of a narrow screen the sidebar stays.
|
|
307
|
-
const full = settings !== undefined || tabPage === 'discover' || railView !== undefined;
|
|
308
|
-
const sideShown = navOpen || (!sidebar.collapsed && !full);
|
|
309
|
-
// Over such a page, the logo (and Mod+B) goes back to the conversation, with the sidebar.
|
|
310
|
-
const toggleSide = () => {
|
|
311
|
-
if (navOpen) {
|
|
312
|
-
setNavOpen(false);
|
|
313
|
-
}
|
|
314
|
-
else if (full) {
|
|
315
|
-
setSettings(undefined);
|
|
316
|
-
setTabPage(undefined);
|
|
317
|
-
if (view) {
|
|
318
|
-
host.showPage('');
|
|
319
|
-
}
|
|
320
|
-
sidebar.reveal();
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
sidebar.toggle();
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
// A list of the rail: it shows in the sidebar, in place of a page; picked again, the sidebar (or the drawer) goes.
|
|
327
|
-
const showList = (id) => {
|
|
328
|
-
const pick = SideListUtil.pick(id, { side, drawer: navOpen, shown: sideShown });
|
|
329
|
-
if (pick === 'close') {
|
|
330
|
-
setNavOpen(false);
|
|
331
|
-
}
|
|
332
|
-
else if (pick === 'hide') {
|
|
333
|
-
sidebar.toggle();
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
setSideId(id);
|
|
337
|
-
}
|
|
338
|
-
if (pick === 'show') {
|
|
339
|
-
setSettings(undefined);
|
|
340
|
-
setTabPage(undefined);
|
|
341
|
-
if (view && full) {
|
|
342
|
-
host.showPage('');
|
|
343
|
-
}
|
|
344
|
-
sidebar.reveal();
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
const toggleWorkbench = () => {
|
|
348
|
-
if (showEditors) {
|
|
349
|
-
toggleRight();
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
// Over the settings of a wide screen (the rail, Cmd/Ctrl+J): they give way to what was under them.
|
|
353
|
-
if (!phone && settings !== undefined) {
|
|
354
|
-
setSettings(undefined);
|
|
355
|
-
}
|
|
356
|
-
revealRight();
|
|
357
|
-
editor.reveal();
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
useKeys(toggleSide, openSettings, () => editors && toggleWorkbench());
|
|
361
|
-
useTitlebarColor(workbench.status !== 'signed-out', theme);
|
|
65
|
+
const { t, workbench, extensions, host, store, pending, chat, setSideId, removedChats, chatsByDirectory, setChatsByDirectory, foldedChats, setFoldedChats, pinnedChats, setPinnedChats, letGoAsks, setLetGoAsks, navOpen, setNavOpen, phone, screenOpen, setScreenOpen, surface, setSurface, surfaces, settings, setSettings, settingsOpened, tabPage, setTabPage, openSettings, closeSettings, settingsShown, toggleRight, maximized, setMaximized, chatSettings, readArchived, sidebar, editor, online, fileUrl, openLink, activeEditor, view, sideView, sideComing, side, showPage, lists, tools, openTool, editors, showEditors, navigation, codeScan, notices, discoveredOnOpen, tabView, screenPage, seenChats, looking, state, sideShown, showList, toggleWorkbench, picking, chatsBusy, setChatsBusy, } = useAppShell();
|
|
362
66
|
const [providers, reloadProviders] = useAuthProviders(online);
|
|
363
67
|
const [later, setLater] = usePersisted(LOGIN_LATER);
|
|
364
68
|
/** A call failed for want of a sign-in (SIGN_IN_EVENT): the page of sign-in, even if the user put it off. */
|
|
@@ -372,7 +76,9 @@ function AppShell() {
|
|
|
372
76
|
return () => window.removeEventListener(SIGN_IN_EVENT, ask);
|
|
373
77
|
}, [reloadProviders]);
|
|
374
78
|
/** The page of the double: its own, or the one a sidebar view that lists it opens. */
|
|
375
|
-
const doubleId = (_e = (
|
|
79
|
+
const doubleId = (_e = (_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id) !== null && _e !== void 0 ? _e : DOUBLE_PAGE;
|
|
80
|
+
// Where Ta's agents read the page to be, and go (docs/design/ta-app-use.md 3): set below as it renders.
|
|
81
|
+
const screenShell = useScreenNavigator();
|
|
376
82
|
if (workbench.status === 'signed-out') {
|
|
377
83
|
return React.createElement(SignIn, { error: workbench.error });
|
|
378
84
|
}
|
|
@@ -386,7 +92,7 @@ function AppShell() {
|
|
|
386
92
|
}, onSignedIn: () => {
|
|
387
93
|
setAsked(false);
|
|
388
94
|
reloadProviders();
|
|
389
|
-
} }));
|
|
95
|
+
}, onProviders: reloadProviders }));
|
|
390
96
|
}
|
|
391
97
|
// What the columns beside the conversation and the editors take, so that the editors never take more than the conversation.
|
|
392
98
|
const sideWidths = {
|
|
@@ -406,6 +112,7 @@ function AppShell() {
|
|
|
406
112
|
showPage('');
|
|
407
113
|
}
|
|
408
114
|
};
|
|
115
|
+
picking.current = picked;
|
|
409
116
|
const chats = (React.createElement(AssistantChatList, { sessions: workbench.sessions, saved: workbench.saved, removed: removedChats, archived: workbench.archived, onArchive: readArchived, foldDays: chatSettings.chatFoldDays, archiveDays: chatSettings.chatArchiveDays, selected: view || phone ? undefined : (pending !== null && pending !== void 0 ? pending : store === null || store === void 0 ? void 0 : store.sessionId), chat: chat, byDirectory: chatsByDirectory, onByDirectory: setChatsByDirectory, folded: foldedChats, onFolded: setFoldedChats, pinned: pinnedChats, onPinned: setPinnedChats, looking: looking, seen: seenChats, onUnseen: (entry, unseen) => {
|
|
410
117
|
var _a;
|
|
411
118
|
const file = ChatListUtil.file(entry);
|
|
@@ -418,9 +125,9 @@ function AppShell() {
|
|
|
418
125
|
if (at !== undefined) {
|
|
419
126
|
setLetGoAsks(before => ChatAskUtil.letGo(before, ChatListUtil.file(entry), at));
|
|
420
127
|
}
|
|
421
|
-
}, onPicked: picked }));
|
|
128
|
+
}, onPicked: picked, busy: chatsBusy, onBusy: setChatsBusy }));
|
|
422
129
|
const sideList = sideView ? React.createElement(SidebarView, { view: sideView }) : sideComing ? React.createElement(ListSkeleton, null) : chats;
|
|
423
|
-
const editorArea = (React.createElement(EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, cwd: (_f = WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (
|
|
130
|
+
const editorArea = (React.createElement(EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, cwd: (_f = WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (_b = workbench.server) === null || _b === void 0 ? void 0 : _b.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
|
|
424
131
|
// A photo of the scan screen to the double: its conversation shows, the photo goes with what to do with it.
|
|
425
132
|
const askDouble = async (text, image) => {
|
|
426
133
|
const double = extensions.views.find(candidate => candidate.id === DOUBLE_PAGE);
|
|
@@ -501,13 +208,19 @@ function AppShell() {
|
|
|
501
208
|
}
|
|
502
209
|
: {};
|
|
503
210
|
// The chats' tab has the amber dot of their rows while one of them said something unseen, as a messenger's: of
|
|
504
|
-
// those the list shows, so that each dot of the tab has a row to find.
|
|
211
|
+
// those the list shows, so that each dot of the tab has a row to find. Those that
|
|
505
212
|
// wait for the user to decide are counted on it, on the rail too, until answered.
|
|
506
213
|
const listedChats = ChatListUtil.entries(workbench.sessions, workbench.saved, removedChats, undefined, WorkbenchUtil.daysAgo(Date.now(), chatSettings.chatArchiveDays), ChatListUtil.keptFiles(workbench.saved, pinnedChats, letGoAsks), ChatIconUtil.archiveSince(extensions.chatIcons, Date.now())).listed;
|
|
507
214
|
const chatsAsking = ChatAskUtil.count(listedChats, letGoAsks);
|
|
508
215
|
const inFront = looking ? workbench.sessions.find(session => session.sessionId === looking) : undefined;
|
|
509
216
|
const chatsUnseen = ChatSeenUtil.anyUnseen(listedChats, seenChats, inFront && ChatListUtil.file(inFront));
|
|
510
|
-
|
|
217
|
+
// Dragged away, the dot or the count of the tab: all seen, and what waits for the user let go.
|
|
218
|
+
const seeAllChats = () => {
|
|
219
|
+
state.set(SEEN_CHATS, ChatSeenUtil.seeAll(state.get(SEEN_CHATS), listedChats, Date.now()));
|
|
220
|
+
if (chatsAsking) {
|
|
221
|
+
setLetGoAsks(before => ChatAskUtil.letGoAll(before, listedChats));
|
|
222
|
+
}
|
|
223
|
+
};
|
|
511
224
|
const tabs = phone
|
|
512
225
|
? phoneTabs(lists, navigation, {
|
|
513
226
|
discover: t('ta.discover'),
|
|
@@ -518,23 +231,93 @@ function AppShell() {
|
|
|
518
231
|
}).map(item => (item.id === '' && (chatsUnseen || chatsAsking) ? { ...item, unseen: chatsUnseen, onSeeAll: seeAllChats, asks: chatsAsking } : item))
|
|
519
232
|
: [];
|
|
520
233
|
const tab = tabPage === 'me' ? ME_TAB : tabPage === 'discover' ? DISCOVER : ((_g = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _g !== void 0 ? _g : side);
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
234
|
+
const pickTab = (id) => {
|
|
235
|
+
var _a;
|
|
236
|
+
setSurface(undefined);
|
|
237
|
+
if (id === ((_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id) || navigation.nav.some(candidate => candidate.id === id)) {
|
|
238
|
+
showPage(id);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
setTabPage(id === ME_TAB ? 'me' : id === DISCOVER ? 'discover' : undefined);
|
|
242
|
+
if (tabView) {
|
|
243
|
+
host.showPage('');
|
|
244
|
+
}
|
|
245
|
+
if (id !== ME_TAB && id !== DISCOVER) {
|
|
246
|
+
setSideId(id);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
const chatName = (entry) => entry.sessionName || entry.firstMessage || t('ta.chat.new');
|
|
250
|
+
const shownChat = store ? workbench.sessions.find(session => session.sessionId === store.sessionId) : undefined;
|
|
251
|
+
screenShell.current = {
|
|
252
|
+
phone,
|
|
253
|
+
where: ScreenNavigatorUtil.where({
|
|
254
|
+
settings: settingsShown ? (settings !== null && settings !== void 0 ? settings : '') : undefined,
|
|
255
|
+
page: phone ? (screenOpen ? screenPage : tabView) : tabPage === 'discover' ? undefined : view,
|
|
256
|
+
discover: tabPage === 'discover',
|
|
257
|
+
me: phone && !screenOpen && tabPage === 'me',
|
|
258
|
+
list: (phone ? !screenOpen && !tabView && !tabPage : sideShown) ? (_c = lists.find(entry => entry.id === side)) === null || _c === void 0 ? void 0 : _c.label : undefined,
|
|
259
|
+
chat: (phone ? screenOpen && !screenPage && settings === undefined : settings === undefined && tabPage !== 'discover' && !view)
|
|
260
|
+
? shownChat
|
|
261
|
+
? chatName(shownChat)
|
|
262
|
+
: t('ta.chat.new')
|
|
263
|
+
: undefined,
|
|
264
|
+
words: { settings: t('ta.settings'), discover: t('ta.discover'), me: t('ta.me') },
|
|
265
|
+
}),
|
|
266
|
+
places: [
|
|
267
|
+
...lists.map(entry => ({ id: `list:${entry.id}`, title: entry.label })),
|
|
268
|
+
...[...(navigation.home ? [navigation.home] : []), ...navigation.pages].map(page => ({
|
|
269
|
+
id: `page:${page.id}`,
|
|
270
|
+
title: WebLabelUtil.text(page.title),
|
|
271
|
+
})),
|
|
272
|
+
...navigation.onOpen.map(page => ({ id: `page:${page.id}`, title: page.title })),
|
|
273
|
+
{ id: 'discover', title: t('ta.discover') },
|
|
274
|
+
...(phone ? [{ id: 'me', title: t('ta.me') }] : []),
|
|
275
|
+
{ id: 'settings', title: t('ta.settings') },
|
|
276
|
+
],
|
|
277
|
+
goPlace: place => {
|
|
278
|
+
const [kind, id = ''] = place.id.split(/:(.*)/s);
|
|
279
|
+
if (kind === 'settings') {
|
|
280
|
+
return openSettings();
|
|
281
|
+
}
|
|
282
|
+
if (kind === 'page') {
|
|
283
|
+
return host.showView(id);
|
|
284
|
+
}
|
|
285
|
+
if (phone) {
|
|
286
|
+
return pickTab(kind === 'list' ? id : kind === 'me' ? ME_TAB : DISCOVER);
|
|
287
|
+
}
|
|
288
|
+
setSettings(undefined);
|
|
289
|
+
setNavOpen(false);
|
|
290
|
+
if (kind === 'discover') {
|
|
291
|
+
setTabPage('discover');
|
|
528
292
|
return;
|
|
529
293
|
}
|
|
530
|
-
setTabPage(
|
|
531
|
-
|
|
294
|
+
setTabPage(undefined);
|
|
295
|
+
setSideId(id);
|
|
296
|
+
if (view) {
|
|
532
297
|
host.showPage('');
|
|
533
298
|
}
|
|
534
|
-
|
|
535
|
-
|
|
299
|
+
sidebar.reveal();
|
|
300
|
+
},
|
|
301
|
+
showChat: async (target) => {
|
|
302
|
+
const switcher = host.sessionSwitcher();
|
|
303
|
+
if (!switcher) {
|
|
304
|
+
throw new Error('The page cannot show a conversation yet.');
|
|
536
305
|
}
|
|
537
|
-
|
|
306
|
+
const shown = switcher('sessionId' in target ? target.sessionId : { sessionFile: target.sessionFile });
|
|
307
|
+
host.showPage('');
|
|
308
|
+
await shown;
|
|
309
|
+
},
|
|
310
|
+
chats: [
|
|
311
|
+
...workbench.sessions
|
|
312
|
+
.filter(session => !session.group)
|
|
313
|
+
.map(session => ({ name: chatName(session), sessionId: session.sessionId, sessionFile: session.sessionFile })),
|
|
314
|
+
...workbench.saved.filter(saved => !saved.group).map(saved => ({ name: chatName(saved), sessionFile: saved.sessionFile })),
|
|
315
|
+
],
|
|
316
|
+
openSettings,
|
|
317
|
+
};
|
|
318
|
+
// The launcher and the board are over the first tab only, as WeChat's over its chats.
|
|
319
|
+
const firstTab = ((_d = tabs[0]) === null || _d === void 0 ? void 0 : _d.id) === tab;
|
|
320
|
+
const content = phone ? (React.createElement(PhoneShell, { tabs: tabs, tab: tab, launcher: firstTab && surfaces.launcher ? React.createElement(LauncherSurface, { active: surface === 'launcher' }) : undefined, board: firstTab && surfaces.board ? (React.createElement(BoardSurface, { leading: React.createElement(IconButton, { icon: ChevronLeft, label: t('ta.back'), onClick: () => setSurface(undefined) }) })) : undefined, surface: surface, onSurface: setSurface, onTab: pickTab, home: tabPage === 'me' ? (React.createElement("div", { className: "ta-main" },
|
|
538
321
|
React.createElement(MeView, { onSettings: openSettings }))) : tabPage === 'discover' ? (React.createElement("div", { className: "ta-main" }, discoverView())) : tabView ? (React.createElement("div", { className: "ta-main" },
|
|
539
322
|
React.createElement(PageView, { view: tabView }))) : (React.createElement("div", { className: "ta-sidebar" }, sideList)), screen: React.createElement(React.Fragment, null,
|
|
540
323
|
React.createElement(KeptPages, { views: extensions.views, kept: extensions.kept, shown: screenPage, render: page => (React.createElement(PageView, { view: page, leading: React.createElement(IconButton, { icon: ChevronLeft, label: t('ta.back'), className: "ta-narrow-only", onClick: closeScreen }) })) }),
|
|
@@ -545,7 +328,7 @@ function AppShell() {
|
|
|
545
328
|
setSettings(undefined);
|
|
546
329
|
setNavOpen(false);
|
|
547
330
|
setTabPage('discover');
|
|
548
|
-
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks: chatsAsking }),
|
|
331
|
+
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks: chatsAsking, onDismissAsks: seeAllChats }),
|
|
549
332
|
sideShown && (React.createElement("div", { className: "ta-sidebar", style: paneStyle(sidebar) },
|
|
550
333
|
sideList,
|
|
551
334
|
React.createElement(Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
|
|
@@ -571,8 +354,13 @@ function AppShell() {
|
|
|
571
354
|
}
|
|
572
355
|
/** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
|
|
573
356
|
export function AppView() {
|
|
357
|
+
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
358
|
+
const [shared] = React.useState(() => SharedPageUtil.link());
|
|
574
359
|
// The launch picture of the app of a phone goes once the page is whole.
|
|
575
360
|
React.useEffect(() => LaunchScreenUtil.start(), []);
|
|
361
|
+
if (shared) {
|
|
362
|
+
return React.createElement(SharedPage, { link: shared });
|
|
363
|
+
}
|
|
576
364
|
return (React.createElement(DinoLookProvider, null,
|
|
577
365
|
React.createElement(AppShell, null),
|
|
578
366
|
React.createElement(DinoLookHost, null)));
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* How many conversations wait for the user to decide, on the entry of the chats (a tab, the rail): blue, as their ? on
|
|
4
|
+
* the rows. Dragged away as the amber dot (UnseenDrop), all of them are let go and seen (`onDismiss`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function AsksBadge({ count, onDismiss }: {
|
|
4
7
|
count: number;
|
|
8
|
+
onDismiss?: () => void;
|
|
5
9
|
}): React.JSX.Element;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useT } from '../i18n/use-t.js';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { UnseenDrop } from './unseen-drop.js';
|
|
4
|
+
/**
|
|
5
|
+
* How many conversations wait for the user to decide, on the entry of the chats (a tab, the rail): blue, as their ? on
|
|
6
|
+
* the rows. Dragged away as the amber dot (UnseenDrop), all of them are let go and seen (`onDismiss`).
|
|
7
|
+
*/
|
|
8
|
+
export function AsksBadge({ count, onDismiss }) {
|
|
5
9
|
const t = useT();
|
|
6
|
-
return (React.createElement(
|
|
10
|
+
return (React.createElement(UnseenDrop, { label: t('ta.chat.asksCount', { count }), onDismiss: onDismiss, className: "ta-asks-badge", tone: "asks" }, count > 99 ? '99+' : count));
|
|
7
11
|
}
|
|
8
12
|
//# sourceMappingURL=asks-badge.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
/** The
|
|
3
|
-
export type AuthKind = 'oauth' | 'api_key';
|
|
2
|
+
/** The ways to have models, each with a small picture: an account, a key, or a program an extension installs (WebSettingsSection.signIn). */
|
|
3
|
+
export type AuthKind = 'oauth' | 'api_key' | 'program';
|
|
4
4
|
export declare function AuthPicture({ kind }: {
|
|
5
5
|
kind: AuthKind;
|
|
6
6
|
}): React.ReactElement;
|
|
@@ -25,7 +25,19 @@ function Key() {
|
|
|
25
25
|
[0, 1, 2, 3, 4, 5, 6, 7].map(i => (React.createElement("circle", { key: i, className: "ta-pic-mark ta-pic-soft ta-pic-dot", cx: 58 + i * 10, cy: "46", r: "2.5" }))),
|
|
26
26
|
React.createElement("rect", { className: "ta-pic-box", x: "96", y: "68", width: "50", height: "15", rx: "7.5" })));
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/** A program installed on this computer: a terminal, a command run, its install going. */
|
|
29
|
+
function Program() {
|
|
30
|
+
return (React.createElement(React.Fragment, null,
|
|
31
|
+
React.createElement("rect", { className: "ta-pic-pane", x: "1", y: "1", width: "158", height: "18", rx: "9" }),
|
|
32
|
+
React.createElement("circle", { className: "ta-pic-line", cx: "12", cy: "10", r: "2.5" }),
|
|
33
|
+
React.createElement("circle", { className: "ta-pic-line", cx: "20", cy: "10", r: "2.5" }),
|
|
34
|
+
React.createElement("path", { className: "ta-pic-stroke", d: "M18 32l6 5-6 5" }),
|
|
35
|
+
React.createElement(Line, { x: 32, y: 35, w: 64 }),
|
|
36
|
+
React.createElement("rect", { className: "ta-pic-accent", x: "14", y: "54", width: "132", height: "14", rx: "7" }),
|
|
37
|
+
React.createElement("rect", { className: "ta-pic-mark", x: "17", y: "57", width: "84", height: "8", rx: "4" }),
|
|
38
|
+
React.createElement(Line, { x: 14, y: 80, w: 48 })));
|
|
39
|
+
}
|
|
40
|
+
const PICTURES = { oauth: Account, api_key: Key, program: Program };
|
|
29
41
|
export function AuthPicture({ kind }) {
|
|
30
42
|
const Shapes = PICTURES[kind];
|
|
31
43
|
return (React.createElement(Picture, null,
|
|
@@ -38,9 +38,9 @@ export declare namespace AuthUtil {
|
|
|
38
38
|
}
|
|
39
39
|
/** The ways to sign in to providers of models, read again with `reload`; undefined until read. */
|
|
40
40
|
export declare function useAuthProviders(online: boolean): [TaAuthProvider[] | undefined, () => void];
|
|
41
|
-
|
|
42
|
-
export declare function AuthPanel({ onSignedIn, kinds }: {
|
|
41
|
+
export declare function AuthPanel({ onSignedIn, onProviders, kinds }: {
|
|
43
42
|
onSignedIn?(): void;
|
|
43
|
+
onProviders?(): void;
|
|
44
44
|
kinds?: boolean;
|
|
45
45
|
}): React.JSX.Element;
|
|
46
46
|
/** The model accounts, over the page (the gear menu). */
|
|
@@ -48,7 +48,8 @@ export declare function AuthDialog({ onClose }: {
|
|
|
48
48
|
onClose(): void;
|
|
49
49
|
}): React.ReactPortal;
|
|
50
50
|
/** The first page while no provider of models is signed in: Ta can do nothing without one. */
|
|
51
|
-
export declare function LoginPage({ onLater, onSignedIn }: {
|
|
51
|
+
export declare function LoginPage({ onLater, onSignedIn, onProviders }: {
|
|
52
52
|
onLater(): void;
|
|
53
53
|
onSignedIn(): void;
|
|
54
|
+
onProviders?(): void;
|
|
54
55
|
}): React.JSX.Element;
|