@celljs/ta-web 4.9.0 → 4.10.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 +4 -3
- package/README.md +4 -3
- package/esm/browser/assistant/assistant-chat-list.js +8 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +33 -5
- package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
- package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-source.js +2 -0
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +13 -3
- package/esm/browser/assistant/assistant-tasks.js +3 -2
- package/esm/browser/assistant/assistant-view.js +81 -56
- package/esm/browser/assistant/assistant.d.ts +30 -1
- package/esm/browser/assistant/assistant.js +89 -6
- package/esm/browser/assistant/task-views.d.ts +40 -6
- package/esm/browser/assistant/task-views.js +73 -21
- package/esm/browser/avatar/dino-avatar.d.ts +3 -4
- package/esm/browser/avatar/dino-avatar.js +4 -178
- package/esm/browser/avatar/dino-face.d.ts +19 -0
- package/esm/browser/avatar/dino-face.js +142 -0
- package/esm/browser/avatar/dino-geometry.d.ts +11 -0
- package/esm/browser/avatar/dino-geometry.js +38 -0
- package/esm/browser/avatar/dino-kinds.d.ts +15 -0
- package/esm/browser/avatar/dino-kinds.js +544 -0
- package/esm/browser/avatar/dino-motion.js +1 -1
- package/esm/browser/avatar/dino-shape.d.ts +80 -0
- package/esm/browser/avatar/dino-shape.js +113 -0
- package/esm/browser/avatar/dino-species.d.ts +1 -61
- package/esm/browser/avatar/dino-species.js +2 -653
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +23 -1
- package/esm/browser/chat/chat-stores.d.ts +59 -0
- package/esm/browser/chat/chat-stores.js +121 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +33 -12
- package/esm/browser/chat/chat.d.ts +31 -39
- package/esm/browser/chat/chat.js +226 -175
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +6 -3
- package/esm/browser/components/app-nav.js +19 -10
- package/esm/browser/components/app-shell-hooks.d.ts +47 -0
- package/esm/browser/components/app-shell-hooks.js +169 -0
- package/esm/browser/components/app-view.js +81 -172
- package/esm/browser/components/auth-view.js +1 -1
- package/esm/browser/components/chat-list.d.ts +20 -2
- package/esm/browser/components/chat-list.js +138 -22
- package/esm/browser/components/composer-box.d.ts +5 -5
- package/esm/browser/components/composer-box.js +111 -4
- package/esm/browser/components/composer.d.ts +7 -0
- package/esm/browser/components/composer.js +22 -14
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +129 -6
- package/esm/browser/components/conversation-scroll.js +429 -109
- package/esm/browser/components/dino.js +1 -1
- package/esm/browser/components/earlier-messages.d.ts +2 -1
- package/esm/browser/components/earlier-messages.js +2 -17
- package/esm/browser/components/editor-area.d.ts +3 -1
- package/esm/browser/components/editor-area.js +6 -5
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +30 -9
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +1 -1
- package/esm/browser/components/icon.d.ts +2 -2
- package/esm/browser/components/icon.js +5 -6
- package/esm/browser/components/image-viewer.d.ts +124 -0
- package/esm/browser/components/image-viewer.js +397 -0
- package/esm/browser/components/lightbox.d.ts +11 -0
- package/esm/browser/components/lightbox.js +24 -0
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +24 -10
- package/esm/browser/components/media.js +1 -10
- package/esm/browser/components/message-footer.d.ts +16 -2
- package/esm/browser/components/message-footer.js +29 -12
- package/esm/browser/components/message-list.d.ts +24 -3
- package/esm/browser/components/message-list.js +149 -20
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +18 -3
- package/esm/browser/components/nav-places.d.ts +16 -1
- package/esm/browser/components/nav-places.js +12 -3
- package/esm/browser/components/phone-shell.d.ts +4 -1
- package/esm/browser/components/phone-shell.js +3 -1
- package/esm/browser/components/run-status.js +3 -3
- package/esm/browser/components/select-bar.d.ts +9 -0
- package/esm/browser/components/select-bar.js +24 -0
- package/esm/browser/components/session-settings.d.ts +6 -0
- package/esm/browser/components/session-settings.js +14 -1
- package/esm/browser/components/session-view.js +8 -4
- package/esm/browser/components/settings-choices.d.ts +35 -0
- package/esm/browser/components/settings-choices.js +117 -0
- package/esm/browser/components/settings-parts.d.ts +21 -0
- package/esm/browser/components/settings-parts.js +323 -0
- package/esm/browser/components/settings-view.d.ts +0 -6
- package/esm/browser/components/settings-view.js +4 -406
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +14 -12
- package/esm/browser/components/voice-button.d.ts +1 -1
- package/esm/browser/components/voice-button.js +1 -1
- package/esm/browser/components/voice-talk.d.ts +43 -0
- package/esm/browser/components/voice-talk.js +222 -0
- package/esm/browser/components/workbench-view.js +1 -1
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +136 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +2 -0
- package/esm/browser/device/long-press.js +16 -1
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +64 -76
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +149 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +406 -107
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-extension-api.d.ts +135 -2
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
- package/esm/browser/extension/web-extension-protocol.js +8 -0
- package/esm/browser/extension/web-extensions.d.ts +14 -1
- package/esm/browser/extension/web-extensions.js +128 -24
- package/esm/browser/extension/web-tasks.d.ts +9 -1
- package/esm/browser/extension/web-tasks.js +24 -0
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/hooks.d.ts +3 -1
- package/esm/browser/hooks.js +8 -0
- package/esm/browser/i18n/locales.d.ts +29 -2
- package/esm/browser/i18n/messages.d.ts +28 -1
- package/esm/browser/i18n/messages.js +58 -4
- package/esm/browser/index.d.ts +6 -0
- package/esm/browser/index.js +6 -0
- package/esm/browser/notices/notices-protocol.d.ts +9 -1
- package/esm/browser/notices/notices.d.ts +2 -0
- package/esm/browser/notices/notices.js +20 -10
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +142 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +107 -0
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +57 -17
- package/esm/browser/style/device.js +43 -4
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +67 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -3
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +2 -0
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/markdown.d.ts +18 -1
- package/esm/browser/util/markdown.js +119 -5
- package/esm/browser/util/process.d.ts +21 -0
- package/esm/browser/util/process.js +45 -1
- package/esm/browser/util/voice.d.ts +5 -2
- package/esm/browser/util/voice.js +6 -3
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +59 -0
- package/esm/browser/workbench-calls.js +141 -0
- package/esm/browser/workbench-protocol.d.ts +5 -1
- package/esm/browser/workbench-util.d.ts +68 -0
- package/esm/browser/workbench-util.js +145 -0
- package/esm/browser/workbench.d.ts +15 -42
- package/esm/browser/workbench.js +53 -167
- package/lib/browser/assistant/assistant-chat-list.js +8 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +33 -5
- package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
- package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-source.js +2 -0
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +13 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -1
- package/lib/browser/assistant/assistant-view.js +78 -53
- package/lib/browser/assistant/assistant.d.ts +30 -1
- package/lib/browser/assistant/assistant.js +89 -6
- package/lib/browser/assistant/task-views.d.ts +40 -6
- package/lib/browser/assistant/task-views.js +74 -21
- package/lib/browser/avatar/dino-avatar.d.ts +3 -4
- package/lib/browser/avatar/dino-avatar.js +27 -202
- package/lib/browser/avatar/dino-face.d.ts +20 -0
- package/lib/browser/avatar/dino-face.js +148 -0
- package/lib/browser/avatar/dino-geometry.d.ts +12 -0
- package/lib/browser/avatar/dino-geometry.js +47 -0
- package/lib/browser/avatar/dino-kinds.d.ts +16 -0
- package/lib/browser/avatar/dino-kinds.js +547 -0
- package/lib/browser/avatar/dino-motion.js +2 -2
- package/lib/browser/avatar/dino-shape.d.ts +81 -0
- package/lib/browser/avatar/dino-shape.js +126 -0
- package/lib/browser/avatar/dino-species.d.ts +1 -61
- package/lib/browser/avatar/dino-species.js +34 -687
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +23 -1
- package/lib/browser/chat/chat-stores.d.ts +60 -0
- package/lib/browser/chat/chat-stores.js +125 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +33 -12
- package/lib/browser/chat/chat.d.ts +31 -39
- package/lib/browser/chat/chat.js +227 -176
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-nav.d.ts +6 -3
- package/lib/browser/components/app-nav.js +17 -8
- package/lib/browser/components/app-shell-hooks.d.ts +48 -0
- package/lib/browser/components/app-shell-hooks.js +211 -0
- package/lib/browser/components/app-view.js +89 -180
- package/lib/browser/components/auth-view.js +3 -3
- package/lib/browser/components/chat-list.d.ts +20 -2
- package/lib/browser/components/chat-list.js +137 -21
- package/lib/browser/components/composer-box.d.ts +5 -5
- package/lib/browser/components/composer-box.js +111 -4
- package/lib/browser/components/composer.d.ts +7 -0
- package/lib/browser/components/composer.js +22 -14
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +129 -6
- package/lib/browser/components/conversation-scroll.js +431 -110
- package/lib/browser/components/dino.js +3 -3
- package/lib/browser/components/earlier-messages.d.ts +2 -1
- package/lib/browser/components/earlier-messages.js +2 -17
- package/lib/browser/components/editor-area.d.ts +3 -1
- package/lib/browser/components/editor-area.js +5 -4
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +30 -9
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +5 -5
- package/lib/browser/components/icon.d.ts +2 -2
- package/lib/browser/components/icon.js +7 -6
- package/lib/browser/components/image-viewer.d.ts +125 -0
- package/lib/browser/components/image-viewer.js +435 -0
- package/lib/browser/components/lightbox.d.ts +12 -0
- package/lib/browser/components/lightbox.js +60 -0
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +24 -10
- package/lib/browser/components/media.js +2 -11
- package/lib/browser/components/message-footer.d.ts +16 -2
- package/lib/browser/components/message-footer.js +31 -12
- package/lib/browser/components/message-list.d.ts +24 -3
- package/lib/browser/components/message-list.js +146 -16
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +17 -2
- package/lib/browser/components/nav-places.d.ts +16 -1
- package/lib/browser/components/nav-places.js +13 -3
- package/lib/browser/components/phone-shell.d.ts +4 -1
- package/lib/browser/components/phone-shell.js +3 -1
- package/lib/browser/components/run-status.js +3 -3
- package/lib/browser/components/select-bar.d.ts +10 -0
- package/lib/browser/components/select-bar.js +61 -0
- package/lib/browser/components/session-settings.d.ts +6 -0
- package/lib/browser/components/session-settings.js +14 -1
- package/lib/browser/components/session-view.js +7 -3
- package/lib/browser/components/settings-choices.d.ts +36 -0
- package/lib/browser/components/settings-choices.js +156 -0
- package/lib/browser/components/settings-parts.d.ts +22 -0
- package/lib/browser/components/settings-parts.js +359 -0
- package/lib/browser/components/settings-view.d.ts +0 -6
- package/lib/browser/components/settings-view.js +2 -405
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +14 -12
- package/lib/browser/components/voice-button.d.ts +1 -1
- package/lib/browser/components/voice-button.js +1 -1
- package/lib/browser/components/voice-talk.d.ts +44 -0
- package/lib/browser/components/voice-talk.js +260 -0
- package/lib/browser/components/workbench-view.js +3 -3
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +173 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +2 -0
- package/lib/browser/device/long-press.js +16 -1
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +63 -75
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +148 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +410 -108
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-extension-api.d.ts +135 -2
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
- package/lib/browser/extension/web-extension-protocol.js +9 -1
- package/lib/browser/extension/web-extensions.d.ts +14 -1
- package/lib/browser/extension/web-extensions.js +125 -21
- package/lib/browser/extension/web-tasks.d.ts +9 -1
- package/lib/browser/extension/web-tasks.js +24 -0
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/hooks.d.ts +3 -1
- package/lib/browser/hooks.js +9 -0
- package/lib/browser/i18n/locales.d.ts +29 -2
- package/lib/browser/i18n/messages.d.ts +28 -1
- package/lib/browser/i18n/messages.js +58 -4
- package/lib/browser/index.d.ts +6 -0
- package/lib/browser/index.js +6 -0
- package/lib/browser/notices/notices-protocol.d.ts +9 -1
- package/lib/browser/notices/notices.d.ts +2 -0
- package/lib/browser/notices/notices.js +20 -10
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +148 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +111 -0
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +57 -17
- package/lib/browser/style/device.js +43 -4
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +67 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -3
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +2 -0
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/markdown.d.ts +18 -1
- package/lib/browser/util/markdown.js +119 -5
- package/lib/browser/util/process.d.ts +21 -0
- package/lib/browser/util/process.js +46 -2
- package/lib/browser/util/voice.d.ts +5 -2
- package/lib/browser/util/voice.js +6 -3
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +60 -0
- package/lib/browser/workbench-calls.js +145 -0
- package/lib/browser/workbench-protocol.d.ts +5 -1
- package/lib/browser/workbench-util.d.ts +69 -0
- package/lib/browser/workbench-util.js +151 -0
- package/lib/browser/workbench.d.ts +15 -42
- package/lib/browser/workbench.js +74 -189
- package/package.json +10 -10
- package/public/launch.svg +46 -42
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.AppView = AppView;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
37
38
|
const lucide_react_1 = require("lucide-react");
|
|
38
39
|
const React = __importStar(require("react"));
|
|
39
40
|
const assistant_chat_list_1 = require("../assistant/assistant-chat-list");
|
|
@@ -41,15 +42,15 @@ const chat_protocol_1 = require("../chat/chat-protocol");
|
|
|
41
42
|
const chat_view_1 = require("../chat/chat-view");
|
|
42
43
|
const device_1 = require("../device/device");
|
|
43
44
|
const launch_screen_1 = require("../device/launch-screen");
|
|
44
|
-
const sheet_swipe_1 = require("../device/sheet-swipe");
|
|
45
45
|
const extension_view_1 = require("../extension/extension-view");
|
|
46
|
+
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
47
|
+
const files_protocol_1 = require("../files/files-protocol");
|
|
46
48
|
const hooks_1 = require("../hooks");
|
|
47
|
-
const messages_1 = require("../i18n/messages");
|
|
48
49
|
const use_t_1 = require("../i18n/use-t");
|
|
49
50
|
const notices_1 = require("../notices/notices");
|
|
50
|
-
const
|
|
51
|
-
const state_protocol_1 = require("../state/state-protocol");
|
|
51
|
+
const voice_1 = require("../util/voice");
|
|
52
52
|
const app_nav_1 = require("./app-nav");
|
|
53
|
+
const app_shell_hooks_1 = require("./app-shell-hooks");
|
|
53
54
|
const auth_view_1 = require("./auth-view");
|
|
54
55
|
const board_1 = require("./board");
|
|
55
56
|
const chat_list_1 = require("./chat-list");
|
|
@@ -58,6 +59,7 @@ const dino_look_1 = require("./dino-look");
|
|
|
58
59
|
const discover_view_1 = require("./discover-view");
|
|
59
60
|
const editor_area_1 = require("./editor-area");
|
|
60
61
|
const environment_view_1 = require("./environment-view");
|
|
62
|
+
const held_talk_1 = require("./held-talk");
|
|
61
63
|
const host_view_1 = require("./host-view");
|
|
62
64
|
const icon_1 = require("./icon");
|
|
63
65
|
const kept_pages_1 = require("./kept-pages");
|
|
@@ -77,112 +79,6 @@ const split_pane_1 = require("./split-pane");
|
|
|
77
79
|
const surface_flyout_1 = require("./surface-flyout");
|
|
78
80
|
const workbench_toggle_1 = require("./workbench-toggle");
|
|
79
81
|
const workbench_view_1 = require("./workbench-view");
|
|
80
|
-
/**
|
|
81
|
-
* What the sidebar shows in this tab: `` for the chats, else the id of a sidebar view. Until the user picks
|
|
82
|
-
* a tab, the first sidebar view of web extensions (the agents), or the chats if there is none.
|
|
83
|
-
*/
|
|
84
|
-
const FIRST_SIDE = '*';
|
|
85
|
-
/** The user put off signing in to a model, in this tab: the page shows the app until the tab is reopened. */
|
|
86
|
-
const LOGIN_LATER = { key: 'login.later', tier: 'tab', initial: false, parse: state_protocol_1.StateUtil.boolean };
|
|
87
|
-
const SIDE = { key: 'side', tier: 'tab', initial: FIRST_SIDE, parse: state_protocol_1.StateUtil.string };
|
|
88
|
-
/** Whether the workbench on the right shows, in this browser, whose screen decides. */
|
|
89
|
-
const RIGHT = { key: 'panel', tier: 'device', initial: true, parse: state_protocol_1.StateUtil.boolean };
|
|
90
|
-
/** Sessions change with other clients too; while the tab is visible they are read again now and then. */
|
|
91
|
-
const REFRESH_MS = 5000;
|
|
92
|
-
/** The cards of web extensions, as a tool of the workbench and its tab. */
|
|
93
|
-
const CARDS_ID = 'ta/cards';
|
|
94
|
-
const CARDS_TAB_ID = `view:${CARDS_ID}`;
|
|
95
|
-
function cardsTab(title) {
|
|
96
|
-
return { id: CARDS_TAB_ID, extension: 'ta', title, icon: lucide_react_1.LayoutGrid, render: editor_area_1.WorkbenchCards };
|
|
97
|
-
}
|
|
98
|
-
const SIDEBAR = { key: 'sidebar', initial: 300, min: 200, max: 520 };
|
|
99
|
-
const EDITOR = { key: 'editor', initial: 480, min: 320, max: 1200 };
|
|
100
|
-
/** The width of the navigation rail, in style.ts. */
|
|
101
|
-
const RAIL = 56;
|
|
102
|
-
/**
|
|
103
|
-
* Whether the right of the page (editors and cards) shows; on narrow screens it starts hidden. The last of
|
|
104
|
-
* them hides it where it lies over the conversation, the user's choice kept.
|
|
105
|
-
*/
|
|
106
|
-
function useRight() {
|
|
107
|
-
const [kept, keep] = (0, hooks_1.usePersisted)(RIGHT);
|
|
108
|
-
// Where it does not fit beside the conversation it opens over it: only when asked, in this page.
|
|
109
|
-
const inline = (0, device_1.useDevice)(device => device.layout) === 'expanded';
|
|
110
|
-
const [asked, setAsked] = React.useState(false);
|
|
111
|
-
const open = kept && (inline || asked);
|
|
112
|
-
const set = React.useCallback((next) => {
|
|
113
|
-
setAsked(next);
|
|
114
|
-
keep(next);
|
|
115
|
-
}, [keep]);
|
|
116
|
-
const toggle = React.useCallback(() => set(!open), [set, open]);
|
|
117
|
-
const reveal = React.useCallback(() => set(true), [set]);
|
|
118
|
-
const uncover = React.useCallback(() => setAsked(false), []);
|
|
119
|
-
// `set` is stable, so `reveal` is too: effects may depend on it.
|
|
120
|
-
return [open, toggle, reveal, uncover];
|
|
121
|
-
}
|
|
122
|
-
/** Cmd/Ctrl+B shows or hides the sidebar and Cmd/Ctrl+, opens the settings, as in an IDE. */
|
|
123
|
-
function useKeys(toggle, openSettings) {
|
|
124
|
-
React.useEffect(() => {
|
|
125
|
-
const onKey = (event) => {
|
|
126
|
-
if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const key = event.key.toLowerCase();
|
|
130
|
-
if (key === 'b') {
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
toggle();
|
|
133
|
-
}
|
|
134
|
-
else if (key === ',') {
|
|
135
|
-
event.preventDefault();
|
|
136
|
-
openSettings();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
window.addEventListener('keydown', onKey);
|
|
140
|
-
return () => window.removeEventListener('keydown', onKey);
|
|
141
|
-
}, [toggle, openSettings]);
|
|
142
|
-
}
|
|
143
|
-
/** Reads the open sessions and the web extensions again while the tab is visible: other clients change them too. */
|
|
144
|
-
/**
|
|
145
|
-
* The installed app with its title bar hidden draws the bar itself (see .ta-titlebar), but the browser
|
|
146
|
-
* paints the corners of the window's buttons with theme-color: the traffic lights at the left over the
|
|
147
|
-
* side columns, its own buttons at the right. So the bar is the colour of the side columns throughout, the
|
|
148
|
-
* conversation below it too. Otherwise the whole title bar has the conversation's colour, as the sign-in page.
|
|
149
|
-
*/
|
|
150
|
-
function useTitlebarColor(signedIn, theme) {
|
|
151
|
-
React.useEffect(() => {
|
|
152
|
-
const overlay = matchMedia('(display-mode: window-controls-overlay)');
|
|
153
|
-
const apply = () => {
|
|
154
|
-
const meta = document.querySelector('meta[name="theme-color"]');
|
|
155
|
-
if (meta) {
|
|
156
|
-
meta.content = settings_1.THEME_COLORS[theme][overlay.matches && signedIn ? 'side' : 'main'];
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
apply();
|
|
160
|
-
overlay.addEventListener('change', apply);
|
|
161
|
-
return () => overlay.removeEventListener('change', apply);
|
|
162
|
-
}, [signedIn, theme]);
|
|
163
|
-
}
|
|
164
|
-
function useRefresh(online) {
|
|
165
|
-
const [, workbench] = (0, hooks_1.useWorkbench)();
|
|
166
|
-
const [, extensions] = (0, hooks_1.useWebExtensions)();
|
|
167
|
-
React.useEffect(() => {
|
|
168
|
-
if (!online) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
const sessions = () => document.visibilityState === 'visible' && workbench.refresh().catch(() => undefined);
|
|
172
|
-
const shown = () => {
|
|
173
|
-
sessions();
|
|
174
|
-
if (document.visibilityState === 'visible') {
|
|
175
|
-
extensions.refresh().catch(() => undefined);
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const timer = setInterval(sessions, REFRESH_MS);
|
|
179
|
-
document.addEventListener('visibilitychange', shown);
|
|
180
|
-
return () => {
|
|
181
|
-
clearInterval(timer);
|
|
182
|
-
document.removeEventListener('visibilitychange', shown);
|
|
183
|
-
};
|
|
184
|
-
}, [online, workbench, extensions]);
|
|
185
|
-
}
|
|
186
82
|
/**
|
|
187
83
|
* ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
|
|
188
84
|
* extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
|
|
@@ -191,13 +87,13 @@ function useRefresh(online) {
|
|
|
191
87
|
* the conversation instead.
|
|
192
88
|
*/
|
|
193
89
|
function AppShell() {
|
|
194
|
-
var _a, _b;
|
|
195
|
-
var
|
|
90
|
+
var _a, _b, _c, _d;
|
|
91
|
+
var _e, _f, _g, _h;
|
|
196
92
|
const t = (0, use_t_1.useT)();
|
|
197
93
|
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
198
94
|
const [extensions, host] = (0, hooks_1.useWebExtensions)();
|
|
199
95
|
const [{ store, pending }, chat] = (0, chat_view_1.useChat)();
|
|
200
|
-
const [sideId, setSideId] = (0, hooks_1.usePersisted)(SIDE);
|
|
96
|
+
const [sideId, setSideId] = (0, hooks_1.usePersisted)(app_shell_hooks_1.SIDE);
|
|
201
97
|
const [removedChats] = (0, hooks_1.usePersisted)(chat_protocol_1.REMOVED_CHATS);
|
|
202
98
|
const [chatsByDirectory, setChatsByDirectory] = (0, hooks_1.usePersisted)(chat_list_1.BY_DIRECTORY);
|
|
203
99
|
const [foldedChats, setFoldedChats] = (0, hooks_1.usePersisted)(chat_list_1.FOLDED);
|
|
@@ -216,7 +112,7 @@ function AppShell() {
|
|
|
216
112
|
React.useEffect(() => {
|
|
217
113
|
if (phone && !opened.current) {
|
|
218
114
|
opened.current = true;
|
|
219
|
-
setSideId(FIRST_SIDE);
|
|
115
|
+
setSideId(app_shell_hooks_1.FIRST_SIDE);
|
|
220
116
|
host.showPage('');
|
|
221
117
|
}
|
|
222
118
|
}, [phone, setSideId, host]);
|
|
@@ -236,17 +132,18 @@ function AppShell() {
|
|
|
236
132
|
}, [phone]);
|
|
237
133
|
const closeSettings = React.useCallback(() => (phone ? setScreenOpen(false) : setSettings(undefined)), [phone]);
|
|
238
134
|
const settingsShown = settings !== undefined && (!phone || screenOpen);
|
|
239
|
-
const [rightOpen, toggleRight, revealRight, uncoverRight] = useRight();
|
|
135
|
+
const [rightOpen, toggleRight, revealRight, uncoverRight] = (0, app_shell_hooks_1.useRight)();
|
|
240
136
|
const [maximized, setMaximized] = React.useState(false);
|
|
241
|
-
const [{ theme, language }
|
|
242
|
-
const sidebar = (0, split_pane_1.usePane)(SIDEBAR);
|
|
243
|
-
const editor = (0, split_pane_1.usePane)(EDITOR);
|
|
137
|
+
const [{ theme, language }] = (0, hooks_1.useSettings)();
|
|
138
|
+
const sidebar = (0, split_pane_1.usePane)(app_shell_hooks_1.SIDEBAR);
|
|
139
|
+
const editor = (0, split_pane_1.usePane)(app_shell_hooks_1.EDITOR);
|
|
244
140
|
const online = workbench.status === 'online';
|
|
245
141
|
// Files named in replies outside a conversation (channels, pages) are in the server's directory.
|
|
246
|
-
const
|
|
142
|
+
const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
|
|
143
|
+
const fileUrl = React.useCallback(async (path) => files.loadable(await bench.workspace.fileUrl(path)), [bench, files]);
|
|
247
144
|
const openLink = (0, hooks_1.useOpenLink)(undefined);
|
|
248
145
|
(0, workbench_view_1.useDocument)();
|
|
249
|
-
useRefresh(online);
|
|
146
|
+
(0, app_shell_hooks_1.useRefresh)(online);
|
|
250
147
|
// What the server and its packages say (errors, questions) is in the language of the page.
|
|
251
148
|
React.useEffect(() => {
|
|
252
149
|
if (online) {
|
|
@@ -256,6 +153,16 @@ function AppShell() {
|
|
|
256
153
|
React.useEffect(() => {
|
|
257
154
|
void bench.start();
|
|
258
155
|
}, [bench]);
|
|
156
|
+
// The computer cannot be reached from the start: the web extensions of the last time start anyway (from
|
|
157
|
+
// the code this device kept) and show what they read last; online, `chat.start` loads them.
|
|
158
|
+
const offline = workbench.status === 'offline';
|
|
159
|
+
const startedOffline = React.useRef(false);
|
|
160
|
+
React.useEffect(() => {
|
|
161
|
+
if (offline && !startedOffline.current) {
|
|
162
|
+
startedOffline.current = true;
|
|
163
|
+
void host.refresh().catch(() => undefined);
|
|
164
|
+
}
|
|
165
|
+
}, [offline, host]);
|
|
259
166
|
/** The conversation the page opens with is shown: those shown after are the user's doing. */
|
|
260
167
|
const started = React.useRef(false);
|
|
261
168
|
React.useEffect(() => {
|
|
@@ -272,6 +179,8 @@ function AppShell() {
|
|
|
272
179
|
if (focus > 0) {
|
|
273
180
|
revealRight();
|
|
274
181
|
revealEditor();
|
|
182
|
+
// Opened from the launcher or the board: the workbench comes in their place.
|
|
183
|
+
setSurface(undefined);
|
|
275
184
|
}
|
|
276
185
|
}, [focus, revealRight, revealEditor]);
|
|
277
186
|
// A web extension shows another conversation: the conversation, not a page, a drawer or the workbench over it, is then in front.
|
|
@@ -324,35 +233,10 @@ function AppShell() {
|
|
|
324
233
|
setSideId('');
|
|
325
234
|
}
|
|
326
235
|
}, [shownSession]);
|
|
327
|
-
|
|
328
|
-
const hasCards = extensions.widgets.some(widget => widget.placement === 'panel');
|
|
329
|
-
const cardsOpen = extensions.editors.some(candidate => candidate.id === CARDS_TAB_ID);
|
|
330
|
-
const openCards = React.useCallback(() => host.open(cardsTab(() => (0, messages_1.message)(settingsStore.state.language, 'ta.workbench.cards'))), [host, settingsStore]);
|
|
331
|
-
const quiet = extensions.editors.length === 0 && rightOpen && !editor.collapsed;
|
|
332
|
-
// Only when cards come: not when the user closes their tab.
|
|
333
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: follows whether there are cards
|
|
334
|
-
React.useEffect(() => {
|
|
335
|
-
if (hasCards && !cardsOpen && quiet) {
|
|
336
|
-
openCards();
|
|
337
|
-
}
|
|
338
|
-
}, [hasCards]);
|
|
339
|
-
React.useEffect(() => {
|
|
340
|
-
if (!hasCards && cardsOpen) {
|
|
341
|
-
void host.closeEditor(CARDS_TAB_ID);
|
|
342
|
-
}
|
|
343
|
-
}, [hasCards, cardsOpen, host]);
|
|
344
|
-
const cardsTool = {
|
|
345
|
-
id: CARDS_ID,
|
|
346
|
-
extension: 'ta',
|
|
347
|
-
title: () => (0, messages_1.message)(settingsStore.state.language, 'ta.workbench.cards'),
|
|
348
|
-
component: editor_area_1.WorkbenchCards,
|
|
349
|
-
icon: lucide_react_1.LayoutGrid,
|
|
350
|
-
location: 'panel',
|
|
351
|
-
order: 0,
|
|
352
|
-
};
|
|
236
|
+
const { hasCards, openCards, cardsTool } = (0, app_shell_hooks_1.useWorkbenchCards)(rightOpen && !editor.collapsed);
|
|
353
237
|
const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
|
|
354
238
|
const sideViews = side_lists_1.SideListUtil.sidebarViews(extensions.views);
|
|
355
|
-
const sideView = sideId === FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
|
|
239
|
+
const sideView = sideId === app_shell_hooks_1.FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
|
|
356
240
|
const side = sideView ? sideView.id : '';
|
|
357
241
|
const showPage = (id) => {
|
|
358
242
|
host.showPage(id);
|
|
@@ -362,7 +246,7 @@ function AppShell() {
|
|
|
362
246
|
};
|
|
363
247
|
const lists = side_lists_1.SideListUtil.of(sideViews, t('ta.chat'));
|
|
364
248
|
const tools = [...(hasCards ? [cardsTool] : []), ...extensions.views.filter(candidate => candidate.location === 'panel')];
|
|
365
|
-
const openTool = (id) => (id === CARDS_ID ? openCards() : host.openView(id));
|
|
249
|
+
const openTool = (id) => (id === app_shell_hooks_1.CARDS_ID ? openCards() : host.openView(id));
|
|
366
250
|
// The workbench: the tabs open, or the tools that open there.
|
|
367
251
|
const editors = extensions.editors.length > 0 || tools.length > 0;
|
|
368
252
|
// The settings take the place of the conversation and of the workbench, as a page of their own.
|
|
@@ -376,18 +260,7 @@ function AppShell() {
|
|
|
376
260
|
}
|
|
377
261
|
tabsBefore.current = tabCount;
|
|
378
262
|
}, [tabCount, showEditors, toggleRight, layout]);
|
|
379
|
-
|
|
380
|
-
(0, sheet_swipe_1.useSheetSwipe)({
|
|
381
|
-
enabled: touch && layout === 'compact' && !phone && !showEditors,
|
|
382
|
-
open: navOpen,
|
|
383
|
-
setOpen: setNavOpen,
|
|
384
|
-
side: 'left',
|
|
385
|
-
opensFrom: 'edge',
|
|
386
|
-
closesFrom: 'anywhere',
|
|
387
|
-
sheet: '.ta-nav',
|
|
388
|
-
scrim: '.ta-scrim',
|
|
389
|
-
settleMs: 240,
|
|
390
|
-
});
|
|
263
|
+
(0, app_shell_hooks_1.useDrawerSwipe)(touch && layout === 'compact' && !phone && !showEditors, navOpen, setNavOpen);
|
|
391
264
|
// The pages of the rail: in the navigation, or under Discover.
|
|
392
265
|
const navigation = (0, app_nav_1.useNavigation)(extensions.views);
|
|
393
266
|
// Without a sidebar view that lists the double, its page is the first tab: it opens there, once the views are in.
|
|
@@ -404,6 +277,11 @@ function AppShell() {
|
|
|
404
277
|
const railView = view && (view === navigation.home || navigation.pages.includes(view)) ? view : undefined;
|
|
405
278
|
// 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.
|
|
406
279
|
const tabView = view && (view === navigation.home || navigation.nav.includes(view)) ? view : undefined;
|
|
280
|
+
// A page of the screen, and those in the background beside it, kept as they were.
|
|
281
|
+
const screenPage = settings === undefined && view && !tabView ? view : undefined;
|
|
282
|
+
// The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
|
|
283
|
+
const conversationShown = phone ? screenOpen && settings === undefined && !screenPage : settings === undefined && tabPage !== 'discover' && !view;
|
|
284
|
+
React.useEffect(() => host.setConversationShown(conversationShown), [host, conversationShown]);
|
|
407
285
|
const { pageShown } = extensions;
|
|
408
286
|
// biome-ignore lint/correctness/useExhaustiveDependencies: follows the pages shown
|
|
409
287
|
React.useEffect(() => {
|
|
@@ -467,10 +345,23 @@ function AppShell() {
|
|
|
467
345
|
sidebar.reveal();
|
|
468
346
|
}
|
|
469
347
|
};
|
|
470
|
-
|
|
471
|
-
|
|
348
|
+
const toggleWorkbench = () => {
|
|
349
|
+
if (showEditors) {
|
|
350
|
+
toggleRight();
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
// Over the settings of a wide screen (the rail, Cmd/Ctrl+J): they give way to what was under them.
|
|
354
|
+
if (!phone && settings !== undefined) {
|
|
355
|
+
setSettings(undefined);
|
|
356
|
+
}
|
|
357
|
+
revealRight();
|
|
358
|
+
editor.reveal();
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
(0, app_shell_hooks_1.useKeys)(toggleSide, openSettings, () => editors && toggleWorkbench());
|
|
362
|
+
(0, app_shell_hooks_1.useTitlebarColor)(workbench.status !== 'signed-out', theme);
|
|
472
363
|
const [providers, reloadProviders] = (0, auth_view_1.useAuthProviders)(online);
|
|
473
|
-
const [later, setLater] = (0, hooks_1.usePersisted)(LOGIN_LATER);
|
|
364
|
+
const [later, setLater] = (0, hooks_1.usePersisted)(app_shell_hooks_1.LOGIN_LATER);
|
|
474
365
|
/** A call failed for want of a sign-in (SIGN_IN_EVENT): the page of sign-in, even if the user put it off. */
|
|
475
366
|
const [asked, setAsked] = React.useState(false);
|
|
476
367
|
React.useEffect(() => {
|
|
@@ -481,6 +372,8 @@ function AppShell() {
|
|
|
481
372
|
window.addEventListener(notices_1.SIGN_IN_EVENT, ask);
|
|
482
373
|
return () => window.removeEventListener(notices_1.SIGN_IN_EVENT, ask);
|
|
483
374
|
}, [reloadProviders]);
|
|
375
|
+
/** The page of the double: its own, or the one a sidebar view that lists it opens. */
|
|
376
|
+
const doubleId = (_e = (_b = navigation.home) === null || _b === void 0 ? void 0 : _b.id) !== null && _e !== void 0 ? _e : side_lists_1.DOUBLE_PAGE;
|
|
484
377
|
if (workbench.status === 'signed-out') {
|
|
485
378
|
return React.createElement(workbench_view_1.SignIn, { error: workbench.error });
|
|
486
379
|
}
|
|
@@ -496,18 +389,9 @@ function AppShell() {
|
|
|
496
389
|
reloadProviders();
|
|
497
390
|
} }));
|
|
498
391
|
}
|
|
499
|
-
const toggleWorkbench = () => {
|
|
500
|
-
if (showEditors) {
|
|
501
|
-
toggleRight();
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
revealRight();
|
|
505
|
-
editor.reveal();
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
392
|
// What the columns beside the conversation and the editors take, so that the editors never take more than the conversation.
|
|
509
393
|
const sideWidths = {
|
|
510
|
-
'--ta-left': `${RAIL + (sideShown ? sidebar.size : 0)}px`,
|
|
394
|
+
'--ta-left': `${app_shell_hooks_1.RAIL + (sideShown ? sidebar.size : 0)}px`,
|
|
511
395
|
};
|
|
512
396
|
const classes = ['ta-app', navOpen && 'ta-nav-open', showEditors && 'ta-editors-open', showEditors && maximized && 'ta-workbench-max'];
|
|
513
397
|
const toggle = editors ? { open: showEditors, toggle: toggleWorkbench, tabs: extensions.editors.length } : undefined;
|
|
@@ -524,7 +408,7 @@ function AppShell() {
|
|
|
524
408
|
}
|
|
525
409
|
};
|
|
526
410
|
const chats = (React.createElement(assistant_chat_list_1.AssistantChatList, { sessions: workbench.sessions, saved: workbench.saved, removed: removedChats, 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, onPicked: picked }));
|
|
527
|
-
const editorArea = (React.createElement(editor_area_1.EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
|
|
411
|
+
const editorArea = (React.createElement(editor_area_1.EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, cwd: (_f = web_extension_protocol_1.WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (_c = workbench.server) === null || _c === void 0 ? void 0 : _c.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
|
|
528
412
|
const overlays = (React.createElement(React.Fragment, null,
|
|
529
413
|
React.createElement(notice_center_1.NoticeCenter, null),
|
|
530
414
|
React.createElement(link_dialog_1.LinkDialog, null),
|
|
@@ -549,19 +433,44 @@ function AppShell() {
|
|
|
549
433
|
}
|
|
550
434
|
};
|
|
551
435
|
const discoverView = (leading) => (React.createElement(discover_view_1.DiscoverView, { pages: navigation.discover, onOpen: openDiscovered, onPin: pinDiscovered, onSettings: () => openSettings('navigation'), leading: leading }));
|
|
436
|
+
// A held entry of the navigation talks, without a menu: the double opens and its box listens, the chats open a
|
|
437
|
+
// new conversation whose box does; letting go gives what was said (HeldTalk). Nowhere to talk, they are a tap.
|
|
438
|
+
const talkHold = (place, open) => ({
|
|
439
|
+
start: () => {
|
|
440
|
+
open();
|
|
441
|
+
held_talk_1.HeldTalk.hold(place);
|
|
442
|
+
},
|
|
443
|
+
move: held_talk_1.HeldTalk.point,
|
|
444
|
+
end: held_talk_1.HeldTalk.release,
|
|
445
|
+
cancel: held_talk_1.HeldTalk.cancel,
|
|
446
|
+
});
|
|
447
|
+
const holds = voice_1.Voice.canListen()
|
|
448
|
+
? {
|
|
449
|
+
double: talkHold('double', () => {
|
|
450
|
+
showPage(doubleId);
|
|
451
|
+
// Over the tabs when a sidebar view lists the double; as a tab of its own elsewhere.
|
|
452
|
+
if (phone) {
|
|
453
|
+
setScreenOpen(!navigation.home);
|
|
454
|
+
}
|
|
455
|
+
}),
|
|
456
|
+
chats: talkHold('draft', () => {
|
|
457
|
+
void chat.draft();
|
|
458
|
+
picked();
|
|
459
|
+
}),
|
|
460
|
+
}
|
|
461
|
+
: {};
|
|
552
462
|
const tabs = phone
|
|
553
463
|
? (0, nav_places_1.phoneTabs)(lists, navigation, {
|
|
554
464
|
discover: t('ta.discover'),
|
|
555
465
|
me: t('ta.me'),
|
|
556
466
|
fold: t('ta.nav.fold'),
|
|
557
467
|
settings: { label: t('ta.nav.settings'), run: () => openSettings('navigation') },
|
|
468
|
+
holds,
|
|
558
469
|
})
|
|
559
470
|
: [];
|
|
560
|
-
const tab = tabPage === 'me' ? nav_places_1.ME_TAB : tabPage === 'discover' ? nav_places_1.DISCOVER : ((
|
|
471
|
+
const tab = tabPage === 'me' ? nav_places_1.ME_TAB : tabPage === 'discover' ? nav_places_1.DISCOVER : ((_g = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _g !== void 0 ? _g : side);
|
|
561
472
|
// The launcher and the board are over the first tab only, as WeChat's over its chats.
|
|
562
|
-
const firstTab = ((
|
|
563
|
-
// A page of the screen, and those in the background beside it, kept as they were.
|
|
564
|
-
const screenPage = settings === undefined && view && !tabView ? view : undefined;
|
|
473
|
+
const firstTab = ((_d = tabs[0]) === null || _d === void 0 ? void 0 : _d.id) === tab;
|
|
565
474
|
const content = phone ? (React.createElement(phone_shell_1.PhoneShell, { tabs: tabs, tab: tab, launcher: firstTab && surfaces.launcher ? React.createElement(launcher_surface_1.LauncherSurface, { active: surface === 'launcher' }) : undefined, board: firstTab && surfaces.board ? (React.createElement(board_1.BoardSurface, { leading: React.createElement(icon_1.IconButton, { icon: lucide_react_1.ChevronLeft, label: t('ta.back'), onClick: () => setSurface(undefined) }) })) : undefined, surface: surface, onSurface: setSurface, onTab: id => {
|
|
566
475
|
var _a;
|
|
567
476
|
setSurface(undefined);
|
|
@@ -583,11 +492,11 @@ function AppShell() {
|
|
|
583
492
|
settings !== undefined ? (React.createElement(settings_view_1.SettingsView, { key: settingsOpened, section: settings || undefined, onClose: closeSettings, onBack: closeSettings })) : screenPage ? null : (React.createElement(chat_view_1.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 },
|
|
584
493
|
navOpen && React.createElement("button", { type: "button", className: "ta-scrim", "aria-label": t('ta.close'), onClick: () => setNavOpen(false) }),
|
|
585
494
|
React.createElement("div", { className: "ta-nav" },
|
|
586
|
-
React.createElement(app_nav_1.Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? nav_places_1.DISCOVER : ((
|
|
495
|
+
React.createElement(app_nav_1.Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? nav_places_1.DISCOVER : ((_h = view === null || view === void 0 ? void 0 : view.id) !== null && _h !== void 0 ? _h : ''), onPage: showPage, onDiscover: () => {
|
|
587
496
|
setSettings(undefined);
|
|
588
497
|
setNavOpen(false);
|
|
589
498
|
setTabPage('discover');
|
|
590
|
-
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface }),
|
|
499
|
+
}, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds }),
|
|
591
500
|
sideShown && (React.createElement("div", { className: "ta-sidebar", style: (0, split_pane_1.paneStyle)(sidebar) },
|
|
592
501
|
sideView ? React.createElement(app_nav_1.SidebarView, { view: sideView }) : chats,
|
|
593
502
|
React.createElement(split_pane_1.Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
|
|
@@ -43,7 +43,7 @@ const React = __importStar(require("react"));
|
|
|
43
43
|
const react_dom_1 = require("react-dom");
|
|
44
44
|
const hooks_1 = require("../hooks");
|
|
45
45
|
const use_t_1 = require("../i18n/use-t");
|
|
46
|
-
const
|
|
46
|
+
const workbench_util_1 = require("../workbench-util");
|
|
47
47
|
const auth_pictures_1 = require("./auth-pictures");
|
|
48
48
|
const callout_1 = require("./callout");
|
|
49
49
|
const empty_state_1 = require("./empty-state");
|
|
@@ -126,7 +126,7 @@ function AuthFlow({ provider, onDone, onBack }) {
|
|
|
126
126
|
const t = (0, use_t_1.useT)();
|
|
127
127
|
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
128
128
|
// The provider sends the browser back to the machine of ta serve, which is not this one: the address is pasted.
|
|
129
|
-
const elsewhere =
|
|
129
|
+
const elsewhere = workbench_util_1.WorkbenchUtil.elsewhere(workbench.host);
|
|
130
130
|
const [state, dispatch] = React.useReducer(AuthUtil.reduce, { infos: [] });
|
|
131
131
|
const [answer, setAnswer] = React.useState('');
|
|
132
132
|
const loginId = React.useRef(undefined);
|
|
@@ -339,7 +339,7 @@ function LoginPage({ onLater, onSignedIn }) {
|
|
|
339
339
|
React.createElement("div", { className: "ta-card ta-login-card" },
|
|
340
340
|
React.createElement(ta_avatar_1.TaAvatar, { size: 72 }),
|
|
341
341
|
React.createElement("h1", null, t('ta.auth.title')),
|
|
342
|
-
React.createElement("p", null, t(
|
|
342
|
+
React.createElement("p", null, t(workbench_util_1.WorkbenchUtil.elsewhere(workbench.host) ? 'ta.auth.hintRemote' : 'ta.auth.hint')),
|
|
343
343
|
React.createElement(AuthPanel, { kinds: true, onSignedIn: onSignedIn }),
|
|
344
344
|
React.createElement("button", { type: "button", className: "ta-login-later", onClick: onLater }, t('ta.auth.later')))));
|
|
345
345
|
}
|
|
@@ -39,6 +39,8 @@ export declare const BY_DIRECTORY: StateSpec<boolean>;
|
|
|
39
39
|
export declare const FOLDED: StateSpec<string[]>;
|
|
40
40
|
export declare namespace ChatListUtil {
|
|
41
41
|
function isOpen(entry: ChatEntry): entry is TaSessionInfo;
|
|
42
|
+
/** Whether it is the double's own conversation: its session, or before that is open its file. */
|
|
43
|
+
function isDouble(entry: ChatEntry, double: Pick<ChatListDouble, 'session' | 'sessionFile'>): boolean;
|
|
42
44
|
/** The id of an open session, the file of a saved one. */
|
|
43
45
|
function key(entry: ChatEntry): string;
|
|
44
46
|
/**
|
|
@@ -64,15 +66,31 @@ export declare namespace ChatListUtil {
|
|
|
64
66
|
/** `19:59` today, `11/8` before. */
|
|
65
67
|
function clock(time: number, now: number): string;
|
|
66
68
|
function title(session: ChatEntry, t: Translate): string;
|
|
69
|
+
/**
|
|
70
|
+
* Whether a row shows the same: what of its conversation and its place it shows, and the rest as is. The list
|
|
71
|
+
* reads the conversations again every few seconds into new objects: one that answers draws its row again, not every row.
|
|
72
|
+
*/
|
|
73
|
+
function sameRow<T extends {
|
|
74
|
+
session: ChatEntry;
|
|
75
|
+
source: ChatSource;
|
|
76
|
+
}>(before: T, after: T): boolean;
|
|
77
|
+
/** What a row says under its title: the last thing said, unless it is the title again. */
|
|
78
|
+
function preview(session: ChatEntry, title: string): string | undefined;
|
|
67
79
|
/** The first letter of a name, for its avatar. */
|
|
68
80
|
function initial(name: string): string;
|
|
69
81
|
}
|
|
82
|
+
/** What a task of the double came to, as the list says it beside the conversation. */
|
|
83
|
+
export type ChatTaskStatus = 'running' | 'done' | 'failed' | 'stopped';
|
|
70
84
|
/** The double, for the list: which conversations are its tasks, and how to hand it one. */
|
|
71
85
|
export interface ChatListDouble {
|
|
72
|
-
/** The sessions of its tasks. */
|
|
73
|
-
tasks:
|
|
86
|
+
/** The sessions of its tasks, and where each is. */
|
|
87
|
+
tasks: ReadonlyMap<string, ChatTaskStatus>;
|
|
74
88
|
/** Its own conversation. */
|
|
75
89
|
session?: string;
|
|
90
|
+
/** The file of its own conversation: it is known before the conversation opens (and without the computer). */
|
|
91
|
+
sessionFile?: string;
|
|
92
|
+
/** What the user calls it. */
|
|
93
|
+
name: string;
|
|
76
94
|
hand(session: TaSessionInfo, title: string): void;
|
|
77
95
|
}
|
|
78
96
|
export interface ChatListProps {
|