@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
|
@@ -34,32 +34,28 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.AppView = AppView;
|
|
37
|
-
const react_1 = require("@celljs/react");
|
|
38
37
|
const lucide_react_1 = require("lucide-react");
|
|
39
38
|
const React = __importStar(require("react"));
|
|
40
39
|
const assistant_chat_list_1 = require("../assistant/assistant-chat-list");
|
|
41
|
-
const chat_protocol_1 = require("../chat/chat-protocol");
|
|
42
40
|
const chat_view_1 = require("../chat/chat-view");
|
|
43
|
-
const device_1 = require("../device/device");
|
|
44
41
|
const launch_screen_1 = require("../device/launch-screen");
|
|
45
42
|
const extension_view_1 = require("../extension/extension-view");
|
|
46
43
|
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
47
|
-
const files_protocol_1 = require("../files/files-protocol");
|
|
48
44
|
const hooks_1 = require("../hooks");
|
|
49
|
-
const use_t_1 = require("../i18n/use-t");
|
|
50
45
|
const code_renderers_1 = require("../markdown/code-renderers");
|
|
51
46
|
const notices_1 = require("../notices/notices");
|
|
52
|
-
const
|
|
53
|
-
const
|
|
47
|
+
const shared_link_1 = require("../share/shared-link");
|
|
48
|
+
const shared_page_1 = require("../share/shared-page");
|
|
54
49
|
const voice_1 = require("../util/voice");
|
|
55
50
|
const workbench_util_1 = require("../workbench-util");
|
|
56
51
|
const app_nav_1 = require("./app-nav");
|
|
57
52
|
const app_shell_hooks_1 = require("./app-shell-hooks");
|
|
53
|
+
const app_shell_state_1 = require("./app-shell-state");
|
|
58
54
|
const auth_view_1 = require("./auth-view");
|
|
59
55
|
const board_1 = require("./board");
|
|
60
56
|
const chat_asks_1 = require("./chat-asks");
|
|
61
57
|
const chat_icon_1 = require("./chat-icon");
|
|
62
|
-
const
|
|
58
|
+
const chat_list_util_1 = require("./chat-list-util");
|
|
63
59
|
const chat_seen_1 = require("./chat-seen");
|
|
64
60
|
const connection_bar_1 = require("./connection-bar");
|
|
65
61
|
const custom_host_1 = require("./custom-host");
|
|
@@ -82,13 +78,14 @@ const notice_center_1 = require("./notice-center");
|
|
|
82
78
|
const phone_shell_1 = require("./phone-shell");
|
|
83
79
|
const remote_prompts_1 = require("./remote-prompts");
|
|
84
80
|
const scan_screen_1 = require("./scan-screen");
|
|
81
|
+
const screen_navigator_1 = require("./screen-navigator");
|
|
82
|
+
const screen_navigator_util_1 = require("./screen-navigator-util");
|
|
85
83
|
const serve_restart_1 = require("./serve-restart");
|
|
86
84
|
const settings_view_1 = require("./settings-view");
|
|
87
85
|
const share_dialog_1 = require("./share-dialog");
|
|
88
86
|
const side_lists_1 = require("./side-lists");
|
|
89
87
|
const split_pane_1 = require("./split-pane");
|
|
90
88
|
const surface_flyout_1 = require("./surface-flyout");
|
|
91
|
-
const use_seen_chats_1 = require("./use-seen-chats");
|
|
92
89
|
const workbench_toggle_1 = require("./workbench-toggle");
|
|
93
90
|
const workbench_view_1 = require("./workbench-view");
|
|
94
91
|
/**
|
|
@@ -101,300 +98,7 @@ const workbench_view_1 = require("./workbench-view");
|
|
|
101
98
|
function AppShell() {
|
|
102
99
|
var _a, _b, _c, _d;
|
|
103
100
|
var _e, _f, _g, _h;
|
|
104
|
-
const t = (0,
|
|
105
|
-
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
106
|
-
const [extensions, host] = (0, hooks_1.useWebExtensions)();
|
|
107
|
-
const [{ store, pending }, chat] = (0, chat_view_1.useChat)();
|
|
108
|
-
const [sideId, setSideId] = (0, hooks_1.usePersisted)(app_shell_hooks_1.SIDE);
|
|
109
|
-
const [removedChats] = (0, hooks_1.usePersisted)(chat_protocol_1.REMOVED_CHATS);
|
|
110
|
-
const [chatsByDirectory, setChatsByDirectory] = (0, hooks_1.usePersisted)(chat_list_1.BY_DIRECTORY);
|
|
111
|
-
const [foldedChats, setFoldedChats] = (0, hooks_1.usePersisted)(chat_list_1.FOLDED);
|
|
112
|
-
const [pinnedChats, setPinnedChats] = (0, hooks_1.usePersisted)(chat_list_1.PINNED);
|
|
113
|
-
const [letGoAsks, setLetGoAsks] = (0, hooks_1.usePersisted)(chat_asks_1.LET_GO_ASKS);
|
|
114
|
-
const [navOpen, setNavOpen] = React.useState(false);
|
|
115
|
-
const layout = (0, device_1.useDevice)(device => device.layout);
|
|
116
|
-
const touch = (0, device_1.useDevice)(device => device.touch);
|
|
117
|
-
// A phone: tabs at the bottom, and the conversation or a page over them, a screen of its own (phone-shell.tsx).
|
|
118
|
-
const phone = (0, device_1.useDevice)(device => device.handheld);
|
|
119
|
-
const [screenOpen, setScreenOpen] = React.useState(false);
|
|
120
|
-
// The launcher or the board, over the first tab of a phone or in a flyout of the rail (ta-launcher.md).
|
|
121
|
-
const [surface, setSurface] = React.useState();
|
|
122
|
-
const closing = React.useRef(undefined);
|
|
123
|
-
const surfaces = (0, board_1.useSurfaces)();
|
|
124
|
-
// It opens on its first tab, as those apps do, whatever this tab of the browser showed before.
|
|
125
|
-
const opened = React.useRef(false);
|
|
126
|
-
React.useEffect(() => {
|
|
127
|
-
if (phone && !opened.current) {
|
|
128
|
-
opened.current = true;
|
|
129
|
-
setSideId(app_shell_hooks_1.FIRST_SIDE);
|
|
130
|
-
host.showPage('');
|
|
131
|
-
}
|
|
132
|
-
}, [phone, setSideId, host]);
|
|
133
|
-
/**
|
|
134
|
-
* The settings view is shown in place of the conversation or the page, at that section (`''`: the first); on a
|
|
135
|
-
* phone it is a screen over Me, which stays while it slides away, until another screen takes its place.
|
|
136
|
-
*/
|
|
137
|
-
const [settings, setSettings] = React.useState();
|
|
138
|
-
// Each opening of the settings on a phone starts afresh: no search or section left from the last.
|
|
139
|
-
const [settingsOpened, setSettingsOpened] = React.useState(0);
|
|
140
|
-
const [tabPage, setTabPage] = React.useState();
|
|
141
|
-
const openSettings = React.useCallback((section) => {
|
|
142
|
-
setSettings(section !== null && section !== void 0 ? section : '');
|
|
143
|
-
setSettingsOpened(count => count + 1);
|
|
144
|
-
setNavOpen(false);
|
|
145
|
-
setScreenOpen(phone);
|
|
146
|
-
}, [phone]);
|
|
147
|
-
const closeSettings = React.useCallback(() => (phone ? setScreenOpen(false) : setSettings(undefined)), [phone]);
|
|
148
|
-
const settingsShown = settings !== undefined && (!phone || screenOpen);
|
|
149
|
-
const [rightOpen, toggleRight, revealRight, uncoverRight] = (0, app_shell_hooks_1.useRight)();
|
|
150
|
-
const [maximized, setMaximized] = React.useState(false);
|
|
151
|
-
const [{ theme, language, settings: chatSettings }] = (0, hooks_1.useSettings)();
|
|
152
|
-
const readArchived = React.useCallback(() => void bench.readArchived().catch(() => undefined), [bench]);
|
|
153
|
-
React.useEffect(() => bench.setArchiveDays(chatSettings.chatArchiveDays), [bench, chatSettings.chatArchiveDays]);
|
|
154
|
-
const sidebar = (0, split_pane_1.usePane)(app_shell_hooks_1.SIDEBAR);
|
|
155
|
-
const editor = (0, split_pane_1.usePane)(app_shell_hooks_1.EDITOR);
|
|
156
|
-
const online = workbench.status === 'online';
|
|
157
|
-
// Files named in replies outside a conversation (channels, pages) are in the server's directory.
|
|
158
|
-
const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
|
|
159
|
-
const fileUrl = React.useCallback(async (path, box) => files.loadable(thumbnail_1.ThumbnailUtil.boxed(await bench.workspace.fileUrl(path), box)), [bench, files]);
|
|
160
|
-
const openLink = (0, hooks_1.useOpenLink)(undefined);
|
|
161
|
-
(0, workbench_view_1.useDocument)();
|
|
162
|
-
(0, app_shell_hooks_1.useRefresh)(online);
|
|
163
|
-
// What the server and its packages say (errors, questions) is in the language of the page.
|
|
164
|
-
React.useEffect(() => {
|
|
165
|
-
if (online) {
|
|
166
|
-
bench.settings.setLanguage(language).catch(() => undefined);
|
|
167
|
-
}
|
|
168
|
-
}, [online, language, bench]);
|
|
169
|
-
React.useEffect(() => {
|
|
170
|
-
void bench.start();
|
|
171
|
-
}, [bench]);
|
|
172
|
-
// The computer cannot be reached from the start: the web extensions of the last time start anyway (from
|
|
173
|
-
// the code this device kept) and show what they read last; online, `chat.start` loads them.
|
|
174
|
-
const offline = workbench.status === 'offline';
|
|
175
|
-
const startedOffline = React.useRef(false);
|
|
176
|
-
React.useEffect(() => {
|
|
177
|
-
if (offline && !startedOffline.current) {
|
|
178
|
-
startedOffline.current = true;
|
|
179
|
-
void host.refresh().catch(() => undefined);
|
|
180
|
-
}
|
|
181
|
-
}, [offline, host]);
|
|
182
|
-
/** The conversation the page opens with is shown: those shown after are the user's doing. */
|
|
183
|
-
const started = React.useRef(false);
|
|
184
|
-
React.useEffect(() => {
|
|
185
|
-
if (online) {
|
|
186
|
-
void chat.start().then(() => {
|
|
187
|
-
started.current = true;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}, [online, chat]);
|
|
191
|
-
// A tab a web extension opens is meant to be seen, unless it opens again behind the others as the page loads.
|
|
192
|
-
const { activeEditor, focus } = extensions;
|
|
193
|
-
const revealEditor = editor.reveal;
|
|
194
|
-
React.useEffect(() => {
|
|
195
|
-
if (focus > 0) {
|
|
196
|
-
revealRight();
|
|
197
|
-
revealEditor();
|
|
198
|
-
// Opened from the launcher or the board: the workbench comes in their place.
|
|
199
|
-
setSurface(undefined);
|
|
200
|
-
}
|
|
201
|
-
}, [focus, revealRight, revealEditor]);
|
|
202
|
-
React.useEffect(() => {
|
|
203
|
-
host.setSettingsOpener(openSettings);
|
|
204
|
-
return () => host.setSettingsOpener(undefined);
|
|
205
|
-
}, [host, openSettings]);
|
|
206
|
-
// A web extension shows another conversation: the conversation, not a page, a drawer or the workbench over it, is then in front.
|
|
207
|
-
React.useEffect(() => {
|
|
208
|
-
host.setSessionSwitcher(async (session, opening) => {
|
|
209
|
-
// In front at once, while it opens.
|
|
210
|
-
const shown = typeof session === 'object' && 'sessionFile' in session ? chat.resume(session.sessionFile) : chat.show(session, opening);
|
|
211
|
-
setNavOpen(false);
|
|
212
|
-
setSurface(undefined);
|
|
213
|
-
setSettings(undefined);
|
|
214
|
-
setScreenOpen(true);
|
|
215
|
-
setMaximized(false);
|
|
216
|
-
uncoverRight();
|
|
217
|
-
try {
|
|
218
|
-
await shown;
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
// A phone goes back to the list it came from, rather than showing the conversation of before.
|
|
222
|
-
if (phone && chat.state.pending === undefined) {
|
|
223
|
-
setScreenOpen(false);
|
|
224
|
-
}
|
|
225
|
-
throw error;
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
return () => host.setSessionSwitcher(undefined);
|
|
229
|
-
}, [host, chat, uncoverRight, phone]);
|
|
230
|
-
// A page shown from the sidebar on a phone: the drawer goes; so do the settings, for the page or the conversation shown.
|
|
231
|
-
const { page } = extensions;
|
|
232
|
-
const shownSession = store === null || store === void 0 ? void 0 : store.sessionId;
|
|
233
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the page
|
|
234
|
-
React.useEffect(() => setNavOpen(false), [page]);
|
|
235
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows what the main area shows
|
|
236
|
-
React.useEffect(() => {
|
|
237
|
-
setSettings(undefined);
|
|
238
|
-
// A phone keeps the tab under what came over it.
|
|
239
|
-
if (!phone) {
|
|
240
|
-
setTabPage(undefined);
|
|
241
|
-
}
|
|
242
|
-
}, [page, shownSession]);
|
|
243
|
-
// Another conversation shown that no sidebar view lists (not that of an agent, which is in a group), by a page,
|
|
244
|
-
// 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,
|
|
245
|
-
// nor one the list does not have yet: it may be an agent's.
|
|
246
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the conversation shown
|
|
247
|
-
React.useEffect(() => {
|
|
248
|
-
if (!shownSession || !started.current || phone) {
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
const info = workbench.sessions.find(session => session.sessionId === shownSession);
|
|
252
|
-
if (info && !info.group) {
|
|
253
|
-
setSideId('');
|
|
254
|
-
}
|
|
255
|
-
}, [shownSession]);
|
|
256
|
-
const { hasCards, openCards, cardsTool } = (0, app_shell_hooks_1.useWorkbenchCards)(rightOpen && !editor.collapsed);
|
|
257
|
-
const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
|
|
258
|
-
const sideViews = side_lists_1.SideListUtil.sidebarViews(extensions.views);
|
|
259
|
-
const sideView = sideId === app_shell_hooks_1.FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
|
|
260
|
-
// The first start, nothing kept: the double's list may still come, rather than the chats shown a moment before it.
|
|
261
|
-
const sideComing = sideId === app_shell_hooks_1.FIRST_SIDE && !sideView && !extensions.loaded;
|
|
262
|
-
const side = sideView ? sideView.id : sideComing ? app_shell_hooks_1.FIRST_SIDE : '';
|
|
263
|
-
const showPage = (id) => {
|
|
264
|
-
host.showPage(id);
|
|
265
|
-
setNavOpen(false);
|
|
266
|
-
setSettings(undefined);
|
|
267
|
-
setTabPage(undefined);
|
|
268
|
-
};
|
|
269
|
-
const lists = side_lists_1.SideListUtil.of(sideViews, t('ta.chat'));
|
|
270
|
-
const tools = [...(hasCards ? [cardsTool] : []), ...extensions.views.filter(candidate => candidate.location === 'panel')];
|
|
271
|
-
const openTool = (id) => (id === app_shell_hooks_1.CARDS_ID ? openCards() : host.openView(id));
|
|
272
|
-
// The workbench: the tabs open, or the tools that open there.
|
|
273
|
-
const editors = extensions.editors.length > 0 || tools.length > 0;
|
|
274
|
-
// The settings take the place of the conversation and of the workbench, as a page of their own.
|
|
275
|
-
const showEditors = rightOpen && editors && !editor.collapsed && !settingsShown;
|
|
276
|
-
// Over the conversation of a narrow screen, closing the last tab goes back to the conversation.
|
|
277
|
-
const tabCount = extensions.editors.length;
|
|
278
|
-
const tabsBefore = React.useRef(tabCount);
|
|
279
|
-
React.useEffect(() => {
|
|
280
|
-
if (tabsBefore.current > 0 && tabCount === 0 && showEditors && layout !== 'expanded') {
|
|
281
|
-
toggleRight();
|
|
282
|
-
}
|
|
283
|
-
tabsBefore.current = tabCount;
|
|
284
|
-
}, [tabCount, showEditors, toggleRight, layout]);
|
|
285
|
-
(0, app_shell_hooks_1.useDrawerSwipe)(touch && layout === 'compact' && !phone && !showEditors, navOpen, setNavOpen);
|
|
286
|
-
// The pages of the rail: in the navigation, or under Discover.
|
|
287
|
-
const navigation = (0, app_nav_1.useNavigation)(extensions.views);
|
|
288
|
-
const codeScan = (0, hooks_1.useCodeScan)();
|
|
289
|
-
const [, notices] = (0, hooks_1.useNotices)();
|
|
290
|
-
// Without a sidebar view that lists the double, its page is the first tab: it opens there, once the views are in.
|
|
291
|
-
const homeOpened = React.useRef(false);
|
|
292
|
-
const homeId = phone && extensions.views.length > 0 ? (_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id : undefined;
|
|
293
|
-
React.useEffect(() => {
|
|
294
|
-
if (homeId && !homeOpened.current) {
|
|
295
|
-
homeOpened.current = true;
|
|
296
|
-
if (!host.state.page) {
|
|
297
|
-
host.showPage(homeId);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}, [homeId, host]);
|
|
301
|
-
// A page of an extension started on open that Discover lists: shown as those of Discover are.
|
|
302
|
-
const discoveredOnOpen = !!(view === null || view === void 0 ? void 0 : view.onOpen) && navigation.onOpen.some(entry => entry.state === 'shown');
|
|
303
|
-
const railView = view && (view === navigation.home || navigation.pages.includes(view) || discoveredOnOpen) ? view : undefined;
|
|
304
|
-
// 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.
|
|
305
|
-
const tabView = view && (view === navigation.home || navigation.nav.includes(view)) ? view : undefined;
|
|
306
|
-
// A page of the screen, and those in the background beside it, kept as they were.
|
|
307
|
-
const screenPage = settings === undefined && view && !tabView ? view : undefined;
|
|
308
|
-
// The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
|
|
309
|
-
const conversationShown = phone ? screenOpen && settings === undefined && !screenPage : settings === undefined && tabPage !== 'discover' && !view;
|
|
310
|
-
React.useEffect(() => host.setConversationShown(conversationShown), [host, conversationShown]);
|
|
311
|
-
// What the user has seen is kept here, whichever list or tab is out: one read from the agents' list is seen too.
|
|
312
|
-
const { seen: seenChats, looking } = (0, assistant_chat_list_1.useSeenConversations)(workbench.sessions, conversationShown ? store === null || store === void 0 ? void 0 : store.sessionId : undefined, (view === null || view === void 0 ? void 0 : view.id) === side_lists_1.DOUBLE_PAGE && settings === undefined && (!phone || screenOpen || view === tabView));
|
|
313
|
-
// The others in the same Ta see who looks at a conversation with them (TaSessionInfo.people), while the page is seen.
|
|
314
|
-
const pageVisible = (0, use_seen_chats_1.usePageVisible)();
|
|
315
|
-
React.useEffect(() => bench.presence.look(pageVisible ? looking : undefined), [bench, pageVisible, looking]);
|
|
316
|
-
const state = (0, react_1.useInject)(state_protocol_1.TaState);
|
|
317
|
-
const { pageShown } = extensions;
|
|
318
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the pages shown
|
|
319
|
-
React.useEffect(() => {
|
|
320
|
-
// A page that slides in over it: the launcher or the board goes once covered, not under the page as it comes.
|
|
321
|
-
if (phone && surface && view && !tabView) {
|
|
322
|
-
const timer = setTimeout(() => setSurface(undefined), 420);
|
|
323
|
-
closing.current = () => clearTimeout(timer);
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
setSurface(undefined);
|
|
327
|
-
}
|
|
328
|
-
// A page shown from the workbench over it (Open in the main area of a channel): the workbench goes, as for a conversation.
|
|
329
|
-
if (pageShown > 0 && view) {
|
|
330
|
-
setSettings(undefined);
|
|
331
|
-
setScreenOpen(!tabView);
|
|
332
|
-
setMaximized(false);
|
|
333
|
-
uncoverRight();
|
|
334
|
-
}
|
|
335
|
-
}, [pageShown]);
|
|
336
|
-
React.useEffect(() => () => { var _a; return (_a = closing.current) === null || _a === void 0 ? void 0 : _a.call(closing); }, []);
|
|
337
|
-
React.useEffect(() => {
|
|
338
|
-
if (layout !== 'compact') {
|
|
339
|
-
setNavOpen(false);
|
|
340
|
-
}
|
|
341
|
-
}, [layout]);
|
|
342
|
-
// 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.
|
|
343
|
-
const full = settings !== undefined || tabPage === 'discover' || railView !== undefined;
|
|
344
|
-
const sideShown = navOpen || (!sidebar.collapsed && !full);
|
|
345
|
-
// Over such a page, the logo (and Mod+B) goes back to the conversation, with the sidebar.
|
|
346
|
-
const toggleSide = () => {
|
|
347
|
-
if (navOpen) {
|
|
348
|
-
setNavOpen(false);
|
|
349
|
-
}
|
|
350
|
-
else if (full) {
|
|
351
|
-
setSettings(undefined);
|
|
352
|
-
setTabPage(undefined);
|
|
353
|
-
if (view) {
|
|
354
|
-
host.showPage('');
|
|
355
|
-
}
|
|
356
|
-
sidebar.reveal();
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
sidebar.toggle();
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
// A list of the rail: it shows in the sidebar, in place of a page; picked again, the sidebar (or the drawer) goes.
|
|
363
|
-
const showList = (id) => {
|
|
364
|
-
const pick = side_lists_1.SideListUtil.pick(id, { side, drawer: navOpen, shown: sideShown });
|
|
365
|
-
if (pick === 'close') {
|
|
366
|
-
setNavOpen(false);
|
|
367
|
-
}
|
|
368
|
-
else if (pick === 'hide') {
|
|
369
|
-
sidebar.toggle();
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
setSideId(id);
|
|
373
|
-
}
|
|
374
|
-
if (pick === 'show') {
|
|
375
|
-
setSettings(undefined);
|
|
376
|
-
setTabPage(undefined);
|
|
377
|
-
if (view && full) {
|
|
378
|
-
host.showPage('');
|
|
379
|
-
}
|
|
380
|
-
sidebar.reveal();
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
const toggleWorkbench = () => {
|
|
384
|
-
if (showEditors) {
|
|
385
|
-
toggleRight();
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
// Over the settings of a wide screen (the rail, Cmd/Ctrl+J): they give way to what was under them.
|
|
389
|
-
if (!phone && settings !== undefined) {
|
|
390
|
-
setSettings(undefined);
|
|
391
|
-
}
|
|
392
|
-
revealRight();
|
|
393
|
-
editor.reveal();
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
(0, app_shell_hooks_1.useKeys)(toggleSide, openSettings, () => editors && toggleWorkbench());
|
|
397
|
-
(0, app_shell_hooks_1.useTitlebarColor)(workbench.status !== 'signed-out', theme);
|
|
101
|
+
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, } = (0, app_shell_state_1.useAppShell)();
|
|
398
102
|
const [providers, reloadProviders] = (0, auth_view_1.useAuthProviders)(online);
|
|
399
103
|
const [later, setLater] = (0, hooks_1.usePersisted)(app_shell_hooks_1.LOGIN_LATER);
|
|
400
104
|
/** A call failed for want of a sign-in (SIGN_IN_EVENT): the page of sign-in, even if the user put it off. */
|
|
@@ -408,7 +112,9 @@ function AppShell() {
|
|
|
408
112
|
return () => window.removeEventListener(notices_1.SIGN_IN_EVENT, ask);
|
|
409
113
|
}, [reloadProviders]);
|
|
410
114
|
/** The page of the double: its own, or the one a sidebar view that lists it opens. */
|
|
411
|
-
const doubleId = (_e = (
|
|
115
|
+
const doubleId = (_e = (_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id) !== null && _e !== void 0 ? _e : side_lists_1.DOUBLE_PAGE;
|
|
116
|
+
// Where Ta's agents read the page to be, and go (docs/design/ta-app-use.md 3): set below as it renders.
|
|
117
|
+
const screenShell = (0, screen_navigator_1.useScreenNavigator)();
|
|
412
118
|
if (workbench.status === 'signed-out') {
|
|
413
119
|
return React.createElement(workbench_view_1.SignIn, { error: workbench.error });
|
|
414
120
|
}
|
|
@@ -422,7 +128,7 @@ function AppShell() {
|
|
|
422
128
|
}, onSignedIn: () => {
|
|
423
129
|
setAsked(false);
|
|
424
130
|
reloadProviders();
|
|
425
|
-
} }));
|
|
131
|
+
}, onProviders: reloadProviders }));
|
|
426
132
|
}
|
|
427
133
|
// What the columns beside the conversation and the editors take, so that the editors never take more than the conversation.
|
|
428
134
|
const sideWidths = {
|
|
@@ -442,15 +148,22 @@ function AppShell() {
|
|
|
442
148
|
showPage('');
|
|
443
149
|
}
|
|
444
150
|
};
|
|
445
|
-
|
|
151
|
+
picking.current = picked;
|
|
152
|
+
const chats = (React.createElement(assistant_chat_list_1.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) => {
|
|
153
|
+
var _a;
|
|
154
|
+
const file = chat_list_util_1.ChatListUtil.file(entry);
|
|
155
|
+
const before = state.get(chat_seen_1.SEEN_CHATS);
|
|
156
|
+
const now = Date.now();
|
|
157
|
+
state.set(chat_seen_1.SEEN_CHATS, unseen ? chat_seen_1.ChatSeenUtil.markUnseen(before, file, now) : ((_a = chat_seen_1.ChatSeenUtil.look(before, file, entry.updatedAt, now)) !== null && _a !== void 0 ? _a : before));
|
|
158
|
+
}, letGo: letGoAsks, onLetGo: entry => {
|
|
446
159
|
var _a;
|
|
447
160
|
const at = (_a = entry.asking) === null || _a === void 0 ? void 0 : _a.at;
|
|
448
161
|
if (at !== undefined) {
|
|
449
|
-
setLetGoAsks(before => chat_asks_1.ChatAskUtil.letGo(before,
|
|
162
|
+
setLetGoAsks(before => chat_asks_1.ChatAskUtil.letGo(before, chat_list_util_1.ChatListUtil.file(entry), at));
|
|
450
163
|
}
|
|
451
|
-
}, onPicked: picked }));
|
|
164
|
+
}, onPicked: picked, busy: chatsBusy, onBusy: setChatsBusy }));
|
|
452
165
|
const sideList = sideView ? React.createElement(app_nav_1.SidebarView, { view: sideView }) : sideComing ? React.createElement(list_skeleton_1.ListSkeleton, null) : chats;
|
|
453
|
-
const editorArea = (React.createElement(editor_area_1.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 = web_extension_protocol_1.WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (
|
|
166
|
+
const editorArea = (React.createElement(editor_area_1.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 = web_extension_protocol_1.WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (_b = workbench.server) === null || _b === void 0 ? void 0 : _b.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
|
|
454
167
|
// A photo of the scan screen to the double: its conversation shows, the photo goes with what to do with it.
|
|
455
168
|
const askDouble = async (text, image) => {
|
|
456
169
|
const double = extensions.views.find(candidate => candidate.id === side_lists_1.DOUBLE_PAGE);
|
|
@@ -531,13 +244,19 @@ function AppShell() {
|
|
|
531
244
|
}
|
|
532
245
|
: {};
|
|
533
246
|
// The chats' tab has the amber dot of their rows while one of them said something unseen, as a messenger's: of
|
|
534
|
-
// those the list shows, so that each dot of the tab has a row to find.
|
|
247
|
+
// those the list shows, so that each dot of the tab has a row to find. Those that
|
|
535
248
|
// wait for the user to decide are counted on it, on the rail too, until answered.
|
|
536
|
-
const listedChats =
|
|
249
|
+
const listedChats = chat_list_util_1.ChatListUtil.entries(workbench.sessions, workbench.saved, removedChats, undefined, workbench_util_1.WorkbenchUtil.daysAgo(Date.now(), chatSettings.chatArchiveDays), chat_list_util_1.ChatListUtil.keptFiles(workbench.saved, pinnedChats, letGoAsks), chat_icon_1.ChatIconUtil.archiveSince(extensions.chatIcons, Date.now())).listed;
|
|
537
250
|
const chatsAsking = chat_asks_1.ChatAskUtil.count(listedChats, letGoAsks);
|
|
538
251
|
const inFront = looking ? workbench.sessions.find(session => session.sessionId === looking) : undefined;
|
|
539
|
-
const chatsUnseen = chat_seen_1.ChatSeenUtil.anyUnseen(listedChats, seenChats, inFront &&
|
|
540
|
-
|
|
252
|
+
const chatsUnseen = chat_seen_1.ChatSeenUtil.anyUnseen(listedChats, seenChats, inFront && chat_list_util_1.ChatListUtil.file(inFront));
|
|
253
|
+
// Dragged away, the dot or the count of the tab: all seen, and what waits for the user let go.
|
|
254
|
+
const seeAllChats = () => {
|
|
255
|
+
state.set(chat_seen_1.SEEN_CHATS, chat_seen_1.ChatSeenUtil.seeAll(state.get(chat_seen_1.SEEN_CHATS), listedChats, Date.now()));
|
|
256
|
+
if (chatsAsking) {
|
|
257
|
+
setLetGoAsks(before => chat_asks_1.ChatAskUtil.letGoAll(before, listedChats));
|
|
258
|
+
}
|
|
259
|
+
};
|
|
541
260
|
const tabs = phone
|
|
542
261
|
? (0, nav_places_1.phoneTabs)(lists, navigation, {
|
|
543
262
|
discover: t('ta.discover'),
|
|
@@ -548,23 +267,93 @@ function AppShell() {
|
|
|
548
267
|
}).map(item => (item.id === '' && (chatsUnseen || chatsAsking) ? { ...item, unseen: chatsUnseen, onSeeAll: seeAllChats, asks: chatsAsking } : item))
|
|
549
268
|
: [];
|
|
550
269
|
const tab = tabPage === 'me' ? nav_places_1.ME_TAB : tabPage === 'discover' ? nav_places_1.DISCOVER : ((_g = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _g !== void 0 ? _g : side);
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
270
|
+
const pickTab = (id) => {
|
|
271
|
+
var _a;
|
|
272
|
+
setSurface(undefined);
|
|
273
|
+
if (id === ((_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id) || navigation.nav.some(candidate => candidate.id === id)) {
|
|
274
|
+
showPage(id);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
setTabPage(id === nav_places_1.ME_TAB ? 'me' : id === nav_places_1.DISCOVER ? 'discover' : undefined);
|
|
278
|
+
if (tabView) {
|
|
279
|
+
host.showPage('');
|
|
280
|
+
}
|
|
281
|
+
if (id !== nav_places_1.ME_TAB && id !== nav_places_1.DISCOVER) {
|
|
282
|
+
setSideId(id);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
const chatName = (entry) => entry.sessionName || entry.firstMessage || t('ta.chat.new');
|
|
286
|
+
const shownChat = store ? workbench.sessions.find(session => session.sessionId === store.sessionId) : undefined;
|
|
287
|
+
screenShell.current = {
|
|
288
|
+
phone,
|
|
289
|
+
where: screen_navigator_util_1.ScreenNavigatorUtil.where({
|
|
290
|
+
settings: settingsShown ? (settings !== null && settings !== void 0 ? settings : '') : undefined,
|
|
291
|
+
page: phone ? (screenOpen ? screenPage : tabView) : tabPage === 'discover' ? undefined : view,
|
|
292
|
+
discover: tabPage === 'discover',
|
|
293
|
+
me: phone && !screenOpen && tabPage === 'me',
|
|
294
|
+
list: (phone ? !screenOpen && !tabView && !tabPage : sideShown) ? (_c = lists.find(entry => entry.id === side)) === null || _c === void 0 ? void 0 : _c.label : undefined,
|
|
295
|
+
chat: (phone ? screenOpen && !screenPage && settings === undefined : settings === undefined && tabPage !== 'discover' && !view)
|
|
296
|
+
? shownChat
|
|
297
|
+
? chatName(shownChat)
|
|
298
|
+
: t('ta.chat.new')
|
|
299
|
+
: undefined,
|
|
300
|
+
words: { settings: t('ta.settings'), discover: t('ta.discover'), me: t('ta.me') },
|
|
301
|
+
}),
|
|
302
|
+
places: [
|
|
303
|
+
...lists.map(entry => ({ id: `list:${entry.id}`, title: entry.label })),
|
|
304
|
+
...[...(navigation.home ? [navigation.home] : []), ...navigation.pages].map(page => ({
|
|
305
|
+
id: `page:${page.id}`,
|
|
306
|
+
title: web_extension_protocol_1.WebLabelUtil.text(page.title),
|
|
307
|
+
})),
|
|
308
|
+
...navigation.onOpen.map(page => ({ id: `page:${page.id}`, title: page.title })),
|
|
309
|
+
{ id: 'discover', title: t('ta.discover') },
|
|
310
|
+
...(phone ? [{ id: 'me', title: t('ta.me') }] : []),
|
|
311
|
+
{ id: 'settings', title: t('ta.settings') },
|
|
312
|
+
],
|
|
313
|
+
goPlace: place => {
|
|
314
|
+
const [kind, id = ''] = place.id.split(/:(.*)/s);
|
|
315
|
+
if (kind === 'settings') {
|
|
316
|
+
return openSettings();
|
|
317
|
+
}
|
|
318
|
+
if (kind === 'page') {
|
|
319
|
+
return host.showView(id);
|
|
320
|
+
}
|
|
321
|
+
if (phone) {
|
|
322
|
+
return pickTab(kind === 'list' ? id : kind === 'me' ? nav_places_1.ME_TAB : nav_places_1.DISCOVER);
|
|
323
|
+
}
|
|
324
|
+
setSettings(undefined);
|
|
325
|
+
setNavOpen(false);
|
|
326
|
+
if (kind === 'discover') {
|
|
327
|
+
setTabPage('discover');
|
|
558
328
|
return;
|
|
559
329
|
}
|
|
560
|
-
setTabPage(
|
|
561
|
-
|
|
330
|
+
setTabPage(undefined);
|
|
331
|
+
setSideId(id);
|
|
332
|
+
if (view) {
|
|
562
333
|
host.showPage('');
|
|
563
334
|
}
|
|
564
|
-
|
|
565
|
-
|
|
335
|
+
sidebar.reveal();
|
|
336
|
+
},
|
|
337
|
+
showChat: async (target) => {
|
|
338
|
+
const switcher = host.sessionSwitcher();
|
|
339
|
+
if (!switcher) {
|
|
340
|
+
throw new Error('The page cannot show a conversation yet.');
|
|
566
341
|
}
|
|
567
|
-
|
|
342
|
+
const shown = switcher('sessionId' in target ? target.sessionId : { sessionFile: target.sessionFile });
|
|
343
|
+
host.showPage('');
|
|
344
|
+
await shown;
|
|
345
|
+
},
|
|
346
|
+
chats: [
|
|
347
|
+
...workbench.sessions
|
|
348
|
+
.filter(session => !session.group)
|
|
349
|
+
.map(session => ({ name: chatName(session), sessionId: session.sessionId, sessionFile: session.sessionFile })),
|
|
350
|
+
...workbench.saved.filter(saved => !saved.group).map(saved => ({ name: chatName(saved), sessionFile: saved.sessionFile })),
|
|
351
|
+
],
|
|
352
|
+
openSettings,
|
|
353
|
+
};
|
|
354
|
+
// The launcher and the board are over the first tab only, as WeChat's over its chats.
|
|
355
|
+
const firstTab = ((_d = tabs[0]) === null || _d === void 0 ? void 0 : _d.id) === tab;
|
|
356
|
+
const content = phone ? (React.createElement(phone_shell_1.PhoneShell, { tabs: tabs, tab: tab, launcher: firstTab && surfaces.launcher ? React.createElement(launcher_surface_1.LauncherSurface, { active: surface === 'launcher' }) : undefined, board: firstTab && surfaces.board ? (React.createElement(board_1.BoardSurface, { leading: React.createElement(icon_1.IconButton, { icon: lucide_react_1.ChevronLeft, label: t('ta.back'), onClick: () => setSurface(undefined) }) })) : undefined, surface: surface, onSurface: setSurface, onTab: pickTab, home: tabPage === 'me' ? (React.createElement("div", { className: "ta-main" },
|
|
568
357
|
React.createElement(me_view_1.MeView, { onSettings: openSettings }))) : tabPage === 'discover' ? (React.createElement("div", { className: "ta-main" }, discoverView())) : tabView ? (React.createElement("div", { className: "ta-main" },
|
|
569
358
|
React.createElement(app_nav_1.PageView, { view: tabView }))) : (React.createElement("div", { className: "ta-sidebar" }, sideList)), screen: React.createElement(React.Fragment, null,
|
|
570
359
|
React.createElement(kept_pages_1.KeptPages, { views: extensions.views, kept: extensions.kept, shown: screenPage, render: page => (React.createElement(app_nav_1.PageView, { view: page, leading: React.createElement(icon_1.IconButton, { icon: lucide_react_1.ChevronLeft, label: t('ta.back'), className: "ta-narrow-only", onClick: closeScreen }) })) }),
|
|
@@ -575,7 +364,7 @@ function AppShell() {
|
|
|
575
364
|
setSettings(undefined);
|
|
576
365
|
setNavOpen(false);
|
|
577
366
|
setTabPage('discover');
|
|
578
|
-
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks: chatsAsking }),
|
|
367
|
+
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks: chatsAsking, onDismissAsks: seeAllChats }),
|
|
579
368
|
sideShown && (React.createElement("div", { className: "ta-sidebar", style: (0, split_pane_1.paneStyle)(sidebar) },
|
|
580
369
|
sideList,
|
|
581
370
|
React.createElement(split_pane_1.Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
|
|
@@ -601,8 +390,13 @@ function AppShell() {
|
|
|
601
390
|
}
|
|
602
391
|
/** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
|
|
603
392
|
function AppView() {
|
|
393
|
+
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
394
|
+
const [shared] = React.useState(() => shared_link_1.SharedPageUtil.link());
|
|
604
395
|
// The launch picture of the app of a phone goes once the page is whole.
|
|
605
396
|
React.useEffect(() => launch_screen_1.LaunchScreenUtil.start(), []);
|
|
397
|
+
if (shared) {
|
|
398
|
+
return React.createElement(shared_page_1.SharedPage, { link: shared });
|
|
399
|
+
}
|
|
606
400
|
return (React.createElement(dino_look_1.DinoLookProvider, null,
|
|
607
401
|
React.createElement(AppShell, null),
|
|
608
402
|
React.createElement(dino_look_1.DinoLookHost, null)));
|
|
@@ -1,6 +1,10 @@
|
|
|
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;
|
|
6
10
|
//# sourceMappingURL=asks-badge.d.ts.map
|
|
@@ -36,9 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.AsksBadge = AsksBadge;
|
|
37
37
|
const React = __importStar(require("react"));
|
|
38
38
|
const use_t_1 = require("../i18n/use-t");
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const unseen_drop_1 = require("./unseen-drop");
|
|
40
|
+
/**
|
|
41
|
+
* How many conversations wait for the user to decide, on the entry of the chats (a tab, the rail): blue, as their ? on
|
|
42
|
+
* the rows. Dragged away as the amber dot (UnseenDrop), all of them are let go and seen (`onDismiss`).
|
|
43
|
+
*/
|
|
44
|
+
function AsksBadge({ count, onDismiss }) {
|
|
41
45
|
const t = (0, use_t_1.useT)();
|
|
42
|
-
return (React.createElement(
|
|
46
|
+
return (React.createElement(unseen_drop_1.UnseenDrop, { label: t('ta.chat.asksCount', { count }), onDismiss: onDismiss, className: "ta-asks-badge", tone: "asks" }, count > 99 ? '99+' : count));
|
|
43
47
|
}
|
|
44
48
|
//# 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;
|
|
@@ -61,7 +61,19 @@ function Key() {
|
|
|
61
61
|
[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" }))),
|
|
62
62
|
React.createElement("rect", { className: "ta-pic-box", x: "96", y: "68", width: "50", height: "15", rx: "7.5" })));
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
/** A program installed on this computer: a terminal, a command run, its install going. */
|
|
65
|
+
function Program() {
|
|
66
|
+
return (React.createElement(React.Fragment, null,
|
|
67
|
+
React.createElement("rect", { className: "ta-pic-pane", x: "1", y: "1", width: "158", height: "18", rx: "9" }),
|
|
68
|
+
React.createElement("circle", { className: "ta-pic-line", cx: "12", cy: "10", r: "2.5" }),
|
|
69
|
+
React.createElement("circle", { className: "ta-pic-line", cx: "20", cy: "10", r: "2.5" }),
|
|
70
|
+
React.createElement("path", { className: "ta-pic-stroke", d: "M18 32l6 5-6 5" }),
|
|
71
|
+
React.createElement(picture_1.PictureLine, { x: 32, y: 35, w: 64 }),
|
|
72
|
+
React.createElement("rect", { className: "ta-pic-accent", x: "14", y: "54", width: "132", height: "14", rx: "7" }),
|
|
73
|
+
React.createElement("rect", { className: "ta-pic-mark", x: "17", y: "57", width: "84", height: "8", rx: "4" }),
|
|
74
|
+
React.createElement(picture_1.PictureLine, { x: 14, y: 80, w: 48 })));
|
|
75
|
+
}
|
|
76
|
+
const PICTURES = { oauth: Account, api_key: Key, program: Program };
|
|
65
77
|
function AuthPicture({ kind }) {
|
|
66
78
|
const Shapes = PICTURES[kind];
|
|
67
79
|
return (React.createElement(picture_1.Picture, null,
|