@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
|
@@ -2,6 +2,7 @@ import type { TaEvent, TaPackageServer, TaRemoteServer, TaServer, TaSessionInfo,
|
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { Mood } from '../avatar/dino-avatar.js';
|
|
4
4
|
import type { DeviceState } from '../device/device-protocol.js';
|
|
5
|
+
import type { TaFiles } from '../files/files-protocol.js';
|
|
5
6
|
import type { Language, Theme } from '../settings/settings-protocol.js';
|
|
6
7
|
import type { WebPageInfo } from './web-pages.js';
|
|
7
8
|
export type { WebPageInfo, WebPageState } from './web-pages.js';
|
|
@@ -21,6 +22,12 @@ export interface WebExtensionAPI {
|
|
|
21
22
|
readonly terminals: TaTerminalServer;
|
|
22
23
|
/** The packages pi loads; for the data of the extension's own package, {@link storage}. */
|
|
23
24
|
readonly packages: TaPackageServer;
|
|
25
|
+
/**
|
|
26
|
+
* The bytes of the files of the workspace, for what the page cannot load by their URL
|
|
27
|
+
* (`workspace.fileUrl`): behind a relay, and in the app on a phone, only the calls on the WebSocket reach
|
|
28
|
+
* ta serve. `byUrl` says which way it is; the bytes come sealed, end to end, when it is not.
|
|
29
|
+
*/
|
|
30
|
+
readonly files: TaFiles;
|
|
24
31
|
/** The other machines of `ssh://` directories (TaLocation): their ports, for a page served there. */
|
|
25
32
|
readonly remote: TaRemoteServer;
|
|
26
33
|
/** pi's settings of ta (`settings.json`): `getSettings(cwd)` also lists the models with credentials, for a model picker. */
|
|
@@ -49,6 +56,12 @@ export interface WebExtensionAPI {
|
|
|
49
56
|
* entries of its + menu and something above it, each given the conversation it is drawn for.
|
|
50
57
|
*/
|
|
51
58
|
registerComposerAddon(addon: WebComposerAddon): void;
|
|
59
|
+
/**
|
|
60
|
+
* A section of the settings, after those of Ta: what the user sets once for the extension (a model it
|
|
61
|
+
* uses, a choice it makes), kept with `storage`. Its rows look like Ta's, each with a control the
|
|
62
|
+
* extension draws.
|
|
63
|
+
*/
|
|
64
|
+
registerSettings(section: WebSettingsSection): void;
|
|
52
65
|
/**
|
|
53
66
|
* Opens what links of replies point to: files (at the lines they name), directories, pages of the web.
|
|
54
67
|
* Openers are asked in the order they were registered; the first that returns true has opened it.
|
|
@@ -123,6 +136,8 @@ export type WebOpener = (link: WebLink) => boolean | Promise<boolean>;
|
|
|
123
136
|
export interface WebSessionOpening {
|
|
124
137
|
title?: string;
|
|
125
138
|
cwd?: string;
|
|
139
|
+
/** Its session file, when known: what the device kept of the conversation shows while it opens, and while the computer cannot be reached. */
|
|
140
|
+
sessionFile?: string;
|
|
126
141
|
}
|
|
127
142
|
export interface WebStorage {
|
|
128
143
|
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
@@ -222,7 +237,10 @@ export interface WebExtensionUI {
|
|
|
222
237
|
setEditorDirty(id: string, dirty: boolean): void;
|
|
223
238
|
/** A React hook: the id of the tab shown in the workbench, whoever opened it. */
|
|
224
239
|
useActiveEditor(): string | undefined;
|
|
225
|
-
/**
|
|
240
|
+
/**
|
|
241
|
+
* A React hook: the directory of the conversation (or agent) in front, as it changes; the default directory
|
|
242
|
+
* of the server when none is: a page, the settings, the lists of a phone. What opens now (a terminal) opens there.
|
|
243
|
+
*/
|
|
226
244
|
useCwd(): string;
|
|
227
245
|
/**
|
|
228
246
|
* A React hook: the device the page runs on, as it changes: the layout (`compact`: the navigation is a
|
|
@@ -233,6 +251,11 @@ export interface WebExtensionUI {
|
|
|
233
251
|
useDevice(): DeviceState;
|
|
234
252
|
/** A React hook: the session of the conversation shown (TaSessionInfo.sessionId). */
|
|
235
253
|
useSessionId(): string | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* A React hook: the open sessions of ta serve, as the page reads them again: whether each answers now
|
|
256
|
+
* (`isStreaming`), what was said last. The same array until one changes.
|
|
257
|
+
*/
|
|
258
|
+
useSessions(): readonly TaSessionInfo[];
|
|
236
259
|
/**
|
|
237
260
|
* Shows a view of any web extension by its id, `<extension name>/<view name>` (`assistant/assistant`
|
|
238
261
|
* for the double): a page in the main area, a tool of the workbench as its tab; `''` the conversation again.
|
|
@@ -250,6 +273,21 @@ export interface WebExtensionUI {
|
|
|
250
273
|
* screen): the menu to render, and `open` for `onContextMenu`, with sections set apart by a line.
|
|
251
274
|
*/
|
|
252
275
|
useContextMenu(): [React.ReactNode, (event: React.MouseEvent, sections: WebMenuItem[][]) => void];
|
|
276
|
+
/**
|
|
277
|
+
* For a menu of your own (`position: fixed`, its entries `role="menuitem"`), from a layout effect: places it
|
|
278
|
+
* where it was `opened` as the menus of the page go (at the pointer; under a finger, out from under it and the
|
|
279
|
+
* row it pressed, `around`), and on a touch screen lets the finger have it as the menus of the page do: slide
|
|
280
|
+
* onto an entry and let go to choose it, slide off and let go to `close` it, a tap outside only closing it.
|
|
281
|
+
* Returns how to stop. Prefer `useContextMenu`, which does this.
|
|
282
|
+
*/
|
|
283
|
+
attachMenu(menu: HTMLElement, opened: {
|
|
284
|
+
x: number;
|
|
285
|
+
y: number;
|
|
286
|
+
around?: {
|
|
287
|
+
top: number;
|
|
288
|
+
bottom: number;
|
|
289
|
+
};
|
|
290
|
+
}, close: () => void): () => void;
|
|
253
291
|
/**
|
|
254
292
|
* In the Ta app: the camera of the system scans a QR code; resolves with its text, or undefined when the user
|
|
255
293
|
* cancelled. Undefined elsewhere (a browser has no scanner of its own).
|
|
@@ -275,6 +313,11 @@ export interface WebExtensionUI {
|
|
|
275
313
|
useView(id: string): WebViewInfo | undefined;
|
|
276
314
|
/** A React hook: the tasks of every extension (registerTasks), the double's too; the same array until one changes. */
|
|
277
315
|
useTasks(): readonly WebTaskEntry[];
|
|
316
|
+
/**
|
|
317
|
+
* Deletes tasks (`WebTask.remove`) once the user agrees, asked once for all of them (the title of one, the
|
|
318
|
+
* count of many, and what their `removeHint`s say); a failure is a notice. Resolves whether the user agreed.
|
|
319
|
+
*/
|
|
320
|
+
removeTasks(tasks: readonly WebTaskRemoval[]): Promise<boolean>;
|
|
278
321
|
/** ta: the dinosaur of the Cell logo; `mark`, one or two characters, tells agents apart. */
|
|
279
322
|
readonly Avatar: React.ComponentType<{
|
|
280
323
|
mood?: Mood;
|
|
@@ -298,6 +341,14 @@ export interface WebExtensionUI {
|
|
|
298
341
|
readonly Markdown: React.ComponentType<{
|
|
299
342
|
text: string;
|
|
300
343
|
}>;
|
|
344
|
+
/**
|
|
345
|
+
* A React hook: a chat that scrolls as the conversations of the page do, the element of the returned ref
|
|
346
|
+
* being what scrolls and its first child (positioned) holding a row for each message. At the bottom it
|
|
347
|
+
* follows what comes in; scrolled up, what the user reads stays where it is (the message box growing, rows
|
|
348
|
+
* changing their height); a part opened by a click stays where it was. `sent`: how many messages the user
|
|
349
|
+
* sent, one more of which goes to the bottom; another `key` (another chat in the same view) too.
|
|
350
|
+
*/
|
|
351
|
+
useChatScroll(sent: number, key?: string): React.RefObject<HTMLDivElement | null>;
|
|
301
352
|
/** What a list or a view shows while it has nothing, as the lists of the page show it: centered in the space it has. */
|
|
302
353
|
readonly Empty: React.ComponentType<WebEmptyProps>;
|
|
303
354
|
/** What a list shows while its rows are on their way (its data not read yet), as the lists of the page show it: after a moment, never for a list that comes at once. */
|
|
@@ -313,10 +364,24 @@ export interface WebExtensionUI {
|
|
|
313
364
|
* it. Elsewhere, and without actions, it is the row alone (a right click or a long press is its menu).
|
|
314
365
|
*/
|
|
315
366
|
readonly SwipeRow: React.ComponentType<WebSwipeRowProps>;
|
|
367
|
+
/**
|
|
368
|
+
* Several rows of a list chosen at once, as the multiple selection of WeChat: the round mark a row shows at
|
|
369
|
+
* its start while the list is selecting (`SelectCheck`), and the bar under the list (`SelectBar`) with
|
|
370
|
+
* Select all, how many are chosen, their actions (Delete) and Done. One look for every list.
|
|
371
|
+
*/
|
|
372
|
+
readonly SelectCheck: React.ComponentType<WebSelectCheckProps>;
|
|
373
|
+
readonly SelectBar: React.ComponentType<WebSelectBarProps>;
|
|
316
374
|
/** A small picture as the pictures of Ta: an SVG whose shapes take the classes `ta-pic-*` (WebPictureProps). */
|
|
317
375
|
readonly Picture: React.ComponentType<WebPictureProps>;
|
|
318
376
|
/** Choices as pictures in a row, as the suggestions of an empty conversation: a click picks one. */
|
|
319
377
|
readonly PictureCards: React.ComponentType<WebPictureCardsProps>;
|
|
378
|
+
/**
|
|
379
|
+
* A picture to look at closely, as the viewers of pictures: all of it at first (never larger than its own
|
|
380
|
+
* pixels), pinched by two fingers or a trackpad, zoomed by a wheel with Ctrl or ⌘ and by a double tap or
|
|
381
|
+
* click, dragged or scrolled once zoomed; with − / the scale / + / 1:1 below it. It fills its parent (a
|
|
382
|
+
* column of flex).
|
|
383
|
+
*/
|
|
384
|
+
readonly ImageViewer: React.ComponentType<WebImageViewerProps>;
|
|
320
385
|
/** A QR code of a text (a link to scan with a phone), black on white whatever the theme; `label` for a screen reader. */
|
|
321
386
|
readonly QrCode: React.ComponentType<{
|
|
322
387
|
text: string;
|
|
@@ -524,7 +589,7 @@ export interface WebEmptyProps {
|
|
|
524
589
|
/** Under the text: a button. */
|
|
525
590
|
children?: React.ReactNode;
|
|
526
591
|
}
|
|
527
|
-
/** An action behind a row a finger swiped (WebExtensionUI.SwipeRow): a word, as WeChat's. */
|
|
592
|
+
/** An action behind a row a finger swiped (WebExtensionUI.SwipeRow), or for the rows selected (SelectBar): a word, as WeChat's. */
|
|
528
593
|
export interface WebSwipeAction {
|
|
529
594
|
key: string;
|
|
530
595
|
label: string;
|
|
@@ -538,6 +603,22 @@ export interface WebSwipeRowProps {
|
|
|
538
603
|
className?: string;
|
|
539
604
|
children?: React.ReactNode;
|
|
540
605
|
}
|
|
606
|
+
export interface WebSelectCheckProps {
|
|
607
|
+
checked: boolean;
|
|
608
|
+
/** A row that cannot be chosen (nothing to do with it): a faint mark. */
|
|
609
|
+
disabled?: boolean;
|
|
610
|
+
}
|
|
611
|
+
export interface WebSelectBarProps {
|
|
612
|
+
/** How many are chosen, of how many could be. */
|
|
613
|
+
count: number;
|
|
614
|
+
total: number;
|
|
615
|
+
/** Chooses every row (`true`), or none. */
|
|
616
|
+
onSelectAll(all: boolean): void;
|
|
617
|
+
/** The list stops selecting. */
|
|
618
|
+
onDone(): void;
|
|
619
|
+
/** What can be done with those chosen: disabled while none is. */
|
|
620
|
+
actions: WebSwipeAction[];
|
|
621
|
+
}
|
|
541
622
|
export interface WebSkeletonProps {
|
|
542
623
|
/** How many rows, at most 6; 6 unless told. */
|
|
543
624
|
rows?: number;
|
|
@@ -572,6 +653,19 @@ export interface WebPictureCard {
|
|
|
572
653
|
disabled?: boolean;
|
|
573
654
|
onPick(): void;
|
|
574
655
|
}
|
|
656
|
+
export interface WebImageViewerProps {
|
|
657
|
+
src: string;
|
|
658
|
+
alt?: string;
|
|
659
|
+
/** On its root, for the background behind the picture (a checkerboard for transparency). */
|
|
660
|
+
className?: string;
|
|
661
|
+
/** Once it loaded: its size in pixels. */
|
|
662
|
+
onLoad?(size: {
|
|
663
|
+
width: number;
|
|
664
|
+
height: number;
|
|
665
|
+
}): void;
|
|
666
|
+
/** A click or tap beside the picture. */
|
|
667
|
+
onBackground?(): void;
|
|
668
|
+
}
|
|
575
669
|
export interface WebPictureCardsProps {
|
|
576
670
|
cards: readonly WebPictureCard[];
|
|
577
671
|
/** Default as many as there are cards. */
|
|
@@ -632,6 +726,22 @@ export interface WebConversation {
|
|
|
632
726
|
/** As the page names it: the name of the session, or of the double. */
|
|
633
727
|
title?: string;
|
|
634
728
|
}
|
|
729
|
+
/** A section an extension adds to the settings (WebExtensionAPI.registerSettings). */
|
|
730
|
+
export interface WebSettingsSection {
|
|
731
|
+
title: WebLabel;
|
|
732
|
+
/** Beside its title in the list of the sections; default: a puzzle piece. */
|
|
733
|
+
icon?: WebIcon;
|
|
734
|
+
rows: WebSettingRow[];
|
|
735
|
+
}
|
|
736
|
+
/** A row of the settings of an extension: a label and a description as Ta's rows have, and its control. */
|
|
737
|
+
export interface WebSettingRow {
|
|
738
|
+
key: string;
|
|
739
|
+
label: WebLabel;
|
|
740
|
+
description?: WebLabel;
|
|
741
|
+
/** The control, beside the label; with `stacked`, under it, for a wide one (a model picker, a list). */
|
|
742
|
+
render: React.ComponentType;
|
|
743
|
+
stacked?: boolean;
|
|
744
|
+
}
|
|
635
745
|
/** What an extension adds to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
|
|
636
746
|
export interface WebComposerAddon {
|
|
637
747
|
/** Entries of the + menu, a section of their own; read each time the conversation is drawn, and when `subscribe` says. */
|
|
@@ -695,6 +805,16 @@ export interface WebView {
|
|
|
695
805
|
* navigation, instead of taking a place there by itself.
|
|
696
806
|
*/
|
|
697
807
|
discover?: boolean;
|
|
808
|
+
/** A page: the line a list shows under its name, as a messenger does — the last thing said there, and when. */
|
|
809
|
+
preview?(): WebViewPreview | undefined;
|
|
810
|
+
/** A page: whoever is there answers now; a list that shows it marks it so, as a conversation answering. */
|
|
811
|
+
busy?(): boolean;
|
|
812
|
+
/** What `preview` or `busy` gives changed: the lists read it again. */
|
|
813
|
+
subscribe?(listener: () => void): () => void;
|
|
814
|
+
}
|
|
815
|
+
export interface WebViewPreview {
|
|
816
|
+
text: string;
|
|
817
|
+
at: number;
|
|
698
818
|
}
|
|
699
819
|
/** What `ui.shareExtension` hands on. */
|
|
700
820
|
export interface WebShareTarget {
|
|
@@ -764,6 +884,10 @@ export interface WebViewInfo {
|
|
|
764
884
|
shown: boolean;
|
|
765
885
|
/** WebView.menu: the list that shows the page draws a … with it. */
|
|
766
886
|
menu?(): WebMenuItem[][];
|
|
887
|
+
/** WebView.preview. */
|
|
888
|
+
preview?: WebViewPreview;
|
|
889
|
+
/** WebView.busy. */
|
|
890
|
+
busy: boolean;
|
|
767
891
|
}
|
|
768
892
|
export interface WebTool {
|
|
769
893
|
/** Letters, digits, `_` and `-`, starting with a letter. */
|
|
@@ -797,7 +921,16 @@ export interface WebTask {
|
|
|
797
921
|
open(): void;
|
|
798
922
|
/** Its …, read each time it opens: stop it, take it over, keep its agents. */
|
|
799
923
|
menu?(): WebMenuItem[][];
|
|
924
|
+
/**
|
|
925
|
+
* Deletes it without asking, a running one stopped first: what its delete in `menu` does once the user
|
|
926
|
+
* agreed. The lists ask (`ui.removeTasks`) and call it, for a row swiped on a phone or for many selected.
|
|
927
|
+
*/
|
|
928
|
+
remove?(): Promise<void>;
|
|
929
|
+
/** What deleting it does besides, said when the user is asked: what stays, and where. */
|
|
930
|
+
removeHint?: string;
|
|
800
931
|
}
|
|
932
|
+
/** What deleting a task reads of it: its menu deletes it this way too, before it is listed. */
|
|
933
|
+
export type WebTaskRemoval = Pick<WebTask, 'title' | 'remove' | 'removeHint'>;
|
|
801
934
|
/** The tasks of an extension. `tasks` gives the same objects for what did not change, and is called again after `subscribe`'s listener. */
|
|
802
935
|
export interface WebTaskSource {
|
|
803
936
|
tasks(): readonly WebTask[];
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
import type { TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
1
2
|
/**
|
|
2
3
|
* The code of the web extensions of packages, kept in this browser by its hash (`TaWebExtensionInfo.hash`,
|
|
3
4
|
* of the code itself): a start reads from ta serve only what changed. A phone over the relay read some 230 KB
|
|
4
5
|
* at every start before its double's list could show.
|
|
5
6
|
* What the last list of a ta serve does not name goes; switching to another computer reads its own again.
|
|
7
|
+
* The list itself is kept for each computer too, for the extensions to start before it answers.
|
|
6
8
|
*/
|
|
7
9
|
export declare class WebExtensionCode {
|
|
8
10
|
protected readonly storage: () => Storage | undefined;
|
|
9
11
|
static readonly PREFIX = "ta.web-extension ";
|
|
12
|
+
static readonly LIST = "web-extensions";
|
|
10
13
|
constructor(storage: () => Storage | undefined);
|
|
11
14
|
get(hash: string): string | undefined;
|
|
12
15
|
set(hash: string, code: string): void;
|
|
16
|
+
/** The list the computer `host` gave last (with the values it keeps for the page, forgotten with them). */
|
|
17
|
+
list(host: string): TaWebExtensionInfo[];
|
|
18
|
+
keepList(host: string, infos: TaWebExtensionInfo[]): void;
|
|
13
19
|
/** Only the code of `hashes`, those of the list of now. */
|
|
14
20
|
keepOnly(hashes: Iterable<string>): void;
|
|
15
21
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { StateUtil } from '../state/state-protocol.js';
|
|
1
2
|
/**
|
|
2
3
|
* The code of the web extensions of packages, kept in this browser by its hash (`TaWebExtensionInfo.hash`,
|
|
3
4
|
* of the code itself): a start reads from ta serve only what changed. A phone over the relay read some 230 KB
|
|
4
5
|
* at every start before its double's list could show.
|
|
5
6
|
* What the last list of a ta serve does not name goes; switching to another computer reads its own again.
|
|
7
|
+
* The list itself is kept for each computer too, for the extensions to start before it answers.
|
|
6
8
|
*/
|
|
7
9
|
export class WebExtensionCode {
|
|
8
10
|
constructor(storage) {
|
|
@@ -27,6 +29,27 @@ export class WebExtensionCode {
|
|
|
27
29
|
// Full, or a browser that keeps nothing: read again next time.
|
|
28
30
|
}
|
|
29
31
|
}
|
|
32
|
+
/** The list the computer `host` gave last (with the values it keeps for the page, forgotten with them). */
|
|
33
|
+
list(host) {
|
|
34
|
+
var _a;
|
|
35
|
+
var _b;
|
|
36
|
+
try {
|
|
37
|
+
const kept = JSON.parse((_b = (_a = this.storage()) === null || _a === void 0 ? void 0 : _a.getItem(StateUtil.localKey(WebExtensionCode.LIST, 'user', host))) !== null && _b !== void 0 ? _b : 'null');
|
|
38
|
+
return Array.isArray(kept) ? kept : [];
|
|
39
|
+
}
|
|
40
|
+
catch (_c) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
keepList(host, infos) {
|
|
45
|
+
var _a;
|
|
46
|
+
try {
|
|
47
|
+
(_a = this.storage()) === null || _a === void 0 ? void 0 : _a.setItem(StateUtil.localKey(WebExtensionCode.LIST, 'user', host), JSON.stringify(infos));
|
|
48
|
+
}
|
|
49
|
+
catch (_b) {
|
|
50
|
+
// Full: the extensions start once the computer answers.
|
|
51
|
+
}
|
|
52
|
+
}
|
|
30
53
|
/** Only the code of `hashes`, those of the list of now. */
|
|
31
54
|
keepOnly(hashes) {
|
|
32
55
|
const storage = this.storage();
|
|
@@ -52,4 +75,5 @@ export class WebExtensionCode {
|
|
|
52
75
|
}
|
|
53
76
|
}
|
|
54
77
|
WebExtensionCode.PREFIX = 'ta.web-extension ';
|
|
78
|
+
WebExtensionCode.LIST = 'web-extensions';
|
|
55
79
|
//# sourceMappingURL=web-extension-code.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TaEvent, TaTemporaryFrom, TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { MessageId } from '../i18n/messages.js';
|
|
4
|
-
import type { WebAvatarProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebIcon, WebLabel, WebMenuItem, WebOpener, WebSearchSource, WebSessionOpening, WebShareTarget, WebTool, WidgetOptions } from './web-extension-api.js';
|
|
4
|
+
import type { WebAvatarProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebIcon, WebLabel, WebMenuItem, WebOpener, WebSearchSource, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTool, WebViewPreview, WidgetOptions } from './web-extension-api.js';
|
|
5
5
|
import type { PageUsage, WebPageInfo } from './web-pages.js';
|
|
6
6
|
import type { WebTaskBoard } from './web-tasks.js';
|
|
7
7
|
export declare const TaWebExtensions: unique symbol;
|
|
@@ -38,6 +38,12 @@ export interface WebComposerAddonEntry {
|
|
|
38
38
|
extension: string;
|
|
39
39
|
addon: WebComposerAddon;
|
|
40
40
|
}
|
|
41
|
+
export interface WebSettingsEntry {
|
|
42
|
+
/** `<extension id>/<index>`. */
|
|
43
|
+
id: string;
|
|
44
|
+
extension: string;
|
|
45
|
+
section: WebSettingsSection;
|
|
46
|
+
}
|
|
41
47
|
export interface WebViewEntry {
|
|
42
48
|
/** `<extension name>/<view name>`. */
|
|
43
49
|
id: string;
|
|
@@ -54,6 +60,9 @@ export interface WebViewEntry {
|
|
|
54
60
|
/** Under Discover until the user pins it (WebView.discover). */
|
|
55
61
|
discover?: boolean;
|
|
56
62
|
menu?(): WebMenuItem[][];
|
|
63
|
+
preview?(): WebViewPreview | undefined;
|
|
64
|
+
busy?(): boolean;
|
|
65
|
+
subscribePreview?(listener: () => void): () => void;
|
|
57
66
|
/** Kept from before (WebViewUtil.placeholders): its place, until its extension registers it again. */
|
|
58
67
|
pending?: boolean;
|
|
59
68
|
}
|
|
@@ -87,6 +96,8 @@ export interface WebExtensionsState {
|
|
|
87
96
|
widgets: WebWidgetEntry[];
|
|
88
97
|
/** What extensions add to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
|
|
89
98
|
composerAddons: WebComposerAddonEntry[];
|
|
99
|
+
/** The sections extensions add to the settings (WebExtensionAPI.registerSettings). */
|
|
100
|
+
settingsSections: WebSettingsEntry[];
|
|
90
101
|
renderers: Record<string, React.ComponentType<{
|
|
91
102
|
message: WebCustomMessage;
|
|
92
103
|
}>>;
|
|
@@ -103,6 +114,11 @@ export interface WebExtensionsState {
|
|
|
103
114
|
focus: number;
|
|
104
115
|
/** The directory of the conversation shown. */
|
|
105
116
|
cwd?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The conversation is in front, not a page, the settings, Discover or the lists of a phone
|
|
119
|
+
* (setConversationShown): `ui.useCwd` gives its directory only then, else the default one.
|
|
120
|
+
*/
|
|
121
|
+
conversationShown: boolean;
|
|
106
122
|
/** The session of the conversation shown. */
|
|
107
123
|
sessionId?: string;
|
|
108
124
|
/** The view of the page shown in the main area; `''` for the conversation. */
|
|
@@ -122,6 +138,10 @@ export interface WebExtensionsState {
|
|
|
122
138
|
/** An extension handed on: its dialog shows (WebExtensionUI.shareExtension). */
|
|
123
139
|
sharing?: WebShareTarget;
|
|
124
140
|
}
|
|
141
|
+
export declare namespace WebCwdUtil {
|
|
142
|
+
/** The directory of the conversation while it is in front; else none, and the workbench is in the default directory. */
|
|
143
|
+
function shown(state: Pick<WebExtensionsState, 'cwd' | 'conversationShown'>): string | undefined;
|
|
144
|
+
}
|
|
125
145
|
export declare namespace WebLabelUtil {
|
|
126
146
|
function text(label: WebLabel | undefined): string;
|
|
127
147
|
}
|
|
@@ -191,6 +211,8 @@ export interface TaWebExtensions {
|
|
|
191
211
|
pinEditor(id: string): void;
|
|
192
212
|
/** The conversation shown, while there is one. */
|
|
193
213
|
connect(conversation: WebExtensionConversation | undefined): void;
|
|
214
|
+
/** Whether the conversation is what the main area shows: the shell says so as it changes. */
|
|
215
|
+
setConversationShown(shown: boolean): void;
|
|
194
216
|
/** An event of the conversation shown, for the handlers of `on`. */
|
|
195
217
|
emit(event: TaEvent): void;
|
|
196
218
|
/** What `switchSession` of web extensions does: the page shows that session; `undefined` until it can. */
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export const TaWebExtensions = Symbol('TaWebExtensions');
|
|
2
2
|
export const BuiltinWebExtension = Symbol('BuiltinWebExtension');
|
|
3
|
+
export var WebCwdUtil;
|
|
4
|
+
(function (WebCwdUtil) {
|
|
5
|
+
/** The directory of the conversation while it is in front; else none, and the workbench is in the default directory. */
|
|
6
|
+
function shown(state) {
|
|
7
|
+
return state.conversationShown ? state.cwd : undefined;
|
|
8
|
+
}
|
|
9
|
+
WebCwdUtil.shown = shown;
|
|
10
|
+
})(WebCwdUtil || (WebCwdUtil = {}));
|
|
3
11
|
export var WebLabelUtil;
|
|
4
12
|
(function (WebLabelUtil) {
|
|
5
13
|
function text(label) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { TaEvent, TaSettingsServer, TaTemporaryFrom, TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { TaFiles } from '../files/files-protocol.js';
|
|
3
4
|
import { TaLinks } from '../links/links-protocol.js';
|
|
4
5
|
import { TaNotices } from '../notices/notices-protocol.js';
|
|
5
6
|
import { TaSettings } from '../settings/settings-protocol.js';
|
|
6
7
|
import { TaState } from '../state/state-protocol.js';
|
|
7
8
|
import { TaWorkbench } from '../workbench-protocol.js';
|
|
8
|
-
import type { CodeEditorProps, DiffEditorProps, WebComposerAddon, WebComposerProps, WebEditor, WebExtensionAPI, WebExtensionFactory, WebFolderPickerProps, WebModelPickerProps, WebOpener, WebSearchSource, WebShareTarget, WebStorage, WebTaskSource, WebTool, WebView, WidgetOptions } from './web-extension-api.js';
|
|
9
|
+
import type { CodeEditorProps, DiffEditorProps, WebComposerAddon, WebComposerProps, WebEditor, WebExtensionAPI, WebExtensionFactory, WebFolderPickerProps, WebModelPickerProps, WebOpener, WebSearchSource, WebSettingsSection, WebShareTarget, WebStorage, WebTaskSource, WebTool, WebView, WidgetOptions } from './web-extension-api.js';
|
|
9
10
|
import { WebExtensionCode } from './web-extension-code.js';
|
|
10
11
|
import { BuiltinWebExtension, type LoadedWebExtension, TaWebExtensions, type WebEditorEntry, type WebExtensionConversation, type WebExtensionsState, type WebSessionSwitcher, type WebViewEntry } from './web-extension-protocol.js';
|
|
11
12
|
import { WebOnDemand } from './web-on-demand.js';
|
|
@@ -32,6 +33,7 @@ interface Running {
|
|
|
32
33
|
taskSources: WebTaskSource[];
|
|
33
34
|
searches: WebSearchSource[];
|
|
34
35
|
composerAddons: WebComposerAddon[];
|
|
36
|
+
settingsSections: WebSettingsSection[];
|
|
35
37
|
handlers: {
|
|
36
38
|
type: string;
|
|
37
39
|
handler: (event: TaEvent) => void;
|
|
@@ -43,6 +45,7 @@ interface Running {
|
|
|
43
45
|
export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
44
46
|
protected readonly workbench: TaWorkbench;
|
|
45
47
|
protected readonly settings: TaSettings;
|
|
48
|
+
protected readonly taFiles: TaFiles;
|
|
46
49
|
/** Detached: TaLinks asks the openers of the extensions. */
|
|
47
50
|
protected readonly links: TaLinks;
|
|
48
51
|
protected readonly notices: TaNotices;
|
|
@@ -59,6 +62,8 @@ export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
|
59
62
|
protected refreshing: Promise<boolean>;
|
|
60
63
|
/** The tabs of before are open again: from now on, what is open is kept. */
|
|
61
64
|
protected restored: boolean;
|
|
65
|
+
/** The extensions of the list of the last time have started (startKept), once. */
|
|
66
|
+
protected keptStarted: boolean;
|
|
62
67
|
/** The tab shown before the page loaded, until it opens again or the user shows another. */
|
|
63
68
|
protected pendingActive?: string;
|
|
64
69
|
/** The views of the navigation kept from before (WebViewUtil.KEPT), in their places until the extensions have loaded once. */
|
|
@@ -111,9 +116,17 @@ export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
|
111
116
|
protected dropEditor(editor: WebEditorEntry): void;
|
|
112
117
|
protected setDirty(run: Running, id: string, dirty: boolean): void;
|
|
113
118
|
connect(conversation: WebExtensionConversation | undefined): void;
|
|
119
|
+
setConversationShown(shown: boolean): void;
|
|
114
120
|
setSessionSwitcher(switcher: WebSessionSwitcher | undefined): void;
|
|
115
121
|
emit(event: TaEvent): void;
|
|
116
122
|
protected reconcile(): Promise<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
125
|
+
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
126
|
+
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
127
|
+
* still the same and stops the others.
|
|
128
|
+
*/
|
|
129
|
+
protected startKept(host: string | undefined): Promise<boolean>;
|
|
117
130
|
/** The tools open before, behind what is shown; the tab shown before, once it is open again. */
|
|
118
131
|
protected restoreTabs(): Promise<void>;
|
|
119
132
|
protected keepTabs(): void;
|