@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TaTaskNote } from '@celljs/ta-protocol';
|
|
1
|
+
import { TaSaid, TaTaskNote } from '@celljs/ta-protocol';
|
|
2
2
|
import { MessageUtil } from '../util/message.js';
|
|
3
3
|
export var AssistantExport;
|
|
4
4
|
(function (AssistantExport) {
|
|
@@ -22,7 +22,11 @@ export var AssistantExport;
|
|
|
22
22
|
parts.push('', `## ${labels.task} · ${note.title} · ${labels.status(note.status)}`, '', note.body.trim());
|
|
23
23
|
}
|
|
24
24
|
else if (!note) {
|
|
25
|
-
|
|
25
|
+
// What a person reads of it (TaSaid): no context for the model, no summary of a compacted context.
|
|
26
|
+
const said = TaSaid.words(message.role, text);
|
|
27
|
+
if (said) {
|
|
28
|
+
parts.push('', `## ${message.role === 'user' ? labels.user : labels.ta}`, '', said);
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
return `${parts.join('\n')}\n`;
|
|
@@ -8,11 +8,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Autowired, Component } from '@celljs/core';
|
|
11
|
-
import { Bot, Copy, Download, Hand, ListTodo, MessagesSquare, Pencil, RotateCcw, ScrollText, Sparkles, Square, Trash2 } from 'lucide-react';
|
|
11
|
+
import { Bot, CircleSlash, Copy, Download, Hand, ListTodo, MessagesSquare, Pencil, RotateCcw, ScrollText, Sparkles, Square, Trash2 } from 'lucide-react';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { REMOVED_CHATS } from '../chat/chat-protocol.js';
|
|
14
14
|
import { ChatAskUtil, LET_GO_ASKS } from '../components/chat-asks.js';
|
|
15
15
|
import { ChatIconTile, ChatIconUtil } from '../components/chat-icon.js';
|
|
16
|
+
import { ChatListUtil } from '../components/chat-list-util.js';
|
|
16
17
|
import { SEEN_CHATS } from '../components/chat-seen.js';
|
|
17
18
|
import { DinoLookPicker } from '../components/dino-look-picker.js';
|
|
18
19
|
import { BuiltinWebExtension, TaWebExtensions } from '../extension/web-extension-protocol.js';
|
|
@@ -27,9 +28,23 @@ import { AssistantTaskSource } from './assistant-task-source.js';
|
|
|
27
28
|
import { ASSISTANT_NAME, ASSISTANT_TASKS_VIEW, AssistantPanel, AssistantTasks, AssistantTaskView } from './assistant-view.js';
|
|
28
29
|
import { ChatTaskSource } from './chat-task-source.js';
|
|
29
30
|
import { TasksBoardCard } from './task-card.js';
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
/** Faces of conversations as the chats draw them, one component for each look, so that a row drawn again keeps it. */
|
|
32
|
+
const letterFaces = new Map();
|
|
33
|
+
const iconFaces = new WeakMap();
|
|
34
|
+
/** The face of a conversation: the icon an extension gives it, else the letter of its directory in its tone. */
|
|
35
|
+
function chatFace(found, initial, tone) {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
if (found) {
|
|
38
|
+
const tints = (_a = iconFaces.get(found.icon)) !== null && _a !== void 0 ? _a : new Map();
|
|
39
|
+
iconFaces.set(found.icon, tints);
|
|
40
|
+
const face = (_b = tints.get(found.tint)) !== null && _b !== void 0 ? _b : (({ size }) => React.createElement(ChatIconTile, { found, size }));
|
|
41
|
+
tints.set(found.tint, face);
|
|
42
|
+
return face;
|
|
43
|
+
}
|
|
44
|
+
const key = `${tone}:${initial}`;
|
|
45
|
+
const face = (_c = letterFaces.get(key)) !== null && _c !== void 0 ? _c : (({ size }) => React.createElement('span', { className: `ta-chat-avatar ta-tone-${tone}`, style: { width: size, height: size }, 'aria-hidden': true }, initial));
|
|
46
|
+
letterFaces.set(key, face);
|
|
47
|
+
return face;
|
|
33
48
|
}
|
|
34
49
|
function download(name, text) {
|
|
35
50
|
const url = URL.createObjectURL(new Blob([text], { type: 'text/markdown;charset=utf-8' }));
|
|
@@ -68,11 +83,31 @@ let AssistantWebExtension = class AssistantWebExtension {
|
|
|
68
83
|
await this.assistant.removeTask(task.id);
|
|
69
84
|
pi.ui.closeEditor(editorId(task));
|
|
70
85
|
};
|
|
71
|
-
/**
|
|
86
|
+
/** The conversation of a task, when its turn is over and it asks the user to decide (not let go). */
|
|
87
|
+
const askingEntry = (task) => {
|
|
88
|
+
if (task.status === 'running' || task.takenOver) {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
const { sessions, saved } = this.workbench.state;
|
|
92
|
+
const entry = ChatAskUtil.entryOf(sessions, saved, task);
|
|
93
|
+
return entry && ChatAskUtil.asking(entry, this.persisted.get(LET_GO_ASKS)) ? entry : undefined;
|
|
94
|
+
};
|
|
95
|
+
/** What can be done with a task, in its … wherever it shows: stop, let its ask go or take over, then remove (a running one is stopped first). */
|
|
72
96
|
const taskMenu = (task) => {
|
|
73
97
|
const running = task.status === 'running' && !task.takenOver;
|
|
98
|
+
const asks = askingEntry(task);
|
|
74
99
|
return [
|
|
75
100
|
[
|
|
101
|
+
...(asks
|
|
102
|
+
? [
|
|
103
|
+
{
|
|
104
|
+
key: 'letGo',
|
|
105
|
+
label: t('ta.chat.letGo'),
|
|
106
|
+
icon: CircleSlash,
|
|
107
|
+
run: () => this.persisted.set(LET_GO_ASKS, ChatAskUtil.letGoAll(this.persisted.get(LET_GO_ASKS), [asks])),
|
|
108
|
+
},
|
|
109
|
+
]
|
|
110
|
+
: []),
|
|
76
111
|
...(running
|
|
77
112
|
? [{ key: 'stop', label: t('ta.assistant.stop'), icon: Square, run: () => void this.assistant.stopTask(task.id).catch(fail) }]
|
|
78
113
|
: []),
|
|
@@ -102,15 +137,18 @@ let AssistantWebExtension = class AssistantWebExtension {
|
|
|
102
137
|
const tasks = new AssistantTaskSource(this.assistant, {
|
|
103
138
|
t: (id, values) => translator(pi.ui.language)(id, values),
|
|
104
139
|
open: openTask,
|
|
140
|
+
show: task => {
|
|
141
|
+
if (task.sessionFile) {
|
|
142
|
+
void pi.openChat(task.sessionFile).catch(fail);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
openTask(task);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
105
148
|
openDouble: () => pi.ui.showView(`${ASSISTANT_NAME}/assistant`),
|
|
106
149
|
menu: taskMenu,
|
|
107
150
|
remove,
|
|
108
|
-
asking: task => {
|
|
109
|
-
var _a;
|
|
110
|
-
const { sessions, saved } = this.workbench.state;
|
|
111
|
-
const entry = ChatAskUtil.entryOf(sessions, saved, task);
|
|
112
|
-
return entry && ((_a = ChatAskUtil.asking(entry, this.persisted.get(LET_GO_ASKS))) === null || _a === void 0 ? void 0 : _a.question);
|
|
113
|
-
},
|
|
151
|
+
asking: task => { var _a, _b; return (_b = (_a = askingEntry(task)) === null || _a === void 0 ? void 0 : _a.asking) === null || _b === void 0 ? void 0 : _b.question; },
|
|
114
152
|
watchAsking: listener => {
|
|
115
153
|
const stops = [this.workbench.subscribe(() => listener()), this.persisted.subscribe(() => listener())];
|
|
116
154
|
return () => {
|
|
@@ -121,7 +159,7 @@ let AssistantWebExtension = class AssistantWebExtension {
|
|
|
121
159
|
},
|
|
122
160
|
});
|
|
123
161
|
pi.registerTasks(tasks);
|
|
124
|
-
// The conversations the user
|
|
162
|
+
// The conversations of the user's own that wait for them to decide, under the double on its list.
|
|
125
163
|
// The runs of a scheduled task are theirs too, folded into a folder of the chats (WebChatIcon.folder).
|
|
126
164
|
const folderOf = () => ChatIconUtil.folderOf(this.extensions.state.chatIcons);
|
|
127
165
|
const chatTasks = new ChatTaskSource({
|
|
@@ -156,9 +194,26 @@ let AssistantWebExtension = class AssistantWebExtension {
|
|
|
156
194
|
}
|
|
157
195
|
};
|
|
158
196
|
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
197
|
+
glyph: MessagesSquare,
|
|
198
|
+
openChat: entry => void pi.openChat(ChatListUtil.file(entry)).catch(fail),
|
|
199
|
+
letGo: entry => {
|
|
200
|
+
var _a;
|
|
201
|
+
const at = (_a = entry.asking) === null || _a === void 0 ? void 0 : _a.at;
|
|
202
|
+
if (at !== undefined) {
|
|
203
|
+
this.persisted.set(LET_GO_ASKS, ChatAskUtil.letGo(this.persisted.get(LET_GO_ASKS), ChatListUtil.file(entry), at));
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
face: (entry) => {
|
|
207
|
+
var _a, _b;
|
|
208
|
+
const { sessions, saved } = this.workbench.state;
|
|
209
|
+
const found = ChatIconUtil.find(this.extensions.state.chatIcons, {
|
|
210
|
+
sessionFile: entry.sessionFile,
|
|
211
|
+
cwd: entry.cwd,
|
|
212
|
+
...(entry.group ? { group: entry.group } : {}),
|
|
213
|
+
});
|
|
214
|
+
const source = ChatListUtil.sources([...sessions, ...saved]).find(each => { var _a; return each.title === ((_a = entry.group) !== null && _a !== void 0 ? _a : entry.cwd); });
|
|
215
|
+
return chatFace(found, (_a = source === null || source === void 0 ? void 0 : source.initial) !== null && _a !== void 0 ? _a : '', (_b = source === null || source === void 0 ? void 0 : source.tone) !== null && _b !== void 0 ? _b : 0);
|
|
216
|
+
},
|
|
162
217
|
});
|
|
163
218
|
pi.registerTasks(chatTasks);
|
|
164
219
|
const registerPage = () => pi.registerView('assistant', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TaDelegateLevel } from '@celljs/ta-protocol';
|
|
2
2
|
/** The role of ta in its conversation with the user. */
|
|
3
|
-
export declare const ASSISTANT_PROMPT = "You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.\n- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Start independent tasks in parallel. Then tell the user in one sentence what you started.\n- A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.\n- When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.\n-
|
|
3
|
+
export declare const ASSISTANT_PROMPT = "You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.\n- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Say in them what to do and what to answer, never how the answer looks (its length, its format): Ta shows every answer as the user reads it. Start independent tasks in parallel. Then tell the user in one sentence what you started.\n- A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.\n- When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.\n- Give verify only for a change a second look may catch out: code changed across several files, or behavior the user relies on. Not for documents, a small fix of a file or two, research, or what the task checks well itself. verify is one check (a command such as \"bun test\", or one thing to look at), not a list; and when you give it, add no steps of checking again to the instructions: the check does that. When such a task ends, its update asks you to start a check: do it with start_task and verifies, with the instructions it gives as they are, and tell the user what the check found.\n- When the user asks what goes on, list_tasks has your tasks and the conversations they have going on themselves. You cannot write to those or stop them: tell the user, and if they want you to follow one, they hand it to you from the list of chats.\n- When a <task_update> message arrives, the user already sees that the task ended and what it said, its cards too: tell them in one or two sentences what was done and what was not, and whether they need to decide anything. Do not repeat the numbers, lists of files, comparisons or tests it already shows, and write no card of your own for it. With nothing to decide, suggest nothing; with something, name that one thing alone. get_task has the details.\n- Ask before anything risky or irreversible the user did not clearly ask for.\n- Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.";
|
|
4
4
|
/**
|
|
5
5
|
* In the role while the user wants to be asked first (Settings.confirmTasks). The team tools of ta-channels
|
|
6
6
|
* read the same words in the system prompt to ask before they build a team: keep them as they are.
|
|
@@ -39,7 +39,7 @@ export declare const ASSISTANT_TOOLS: {
|
|
|
39
39
|
};
|
|
40
40
|
readonly verify: {
|
|
41
41
|
readonly type: 'string';
|
|
42
|
-
readonly description: '
|
|
42
|
+
readonly description: 'Only for a risky change: the one check to run once it ends, a command or one thing to look at. Its update then asks for a check.';
|
|
43
43
|
};
|
|
44
44
|
readonly verifies: {
|
|
45
45
|
readonly type: 'string';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TaDelegateUtil } from '@celljs/ta-protocol';
|
|
2
2
|
/** The role of ta in its conversation with the user. */
|
|
3
3
|
export const ASSISTANT_PROMPT = `You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.
|
|
4
|
-
- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Start independent tasks in parallel. Then tell the user in one sentence what you started.
|
|
4
|
+
- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Say in them what to do and what to answer, never how the answer looks (its length, its format): Ta shows every answer as the user reads it. Start independent tasks in parallel. Then tell the user in one sentence what you started.
|
|
5
5
|
- A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.
|
|
6
6
|
- When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.
|
|
7
|
-
-
|
|
7
|
+
- Give verify only for a change a second look may catch out: code changed across several files, or behavior the user relies on. Not for documents, a small fix of a file or two, research, or what the task checks well itself. verify is one check (a command such as "bun test", or one thing to look at), not a list; and when you give it, add no steps of checking again to the instructions: the check does that. When such a task ends, its update asks you to start a check: do it with start_task and verifies, with the instructions it gives as they are, and tell the user what the check found.
|
|
8
8
|
- When the user asks what goes on, list_tasks has your tasks and the conversations they have going on themselves. You cannot write to those or stop them: tell the user, and if they want you to follow one, they hand it to you from the list of chats.
|
|
9
|
-
- When a <task_update> message arrives,
|
|
9
|
+
- When a <task_update> message arrives, the user already sees that the task ended and what it said, its cards too: tell them in one or two sentences what was done and what was not, and whether they need to decide anything. Do not repeat the numbers, lists of files, comparisons or tests it already shows, and write no card of your own for it. With nothing to decide, suggest nothing; with something, name that one thing alone. get_task has the details.
|
|
10
10
|
- Ask before anything risky or irreversible the user did not clearly ask for.
|
|
11
11
|
- Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.`;
|
|
12
12
|
/**
|
|
@@ -44,7 +44,10 @@ export const ASSISTANT_TOOLS = {
|
|
|
44
44
|
type: 'boolean',
|
|
45
45
|
description: 'Work in a git worktree of its own beside the repository, on a branch of its own, so that tasks in parallel and the user do not touch the same files.',
|
|
46
46
|
},
|
|
47
|
-
verify: {
|
|
47
|
+
verify: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Only for a risky change: the one check to run once it ends, a command or one thing to look at. Its update then asks for a check.',
|
|
50
|
+
},
|
|
48
51
|
verifies: { type: 'string', description: "The id of the task this one checks: its first line, PASS or FAIL, is that task's verdict." },
|
|
49
52
|
},
|
|
50
53
|
required: ['title', 'instructions'],
|
|
@@ -4,10 +4,14 @@ import type { Translate } from '../i18n/use-t.js';
|
|
|
4
4
|
import type { AssistantAsk, AssistantState, AssistantTask, TaAssistant } from './assistant-protocol.js';
|
|
5
5
|
/** What a task does now, in a few words: what the loading line of its conversation says (ProgressUtil.text), the same. */
|
|
6
6
|
export declare function activity(task: AssistantTask, state: SessionState | undefined, t: Translate): string;
|
|
7
|
+
/** How a task came out of a check: its own verdict for a check that ended, else the verdict of the check of it. */
|
|
8
|
+
export declare function verdict(task: AssistantTask): AssistantTask['verdict'];
|
|
7
9
|
/** What the source does with a task besides listing it: the workbench and the menus are the extension's. */
|
|
8
10
|
export interface AssistantTaskActions {
|
|
9
11
|
t: Translate;
|
|
10
12
|
open(task: AssistantTask): void;
|
|
13
|
+
/** Opens its conversation in the main area (WebTask.show). */
|
|
14
|
+
show?(task: AssistantTask): void;
|
|
11
15
|
/** Shows the double, where a start waits for the user's go. */
|
|
12
16
|
openDouble(): void;
|
|
13
17
|
menu(task: AssistantTask): WebMenuItem[][];
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaSaid } from '@celljs/ta-protocol';
|
|
2
|
+
import { ShieldCheck } from 'lucide-react';
|
|
2
3
|
import { ProgressUtil } from '../util/progress.js';
|
|
4
|
+
import { AssistantTaskUtil } from './assistant-task-util.js';
|
|
3
5
|
/** What a task does now, in a few words: what the loading line of its conversation says (ProgressUtil.text), the same. */
|
|
4
6
|
export function activity(task, state, t) {
|
|
5
|
-
var _a;
|
|
6
7
|
if (task.status === 'running' && (state === null || state === void 0 ? void 0 : state.working)) {
|
|
7
8
|
return ProgressUtil.text(ProgressUtil.phase(state), t, { working: state.workingMessage });
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
// A check's words follow its verdict, which the list says in words of the user's language.
|
|
11
|
+
const said = task.verifies ? AssistantTaskUtil.verdictReason(task.result) : task.result;
|
|
12
|
+
// A card of its reply (ta-glance) is drawn in its conversation, not read out here.
|
|
13
|
+
return task.status === 'running' ? t('ta.task.running') : TaSaid.line(said !== null && said !== void 0 ? said : '', { chars: 80 }) || t(`ta.task.${task.status}`);
|
|
14
|
+
}
|
|
15
|
+
/** How a task came out of a check: its own verdict for a check that ended, else the verdict of the check of it. */
|
|
16
|
+
export function verdict(task) {
|
|
17
|
+
return task.verifies ? (task.status === 'done' ? AssistantTaskUtil.verdictOf(task.result) : undefined) : task.verdict;
|
|
10
18
|
}
|
|
11
19
|
/**
|
|
12
20
|
* The double's own tasks as a source of WebExtensionAPI.registerTasks, which lists them with those of
|
|
@@ -134,7 +142,7 @@ export class AssistantTaskSource {
|
|
|
134
142
|
}
|
|
135
143
|
// How a check found it, and the branch it is on, before what it did.
|
|
136
144
|
const marks = [
|
|
137
|
-
task
|
|
145
|
+
verdict(task) && t(verdict(task) === 'pass' ? 'ta.task.verdictPass' : 'ta.task.verdictFail'),
|
|
138
146
|
task.worktree && t('ta.task.branch', { branch: task.worktree.branch }),
|
|
139
147
|
].filter(Boolean);
|
|
140
148
|
const said = activity(task, state, t);
|
|
@@ -151,15 +159,21 @@ export class AssistantTaskSource {
|
|
|
151
159
|
};
|
|
152
160
|
}
|
|
153
161
|
entry(task, status, detail) {
|
|
162
|
+
var _a;
|
|
154
163
|
return {
|
|
155
164
|
id: task.id,
|
|
156
165
|
title: task.title,
|
|
157
166
|
status,
|
|
158
167
|
detail,
|
|
168
|
+
...(verdict(task) ? { tone: verdict(task) === 'pass' ? 'good' : 'bad' } : {}),
|
|
169
|
+
// A check of another task's work says so on its tile.
|
|
170
|
+
...(task.verifies ? { glyph: ShieldCheck } : {}),
|
|
159
171
|
startedAt: task.startedAt,
|
|
160
172
|
endedAt: task.endedAt,
|
|
161
173
|
origin: task.origin,
|
|
174
|
+
session: (_a = task.sessionFile) !== null && _a !== void 0 ? _a : task.sessionId,
|
|
162
175
|
open: () => this.actions.open(task),
|
|
176
|
+
...(this.actions.show ? { show: () => { var _a, _b; return (_b = (_a = this.actions).show) === null || _b === void 0 ? void 0 : _b.call(_a, task); } } : {}),
|
|
163
177
|
menu: () => this.actions.menu(task),
|
|
164
178
|
remove: () => this.actions.remove(task),
|
|
165
179
|
removeHint: this.actions.t('ta.task.removeHint'),
|
|
@@ -53,8 +53,16 @@ export declare namespace AssistantTaskUtil {
|
|
|
53
53
|
function updateNote(task: AssistantTask): string;
|
|
54
54
|
/** What a task that checks another is told: look at its change, run the check, and say PASS or FAIL first. */
|
|
55
55
|
function checkInstructions(task: Pick<AssistantTask, 'title' | 'verify' | 'worktree' | 'result'>): string;
|
|
56
|
+
/**
|
|
57
|
+
* How a check answers, added to its instructions whatever the double wrote: the verdict alone on the first line
|
|
58
|
+
* (verdictOf), then what it ran and what it showed as it shows any result to the user, a card where its replies
|
|
59
|
+
* are drawn as cards, not lines of plain words.
|
|
60
|
+
*/
|
|
61
|
+
const CHECK_ANSWER = "Answer with PASS or FAIL alone on the first line; after it, show what you ran and what it showed the way you show any result to the user.";
|
|
56
62
|
/** What a check answered on its first line of words: PASS or FAIL. */
|
|
57
63
|
function verdictOf(result: string | undefined): 'pass' | 'fail' | undefined;
|
|
64
|
+
/** What a check said after its verdict (verdictOf): its words without PASS or FAIL in front. */
|
|
65
|
+
function verdictReason(result: string | undefined): string;
|
|
58
66
|
/** The worktree of a task, beside the repository at `root`: `<root>-ta-<id>`, on the branch `ta/<id>-<words of its title>`. */
|
|
59
67
|
function worktreeOf(root: string, id: string, title: string, at: number): {
|
|
60
68
|
path: string;
|
|
@@ -136,13 +136,19 @@ export var AssistantTaskUtil;
|
|
|
136
136
|
? `the changes of the branch ${task.worktree.branch} since ${task.worktree.base} (git diff ${task.worktree.base})`
|
|
137
137
|
: 'the changes in this directory (git diff, git status)';
|
|
138
138
|
return [
|
|
139
|
-
`Check the work of another agent on "${task.title}". Do not change any file
|
|
140
|
-
`Look
|
|
139
|
+
`Check the work of another agent on "${task.title}". Do not change any file.`,
|
|
140
|
+
`Run only this check: ${task.verify}. Look over ${change} once, to see what it covers. Run no other tests, builds or screenshots, and do not review the rest of the code: the agent checked its own work already.`,
|
|
141
141
|
`What the agent said it did:\n${((_a = task.result) !== null && _a !== void 0 ? _a : '').slice(0, 1500)}`,
|
|
142
|
-
|
|
142
|
+
AssistantTaskUtil.CHECK_ANSWER,
|
|
143
143
|
].join('\n\n');
|
|
144
144
|
}
|
|
145
145
|
AssistantTaskUtil.checkInstructions = checkInstructions;
|
|
146
|
+
/**
|
|
147
|
+
* How a check answers, added to its instructions whatever the double wrote: the verdict alone on the first line
|
|
148
|
+
* (verdictOf), then what it ran and what it showed as it shows any result to the user, a card where its replies
|
|
149
|
+
* are drawn as cards, not lines of plain words.
|
|
150
|
+
*/
|
|
151
|
+
AssistantTaskUtil.CHECK_ANSWER = 'Answer with PASS or FAIL alone on the first line; after it, show what you ran and what it showed the way you show any result to the user.';
|
|
146
152
|
/** What a check answered on its first line of words: PASS or FAIL. */
|
|
147
153
|
function verdictOf(result) {
|
|
148
154
|
var _a, _b;
|
|
@@ -154,6 +160,11 @@ export var AssistantTaskUtil;
|
|
|
154
160
|
return word === 'PASS' ? 'pass' : word === 'FAIL' ? 'fail' : undefined;
|
|
155
161
|
}
|
|
156
162
|
AssistantTaskUtil.verdictOf = verdictOf;
|
|
163
|
+
/** What a check said after its verdict (verdictOf): its words without PASS or FAIL in front. */
|
|
164
|
+
function verdictReason(result) {
|
|
165
|
+
return (result !== null && result !== void 0 ? result : '').replace(/^[\s*_`#>]*(?:verdict:?\s*)?(?:PASS|FAIL)\b[*_`]*[\s::.,,。—-]*/i, '');
|
|
166
|
+
}
|
|
167
|
+
AssistantTaskUtil.verdictReason = verdictReason;
|
|
157
168
|
/** The worktree of a task, beside the repository at `root`: `<root>-ta-<id>`, on the branch `ta/<id>-<words of its title>`. */
|
|
158
169
|
function worktreeOf(root, id, title, at) {
|
|
159
170
|
const words = title
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useContextMenu } from '../components/context-menu.js';
|
|
4
4
|
import { EmptyState } from '../components/empty-state.js';
|
|
5
5
|
import { Icon, IconButton } from '../components/icon.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Loading } from '../components/loading.js';
|
|
7
7
|
import { Markdown } from '../components/markdown.js';
|
|
8
8
|
import { SessionView } from '../components/session-view.js';
|
|
9
9
|
import { useRemoveTasks, useTasks, useWorkbench } from '../hooks.js';
|
|
@@ -85,6 +85,6 @@ export function AssistantTaskView({ taskId, onTakeOver, onTasks, menu }) {
|
|
|
85
85
|
store ? (React.createElement(SessionView, { store: store, server: workbench.server, workspace: workbench.workspace, info: info, onClosed: () => setClosed(store), onActivity: () => undefined })) : failed ? (React.createElement("div", { className: "ta-scroll" },
|
|
86
86
|
React.createElement("div", { className: "ta-task-result" },
|
|
87
87
|
React.createElement("p", { className: "ta-task-result-note" }, t('ta.assistant.taskEnded')),
|
|
88
|
-
React.createElement(Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(
|
|
88
|
+
React.createElement(Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(Loading, null))));
|
|
89
89
|
}
|
|
90
90
|
//# sourceMappingURL=assistant-tasks.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TaMessageSource } from '@celljs/ta-protocol';
|
|
1
2
|
import { ChevronRight } from 'lucide-react';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { Callout } from '../components/callout.js';
|
|
@@ -8,7 +9,7 @@ import { TimeBreak, TurnFooter, UserFooter } from '../components/message-footer.
|
|
|
8
9
|
import { endsInSteps, quiet, TurnAvatar } from '../components/message-list.js';
|
|
9
10
|
import { useMessageMenu } from '../components/message-menu.js';
|
|
10
11
|
import { Process } from '../components/message-steps.js';
|
|
11
|
-
import { SkillUse, UserMarks, UserSaid, userWords } from '../components/message-user.js';
|
|
12
|
+
import { NoticeMessage, SkillUse, UserMarks, UserSaid, userWords } from '../components/message-user.js';
|
|
12
13
|
import { RunStatus } from '../components/run-status.js';
|
|
13
14
|
import { CustomMessage, MessageRenderers } from '../extension/extension-view.js';
|
|
14
15
|
import { WebTaskUtil } from '../extension/web-tasks.js';
|
|
@@ -97,6 +98,9 @@ export function AssistantThread({ state, reply, tasks, origin, onTask, t }) {
|
|
|
97
98
|
React.createElement("span", { className: "ta-task-update-text" }, line),
|
|
98
99
|
React.createElement(Icon, { icon: ChevronRight, size: 13, className: "ta-task-update-chevron" }))) : null;
|
|
99
100
|
}
|
|
101
|
+
if (TaMessageSource.isNotice(text)) {
|
|
102
|
+
return React.createElement(NoticeMessage, { key: item.key, message: item.message });
|
|
103
|
+
}
|
|
100
104
|
return React.createElement(DoubleUserMessage, { key: item.key, message: item.message, blocks: blocks });
|
|
101
105
|
};
|
|
102
106
|
return (React.createElement(CodeReply.Provider, { value: reply },
|
|
@@ -10,6 +10,7 @@ import { DialogView } from '../components/dialog-view.js';
|
|
|
10
10
|
import { isAsk, useAsked, useEarlierMessages } from '../components/earlier-messages.js';
|
|
11
11
|
import { HeroCards, HeroSteps } from '../components/hero-cards.js';
|
|
12
12
|
import { Icon } from '../components/icon.js';
|
|
13
|
+
import { Loading } from '../components/loading.js';
|
|
13
14
|
import { useMessageActions } from '../components/message-actions.js';
|
|
14
15
|
import { MessageActions } from '../components/message-footer.js';
|
|
15
16
|
import { MessageImages } from '../components/message-images.js';
|
|
@@ -111,7 +112,7 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
|
|
|
111
112
|
voice: () => voice,
|
|
112
113
|
send: text => say(text),
|
|
113
114
|
ended: (reason, detail) => notices.notify(callEndedNotice(t, reason, detail)),
|
|
114
|
-
}, { sessionId: store.sessionId, double: true });
|
|
115
|
+
}, { sessionId: store.sessionId, double: true }, name || 'Ta');
|
|
115
116
|
const mood = moodOf({
|
|
116
117
|
working: state.working,
|
|
117
118
|
attention: attentions.length > 0 || asks.length > 0,
|
|
@@ -356,9 +357,6 @@ export function AssistantPanel({ onTask }) {
|
|
|
356
357
|
React.createElement(TasksChip, { tasks: allTasks, onOpen: openTasks }),
|
|
357
358
|
React.createElement(WorkbenchToggle, null)),
|
|
358
359
|
React.createElement("div", { className: "ta-assistant-body" },
|
|
359
|
-
React.createElement("div", { className: "ta-assistant-chat" }, store ? (React.createElement(Chat, { store: store, tasks: state.tasks, taskStates: taskStates, onTask: openTask, onMood: setMood, onTasks: openTasks })) : (React.createElement("div", { className: "ta-empty" }, state.error ? (React.createElement(Callout, { level: "error" }, state.error)) :
|
|
360
|
-
React.createElement("span", { className: "ta-spinner" }),
|
|
361
|
-
" ",
|
|
362
|
-
t('ta.assistant.waking'))))))))));
|
|
360
|
+
React.createElement("div", { className: "ta-assistant-chat" }, store ? (React.createElement(Chat, { store: store, tasks: state.tasks, taskStates: taskStates, onTask: openTask, onMood: setMood, onTasks: openTasks })) : state.error || workbench.offlineShown ? (React.createElement("div", { className: "ta-empty" }, state.error ? (React.createElement(Callout, { level: "error" }, state.error)) : (React.createElement("span", { className: "ta-muted" }, t('ta.assistant.offline'))))) : (React.createElement(Loading, { label: t('ta.assistant.waking') })))))));
|
|
363
361
|
}
|
|
364
362
|
//# sourceMappingURL=assistant-view.js.map
|
|
@@ -328,7 +328,8 @@ let TaAssistantImpl = class TaAssistantImpl extends AssistantConversation {
|
|
|
328
328
|
};
|
|
329
329
|
this.book.add(task);
|
|
330
330
|
const store = await this.follow(task);
|
|
331
|
-
|
|
331
|
+
const asked = verifies && !instructions.includes(AssistantTaskUtil.CHECK_ANSWER) ? `${instructions}\n\n${AssistantTaskUtil.CHECK_ANSWER}` : instructions;
|
|
332
|
+
await store.prompt(TaMessageSource.mark(asked, TaMessageSource.DOUBLE));
|
|
332
333
|
const { sessionFile } = await this.server.getState(info.sessionId);
|
|
333
334
|
this.book.change(task, { sessionFile });
|
|
334
335
|
const apart = worktree ? ` (a git worktree on the branch ${worktree.worktree.branch})` : '';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ScreenAwake } from '../device/screen-awake.js';
|
|
2
|
+
import { type StateSpec, TaState } from '../state/state-protocol.js';
|
|
3
|
+
import type { CallPhase, VoiceCall } from './voice-call.js';
|
|
4
|
+
export declare const TaCallKeeper: unique symbol;
|
|
5
|
+
/** A call and what its hook gives it, kept as they are while no view shows its conversation. */
|
|
6
|
+
export interface HeldCall {
|
|
7
|
+
call: VoiceCall;
|
|
8
|
+
/** The hook's references, set again by the view that takes the call back. */
|
|
9
|
+
refs: object;
|
|
10
|
+
}
|
|
11
|
+
/** Where a call goes on: the conversation, as the page shows it again. */
|
|
12
|
+
export interface CallSpot {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
double?: boolean;
|
|
15
|
+
title: string;
|
|
16
|
+
}
|
|
17
|
+
/** The call going on, noted as it changes: the page that loads again (the app restarted) calls again. */
|
|
18
|
+
export interface NotedCall extends CallSpot {
|
|
19
|
+
/** When it last went on. */
|
|
20
|
+
at: number;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace CallKeeperUtil {
|
|
23
|
+
/** A call that went on this long before the page loaded again is called again. */
|
|
24
|
+
const RESUME_MS = 90000;
|
|
25
|
+
/** How often a call going on is noted again. */
|
|
26
|
+
const NOTE_MS = 5000;
|
|
27
|
+
const NOTED: StateSpec<NotedCall | undefined>;
|
|
28
|
+
/** How often a call going on says again how it is to the user's other pages, its phase the same (SHARED). */
|
|
29
|
+
const SHARE_MS = 30000;
|
|
30
|
+
/** A call shared that said nothing for this long is gone: its page was closed or put to sleep. */
|
|
31
|
+
const SHARED_MS = 75000;
|
|
32
|
+
const SHARED: StateSpec<SharedCall | undefined>;
|
|
33
|
+
/** The call of another page of the user (`page` is this one's), going on and heard of lately; undefined when none. */
|
|
34
|
+
function elsewhere(shared: SharedCall | undefined, page: string, now: number): SharedCall | undefined;
|
|
35
|
+
/** The call noted, if it went on lately enough to call again. */
|
|
36
|
+
function resumable(noted: NotedCall | undefined, now: number): CallSpot | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A call going on in a page of the user, as their other pages see it (CallKeeperUtil.SHARED): what it is at, on which
|
|
40
|
+
* device; it is heard and spoken on that device alone, the others show it and may hang it up (`end`).
|
|
41
|
+
*/
|
|
42
|
+
export interface SharedCall extends CallSpot {
|
|
43
|
+
/** The page it goes on in (TaCallKeeper.page). */
|
|
44
|
+
page: string;
|
|
45
|
+
phase: CallPhase;
|
|
46
|
+
paused?: boolean;
|
|
47
|
+
/** It goes on on a phone (DeviceMedia.HANDHELD), else on a computer or a tablet. */
|
|
48
|
+
handheld?: boolean;
|
|
49
|
+
/** When it last said how it is. */
|
|
50
|
+
at: number;
|
|
51
|
+
/** Another page asked it to hang up. */
|
|
52
|
+
end?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** A call going on while its conversation is not on the screen: the page took the user, or Ta, elsewhere. */
|
|
55
|
+
export interface KeptCall {
|
|
56
|
+
sessionId: string;
|
|
57
|
+
/** The double's: it shows on its page. */
|
|
58
|
+
double?: boolean;
|
|
59
|
+
title: string;
|
|
60
|
+
held: HeldCall;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The call going on, one at a time, as a messenger's (docs/design/ta-app-use.md 6.2): its view tells it as it begins,
|
|
64
|
+
* and while its conversation is not in front of the user, wherever the page is, it floats at the top (KeptCallBar),
|
|
65
|
+
* a tap back to it and Hang up. Its view may go meanwhile (another conversation, the settings): a call a partner
|
|
66
|
+
* answers (CallState.partnered) goes on without it, and the view of its conversation takes it back as it shows again.
|
|
67
|
+
* A call begun hangs up the one before.
|
|
68
|
+
*/
|
|
69
|
+
export interface TaCallKeeper {
|
|
70
|
+
/** The call going on, its view on the screen or not; undefined when none. */
|
|
71
|
+
readonly kept: KeptCall | undefined;
|
|
72
|
+
/** A call of a view began. */
|
|
73
|
+
begin(call: KeptCall): void;
|
|
74
|
+
/** Its view went: the call goes on without it. */
|
|
75
|
+
keep(call: KeptCall): void;
|
|
76
|
+
/** The call of a conversation, given back to its view; undefined when none goes on without one. */
|
|
77
|
+
take(sessionId: string): HeldCall | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The call that went on as the page went away (it loaded again, the app restarted), within RESUME_MS: its
|
|
80
|
+
* conversation, to show again and call again; undefined when none.
|
|
81
|
+
*/
|
|
82
|
+
readonly resuming: CallSpot | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The view of a conversation showed: whether to call it again, as its call went on as the page went away; asked
|
|
85
|
+
* once. The double's is called again by whichever conversation is the double's now.
|
|
86
|
+
*/
|
|
87
|
+
resume(sessionId: string, double?: boolean): boolean;
|
|
88
|
+
hangUp(): void;
|
|
89
|
+
/**
|
|
90
|
+
* The call going on in another page of the user (on their phone, another computer), as it says of itself
|
|
91
|
+
* (SharedCall); undefined when none, or when this page has one.
|
|
92
|
+
*/
|
|
93
|
+
readonly elsewhere: SharedCall | undefined;
|
|
94
|
+
/** Asks the page of the call elsewhere to hang it up. */
|
|
95
|
+
hangUpElsewhere(): void;
|
|
96
|
+
subscribe(listener: () => void): () => void;
|
|
97
|
+
}
|
|
98
|
+
export declare class TaCallKeeperImpl implements TaCallKeeper {
|
|
99
|
+
protected readonly persisted?: TaState;
|
|
100
|
+
protected current?: KeptCall;
|
|
101
|
+
/** When the call going on was noted last. */
|
|
102
|
+
protected notedAt: number;
|
|
103
|
+
/** The call of the page before, as this one loaded: read once. */
|
|
104
|
+
protected before?: CallSpot | null;
|
|
105
|
+
/** Its view is gone. */
|
|
106
|
+
protected viewless: boolean;
|
|
107
|
+
protected offState?: () => void;
|
|
108
|
+
protected offShown?: () => void;
|
|
109
|
+
protected readonly listeners: Set<() => void>;
|
|
110
|
+
/** This page, as the call it shares says (SharedCall.page). */
|
|
111
|
+
readonly page: string;
|
|
112
|
+
/** How the call going on was last shared: what of it changes. */
|
|
113
|
+
protected sharedAs?: string;
|
|
114
|
+
protected sharedAt: number;
|
|
115
|
+
/** The call shared, as last read. */
|
|
116
|
+
protected lastShared?: SharedCall;
|
|
117
|
+
protected offShared?: () => void;
|
|
118
|
+
get kept(): KeptCall | undefined;
|
|
119
|
+
get elsewhere(): SharedCall | undefined;
|
|
120
|
+
hangUpElsewhere(): void;
|
|
121
|
+
begin(call: KeptCall): void;
|
|
122
|
+
keep(call: KeptCall): void;
|
|
123
|
+
take(sessionId: string): HeldCall | undefined;
|
|
124
|
+
get resuming(): CallSpot | undefined;
|
|
125
|
+
resume(sessionId: string, double?: boolean): boolean;
|
|
126
|
+
hangUp(): void;
|
|
127
|
+
subscribe(listener: () => void): () => void;
|
|
128
|
+
/** The call going on now: the one before, of another conversation, hangs up. */
|
|
129
|
+
protected watch(call: KeptCall): void;
|
|
130
|
+
/** Notes the call going on, for the page that loads next (resuming); undefined once it is over. */
|
|
131
|
+
protected note(spot: CallSpot | undefined): void;
|
|
132
|
+
/** Tells the user's other pages how the call going on is: as it changes, and every SHARE_MS. */
|
|
133
|
+
protected share(call: KeptCall): void;
|
|
134
|
+
/** Follows the call shared: another page asked this one's to hang up, or one went on or ended elsewhere. */
|
|
135
|
+
protected follow(): void;
|
|
136
|
+
protected drop(): void;
|
|
137
|
+
/** What Ta Desktop was told last: whether a call goes on. */
|
|
138
|
+
protected told: boolean;
|
|
139
|
+
/** The screen stays on while a call goes on: locked, the device stops hearing the user. */
|
|
140
|
+
protected readonly awake: ScreenAwake;
|
|
141
|
+
protected changed(): void;
|
|
142
|
+
}
|