@celljs/ta-web 4.17.0 → 4.18.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/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.js +3 -1
- 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 +61 -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 +9 -4
- package/esm/browser/components/host-view.js +53 -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 +38 -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 +2 -0
- package/esm/browser/hosts.js +12 -2
- package/esm/browser/i18n/locales.d.ts +144 -14
- package/esm/browser/i18n/messages-ja.js +153 -23
- package/esm/browser/i18n/messages-zh-tw.js +153 -23
- package/esm/browser/i18n/messages.d.ts +141 -11
- package/esm/browser/i18n/messages.js +307 -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 +0 -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 +8 -2
- 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 +1 -1
- package/esm/browser/workbench-hosts.js +2 -2
- package/esm/browser/workbench-protocol.d.ts +18 -3
- package/esm/browser/workbench-services.d.ts +9 -1
- package/esm/browser/workbench-services.js +38 -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/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.js +2 -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 +62 -0
- package/lib/browser/components/cloud-sign-in-view.js +393 -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 +9 -4
- package/lib/browser/components/host-view.js +52 -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 +38 -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 +2 -0
- package/lib/browser/hosts.js +12 -2
- package/lib/browser/i18n/locales.d.ts +144 -14
- package/lib/browser/i18n/messages-ja.js +153 -23
- package/lib/browser/i18n/messages-zh-tw.js +153 -23
- package/lib/browser/i18n/messages.d.ts +141 -11
- package/lib/browser/i18n/messages.js +307 -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 +0 -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 +8 -2
- 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 +1 -1
- package/lib/browser/workbench-hosts.js +2 -2
- package/lib/browser/workbench-protocol.d.ts +18 -3
- package/lib/browser/workbench-services.d.ts +9 -1
- package/lib/browser/workbench-services.js +38 -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
|
@@ -17,6 +17,7 @@ import { IconButton, SidebarRight } from './icon.js';
|
|
|
17
17
|
import { DISCOVER, entryHold, hasDiscover, places } from './nav-places.js';
|
|
18
18
|
import { PageStackContext } from './phone-shell.js';
|
|
19
19
|
import { DinoFace } from './ta-avatar.js';
|
|
20
|
+
import { UnseenDrop } from './unseen-drop.js';
|
|
20
21
|
import { WorkbenchToggle, WorkbenchToggleContext } from './workbench-toggle.js';
|
|
21
22
|
/* The navigation of the app: the rail, a sidebar view, a page of the main area. */
|
|
22
23
|
/** Where the pages of the rail go on this device: a phone has the room its tabs leave. */
|
|
@@ -48,17 +49,18 @@ function RailItem({ label, place, active, onClick, onContextMenu, onPointerDown,
|
|
|
48
49
|
* once some are under it; the account with the settings at the bottom. A page's menu (a right click) puts it under
|
|
49
50
|
* Discover; that of the double talks to it, and that of the chats opens a new one (entryMenu).
|
|
50
51
|
*/
|
|
51
|
-
export function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface, holds, asks, onDismissAsks, }) {
|
|
52
|
+
export function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface, holds, asks, onDismissAsks, onSeeAll, }) {
|
|
52
53
|
const t = useT();
|
|
53
54
|
const [{ server }] = useWorkbench();
|
|
54
55
|
const [menu, openMenu] = useContextMenu();
|
|
55
56
|
const held = useHeld();
|
|
56
57
|
const settingsItem = { label: t('ta.nav.settings'), run: () => onSettings('navigation') };
|
|
57
|
-
/** A page of the rail
|
|
58
|
-
const item = (view
|
|
58
|
+
/** A page of the rail: its menu puts it under Discover. */
|
|
59
|
+
const item = (view) => {
|
|
59
60
|
var _a;
|
|
60
61
|
const Glyph = (_a = view.icon) !== null && _a !== void 0 ? _a : PanelTop;
|
|
61
|
-
return (React.createElement(RailItem, { key: view.id, label: WebLabelUtil.text(view.title), place: `page:${view.id}`, active: !settingsShown && current === view.id, onClick: () => onPage(view.id), onContextMenu:
|
|
62
|
+
return (React.createElement(RailItem, { key: view.id, label: WebLabelUtil.text(view.title), place: `page:${view.id}`, active: !settingsShown && current === view.id, onClick: () => onPage(view.id), onContextMenu: event => openMenu(event, [{ label: t('ta.nav.fold'), run: () => navigation.fold(view.id) }, '-', settingsItem]) },
|
|
63
|
+
React.createElement(Glyph, { size: 20, strokeWidth: 1.6 })));
|
|
62
64
|
};
|
|
63
65
|
const discover = hasDiscover(navigation) || current === DISCOVER;
|
|
64
66
|
// The workbench from anywhere, a page or the settings too, as the launcher and the board.
|
|
@@ -67,10 +69,10 @@ export function Rail({ lists, list, onList, navigation, current, onPage, onDisco
|
|
|
67
69
|
React.createElement("div", { className: "ta-rail-logo", title: server ? `Ta v${server.version}` : 'Ta' },
|
|
68
70
|
React.createElement(Dino, { size: 26 })),
|
|
69
71
|
React.createElement("div", { className: "ta-rail-items" },
|
|
70
|
-
navigation.home && item(navigation.home, false, true),
|
|
71
72
|
lists.map(entry => (React.createElement(RailItem, { key: entry.id, label: entry.label, place: `list:${entry.id}`, active: list === entry.id, onClick: () => onList(entry.id), ...held(entryHold(entry.id, entry.double, holds)) },
|
|
72
73
|
entry.double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(entry.icon, { size: 20, strokeWidth: 1.6 }),
|
|
73
|
-
entry.
|
|
74
|
+
entry.double &&
|
|
75
|
+
(asks ? (React.createElement(AsksBadge, { count: asks, onDismiss: onDismissAsks })) : (onSeeAll && React.createElement(UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: onSeeAll, className: "ta-tabbar-dot ta-rail-dot" })))))),
|
|
74
76
|
(navigation.nav.length > 0 || discover) && React.createElement("hr", { className: "ta-rail-divider" }),
|
|
75
77
|
navigation.nav.map(view => item(view)),
|
|
76
78
|
discover && (React.createElement(RailItem, { label: t('ta.discover'), place: "discover", active: !settingsShown && current === DISCOVER, onClick: onDiscover, onContextMenu: event => openMenu(event, [settingsItem]) },
|
|
@@ -129,7 +131,8 @@ export function PageView({ view, leading }) {
|
|
|
129
131
|
React.createElement(view.head, null)))) : (React.createElement("div", { className: "ta-main-title" },
|
|
130
132
|
React.createElement("span", null, title))),
|
|
131
133
|
React.createElement(WorkbenchToggle, null)),
|
|
132
|
-
React.createElement(
|
|
133
|
-
React.createElement(View,
|
|
134
|
+
React.createElement("div", { className: "ta-page-body" },
|
|
135
|
+
React.createElement(ExtensionBoundary, { key: view.id, name: title, resetKey: View },
|
|
136
|
+
React.createElement(View, null)))));
|
|
134
137
|
}
|
|
135
138
|
//# sourceMappingURL=app-nav.js.map
|
|
@@ -54,7 +54,6 @@ export declare function useAppShell(): {
|
|
|
54
54
|
activeEditor: string | undefined;
|
|
55
55
|
view: import("../index.js").WebViewEntry | undefined;
|
|
56
56
|
sideView: import("../index.js").WebViewEntry | undefined;
|
|
57
|
-
sideComing: boolean;
|
|
58
57
|
side: string;
|
|
59
58
|
showPage: (id: string) => void;
|
|
60
59
|
lists: import("./side-lists.js").SideList[];
|
|
@@ -65,7 +64,7 @@ export declare function useAppShell(): {
|
|
|
65
64
|
navigation: import("./nav-places.js").Navigation;
|
|
66
65
|
codeScan: import("../device/code-scan.js").CodeScan | undefined;
|
|
67
66
|
notices: import("../index.js").TaNotices;
|
|
68
|
-
|
|
67
|
+
railCurrent: string;
|
|
69
68
|
tabView: import("../index.js").WebViewEntry | undefined;
|
|
70
69
|
screenPage: import("../index.js").WebViewEntry | undefined;
|
|
71
70
|
seenChats: import("./chat-seen.js").ChatSeen;
|
|
@@ -76,5 +75,6 @@ export declare function useAppShell(): {
|
|
|
76
75
|
toggleWorkbench: () => void;
|
|
77
76
|
picking: React.RefObject<() => void>;
|
|
78
77
|
chatsBusy: boolean;
|
|
78
|
+
deciding: number;
|
|
79
79
|
setChatsBusy: React.Dispatch<React.SetStateAction<boolean>>;
|
|
80
80
|
};
|
|
@@ -6,6 +6,7 @@ import { REMOVED_CHATS } from '../chat/chat-protocol.js';
|
|
|
6
6
|
import { useChat } from '../chat/chat-view.js';
|
|
7
7
|
import { useBackLayer, useNoBackLayer } from '../device/back-stack.js';
|
|
8
8
|
import { useDevice } from '../device/device.js';
|
|
9
|
+
import { WebTaskUtil } from '../extension/web-tasks.js';
|
|
9
10
|
import { TaFiles } from '../files/files-protocol.js';
|
|
10
11
|
import { useCodeScan, useNotices, useOpenLink, usePersisted, useSettings, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
11
12
|
import { useT } from '../i18n/use-t.js';
|
|
@@ -16,6 +17,7 @@ import { CARDS_ID, EDITOR, FIRST_SIDE, SETTINGS_SHOWN, SIDE, SIDEBAR, TAB_PAGE,
|
|
|
16
17
|
import { useSurfaces } from './board.js';
|
|
17
18
|
import { LET_GO_ASKS } from './chat-asks.js';
|
|
18
19
|
import { BY_DIRECTORY, FOLDED, PINNED } from './chat-list-util.js';
|
|
20
|
+
import { DISCOVER } from './nav-places.js';
|
|
19
21
|
import { DOUBLE_PAGE, SideListUtil } from './side-lists.js';
|
|
20
22
|
import { usePane } from './split-pane.js';
|
|
21
23
|
import { usePageVisible } from './use-seen-chats.js';
|
|
@@ -188,17 +190,16 @@ export function useAppShell() {
|
|
|
188
190
|
const { hasCards, openCards, cardsTool } = useWorkbenchCards(rightOpen && !editor.collapsed);
|
|
189
191
|
const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
|
|
190
192
|
const sideViews = SideListUtil.sidebarViews(extensions.views);
|
|
191
|
-
const
|
|
192
|
-
// The first
|
|
193
|
-
const
|
|
194
|
-
const side = sideView ? sideView.id :
|
|
193
|
+
const lists = SideListUtil.of(sideViews, { chats: t('ta.chat'), double: t('ta.nav.double') });
|
|
194
|
+
// The first list is the double's: the chats, else (a sidebar view of before that lists the double) that view.
|
|
195
|
+
const sideView = sideViews.find(candidate => candidate.id === (sideId === FIRST_SIDE ? lists[0].id : sideId));
|
|
196
|
+
const side = sideView ? sideView.id : '';
|
|
195
197
|
const showPage = (id) => {
|
|
196
198
|
host.showPage(id);
|
|
197
199
|
setNavOpen(false);
|
|
198
200
|
setSettings(undefined);
|
|
199
201
|
setTabPage(undefined);
|
|
200
202
|
};
|
|
201
|
-
const lists = SideListUtil.of(sideViews, t('ta.chat'));
|
|
202
203
|
const tools = [...(hasCards ? [cardsTool] : []), ...extensions.views.filter(candidate => candidate.location === 'panel')];
|
|
203
204
|
const openTool = (id) => (id === CARDS_ID ? openCards() : host.openView(id));
|
|
204
205
|
// The workbench: the tabs open, or the tools that open there.
|
|
@@ -224,22 +225,16 @@ export function useAppShell() {
|
|
|
224
225
|
const navigation = useNavigation(extensions.views);
|
|
225
226
|
const codeScan = useCodeScan();
|
|
226
227
|
const [, notices] = useNotices();
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
React.useEffect(() => {
|
|
231
|
-
if (homeId && !homeOpened.current) {
|
|
232
|
-
homeOpened.current = true;
|
|
233
|
-
if (!host.state.page) {
|
|
234
|
-
host.showPage(homeId);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}, [homeId, host]);
|
|
228
|
+
// A page a row of the double's home opened (TaWebExtensions.openHome) shows as a conversation of the list does:
|
|
229
|
+
// beside the list, with the list on the rail, wherever else the page is (Discover, the navigation).
|
|
230
|
+
const fromHome = !!view && !!extensions.pageFrom;
|
|
238
231
|
// A page of an extension started on open that Discover lists: shown as those of Discover are.
|
|
239
|
-
const discoveredOnOpen = !!(view === null || view === void 0 ? void 0 : view.onOpen) && navigation.onOpen.some(entry => entry.state === 'shown');
|
|
240
|
-
const railView = view &&
|
|
232
|
+
const discoveredOnOpen = !fromHome && !!(view === null || view === void 0 ? void 0 : view.onOpen) && navigation.onOpen.some(entry => entry.state === 'shown');
|
|
233
|
+
const railView = view && !fromHome && (navigation.pages.includes(view) || discoveredOnOpen) ? view : undefined;
|
|
241
234
|
// 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.
|
|
242
|
-
const tabView = view &&
|
|
235
|
+
const tabView = view && !fromHome && navigation.nav.includes(view) ? view : undefined;
|
|
236
|
+
// What the rail lights: Discover for a page of it, the page for one of the navigation, nothing for a page of the list.
|
|
237
|
+
const railCurrent = tabPage === 'discover' || discoveredOnOpen || (view && !fromHome && navigation.discover.includes(view)) ? DISCOVER : fromHome ? '' : ((_a = view === null || view === void 0 ? void 0 : view.id) !== null && _a !== void 0 ? _a : '');
|
|
243
238
|
// A page of the screen, and those in the background beside it, kept as they were.
|
|
244
239
|
const screenPage = settings === undefined && view && !tabView ? view : undefined;
|
|
245
240
|
// The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
|
|
@@ -332,8 +327,13 @@ export function useAppShell() {
|
|
|
332
327
|
}
|
|
333
328
|
};
|
|
334
329
|
// The list of chats asked for (ui.showChats): in the sidebar, or the tab of a phone; `busy` keeps only those going
|
|
335
|
-
// on, until the user clears it or another list is shown.
|
|
330
|
+
// on, until the user clears it or another list is shown. On a phone those going on are a page pushed over the tab
|
|
331
|
+
// they were asked from (PhoneStack, AppShell), back with its button, a swipe from the left edge or the back of the
|
|
332
|
+
// system, as the folder of the chats is: the tab stays.
|
|
336
333
|
const [chatsBusy, setChatsBusy] = React.useState(false);
|
|
334
|
+
// What waits for the user to decide, as the double's home lists it: counted on the double's entry, not the chats'.
|
|
335
|
+
const tasks = React.useSyncExternalStore(host.tasks.subscribe, host.tasks.tasks, host.tasks.tasks);
|
|
336
|
+
const deciding = WebTaskUtil.deciding(tasks);
|
|
337
337
|
const chatsAsked = extensions.chatsShown;
|
|
338
338
|
// biome-ignore lint/correctness/useExhaustiveDependencies: each time it is asked, the same again too
|
|
339
339
|
React.useEffect(() => {
|
|
@@ -341,21 +341,26 @@ export function useAppShell() {
|
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
343
|
setChatsBusy(chatsAsked.busy);
|
|
344
|
-
setSideId('');
|
|
345
344
|
setSurface(undefined);
|
|
346
345
|
setSettings(undefined);
|
|
347
|
-
setTabPage(undefined);
|
|
348
346
|
setNavOpen(false);
|
|
349
347
|
if (phone) {
|
|
350
348
|
setScreenOpen(false);
|
|
351
349
|
if (showEditors) {
|
|
352
350
|
toggleRight();
|
|
353
351
|
}
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
// Pushed over the tab, unless it is a page of an extension's own (SideListUtil.pushesOver): then over the chats.
|
|
353
|
+
if (!chatsAsked.busy || !SideListUtil.pushesOver(tabView)) {
|
|
354
|
+
setSideId('');
|
|
355
|
+
setTabPage(undefined);
|
|
356
|
+
if (tabView) {
|
|
357
|
+
host.showPage('');
|
|
358
|
+
}
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
else {
|
|
362
|
+
setSideId('');
|
|
363
|
+
setTabPage(undefined);
|
|
359
364
|
if (view && full) {
|
|
360
365
|
host.showPage('');
|
|
361
366
|
}
|
|
@@ -363,10 +368,10 @@ export function useAppShell() {
|
|
|
363
368
|
}
|
|
364
369
|
}, [chatsAsked.count]);
|
|
365
370
|
React.useEffect(() => {
|
|
366
|
-
if (side !== '') {
|
|
371
|
+
if (side !== '' && !phone) {
|
|
367
372
|
setChatsBusy(false);
|
|
368
373
|
}
|
|
369
|
-
}, [side]);
|
|
374
|
+
}, [side, phone]);
|
|
370
375
|
const toggleWorkbench = () => {
|
|
371
376
|
if (showEditors) {
|
|
372
377
|
toggleRight();
|
|
@@ -438,7 +443,6 @@ export function useAppShell() {
|
|
|
438
443
|
activeEditor,
|
|
439
444
|
view,
|
|
440
445
|
sideView,
|
|
441
|
-
sideComing,
|
|
442
446
|
side,
|
|
443
447
|
showPage,
|
|
444
448
|
lists,
|
|
@@ -449,7 +453,7 @@ export function useAppShell() {
|
|
|
449
453
|
navigation,
|
|
450
454
|
codeScan,
|
|
451
455
|
notices,
|
|
452
|
-
|
|
456
|
+
railCurrent,
|
|
453
457
|
tabView,
|
|
454
458
|
screenPage,
|
|
455
459
|
seenChats,
|
|
@@ -460,6 +464,7 @@ export function useAppShell() {
|
|
|
460
464
|
toggleWorkbench,
|
|
461
465
|
picking,
|
|
462
466
|
chatsBusy,
|
|
467
|
+
deciding,
|
|
463
468
|
setChatsBusy,
|
|
464
469
|
};
|
|
465
470
|
}
|
|
@@ -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 { PageVeil } 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(PageVeil, 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)));
|