@celljs/ta-web 4.17.0 → 4.19.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 +2 -1
- package/README.md +2 -1
- package/esm/browser/account/account-side.d.ts +13 -0
- package/esm/browser/account/account-side.js +74 -0
- package/esm/browser/account/device-account.d.ts +69 -0
- package/esm/browser/account/device-account.js +215 -0
- package/esm/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/esm/browser/assistant/assistant-chat-list.js +74 -4
- package/esm/browser/assistant/assistant-export.js +6 -2
- package/esm/browser/assistant/assistant-extension.js +70 -15
- package/esm/browser/assistant/assistant-role.d.ts +2 -2
- package/esm/browser/assistant/assistant-role.js +7 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +4 -0
- package/esm/browser/assistant/assistant-task-source.js +18 -4
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +14 -3
- package/esm/browser/assistant/assistant-tasks.js +2 -2
- package/esm/browser/assistant/assistant-thread.js +5 -1
- package/esm/browser/assistant/assistant-view.js +3 -5
- package/esm/browser/assistant/assistant.js +2 -1
- package/esm/browser/assistant/call-keeper.d.ts +142 -0
- package/esm/browser/assistant/call-keeper.js +292 -0
- package/esm/browser/assistant/call-screen.d.ts +39 -0
- package/esm/browser/assistant/call-screen.js +75 -0
- package/esm/browser/assistant/chat-task-source.d.ts +16 -18
- package/esm/browser/assistant/chat-task-source.js +27 -52
- package/esm/browser/assistant/realtime-voice.d.ts +62 -1
- package/esm/browser/assistant/realtime-voice.js +188 -29
- package/esm/browser/assistant/task-views.d.ts +9 -6
- package/esm/browser/assistant/task-views.js +28 -10
- package/esm/browser/assistant/voice-call-bar.d.ts +11 -4
- package/esm/browser/assistant/voice-call-bar.js +102 -46
- package/esm/browser/assistant/voice-call.d.ts +33 -1
- package/esm/browser/assistant/voice-call.js +131 -28
- package/esm/browser/assistant/voice-reopen.d.ts +18 -0
- package/esm/browser/assistant/voice-reopen.js +54 -0
- package/esm/browser/chat/chat-view.js +5 -8
- package/esm/browser/cloud/cloud-sign-in.d.ts +100 -0
- package/esm/browser/cloud/cloud-sign-in.js +239 -0
- package/esm/browser/cloud/device-page.d.ts +15 -0
- package/esm/browser/cloud/device-page.js +39 -0
- package/esm/browser/components/access-view.js +25 -1
- package/esm/browser/components/account-menu.d.ts +1 -1
- package/esm/browser/components/account-menu.js +7 -2
- package/esm/browser/components/account-view.d.ts +17 -0
- package/esm/browser/components/account-view.js +216 -0
- package/esm/browser/components/app-contexts.d.ts +12 -0
- package/esm/browser/components/app-contexts.js +28 -0
- package/esm/browser/components/app-nav.d.ts +5 -3
- package/esm/browser/components/app-nav.js +11 -8
- package/esm/browser/components/app-shell-state.d.ts +2 -2
- package/esm/browser/components/app-shell-state.js +33 -28
- package/esm/browser/components/app-view.js +113 -82
- package/esm/browser/components/auth-view.js +3 -5
- package/esm/browser/components/call-pill.d.ts +11 -0
- package/esm/browser/components/call-pill.js +19 -0
- package/esm/browser/components/chat-home-util.d.ts +112 -0
- package/esm/browser/components/chat-home-util.js +123 -0
- package/esm/browser/components/chat-home.d.ts +54 -0
- package/esm/browser/components/chat-home.js +125 -0
- package/esm/browser/components/chat-icon.d.ts +4 -2
- package/esm/browser/components/chat-icon.js +15 -5
- package/esm/browser/components/chat-list-hooks.d.ts +30 -0
- package/esm/browser/components/chat-list-hooks.js +81 -0
- package/esm/browser/components/chat-list-props.d.ts +54 -0
- package/esm/browser/components/chat-list-props.js +2 -0
- package/esm/browser/components/chat-list-row.d.ts +14 -2
- package/esm/browser/components/chat-list-row.js +27 -17
- package/esm/browser/components/chat-list-util.d.ts +40 -9
- package/esm/browser/components/chat-list-util.js +72 -9
- package/esm/browser/components/chat-list.d.ts +4 -49
- package/esm/browser/components/chat-list.js +118 -87
- package/esm/browser/components/cloud-sign-in-view.d.ts +65 -0
- package/esm/browser/components/cloud-sign-in-view.js +351 -0
- package/esm/browser/components/code-editor.js +2 -1
- package/esm/browser/components/composer-box.js +7 -0
- package/esm/browser/components/connection-bar.js +22 -3
- package/esm/browser/components/context-menu.d.ts +11 -2
- package/esm/browser/components/context-menu.js +14 -3
- package/esm/browser/components/conversation-scroll.d.ts +2 -0
- package/esm/browser/components/conversation-scroll.js +14 -0
- package/esm/browser/components/device-sign-in-page.d.ts +12 -0
- package/esm/browser/components/device-sign-in-page.js +74 -0
- package/esm/browser/components/diff-editor.js +2 -1
- package/esm/browser/components/entry-holds.d.ts +22 -0
- package/esm/browser/components/entry-holds.js +49 -0
- package/esm/browser/components/environment-view.js +8 -8
- package/esm/browser/components/face.d.ts +1 -1
- package/esm/browser/components/fold-text.js +3 -1
- package/esm/browser/components/fork-view.js +2 -4
- package/esm/browser/components/gallery.js +2 -1
- package/esm/browser/components/held-talk.d.ts +6 -2
- package/esm/browser/components/held-talk.js +20 -2
- package/esm/browser/components/host-view.d.ts +11 -4
- package/esm/browser/components/host-view.js +60 -14
- package/esm/browser/components/image-swipe.d.ts +50 -0
- package/esm/browser/components/image-swipe.js +139 -0
- package/esm/browser/components/image-viewer.d.ts +10 -114
- package/esm/browser/components/image-viewer.js +46 -365
- package/esm/browser/components/image-zoom.d.ts +112 -0
- package/esm/browser/components/image-zoom.js +355 -0
- package/esm/browser/components/kept-call-bar.d.ts +12 -0
- package/esm/browser/components/kept-call-bar.js +99 -0
- package/esm/browser/components/lightbox.d.ts +6 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/link-dialog.d.ts +2 -1
- package/esm/browser/components/link-dialog.js +5 -1
- package/esm/browser/components/link.d.ts +4 -0
- package/esm/browser/components/link.js +11 -0
- package/esm/browser/components/loading.d.ts +12 -0
- package/esm/browser/components/loading.js +18 -0
- package/esm/browser/components/markdown.js +2 -1
- package/esm/browser/components/mermaid-view.js +14 -7
- package/esm/browser/components/message-images.js +1 -1
- package/esm/browser/components/message-list.js +12 -7
- package/esm/browser/components/message-steps.js +31 -23
- package/esm/browser/components/message-user.d.ts +10 -1
- package/esm/browser/components/message-user.js +48 -13
- package/esm/browser/components/model-picker.d.ts +3 -1
- package/esm/browser/components/model-picker.js +14 -3
- package/esm/browser/components/nav-places.d.ts +7 -12
- package/esm/browser/components/nav-places.js +10 -13
- package/esm/browser/components/phone-shell.d.ts +1 -1
- package/esm/browser/components/scan-screen.d.ts +4 -2
- package/esm/browser/components/scan-screen.js +46 -20
- package/esm/browser/components/search-page.js +3 -2
- package/esm/browser/components/secret-peek.d.ts +3 -0
- package/esm/browser/components/secret-peek.js +19 -0
- package/esm/browser/components/secret-text.d.ts +41 -0
- package/esm/browser/components/secret-text.js +80 -0
- package/esm/browser/components/session-view.js +44 -13
- package/esm/browser/components/settings-choices.d.ts +3 -3
- package/esm/browser/components/settings-choices.js +9 -29
- package/esm/browser/components/settings-parts.js +5 -2
- package/esm/browser/components/settings-view.js +2 -2
- package/esm/browser/components/share-dialog.d.ts +2 -3
- package/esm/browser/components/share-dialog.js +6 -41
- package/esm/browser/components/share-friends.d.ts +18 -0
- package/esm/browser/components/share-friends.js +56 -0
- package/esm/browser/components/share-sheet.d.ts +15 -0
- package/esm/browser/components/share-sheet.js +79 -0
- package/esm/browser/components/side-lists.d.ts +16 -4
- package/esm/browser/components/side-lists.js +28 -12
- package/esm/browser/components/sign-in-accounts.d.ts +2 -1
- package/esm/browser/components/sign-in-accounts.js +59 -5
- package/esm/browser/components/sign-in-label.d.ts +5 -0
- package/esm/browser/components/sign-in-label.js +10 -0
- package/esm/browser/components/system-link-host.d.ts +2 -0
- package/esm/browser/components/system-link-host.js +17 -0
- package/esm/browser/components/tool-result.d.ts +3 -2
- package/esm/browser/components/tool-result.js +5 -3
- package/esm/browser/components/tool-view.d.ts +21 -3
- package/esm/browser/components/tool-view.js +103 -35
- package/esm/browser/components/unseen-drop.d.ts +2 -1
- package/esm/browser/components/unseen-drop.js +1 -1
- package/esm/browser/components/voice-services.js +26 -3
- package/esm/browser/components/workbench-view.d.ts +1 -1
- package/esm/browser/components/workbench-view.js +42 -5
- package/esm/browser/device/code-scan.d.ts +23 -10
- package/esm/browser/device/code-scan.js +48 -43
- package/esm/browser/device/edge-back.d.ts +17 -0
- package/esm/browser/device/edge-back.js +52 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +2 -2
- package/esm/browser/device/screen-awake.d.ts +24 -0
- package/esm/browser/device/screen-awake.js +59 -0
- package/esm/browser/extension/icons.js +13 -2
- package/esm/browser/extension/share-sheet-compat.d.ts +11 -0
- package/esm/browser/extension/share-sheet-compat.js +27 -0
- package/esm/browser/extension/web-api-chats.d.ts +49 -0
- package/esm/browser/extension/web-api-chats.js +2 -0
- package/esm/browser/extension/web-api-components.d.ts +61 -6
- package/esm/browser/extension/web-api-contributions.d.ts +28 -53
- package/esm/browser/extension/web-api-screen-share.d.ts +10 -0
- package/esm/browser/extension/web-api-screen-share.js +3 -0
- package/esm/browser/extension/web-api-services.d.ts +50 -0
- package/esm/browser/extension/web-api-services.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +45 -65
- package/esm/browser/extension/web-extension-context.d.ts +5 -10
- package/esm/browser/extension/web-extension-context.js +33 -21
- package/esm/browser/extension/web-extension-protocol.d.ts +8 -3
- package/esm/browser/extension/web-extension-run.js +0 -1
- package/esm/browser/extension/web-extensions.d.ts +4 -1
- package/esm/browser/extension/web-extensions.js +12 -0
- package/esm/browser/extension/web-tasks.d.ts +6 -1
- package/esm/browser/extension/web-tasks.js +11 -3
- package/esm/browser/extension/web-view-util.d.ts +0 -1
- package/esm/browser/extension/web-view-util.js +4 -5
- package/esm/browser/files/files.d.ts +1 -0
- package/esm/browser/files/files.js +14 -3
- package/esm/browser/game/game-control.d.ts +118 -0
- package/esm/browser/game/game-control.js +341 -0
- package/esm/browser/game/game-host.d.ts +14 -2
- package/esm/browser/game/game-host.js +22 -5
- package/esm/browser/game/game-protocol.d.ts +15 -0
- package/esm/browser/game/game-runner.d.ts +3 -1
- package/esm/browser/game/game-runner.js +6 -0
- package/esm/browser/game/game-util.d.ts +3 -0
- package/esm/browser/game/game-util.js +3 -0
- package/esm/browser/game/game-view.d.ts +5 -2
- package/esm/browser/game/game-view.js +4 -4
- package/esm/browser/game/game3d-protocol.d.ts +5 -1
- package/esm/browser/game/game3d-runner.d.ts +3 -1
- package/esm/browser/game/game3d-runner.js +14 -0
- package/esm/browser/gateway/console-agents.d.ts +11 -0
- package/esm/browser/gateway/console-agents.js +128 -0
- package/esm/browser/gateway/console-extension.js +0 -1
- package/esm/browser/gateway/console-limits.d.ts +19 -0
- package/esm/browser/gateway/console-limits.js +164 -0
- package/esm/browser/gateway/console-parts.d.ts +29 -22
- package/esm/browser/gateway/console-parts.js +67 -137
- package/esm/browser/gateway/console-tenant.d.ts +2 -4
- package/esm/browser/gateway/console-tenant.js +117 -209
- package/esm/browser/gateway/console-trend.js +6 -4
- package/esm/browser/gateway/console-view.js +136 -109
- package/esm/browser/hooks.js +1 -3
- package/esm/browser/hosts.d.ts +7 -0
- package/esm/browser/hosts.js +23 -2
- package/esm/browser/i18n/locales.d.ts +169 -14
- package/esm/browser/i18n/messages-ja.js +178 -23
- package/esm/browser/i18n/messages-zh-tw.js +178 -23
- package/esm/browser/i18n/messages.d.ts +166 -11
- package/esm/browser/i18n/messages.js +357 -47
- package/esm/browser/index.d.ts +1 -0
- package/esm/browser/index.js +1 -0
- package/esm/browser/links/links-protocol.d.ts +10 -1
- package/esm/browser/links/links.d.ts +11 -2
- package/esm/browser/links/links.js +65 -7
- package/esm/browser/links/system-links.d.ts +21 -0
- package/esm/browser/links/system-links.js +54 -0
- package/esm/browser/markdown/hooks.d.ts +3 -1
- package/esm/browser/markdown/hooks.js +11 -3
- package/esm/browser/markdown/mermaid.d.ts +18 -4
- package/esm/browser/markdown/mermaid.js +117 -17
- package/esm/browser/screen/screen-protocol.d.ts +74 -1
- package/esm/browser/screen/screen-protocol.js +15 -0
- package/esm/browser/screen/screen-scroll.d.ts +55 -0
- package/esm/browser/screen/screen-scroll.js +182 -0
- package/esm/browser/screen/screen.d.ts +34 -1
- package/esm/browser/screen/screen.js +172 -2
- package/esm/browser/settings/navigation.d.ts +9 -21
- package/esm/browser/settings/navigation.js +11 -31
- package/esm/browser/settings/settings-protocol.d.ts +9 -0
- package/esm/browser/settings/settings-protocol.js +18 -0
- package/esm/browser/settings/settings.d.ts +7 -1
- package/esm/browser/settings/settings.js +31 -7
- package/esm/browser/share/shared-extensions.js +4 -3
- package/esm/browser/share/shared-page.js +2 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +8 -1
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +0 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +42 -4
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +31 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +7 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +168 -112
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +10 -3
- package/esm/browser/style/shared.d.ts +1 -1
- package/esm/browser/style/shared.js +1 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +12 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +38 -13
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +16 -2
- package/esm/browser/style/tints.d.ts +5 -4
- package/esm/browser/style/tints.js +9 -9
- package/esm/browser/util/desktop.d.ts +7 -1
- package/esm/browser/util/desktop.js +17 -0
- package/esm/browser/util/image-swipe.d.ts +42 -0
- package/esm/browser/util/image-swipe.js +66 -0
- package/esm/browser/util/process.d.ts +31 -3
- package/esm/browser/util/process.js +75 -8
- package/esm/browser/util/share-link.d.ts +5 -0
- package/esm/browser/util/share-link.js +10 -0
- package/esm/browser/util/shell-words.d.ts +18 -0
- package/esm/browser/util/shell-words.js +397 -0
- package/esm/browser/util/spoken.d.ts +5 -0
- package/esm/browser/util/spoken.js +11 -2
- package/esm/browser/util/tool.d.ts +9 -0
- package/esm/browser/util/tool.js +71 -6
- package/esm/browser/util/transcript.js +3 -1
- package/esm/browser/util/turn-end.d.ts +17 -0
- package/esm/browser/util/turn-end.js +164 -0
- package/esm/browser/workbench-hosts.d.ts +8 -1
- package/esm/browser/workbench-hosts.js +22 -2
- package/esm/browser/workbench-protocol.d.ts +25 -3
- package/esm/browser/workbench-services.d.ts +10 -1
- package/esm/browser/workbench-services.js +41 -0
- package/esm/browser/workbench-util.d.ts +9 -3
- package/esm/browser/workbench-util.js +24 -4
- package/esm/browser/workbench.d.ts +3 -0
- package/esm/browser/workbench.js +36 -9
- package/lib/browser/account/account-side.d.ts +14 -0
- package/lib/browser/account/account-side.js +111 -0
- package/lib/browser/account/device-account.d.ts +70 -0
- package/lib/browser/account/device-account.js +219 -0
- package/lib/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/lib/browser/assistant/assistant-chat-list.js +73 -3
- package/lib/browser/assistant/assistant-export.js +5 -1
- package/lib/browser/assistant/assistant-extension.js +69 -14
- package/lib/browser/assistant/assistant-role.d.ts +2 -2
- package/lib/browser/assistant/assistant-role.js +7 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +4 -0
- package/lib/browser/assistant/assistant-task-source.js +19 -4
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +14 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -2
- package/lib/browser/assistant/assistant-thread.js +4 -0
- package/lib/browser/assistant/assistant-view.js +3 -5
- package/lib/browser/assistant/assistant.js +2 -1
- package/lib/browser/assistant/call-keeper.d.ts +143 -0
- package/lib/browser/assistant/call-keeper.js +295 -0
- package/lib/browser/assistant/call-screen.d.ts +40 -0
- package/lib/browser/assistant/call-screen.js +78 -0
- package/lib/browser/assistant/chat-task-source.d.ts +16 -18
- package/lib/browser/assistant/chat-task-source.js +28 -53
- package/lib/browser/assistant/realtime-voice.d.ts +62 -1
- package/lib/browser/assistant/realtime-voice.js +188 -29
- package/lib/browser/assistant/task-views.d.ts +9 -6
- package/lib/browser/assistant/task-views.js +29 -10
- package/lib/browser/assistant/voice-call-bar.d.ts +11 -4
- package/lib/browser/assistant/voice-call-bar.js +102 -46
- package/lib/browser/assistant/voice-call.d.ts +33 -1
- package/lib/browser/assistant/voice-call.js +132 -29
- package/lib/browser/assistant/voice-reopen.d.ts +19 -0
- package/lib/browser/assistant/voice-reopen.js +58 -0
- package/lib/browser/chat/chat-view.js +5 -8
- package/lib/browser/cloud/cloud-sign-in.d.ts +101 -0
- package/lib/browser/cloud/cloud-sign-in.js +244 -0
- package/lib/browser/cloud/device-page.d.ts +16 -0
- package/lib/browser/cloud/device-page.js +42 -0
- package/lib/browser/components/access-view.js +24 -0
- package/lib/browser/components/account-menu.d.ts +1 -1
- package/lib/browser/components/account-menu.js +6 -1
- package/lib/browser/components/account-view.d.ts +18 -0
- package/lib/browser/components/account-view.js +255 -0
- package/lib/browser/components/app-contexts.d.ts +13 -0
- package/lib/browser/components/app-contexts.js +64 -0
- package/lib/browser/components/app-nav.d.ts +5 -3
- package/lib/browser/components/app-nav.js +11 -8
- package/lib/browser/components/app-shell-state.d.ts +2 -2
- package/lib/browser/components/app-shell-state.js +33 -28
- package/lib/browser/components/app-view.js +109 -78
- package/lib/browser/components/auth-view.js +3 -5
- package/lib/browser/components/call-pill.d.ts +12 -0
- package/lib/browser/components/call-pill.js +55 -0
- package/lib/browser/components/chat-home-util.d.ts +113 -0
- package/lib/browser/components/chat-home-util.js +126 -0
- package/lib/browser/components/chat-home.d.ts +55 -0
- package/lib/browser/components/chat-home.js +164 -0
- package/lib/browser/components/chat-icon.d.ts +4 -2
- package/lib/browser/components/chat-icon.js +15 -5
- package/lib/browser/components/chat-list-hooks.d.ts +31 -0
- package/lib/browser/components/chat-list-hooks.js +120 -0
- package/lib/browser/components/chat-list-props.d.ts +55 -0
- package/lib/browser/components/chat-list-props.js +3 -0
- package/lib/browser/components/chat-list-row.d.ts +14 -2
- package/lib/browser/components/chat-list-row.js +27 -16
- package/lib/browser/components/chat-list-util.d.ts +40 -9
- package/lib/browser/components/chat-list-util.js +73 -10
- package/lib/browser/components/chat-list.d.ts +4 -49
- package/lib/browser/components/chat-list.js +121 -90
- package/lib/browser/components/cloud-sign-in-view.d.ts +66 -0
- package/lib/browser/components/cloud-sign-in-view.js +394 -0
- package/lib/browser/components/code-editor.js +2 -1
- package/lib/browser/components/composer-box.js +7 -0
- package/lib/browser/components/connection-bar.js +22 -3
- package/lib/browser/components/context-menu.d.ts +11 -2
- package/lib/browser/components/context-menu.js +14 -3
- package/lib/browser/components/conversation-scroll.d.ts +2 -0
- package/lib/browser/components/conversation-scroll.js +14 -0
- package/lib/browser/components/device-sign-in-page.d.ts +13 -0
- package/lib/browser/components/device-sign-in-page.js +110 -0
- package/lib/browser/components/diff-editor.js +2 -1
- package/lib/browser/components/entry-holds.d.ts +23 -0
- package/lib/browser/components/entry-holds.js +86 -0
- package/lib/browser/components/environment-view.js +8 -8
- package/lib/browser/components/face.d.ts +1 -1
- package/lib/browser/components/fold-text.js +3 -1
- package/lib/browser/components/fork-view.js +2 -4
- package/lib/browser/components/gallery.js +2 -1
- package/lib/browser/components/held-talk.d.ts +6 -2
- package/lib/browser/components/held-talk.js +20 -2
- package/lib/browser/components/host-view.d.ts +11 -4
- package/lib/browser/components/host-view.js +60 -13
- package/lib/browser/components/image-swipe.d.ts +51 -0
- package/lib/browser/components/image-swipe.js +143 -0
- package/lib/browser/components/image-viewer.d.ts +10 -114
- package/lib/browser/components/image-viewer.js +47 -368
- package/lib/browser/components/image-zoom.d.ts +113 -0
- package/lib/browser/components/image-zoom.js +359 -0
- package/lib/browser/components/kept-call-bar.d.ts +13 -0
- package/lib/browser/components/kept-call-bar.js +135 -0
- package/lib/browser/components/lightbox.d.ts +6 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/link-dialog.d.ts +2 -1
- package/lib/browser/components/link-dialog.js +5 -1
- package/lib/browser/components/link.d.ts +4 -0
- package/lib/browser/components/link.js +12 -0
- package/lib/browser/components/loading.d.ts +13 -0
- package/lib/browser/components/loading.js +55 -0
- package/lib/browser/components/markdown.js +2 -1
- package/lib/browser/components/mermaid-view.js +13 -6
- package/lib/browser/components/message-images.js +1 -1
- package/lib/browser/components/message-list.js +12 -7
- package/lib/browser/components/message-steps.js +31 -23
- package/lib/browser/components/message-user.d.ts +10 -1
- package/lib/browser/components/message-user.js +48 -12
- package/lib/browser/components/model-picker.d.ts +3 -1
- package/lib/browser/components/model-picker.js +14 -3
- package/lib/browser/components/nav-places.d.ts +7 -12
- package/lib/browser/components/nav-places.js +10 -13
- package/lib/browser/components/phone-shell.d.ts +1 -1
- package/lib/browser/components/scan-screen.d.ts +4 -2
- package/lib/browser/components/scan-screen.js +47 -20
- package/lib/browser/components/search-page.js +3 -2
- package/lib/browser/components/secret-peek.d.ts +4 -0
- package/lib/browser/components/secret-peek.js +55 -0
- package/lib/browser/components/secret-text.d.ts +42 -0
- package/lib/browser/components/secret-text.js +118 -0
- package/lib/browser/components/session-view.js +43 -12
- package/lib/browser/components/settings-choices.d.ts +3 -3
- package/lib/browser/components/settings-choices.js +8 -28
- package/lib/browser/components/settings-parts.js +4 -1
- package/lib/browser/components/settings-view.js +2 -2
- package/lib/browser/components/share-dialog.d.ts +2 -3
- package/lib/browser/components/share-dialog.js +5 -40
- package/lib/browser/components/share-friends.d.ts +19 -0
- package/lib/browser/components/share-friends.js +93 -0
- package/lib/browser/components/share-sheet.d.ts +16 -0
- package/lib/browser/components/share-sheet.js +115 -0
- package/lib/browser/components/side-lists.d.ts +16 -4
- package/lib/browser/components/side-lists.js +28 -12
- package/lib/browser/components/sign-in-accounts.d.ts +2 -1
- package/lib/browser/components/sign-in-accounts.js +59 -5
- package/lib/browser/components/sign-in-label.d.ts +6 -0
- package/lib/browser/components/sign-in-label.js +13 -0
- package/lib/browser/components/system-link-host.d.ts +3 -0
- package/lib/browser/components/system-link-host.js +53 -0
- package/lib/browser/components/tool-result.d.ts +3 -2
- package/lib/browser/components/tool-result.js +5 -3
- package/lib/browser/components/tool-view.d.ts +21 -3
- package/lib/browser/components/tool-view.js +104 -36
- package/lib/browser/components/unseen-drop.d.ts +2 -1
- package/lib/browser/components/unseen-drop.js +1 -1
- package/lib/browser/components/voice-services.js +23 -0
- package/lib/browser/components/workbench-view.d.ts +1 -1
- package/lib/browser/components/workbench-view.js +42 -5
- package/lib/browser/device/code-scan.d.ts +23 -10
- package/lib/browser/device/code-scan.js +47 -42
- package/lib/browser/device/edge-back.d.ts +18 -0
- package/lib/browser/device/edge-back.js +89 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +2 -2
- package/lib/browser/device/screen-awake.d.ts +25 -0
- package/lib/browser/device/screen-awake.js +63 -0
- package/lib/browser/extension/icons.js +12 -1
- package/lib/browser/extension/share-sheet-compat.d.ts +12 -0
- package/lib/browser/extension/share-sheet-compat.js +30 -0
- package/lib/browser/extension/web-api-chats.d.ts +50 -0
- package/lib/browser/extension/web-api-chats.js +3 -0
- package/lib/browser/extension/web-api-components.d.ts +61 -6
- package/lib/browser/extension/web-api-contributions.d.ts +28 -53
- package/lib/browser/extension/web-api-screen-share.d.ts +11 -0
- package/lib/browser/extension/web-api-screen-share.js +6 -0
- package/lib/browser/extension/web-api-services.d.ts +51 -0
- package/lib/browser/extension/web-api-services.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +45 -65
- package/lib/browser/extension/web-extension-context.d.ts +5 -10
- package/lib/browser/extension/web-extension-context.js +33 -21
- package/lib/browser/extension/web-extension-protocol.d.ts +8 -3
- package/lib/browser/extension/web-extension-run.js +0 -1
- package/lib/browser/extension/web-extensions.d.ts +4 -1
- package/lib/browser/extension/web-extensions.js +12 -0
- package/lib/browser/extension/web-tasks.d.ts +6 -1
- package/lib/browser/extension/web-tasks.js +11 -3
- package/lib/browser/extension/web-view-util.d.ts +0 -1
- package/lib/browser/extension/web-view-util.js +4 -5
- package/lib/browser/files/files.d.ts +1 -0
- package/lib/browser/files/files.js +14 -3
- package/lib/browser/game/game-control.d.ts +119 -0
- package/lib/browser/game/game-control.js +345 -0
- package/lib/browser/game/game-host.d.ts +14 -2
- package/lib/browser/game/game-host.js +22 -5
- package/lib/browser/game/game-protocol.d.ts +15 -0
- package/lib/browser/game/game-runner.d.ts +3 -1
- package/lib/browser/game/game-runner.js +6 -0
- package/lib/browser/game/game-util.d.ts +3 -0
- package/lib/browser/game/game-util.js +3 -0
- package/lib/browser/game/game-view.d.ts +5 -2
- package/lib/browser/game/game-view.js +4 -4
- package/lib/browser/game/game3d-protocol.d.ts +5 -1
- package/lib/browser/game/game3d-runner.d.ts +3 -1
- package/lib/browser/game/game3d-runner.js +14 -0
- package/lib/browser/gateway/console-agents.d.ts +12 -0
- package/lib/browser/gateway/console-agents.js +165 -0
- package/lib/browser/gateway/console-extension.js +0 -1
- package/lib/browser/gateway/console-limits.d.ts +20 -0
- package/lib/browser/gateway/console-limits.js +200 -0
- package/lib/browser/gateway/console-parts.d.ts +29 -22
- package/lib/browser/gateway/console-parts.js +72 -141
- package/lib/browser/gateway/console-tenant.d.ts +2 -4
- package/lib/browser/gateway/console-tenant.js +115 -208
- package/lib/browser/gateway/console-trend.js +6 -4
- package/lib/browser/gateway/console-view.js +134 -107
- package/lib/browser/hooks.js +1 -3
- package/lib/browser/hosts.d.ts +7 -0
- package/lib/browser/hosts.js +23 -2
- package/lib/browser/i18n/locales.d.ts +169 -14
- package/lib/browser/i18n/messages-ja.js +178 -23
- package/lib/browser/i18n/messages-zh-tw.js +178 -23
- package/lib/browser/i18n/messages.d.ts +166 -11
- package/lib/browser/i18n/messages.js +357 -47
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.js +1 -0
- package/lib/browser/links/links-protocol.d.ts +10 -1
- package/lib/browser/links/links.d.ts +11 -2
- package/lib/browser/links/links.js +65 -7
- package/lib/browser/links/system-links.d.ts +22 -0
- package/lib/browser/links/system-links.js +58 -0
- package/lib/browser/markdown/hooks.d.ts +3 -1
- package/lib/browser/markdown/hooks.js +12 -3
- package/lib/browser/markdown/mermaid.d.ts +18 -4
- package/lib/browser/markdown/mermaid.js +117 -17
- package/lib/browser/screen/screen-protocol.d.ts +74 -1
- package/lib/browser/screen/screen-protocol.js +15 -0
- package/lib/browser/screen/screen-scroll.d.ts +56 -0
- package/lib/browser/screen/screen-scroll.js +185 -0
- package/lib/browser/screen/screen.d.ts +34 -1
- package/lib/browser/screen/screen.js +172 -2
- package/lib/browser/settings/navigation.d.ts +9 -21
- package/lib/browser/settings/navigation.js +11 -31
- package/lib/browser/settings/settings-protocol.d.ts +9 -0
- package/lib/browser/settings/settings-protocol.js +19 -1
- package/lib/browser/settings/settings.d.ts +7 -1
- package/lib/browser/settings/settings.js +31 -7
- package/lib/browser/share/shared-extensions.js +4 -3
- package/lib/browser/share/shared-page.js +2 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +8 -1
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +0 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +42 -4
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +31 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +7 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +168 -112
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +10 -3
- package/lib/browser/style/shared.d.ts +1 -1
- package/lib/browser/style/shared.js +1 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +12 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +38 -13
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +16 -2
- package/lib/browser/style/tints.d.ts +5 -4
- package/lib/browser/style/tints.js +9 -9
- package/lib/browser/util/desktop.d.ts +7 -1
- package/lib/browser/util/desktop.js +17 -0
- package/lib/browser/util/image-swipe.d.ts +43 -0
- package/lib/browser/util/image-swipe.js +69 -0
- package/lib/browser/util/process.d.ts +31 -3
- package/lib/browser/util/process.js +74 -7
- package/lib/browser/util/share-link.d.ts +5 -0
- package/lib/browser/util/share-link.js +10 -0
- package/lib/browser/util/shell-words.d.ts +19 -0
- package/lib/browser/util/shell-words.js +400 -0
- package/lib/browser/util/spoken.d.ts +5 -0
- package/lib/browser/util/spoken.js +10 -1
- package/lib/browser/util/tool.d.ts +9 -0
- package/lib/browser/util/tool.js +71 -6
- package/lib/browser/util/transcript.js +3 -1
- package/lib/browser/util/turn-end.d.ts +18 -0
- package/lib/browser/util/turn-end.js +167 -0
- package/lib/browser/workbench-hosts.d.ts +8 -1
- package/lib/browser/workbench-hosts.js +22 -2
- package/lib/browser/workbench-protocol.d.ts +25 -3
- package/lib/browser/workbench-services.d.ts +10 -1
- package/lib/browser/workbench-services.js +41 -0
- package/lib/browser/workbench-util.d.ts +9 -3
- package/lib/browser/workbench-util.js +24 -4
- package/lib/browser/workbench.d.ts +3 -0
- package/lib/browser/workbench.js +35 -8
- package/package.json +7 -7
- package/esm/browser/components/list-skeleton.d.ts +0 -10
- package/esm/browser/components/list-skeleton.js +0 -31
- package/lib/browser/components/list-skeleton.d.ts +0 -11
- package/lib/browser/components/list-skeleton.js +0 -68
|
@@ -2,44 +2,43 @@ import { ChevronLeft } from 'lucide-react';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { AssistantChatList } from '../assistant/assistant-chat-list.js';
|
|
4
4
|
import { ChatView } from '../chat/chat-view.js';
|
|
5
|
+
import { DevicePageUtil } from '../cloud/device-page.js';
|
|
6
|
+
import { DeviceMotion } from '../device/device-protocol.js';
|
|
5
7
|
import { LaunchScreenUtil } from '../device/launch-screen.js';
|
|
6
|
-
import { LoadedExtensions, MessageRenderers, SessionAvatars, SessionMenus, ToolRenderers } from '../extension/extension-view.js';
|
|
7
8
|
import { WebCwdUtil, WebLabelUtil } from '../extension/web-extension-protocol.js';
|
|
8
9
|
import { usePersisted } from '../hooks.js';
|
|
9
|
-
import { CodeRenderers } from '../markdown/code-renderers.js';
|
|
10
10
|
import { SIGN_IN_EVENT } from '../notices/notices.js';
|
|
11
11
|
import { SharedPageUtil } from '../share/shared-link.js';
|
|
12
12
|
import { SharedPage } from '../share/shared-page.js';
|
|
13
|
-
import { Voice } from '../util/voice.js';
|
|
14
13
|
import { WorkbenchUtil } from '../workbench-util.js';
|
|
14
|
+
import { AppContexts } from './app-contexts.js';
|
|
15
15
|
import { PageView, Rail, SidebarView } from './app-nav.js';
|
|
16
16
|
import { LOGIN_LATER, RAIL } from './app-shell-hooks.js';
|
|
17
17
|
import { useAppShell } from './app-shell-state.js';
|
|
18
18
|
import { AuthUtil, LoginPage, useAuthProviders } from './auth-view.js';
|
|
19
19
|
import { BoardSurface } from './board.js';
|
|
20
20
|
import { ChatAskUtil } from './chat-asks.js';
|
|
21
|
-
import {
|
|
21
|
+
import { ChatIconUtil } from './chat-icon.js';
|
|
22
22
|
import { ChatListUtil } from './chat-list-util.js';
|
|
23
23
|
import { ChatSeenUtil, SEEN_CHATS } from './chat-seen.js';
|
|
24
24
|
import { ConnectionBar } from './connection-bar.js';
|
|
25
25
|
import { CustomHost } from './custom-host.js';
|
|
26
|
+
import { DeviceSignInPage } from './device-sign-in-page.js';
|
|
26
27
|
import { DinoLookHost, DinoLookProvider } from './dino-look.js';
|
|
27
28
|
import { DiscoverView } from './discover-view.js';
|
|
28
29
|
import { EditorArea } from './editor-area.js';
|
|
30
|
+
import { EntryHoldUtil, useCallGoingOn } from './entry-holds.js';
|
|
29
31
|
import { EnvironmentPage } from './environment-view.js';
|
|
30
|
-
import {
|
|
31
|
-
import { SwitchingVeil } from './host-view.js';
|
|
32
|
+
import { DeviceOverlays } from './host-view.js';
|
|
32
33
|
import { IconButton, SidebarLeft } from './icon.js';
|
|
34
|
+
import { KeptCallBar } from './kept-call-bar.js';
|
|
33
35
|
import { KeptPages } from './kept-pages.js';
|
|
34
36
|
import { LauncherSurface } from './launcher-surface.js';
|
|
35
|
-
import { OpenLink } from './link.js';
|
|
36
37
|
import { LinkDialog } from './link-dialog.js';
|
|
37
|
-
import { ListSkeleton } from './list-skeleton.js';
|
|
38
38
|
import { MeView } from './me-view.js';
|
|
39
|
-
import { FileUrls } from './media.js';
|
|
40
39
|
import { DISCOVER, ME_TAB, phoneTabs } from './nav-places.js';
|
|
41
40
|
import { NoticeCenter } from './notice-center.js';
|
|
42
|
-
import { PhoneShell } from './phone-shell.js';
|
|
41
|
+
import { PhoneShell, PhoneStack } from './phone-shell.js';
|
|
43
42
|
import { RemotePrompts } from './remote-prompts.js';
|
|
44
43
|
import { ScanHost } from './scan-screen.js';
|
|
45
44
|
import { useScreenNavigator } from './screen-navigator.js';
|
|
@@ -47,7 +46,7 @@ import { ScreenNavigatorUtil } from './screen-navigator-util.js';
|
|
|
47
46
|
import { ServeRestartNotices } from './serve-restart.js';
|
|
48
47
|
import { SettingsView } from './settings-view.js';
|
|
49
48
|
import { ShareHost } from './share-dialog.js';
|
|
50
|
-
import { DOUBLE_PAGE } from './side-lists.js';
|
|
49
|
+
import { DOUBLE_PAGE, SideListUtil } from './side-lists.js';
|
|
51
50
|
import { paneStyle, Sash } from './split-pane.js';
|
|
52
51
|
import { SurfaceFlyout } from './surface-flyout.js';
|
|
53
52
|
import { WorkbenchToggleContext } from './workbench-toggle.js';
|
|
@@ -60,9 +59,9 @@ import { SignIn } from './workbench-view.js';
|
|
|
60
59
|
* the conversation instead.
|
|
61
60
|
*/
|
|
62
61
|
function AppShell() {
|
|
63
|
-
var _a, _b, _c
|
|
64
|
-
var
|
|
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,
|
|
62
|
+
var _a, _b, _c;
|
|
63
|
+
var _d, _e;
|
|
64
|
+
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, side, showPage, lists, tools, openTool, editors, showEditors, navigation, codeScan, notices, railCurrent, tabView, screenPage, seenChats, looking, state, sideShown, showList, toggleWorkbench, picking, chatsBusy, setChatsBusy, deciding, } = useAppShell();
|
|
66
65
|
const [providers, reloadProviders] = useAuthProviders(online);
|
|
67
66
|
const [later, setLater] = usePersisted(LOGIN_LATER);
|
|
68
67
|
/** A call failed for want of a sign-in (SIGN_IN_EVENT): the page of sign-in, even if the user put it off. */
|
|
@@ -75,12 +74,12 @@ function AppShell() {
|
|
|
75
74
|
window.addEventListener(SIGN_IN_EVENT, ask);
|
|
76
75
|
return () => window.removeEventListener(SIGN_IN_EVENT, ask);
|
|
77
76
|
}, [reloadProviders]);
|
|
78
|
-
|
|
79
|
-
const doubleId = (_e = (_a = navigation.home) === null || _a === void 0 ? void 0 : _a.id) !== null && _e !== void 0 ? _e : DOUBLE_PAGE;
|
|
77
|
+
const doubleId = DOUBLE_PAGE;
|
|
80
78
|
// Where Ta's agents read the page to be, and go (docs/design/ta-app-use.md 3): set below as it renders.
|
|
81
79
|
const screenShell = useScreenNavigator();
|
|
80
|
+
const inCall = useCallGoingOn();
|
|
82
81
|
if (workbench.status === 'signed-out') {
|
|
83
|
-
return React.createElement(SignIn, { error: workbench.error });
|
|
82
|
+
return workbench.leaving ? React.createElement("div", { className: "ta-signin" }) : React.createElement(SignIn, { error: workbench.error });
|
|
84
83
|
}
|
|
85
84
|
if (workbench.error === 'environment') {
|
|
86
85
|
return React.createElement(EnvironmentPage, null);
|
|
@@ -113,7 +112,7 @@ function AppShell() {
|
|
|
113
112
|
}
|
|
114
113
|
};
|
|
115
114
|
picking.current = picked;
|
|
116
|
-
const
|
|
115
|
+
const chatList = (busy) => (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) => {
|
|
117
116
|
var _a;
|
|
118
117
|
const file = ChatListUtil.file(entry);
|
|
119
118
|
const before = state.get(SEEN_CHATS);
|
|
@@ -125,9 +124,10 @@ function AppShell() {
|
|
|
125
124
|
if (at !== undefined) {
|
|
126
125
|
setLetGoAsks(before => ChatAskUtil.letGo(before, ChatListUtil.file(entry), at));
|
|
127
126
|
}
|
|
128
|
-
}, onPicked: picked, busy:
|
|
129
|
-
|
|
130
|
-
const
|
|
127
|
+
}, onPicked: picked, busy: busy, onBusy: setChatsBusy }));
|
|
128
|
+
// On a phone the conversations going on are pushed over the tab (below); elsewhere they are the chats, filtered.
|
|
129
|
+
const sideList = sideView ? React.createElement(SidebarView, { view: sideView }) : chatList(!phone && chatsBusy);
|
|
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: (_d = WebCwdUtil.shown(extensions)) !== null && _d !== void 0 ? _d : (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
|
|
131
131
|
// A photo of the scan screen to the double: its conversation shows, the photo goes with what to do with it.
|
|
132
132
|
const askDouble = async (text, image) => {
|
|
133
133
|
const double = extensions.views.find(candidate => candidate.id === DOUBLE_PAGE);
|
|
@@ -148,10 +148,22 @@ function AppShell() {
|
|
|
148
148
|
React.createElement(LinkDialog, null),
|
|
149
149
|
React.createElement(RemotePrompts, null),
|
|
150
150
|
React.createElement(ServeRestartNotices, null),
|
|
151
|
-
React.createElement(
|
|
151
|
+
React.createElement(DeviceOverlays, null),
|
|
152
152
|
codeScan && React.createElement(ScanHost, { onCode: text => void codeScan.open(text), onAsk: askDouble }),
|
|
153
153
|
React.createElement(ShareHost, null),
|
|
154
|
-
React.createElement(CustomHost, null)
|
|
154
|
+
React.createElement(CustomHost, null),
|
|
155
|
+
React.createElement(KeptCallBar, { looking: looking, onBack: (sessionId, double) => {
|
|
156
|
+
var _a;
|
|
157
|
+
if (double) {
|
|
158
|
+
showPage(doubleId);
|
|
159
|
+
if (phone) {
|
|
160
|
+
setScreenOpen(true);
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
void ((_a = host.sessionSwitcher()) === null || _a === void 0 ? void 0 : _a(sessionId));
|
|
165
|
+
picked();
|
|
166
|
+
} })));
|
|
155
167
|
// The screen of a phone slides away: a page it showed is out of sight, and its extension may go to the background.
|
|
156
168
|
const closeScreen = () => {
|
|
157
169
|
setScreenOpen(false);
|
|
@@ -181,46 +193,38 @@ function AppShell() {
|
|
|
181
193
|
}
|
|
182
194
|
};
|
|
183
195
|
const discoverView = (leading) => (React.createElement(DiscoverView, { pages: navigation.discover, onOpenPages: navigation.onOpen, onOpen: openDiscovered, onPin: pinDiscovered, onSettings: () => openSettings('navigation'), onScan: codeScan && (() => void codeScan.scan()), leading: leading }));
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
196
|
+
const keptPages = EntryHoldUtil.kept(extensions.kept, inCall, tabView);
|
|
197
|
+
const holds = EntryHoldUtil.holds({
|
|
198
|
+
double: () => {
|
|
199
|
+
const before = { view: view === null || view === void 0 ? void 0 : view.id, settings, tabPage, screenOpen };
|
|
200
|
+
showPage(doubleId);
|
|
201
|
+
return given => {
|
|
202
|
+
var _a;
|
|
203
|
+
if (given === 'call') {
|
|
204
|
+
host.showPage((_a = before.view) !== null && _a !== void 0 ? _a : '');
|
|
205
|
+
setSettings(before.settings);
|
|
206
|
+
setTabPage(before.tabPage);
|
|
207
|
+
setScreenOpen(before.screenOpen);
|
|
208
|
+
}
|
|
209
|
+
else if (phone) {
|
|
210
|
+
setScreenOpen(true);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
chats: () => {
|
|
215
|
+
void chat.draft();
|
|
216
|
+
picked();
|
|
190
217
|
},
|
|
191
|
-
move: HeldTalk.point,
|
|
192
|
-
end: HeldTalk.release,
|
|
193
|
-
cancel: HeldTalk.cancel,
|
|
194
218
|
});
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
double: talkHold('double', () => {
|
|
198
|
-
showPage(doubleId);
|
|
199
|
-
// Over the tabs when a sidebar view lists the double; as a tab of its own elsewhere.
|
|
200
|
-
if (phone) {
|
|
201
|
-
setScreenOpen(!navigation.home);
|
|
202
|
-
}
|
|
203
|
-
}),
|
|
204
|
-
chats: talkHold('draft', () => {
|
|
205
|
-
void chat.draft();
|
|
206
|
-
picked();
|
|
207
|
-
}),
|
|
208
|
-
}
|
|
209
|
-
: {};
|
|
210
|
-
// The chats' tab has the amber dot of their rows while one of them said something unseen, as a messenger's: of
|
|
211
|
-
// those the list shows, so that each dot of the tab has a row to find. Those that
|
|
212
|
-
// wait for the user to decide are counted on it, on the rail too, until answered.
|
|
219
|
+
// The chats' tab, and the double's on the rail, have the amber dot of the rows listed while one said something unseen,
|
|
220
|
+
// as a messenger's, but those quiet (a call); what waits for the user to decide is counted there until answered.
|
|
213
221
|
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;
|
|
214
|
-
const chatsAsking = ChatAskUtil.count(listedChats, letGoAsks);
|
|
215
222
|
const inFront = looking ? workbench.sessions.find(session => session.sessionId === looking) : undefined;
|
|
216
|
-
const chatsUnseen = ChatSeenUtil.anyUnseen(listedChats, seenChats, inFront && ChatListUtil.file(inFront));
|
|
217
|
-
// Dragged away, the dot
|
|
218
|
-
const seeAllChats = () =>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
setLetGoAsks(before => ChatAskUtil.letGoAll(before, listedChats));
|
|
222
|
-
}
|
|
223
|
-
};
|
|
223
|
+
const chatsUnseen = ChatSeenUtil.anyUnseen(ChatIconUtil.loud(extensions.chatIcons, listedChats), seenChats, inFront && ChatListUtil.file(inFront));
|
|
224
|
+
// Dragged away, the dot of the chats: all seen.
|
|
225
|
+
const seeAllChats = () => state.set(SEEN_CHATS, ChatSeenUtil.seeAll(state.get(SEEN_CHATS), listedChats, Date.now()));
|
|
226
|
+
// Dragged away, the count of the double: what the conversations ask let go; the double's own tasks wait on.
|
|
227
|
+
const letGoAllAsks = () => setLetGoAsks(before => ChatAskUtil.letGoAll(before, listedChats));
|
|
224
228
|
const tabs = phone
|
|
225
229
|
? phoneTabs(lists, navigation, {
|
|
226
230
|
discover: t('ta.discover'),
|
|
@@ -228,13 +232,17 @@ function AppShell() {
|
|
|
228
232
|
fold: t('ta.nav.fold'),
|
|
229
233
|
settings: { label: t('ta.nav.settings'), run: () => openSettings('navigation') },
|
|
230
234
|
holds,
|
|
231
|
-
}).map(item =>
|
|
235
|
+
}).map(item => item.id === '' && chatsUnseen
|
|
236
|
+
? { ...item, unseen: true, onSeeAll: seeAllChats }
|
|
237
|
+
: item.double && deciding
|
|
238
|
+
? { ...item, asks: deciding, onSeeAll: letGoAllAsks }
|
|
239
|
+
: item)
|
|
232
240
|
: [];
|
|
233
|
-
const tab = tabPage === 'me' ? ME_TAB : tabPage === 'discover' ? DISCOVER : ((
|
|
241
|
+
const tab = tabPage === 'me' ? ME_TAB : tabPage === 'discover' ? DISCOVER : ((_e = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _e !== void 0 ? _e : side);
|
|
234
242
|
const pickTab = (id) => {
|
|
235
|
-
var _a;
|
|
236
243
|
setSurface(undefined);
|
|
237
|
-
|
|
244
|
+
setChatsBusy(false);
|
|
245
|
+
if (navigation.nav.some(candidate => candidate.id === id)) {
|
|
238
246
|
showPage(id);
|
|
239
247
|
return;
|
|
240
248
|
}
|
|
@@ -255,7 +263,7 @@ function AppShell() {
|
|
|
255
263
|
page: phone ? (screenOpen ? screenPage : tabView) : tabPage === 'discover' ? undefined : view,
|
|
256
264
|
discover: tabPage === 'discover',
|
|
257
265
|
me: phone && !screenOpen && tabPage === 'me',
|
|
258
|
-
list: (phone ? !screenOpen && !tabView && !tabPage : sideShown) ? (
|
|
266
|
+
list: (phone ? !screenOpen && !tabView && !tabPage : sideShown) ? (_b = lists.find(entry => entry.id === side)) === null || _b === void 0 ? void 0 : _b.label : undefined,
|
|
259
267
|
chat: (phone ? screenOpen && !screenPage && settings === undefined : settings === undefined && tabPage !== 'discover' && !view)
|
|
260
268
|
? shownChat
|
|
261
269
|
? chatName(shownChat)
|
|
@@ -265,7 +273,7 @@ function AppShell() {
|
|
|
265
273
|
}),
|
|
266
274
|
places: [
|
|
267
275
|
...lists.map(entry => ({ id: `list:${entry.id}`, title: entry.label })),
|
|
268
|
-
...
|
|
276
|
+
...navigation.pages.map(page => ({
|
|
269
277
|
id: `page:${page.id}`,
|
|
270
278
|
title: WebLabelUtil.text(page.title),
|
|
271
279
|
})),
|
|
@@ -283,6 +291,10 @@ function AppShell() {
|
|
|
283
291
|
return host.showView(id);
|
|
284
292
|
}
|
|
285
293
|
if (phone) {
|
|
294
|
+
// The tabs are under the screen of a phone: what is over them slides away, as the back does.
|
|
295
|
+
if (screenOpen) {
|
|
296
|
+
closeScreen();
|
|
297
|
+
}
|
|
286
298
|
return pickTab(kind === 'list' ? id : kind === 'me' ? ME_TAB : DISCOVER);
|
|
287
299
|
}
|
|
288
300
|
setSettings(undefined);
|
|
@@ -316,51 +328,70 @@ function AppShell() {
|
|
|
316
328
|
openSettings,
|
|
317
329
|
};
|
|
318
330
|
// The launcher and the board are over the first tab only, as WeChat's over its chats.
|
|
319
|
-
const firstTab = ((
|
|
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" },
|
|
331
|
+
const firstTab = ((_c = tabs[0]) === null || _c === void 0 ? void 0 : _c.id) === tab;
|
|
332
|
+
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: React.createElement(PhoneHome, { pushable: SideListUtil.pushesOver(tabView), busy: chatsBusy, onBusy: setChatsBusy, busyList: () => React.createElement("div", { className: "ta-sidebar" }, chatList(true)) }, tabPage === 'me' ? (React.createElement("div", { className: "ta-main" },
|
|
321
333
|
React.createElement(MeView, { onSettings: openSettings }))) : tabPage === 'discover' ? (React.createElement("div", { className: "ta-main" }, discoverView())) : tabView ? (React.createElement("div", { className: "ta-main" },
|
|
322
|
-
React.createElement(PageView, { view: tabView }))) : (React.createElement("div", { className: "ta-sidebar" }, sideList)), screen: React.createElement(React.Fragment, null,
|
|
323
|
-
React.createElement(KeptPages, { views: extensions.views, kept:
|
|
334
|
+
React.createElement(PageView, { view: tabView }))) : (React.createElement("div", { className: "ta-sidebar" }, sideList))), screen: React.createElement(React.Fragment, null,
|
|
335
|
+
React.createElement(KeptPages, { views: extensions.views, kept: keptPages, 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 }) })) }),
|
|
324
336
|
settings !== undefined ? (React.createElement(SettingsView, { key: settingsOpened, section: settings || undefined, onClose: closeSettings, onBack: closeSettings })) : screenPage ? null : (React.createElement(ChatView, { widgets: extensions.widgets, onMenu: closeScreen, back: true }))), screenOpen: screenOpen, onBack: closeScreen, workbench: editors && !settingsShown ? (React.createElement("div", { className: "ta-editors-pane", inert: !showEditors }, editorArea)) : undefined, workbenchOpen: showEditors, onWorkbench: open => (open ? toggleWorkbench() : showEditors && toggleRight()) }, overlays)) : (React.createElement("div", { className: classes.filter(Boolean).join(' '), style: sideWidths },
|
|
325
337
|
navOpen && React.createElement("button", { type: "button", className: "ta-scrim", "aria-label": t('ta.close'), onClick: () => setNavOpen(false) }),
|
|
326
338
|
React.createElement("div", { className: "ta-nav" },
|
|
327
|
-
React.createElement(Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current:
|
|
339
|
+
React.createElement(Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: railCurrent, onPage: showPage, onDiscover: () => {
|
|
328
340
|
setSettings(undefined);
|
|
329
341
|
setNavOpen(false);
|
|
330
342
|
setTabPage('discover');
|
|
331
|
-
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks:
|
|
343
|
+
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds, asks: deciding, onDismissAsks: letGoAllAsks, onSeeAll: chatsUnseen ? seeAllChats : undefined }),
|
|
332
344
|
sideShown && (React.createElement("div", { className: "ta-sidebar", style: paneStyle(sidebar) },
|
|
333
345
|
sideList,
|
|
334
346
|
React.createElement(Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
|
|
335
347
|
React.createElement("main", { className: "ta-main" },
|
|
336
348
|
React.createElement(ConnectionBar, null),
|
|
337
|
-
React.createElement(KeptPages, { views: extensions.views, kept:
|
|
349
|
+
React.createElement(KeptPages, { views: extensions.views, kept: keptPages, shown: settings === undefined && tabPage !== 'discover' ? view : undefined, render: page => (React.createElement(PageView, { view: page, leading: React.createElement(IconButton, { icon: SidebarLeft, label: t('ta.sidebar'), className: "ta-narrow-only", onClick: () => setNavOpen(true) }) })) }),
|
|
338
350
|
settings !== undefined ? (React.createElement(SettingsView, { section: settings || undefined, onClose: closeSettings, onMenu: () => setNavOpen(true) })) : tabPage === 'discover' ? (discoverView(React.createElement(IconButton, { icon: SidebarLeft, label: t('ta.sidebar'), className: "ta-narrow-only", onClick: () => setNavOpen(true) }))) : view ? null : (React.createElement(ChatView, { widgets: extensions.widgets, onMenu: () => setNavOpen(true) }))),
|
|
339
351
|
showEditors && (React.createElement("div", { className: "ta-editors-pane", style: paneStyle(editor) },
|
|
340
352
|
React.createElement(Sash, { pane: editor, side: "end", label: t('ta.layout.editor') }),
|
|
341
353
|
editorArea)),
|
|
342
354
|
surface && React.createElement(SurfaceFlyout, { surface: surface, onClose: () => setSurface(undefined) }),
|
|
343
355
|
overlays));
|
|
344
|
-
return (React.createElement(
|
|
345
|
-
React.createElement(
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
356
|
+
return (React.createElement(AppContexts, { fileUrl: fileUrl, openLink: openLink },
|
|
357
|
+
React.createElement(WorkbenchToggleContext.Provider, { value: toggle }, content)));
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* What a tab of a phone shows, and the conversations going on (ui.showChats with `busy`) pushed over it while
|
|
361
|
+
* `busy`, as the folder of the chats is pushed over their list: back with its button, a swipe from the left edge or the
|
|
362
|
+
* back of the system (PhoneStack, a layer of BackLayers), to the tab as it was; a conversation picked in it comes over
|
|
363
|
+
* it, and goes back to it. Drawn while open and while it slides away. Not over a page of an extension's own in the
|
|
364
|
+
* tabs (`pushable`, SideListUtil.pushesOver): the page is drawn as it is, the shell shows those going on over the chats.
|
|
365
|
+
*/
|
|
366
|
+
function PhoneHome({ pushable, busy, onBusy, busyList, children, }) {
|
|
367
|
+
const [drawn, setDrawn] = React.useState(busy);
|
|
368
|
+
React.useEffect(() => {
|
|
369
|
+
if (busy) {
|
|
370
|
+
setDrawn(true);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
const timer = setTimeout(() => setDrawn(false), DeviceMotion.SHEET_MS);
|
|
374
|
+
return () => clearTimeout(timer);
|
|
375
|
+
}, [busy]);
|
|
376
|
+
if (!pushable) {
|
|
377
|
+
return children;
|
|
378
|
+
}
|
|
379
|
+
return React.createElement(PhoneStack, { base: children, top: (busy || drawn) && busyList(), open: busy, onClose: () => onBusy(false) });
|
|
354
380
|
}
|
|
355
381
|
/** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
|
|
356
382
|
export function AppView() {
|
|
357
383
|
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
358
384
|
const [shared] = React.useState(() => SharedPageUtil.link());
|
|
385
|
+
// A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
|
|
386
|
+
const [device] = React.useState(() => (shared ? undefined : DevicePageUtil.take()));
|
|
359
387
|
// The launch picture of the app of a phone goes once the page is whole.
|
|
360
388
|
React.useEffect(() => LaunchScreenUtil.start(), []);
|
|
361
389
|
if (shared) {
|
|
362
390
|
return React.createElement(SharedPage, { link: shared });
|
|
363
391
|
}
|
|
392
|
+
if (device) {
|
|
393
|
+
return React.createElement(DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
|
|
394
|
+
}
|
|
364
395
|
return (React.createElement(DinoLookProvider, null,
|
|
365
396
|
React.createElement(AppShell, null),
|
|
366
397
|
React.createElement(DinoLookHost, null)));
|
|
@@ -12,6 +12,7 @@ import { Callout } from './callout.js';
|
|
|
12
12
|
import { CustomProviderForm } from './custom-provider-view.js';
|
|
13
13
|
import { EmptyState } from './empty-state.js';
|
|
14
14
|
import { Icon, IconButton } from './icon.js';
|
|
15
|
+
import { Loading } from './loading.js';
|
|
15
16
|
import { PictureCards } from './picture.js';
|
|
16
17
|
import { TaAvatar } from './ta-avatar.js';
|
|
17
18
|
export var AuthUtil;
|
|
@@ -197,9 +198,7 @@ function AuthFlow({ provider, onDone, onBack }) {
|
|
|
197
198
|
React.createElement(KeyRound, { size: 16, strokeWidth: 1.75, "aria-hidden": "true" }),
|
|
198
199
|
React.createElement("input", { type: prompt.prompt.type === 'secret' ? 'password' : 'text', autoFocus: true, autoComplete: "off", spellCheck: false, placeholder: (_a = prompt.prompt.placeholder) !== null && _a !== void 0 ? _a : (prompt.prompt.type === 'secret' ? t('ta.auth.apiKey') : ''), value: answer, onChange: event => setAnswer(event.target.value) })),
|
|
199
200
|
React.createElement("button", { type: "submit", className: "ta-button ta-primary ta-wide", disabled: !answer.trim() }, t('ta.auth.continue'))))),
|
|
200
|
-
!state.result && !prompt &&
|
|
201
|
-
React.createElement("span", { className: "ta-spinner" }),
|
|
202
|
-
" ", (_b = state.progress) !== null && _b !== void 0 ? _b : t('ta.auth.waiting'))),
|
|
201
|
+
!state.result && !prompt && React.createElement(Loading, { compact: true, label: (_b = state.progress) !== null && _b !== void 0 ? _b : t('ta.auth.waiting') }),
|
|
203
202
|
state.result === 'failed' && (React.createElement(Callout, { level: "error", action: React.createElement("button", { type: "button", className: "ta-button", onClick: onBack }, t('ta.auth.back')) }, t('ta.auth.failed', { message: (_c = state.error) !== null && _c !== void 0 ? _c : '' })))));
|
|
204
203
|
}
|
|
205
204
|
function ProviderRow({ provider, onPick, onSignOut, plain }) {
|
|
@@ -288,8 +287,7 @@ export function AuthPanel({ onSignedIn, onProviders, kinds }) {
|
|
|
288
287
|
return React.createElement(AuthFlow, { provider: picked, onDone: done, onBack: back });
|
|
289
288
|
}
|
|
290
289
|
if (!providers) {
|
|
291
|
-
return
|
|
292
|
-
React.createElement("span", { className: "ta-spinner" })));
|
|
290
|
+
return React.createElement(Loading, null);
|
|
293
291
|
}
|
|
294
292
|
const signOut = async (provider) => {
|
|
295
293
|
if (await notices.confirm({ title: t('ta.auth.signOutConfirm', { name: provider.name }), confirmLabel: t('ta.auth.signOut'), danger: true })) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface CallPillProps {
|
|
3
|
+
title: string;
|
|
4
|
+
/** What the call is at, a few words. */
|
|
5
|
+
phase: string;
|
|
6
|
+
connecting?: boolean;
|
|
7
|
+
onBack(): void;
|
|
8
|
+
onHangUp(): void;
|
|
9
|
+
}
|
|
10
|
+
/** The small window of a call at the top of the page, marked as the part of the call (CallScreen). */
|
|
11
|
+
export declare function CallPill({ title, phase, connecting, onBack, onHangUp }: CallPillProps): React.JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Phone, PhoneOff } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { CallScreen } from '../assistant/call-screen.js';
|
|
4
|
+
import { useT } from '../i18n/use-t.js';
|
|
5
|
+
import { ScreenUtil } from '../screen/screen-protocol.js';
|
|
6
|
+
import { Icon } from './icon.js';
|
|
7
|
+
/** The small window of a call at the top of the page, marked as the part of the call (CallScreen). */
|
|
8
|
+
export function CallPill({ title, phase, connecting, onBack, onHangUp }) {
|
|
9
|
+
const t = useT();
|
|
10
|
+
return (React.createElement("div", { className: "ta-kept-call", ...ScreenUtil.part(CallScreen.PART), "data-phase": connecting ? 'connecting' : 'on' },
|
|
11
|
+
React.createElement("button", { type: "button", className: "ta-kept-call-back", onClick: onBack, "aria-label": `${title} · ${phase}`, ...ScreenUtil.action('open') },
|
|
12
|
+
React.createElement("span", { className: "ta-kept-call-icon" },
|
|
13
|
+
React.createElement(Icon, { icon: Phone, size: 13 })),
|
|
14
|
+
React.createElement("span", { className: "ta-kept-call-title" }, title),
|
|
15
|
+
React.createElement("span", { className: "ta-kept-call-phase" }, phase)),
|
|
16
|
+
React.createElement("button", { type: "button", className: "ta-kept-call-end", "aria-label": t('ta.call.hangUp'), title: t('ta.call.hangUp'), onClick: onHangUp, ...ScreenUtil.action('hangUp') },
|
|
17
|
+
React.createElement(Icon, { icon: PhoneOff, size: 14 }))));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=call-pill.js.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { WebHomeEntry, WebMenuItem, WebTaskEntry, WebViewPreview } from '../extension/web-extension-api.js';
|
|
2
|
+
import type { Translate } from '../i18n/use-t.js';
|
|
3
|
+
import type { ChatSeen } from './chat-seen.js';
|
|
4
|
+
import type { ContextMenuItem } from './context-menu.js';
|
|
5
|
+
/**
|
|
6
|
+
* The double's home at the top of the chats, which are the double's list (docs/design/ta-partners.md): its card, the
|
|
7
|
+
* rows extensions add under it, what waits for the user to decide; its tasks that are no conversation (a team) are
|
|
8
|
+
* rows of the list by their time, those that are one (WebTask.session) that conversation's row.
|
|
9
|
+
*/
|
|
10
|
+
export interface ChatHome {
|
|
11
|
+
double: ChatHomeDouble;
|
|
12
|
+
/** The rows extensions add to the double's list (ChatHomeUtil.items), pinned at first. */
|
|
13
|
+
items: readonly WebHomeEntry[];
|
|
14
|
+
/** The key of the row whose page is in front, as a conversation of the list is (WebExtensionsState.pageFrom). */
|
|
15
|
+
shownItem?: string;
|
|
16
|
+
/** Opens a row: a page it shows is shown beside the list (TaWebExtensions.openHome). */
|
|
17
|
+
openItem(entry: WebHomeEntry): Promise<void>;
|
|
18
|
+
/** Every task (ui.useTasks). */
|
|
19
|
+
tasks: readonly WebTaskEntry[];
|
|
20
|
+
/** A task row opened, ended at `at`: seen, as a conversation is (SEEN_CHATS, ChatHomeUtil.seenKey). */
|
|
21
|
+
look(key: string, at: number): void;
|
|
22
|
+
/** Deletes those that can be, once the user agreed (WebTaskUtil.remove). */
|
|
23
|
+
remove(tasks: readonly WebTaskEntry[]): void;
|
|
24
|
+
}
|
|
25
|
+
/** The double, as its card draws it. */
|
|
26
|
+
export interface ChatHomeDouble {
|
|
27
|
+
name: string;
|
|
28
|
+
/** Its page is in front. */
|
|
29
|
+
shown: boolean;
|
|
30
|
+
/** It answers now. */
|
|
31
|
+
busy: boolean;
|
|
32
|
+
/** What it said last (WebView.preview). */
|
|
33
|
+
preview?: WebViewPreview;
|
|
34
|
+
menu?(): WebMenuItem[][];
|
|
35
|
+
open(): void;
|
|
36
|
+
}
|
|
37
|
+
/** What the double's tasks are at, on its card. */
|
|
38
|
+
export interface ChatHomeCounts {
|
|
39
|
+
waiting: number;
|
|
40
|
+
running: number;
|
|
41
|
+
/** Ended, and not seen since. */
|
|
42
|
+
fresh: number;
|
|
43
|
+
}
|
|
44
|
+
/** The tasks as the home and the list show them. */
|
|
45
|
+
export interface ChatHomeTasks {
|
|
46
|
+
/** What waits for the user to decide, the latest first: above the rest. */
|
|
47
|
+
waiting: WebTaskEntry[];
|
|
48
|
+
/** Those that are no conversation, and wait for nothing: rows of the list by their time. */
|
|
49
|
+
rows: WebTaskEntry[];
|
|
50
|
+
/** The conversations of those that wait: their rows are those of `waiting`, not again below. */
|
|
51
|
+
hidden: ReadonlySet<string>;
|
|
52
|
+
}
|
|
53
|
+
/** A row of the list for a task that is no conversation (ChatHomeTasks.rows), where its time is. */
|
|
54
|
+
export interface ChatTaskRow {
|
|
55
|
+
/** `task:<key>`, as SEEN_CHATS keeps it (ChatHomeUtil.seenKey). */
|
|
56
|
+
key: string;
|
|
57
|
+
task: WebTaskEntry;
|
|
58
|
+
updatedAt: number;
|
|
59
|
+
}
|
|
60
|
+
/** A row an extension adds to the double's list (registerHomeItems): pinned, or where its time is. */
|
|
61
|
+
export interface ChatHomeRow {
|
|
62
|
+
/** `home:<extension>/<id>`, as PINNED keeps it. */
|
|
63
|
+
key: string;
|
|
64
|
+
item: WebHomeEntry;
|
|
65
|
+
updatedAt: number;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace ChatHomeUtil {
|
|
68
|
+
/** Those of the double's home: under it (`double`), or without a place nor a section. */
|
|
69
|
+
function items(items: readonly WebHomeEntry[]): WebHomeEntry[];
|
|
70
|
+
function tasks(tasks: readonly WebTaskEntry[]): ChatHomeTasks;
|
|
71
|
+
function seenKey(task: Pick<WebTaskEntry, 'key'>): string;
|
|
72
|
+
/** When it last changed, as the list orders it: its end, else its start. */
|
|
73
|
+
function at(task: Pick<WebTaskEntry, 'startedAt' | 'endedAt'>): number;
|
|
74
|
+
function row(task: WebTaskEntry): ChatTaskRow;
|
|
75
|
+
function homeRow(item: WebHomeEntry): ChatHomeRow;
|
|
76
|
+
/** The conversations rows of the home stand for (WebHomeItem.sessionFile): not listed again. */
|
|
77
|
+
function standIns(items: readonly WebHomeEntry[]): ReadonlySet<string>;
|
|
78
|
+
/**
|
|
79
|
+
* The rows of the list for tasks: those that are no conversation, and those whose conversation the list does not
|
|
80
|
+
* have (gone, or not read yet), not lost; split as `archive` does.
|
|
81
|
+
*/
|
|
82
|
+
function rows(home: ChatHomeTasks | undefined, all: readonly WebTaskEntry[] | undefined, listed: (file: string) => boolean, query: string, since: number | undefined, archived: readonly string[]): {
|
|
83
|
+
listed: ChatTaskRow[];
|
|
84
|
+
archived: ChatTaskRow[];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* The rows of tasks the list keeps, and those it archives as a conversation is (ChatListUtil.entries): ended
|
|
88
|
+
* before `since`. One whose conversation is archived is that conversation's row in the archive, not one of its own.
|
|
89
|
+
*/
|
|
90
|
+
function archive(rows: readonly ChatTaskRow[], since: number | undefined, archived: ReadonlySet<string>): {
|
|
91
|
+
listed: ChatTaskRow[];
|
|
92
|
+
archived: ChatTaskRow[];
|
|
93
|
+
};
|
|
94
|
+
/** It ended after the user last opened it (once the seen were kept): an amber dot, as a conversation's unread. */
|
|
95
|
+
function unseen(task: WebTaskEntry, seen: ChatSeen): boolean;
|
|
96
|
+
/** Whether one of `texts` has the query (any case); all match an empty one. */
|
|
97
|
+
function matches(query: string, ...texts: (string | undefined)[]): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* What the double's tasks are at: those that wait, run, and ended unseen (`fresh`, which reads the list: a task
|
|
100
|
+
* that is a conversation is unseen as that conversation is).
|
|
101
|
+
*/
|
|
102
|
+
function counts(tasks: readonly WebTaskEntry[], fresh: (task: WebTaskEntry) => boolean): ChatHomeCounts;
|
|
103
|
+
/** The line of the card: what needs the user and goes on; empty when nothing does. */
|
|
104
|
+
function line({ waiting, running, fresh }: ChatHomeCounts, t: Translate): string;
|
|
105
|
+
/** A menu of an extension (sections of items) as the menus of the page take it: a line between the sections. */
|
|
106
|
+
function menu(sections: readonly WebMenuItem[][]): ContextMenuItem[];
|
|
107
|
+
/**
|
|
108
|
+
* The menu of a row of a task: open, then its own menu; a delete only when it has no menu of its own, which has
|
|
109
|
+
* its delete already (WebTask.remove), not to show it twice.
|
|
110
|
+
*/
|
|
111
|
+
function taskMenu(task: Pick<WebTaskEntry, 'menu'>, open: ContextMenuItem, remove?: ContextMenuItem): ContextMenuItem[];
|
|
112
|
+
}
|