@celljs/ta-web 4.16.0 → 4.17.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 +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- 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 +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +121 -333
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +9 -148
- package/esm/browser/components/chat-list.js +277 -513
- package/esm/browser/components/chat-seen.js +1 -0
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +89 -19
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +7 -6
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +3 -1
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +1 -11
- package/esm/browser/gateway/console-parts.js +38 -128
- package/esm/browser/gateway/console-tenant.js +2 -1
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-view.js +39 -1
- package/esm/browser/i18n/locales.d.ts +143 -6
- package/esm/browser/i18n/messages-ja.js +144 -7
- package/esm/browser/i18n/messages-zh-tw.js +144 -7
- package/esm/browser/i18n/messages.d.ts +140 -3
- package/esm/browser/i18n/messages.js +288 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +9 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +114 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +9 -148
- package/lib/browser/components/chat-list.js +294 -532
- package/lib/browser/components/chat-seen.js +1 -0
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +88 -18
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +8 -6
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +2 -0
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +1 -11
- package/lib/browser/gateway/console-parts.js +38 -129
- package/lib/browser/gateway/console-tenant.js +2 -1
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-view.js +39 -1
- package/lib/browser/i18n/locales.d.ts +143 -6
- package/lib/browser/i18n/messages-ja.js +144 -7
- package/lib/browser/i18n/messages-zh-tw.js +144 -7
- package/lib/browser/i18n/messages.d.ts +140 -3
- package/lib/browser/i18n/messages.js +288 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +9 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Callout } from '../components/callout.js';
|
|
3
|
-
import { Segmented } from '../components/settings-controls.js';
|
|
4
|
-
import { useWorkbench } from '../hooks.js';
|
|
5
2
|
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
6
3
|
import { ConsoleUtil } from './console-util.js';
|
|
7
4
|
/** How often what the console shows is read again while it is seen. */
|
|
@@ -52,137 +49,50 @@ export function Stat({ value, label, tone, onClick, title, }) {
|
|
|
52
49
|
return onClick ? (React.createElement("button", { type: "button", className: "ta-console-stat", onClick: onClick, title: title }, body)) : (React.createElement("div", { className: "ta-console-stat" }, body));
|
|
53
50
|
}
|
|
54
51
|
/** This month's minutes and tokens of an account, as bars; the limits of messages and pages in a line. */
|
|
52
|
+
const REFUSED = {
|
|
53
|
+
host: 'ta.console.egressReasonHost',
|
|
54
|
+
port: 'ta.console.egressReasonPort',
|
|
55
|
+
network: 'ta.console.egressReasonNetwork',
|
|
56
|
+
};
|
|
57
|
+
/** The connections a sandbox was refused lately, under the meters. */
|
|
58
|
+
function EgressRefused({ refused }) {
|
|
59
|
+
const t = useT();
|
|
60
|
+
const language = useLanguage();
|
|
61
|
+
return (React.createElement("div", { className: "ta-console-card ta-console-refused" }, refused.map(each => (React.createElement("div", { key: `${each.host}-${each.reason}`, className: "ta-console-refused-row" },
|
|
62
|
+
React.createElement("span", { className: "ta-console-activity-name ta-ellipsis" }, each.host),
|
|
63
|
+
React.createElement("span", { className: "ta-console-refused-reason ta-ellipsis" },
|
|
64
|
+
t(REFUSED[each.reason]),
|
|
65
|
+
each.count > 1 ? ` ×${each.count}` : ''),
|
|
66
|
+
React.createElement("span", { className: "ta-console-activity-time" }, ConsoleUtil.ago(each.at, language)))))));
|
|
67
|
+
}
|
|
55
68
|
export function QuotaMeters({ quota }) {
|
|
56
69
|
const t = useT();
|
|
57
70
|
const language = useLanguage();
|
|
58
71
|
const { minutes, tokens } = quota;
|
|
59
72
|
const allowed = minutes.limit === undefined ? undefined : minutes.limit + minutes.bonus;
|
|
60
73
|
const resets = new Date(quota.resetsAt).toLocaleDateString(language, { month: 'short', day: 'numeric' });
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{ value: '30', label: 'ta.console.range30' },
|
|
84
|
-
];
|
|
85
|
-
function pointLabel(point, range, language) {
|
|
86
|
-
const date = new Date(point.at);
|
|
87
|
-
return range === 1
|
|
88
|
-
? date.toLocaleTimeString(language, { hour: '2-digit', minute: '2-digit' })
|
|
89
|
-
: date.toLocaleDateString(language, { month: 'numeric', day: 'numeric', weekday: range === 7 ? 'short' : undefined });
|
|
90
|
-
}
|
|
91
|
-
/** Bars of a trend, the one under the pointer said above them. */
|
|
92
|
-
function TrendBars({ points, metric, range }) {
|
|
93
|
-
const t = useT();
|
|
94
|
-
const language = useLanguage();
|
|
95
|
-
const [hovered, setHovered] = React.useState();
|
|
96
|
-
const values = points.map(point => (metric === 'tokens' ? point.tokens : point.cost));
|
|
97
|
-
const max = Math.max(...values, 0);
|
|
98
|
-
const shown = hovered !== undefined ? points[hovered] : undefined;
|
|
99
|
-
const format = (value) => { var _a; return (metric === 'tokens' ? ConsoleUtil.count(value) : ((_a = ConsoleUtil.cost(value)) !== null && _a !== void 0 ? _a : '$0')); };
|
|
100
|
-
const width = 600;
|
|
101
|
-
const height = 120;
|
|
102
|
-
const slot = width / points.length;
|
|
103
|
-
const gap = Math.min(4, slot * 0.25);
|
|
104
|
-
return (React.createElement("div", { className: "ta-console-chart" },
|
|
105
|
-
React.createElement("div", { className: "ta-console-chart-hover" }, shown ? (React.createElement(React.Fragment, null,
|
|
106
|
-
React.createElement("span", null, pointLabel(shown, range, language)),
|
|
107
|
-
React.createElement("strong", null, format(metric === 'tokens' ? shown.tokens : shown.cost)),
|
|
108
|
-
React.createElement("span", null, t('ta.console.turns', { count: shown.turns })))) : (React.createElement("span", null, t('ta.console.peak', { value: format(max) })))),
|
|
109
|
-
React.createElement("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", role: "img", "aria-label": t('ta.console.trend'), onPointerMove: event => {
|
|
110
|
-
const box = event.currentTarget.getBoundingClientRect();
|
|
111
|
-
setHovered(Math.min(points.length - 1, Math.max(0, Math.floor(((event.clientX - box.left) / box.width) * points.length))));
|
|
112
|
-
}, onPointerLeave: () => setHovered(undefined) },
|
|
113
|
-
values.map((value, index) => {
|
|
114
|
-
const barHeight = max > 0 ? Math.max(value > 0 ? 2 : 0, (value / max) * (height - 4)) : 0;
|
|
115
|
-
return (React.createElement("rect", { key: points[index].at, x: index * slot + gap / 2, y: height - barHeight, width: Math.max(1, slot - gap), height: barHeight, rx: Math.min(3, (slot - gap) / 3), className: hovered === index ? 'ta-console-chart-bar ta-on' : 'ta-console-chart-bar' }));
|
|
116
|
-
}),
|
|
117
|
-
React.createElement("line", { x1: 0, x2: width, y1: height - 0.5, y2: height - 0.5, className: "ta-console-chart-axis" })),
|
|
118
|
-
React.createElement("div", { className: "ta-console-chart-ticks" },
|
|
119
|
-
React.createElement("span", null, pointLabel(points[0], range, language)),
|
|
120
|
-
React.createElement("span", null, pointLabel(points[Math.floor(points.length / 2)], range, language)),
|
|
121
|
-
React.createElement("span", null, pointLabel(points[points.length - 1], range, language)))));
|
|
122
|
-
}
|
|
123
|
-
function Shares({ rows, total, metric }) {
|
|
124
|
-
return (React.createElement("div", { className: "ta-console-shares" }, rows.map(row => {
|
|
125
|
-
var _a;
|
|
126
|
-
const value = metric === 'tokens' ? row.tokens : row.cost;
|
|
127
|
-
return (React.createElement("div", { key: row.key, className: "ta-console-share" },
|
|
128
|
-
React.createElement("span", { className: "ta-console-share-label ta-ellipsis", title: row.label }, row.label),
|
|
129
|
-
React.createElement(Bar, { share: total > 0 ? Math.round((value / total) * 100) : 0, small: true, part: true }),
|
|
130
|
-
React.createElement("span", { className: "ta-console-share-value" }, metric === 'tokens' ? ConsoleUtil.count(value) : ((_a = ConsoleUtil.cost(value)) !== null && _a !== void 0 ? _a : '—'))));
|
|
131
|
-
})));
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* What agents took over time, of the gateway or of one account: tokens or dollars by hour (a day) or by day (a week,
|
|
135
|
-
* a month), the totals, and the models and accounts that took most.
|
|
136
|
-
*/
|
|
137
|
-
export function TrendCard({ tenantId, tenants, onTenant }) {
|
|
138
|
-
var _a, _b, _c, _d, _e, _f;
|
|
139
|
-
const t = useT();
|
|
140
|
-
const [, bench] = useWorkbench();
|
|
141
|
-
const [range, setRange] = React.useState(7);
|
|
142
|
-
const [metric, setMetric] = React.useState('tokens');
|
|
143
|
-
const { value: trend, error } = usePolled(() => bench.gateway.getUsageTrend(range === 1 ? 2 : range, tenantId), `${range}|${tenantId}`, 60000);
|
|
144
|
-
const points = trend ? ConsoleUtil.points(trend, range) : undefined;
|
|
145
|
-
const totals = points === null || points === void 0 ? void 0 : points.reduce((sum, point) => ({ tokens: sum.tokens + point.tokens, cost: sum.cost + point.cost, turns: sum.turns + point.turns }), {
|
|
146
|
-
tokens: 0,
|
|
147
|
-
cost: 0,
|
|
148
|
-
turns: 0,
|
|
149
|
-
});
|
|
150
|
-
const total = metric === 'tokens' ? ((_a = totals === null || totals === void 0 ? void 0 : totals.tokens) !== null && _a !== void 0 ? _a : 0) : ((_b = totals === null || totals === void 0 ? void 0 : totals.cost) !== null && _b !== void 0 ? _b : 0);
|
|
151
|
-
const names = new Map(tenants === null || tenants === void 0 ? void 0 : tenants.map(tenant => [tenant.id, tenant.name || tenant.account]));
|
|
152
|
-
return (React.createElement("div", { className: "ta-console-card" },
|
|
153
|
-
React.createElement("div", { className: "ta-console-card-head" },
|
|
154
|
-
React.createElement("div", { className: "ta-console-total" },
|
|
155
|
-
React.createElement("strong", null, metric === 'tokens' ? ConsoleUtil.count((_c = totals === null || totals === void 0 ? void 0 : totals.tokens) !== null && _c !== void 0 ? _c : 0) : ((_e = ConsoleUtil.cost((_d = totals === null || totals === void 0 ? void 0 : totals.cost) !== null && _d !== void 0 ? _d : 0)) !== null && _e !== void 0 ? _e : '$0')),
|
|
156
|
-
React.createElement("span", null, t('ta.console.turns', { count: (_f = totals === null || totals === void 0 ? void 0 : totals.turns) !== null && _f !== void 0 ? _f : 0 }))),
|
|
157
|
-
React.createElement("div", { className: "ta-console-card-controls" },
|
|
158
|
-
React.createElement(Segmented, { label: t('ta.console.metric'), value: metric, onChange: setMetric, choices: [
|
|
159
|
-
{ value: 'tokens', label: 'ta.console.tokens' },
|
|
160
|
-
{ value: 'cost', label: 'ta.console.cost' },
|
|
161
|
-
] }),
|
|
162
|
-
React.createElement(Segmented, { label: t('ta.console.range'), value: String(range), onChange: value => setRange(Number(value)), choices: RANGES }))),
|
|
163
|
-
error && !trend ? (React.createElement(Callout, { level: "warning" }, error)) : !points ? (React.createElement("div", { className: "ta-console-chart ta-console-chart-loading" })) : (React.createElement(TrendBars, { points: points, metric: metric, range: range })),
|
|
164
|
-
trend && trend.byModel.length > 0 && (React.createElement(React.Fragment, null,
|
|
165
|
-
React.createElement("span", { className: "ta-console-card-label" }, t('ta.console.byModel')),
|
|
166
|
-
React.createElement(Shares, { metric: metric, total: metric === 'tokens'
|
|
167
|
-
? trend.byModel.reduce((sum, row) => sum + row.tokens, 0)
|
|
168
|
-
: trend.byModel.reduce((sum, row) => sum + row.cost, 0), rows: trend.byModel
|
|
169
|
-
.slice(0, 5)
|
|
170
|
-
.map(row => { var _a; return ({ key: row.model, label: (_a = row.model.split('/').pop()) !== null && _a !== void 0 ? _a : row.model, tokens: row.tokens, cost: row.cost }); }) }))),
|
|
171
|
-
trend && tenants && trend.byTenant.length > 0 && (React.createElement(React.Fragment, null,
|
|
172
|
-
React.createElement("span", { className: "ta-console-card-label" }, t('ta.console.byAccount')),
|
|
173
|
-
React.createElement("div", { className: "ta-console-shares" }, trend.byTenant.slice(0, 5).map(row => {
|
|
174
|
-
var _a, _b;
|
|
175
|
-
const value = metric === 'tokens' ? row.tokens : row.cost;
|
|
176
|
-
const all = metric === 'tokens'
|
|
177
|
-
? trend.byTenant.reduce((sum, each) => sum + each.tokens, 0)
|
|
178
|
-
: trend.byTenant.reduce((sum, each) => sum + each.cost, 0);
|
|
179
|
-
return (React.createElement("button", { key: row.tenantId, type: "button", className: "ta-console-share ta-console-share-button", onClick: () => onTenant === null || onTenant === void 0 ? void 0 : onTenant(row.tenantId) },
|
|
180
|
-
React.createElement("span", { className: "ta-console-share-label ta-ellipsis" }, (_a = names.get(row.tenantId)) !== null && _a !== void 0 ? _a : row.tenantId),
|
|
181
|
-
React.createElement(Bar, { share: all > 0 ? Math.round((value / all) * 100) : 0, small: true, part: true }),
|
|
182
|
-
React.createElement("span", { className: "ta-console-share-value" }, metric === 'tokens' ? ConsoleUtil.count(value) : ((_b = ConsoleUtil.cost(value)) !== null && _b !== void 0 ? _b : '—'))));
|
|
183
|
-
})))),
|
|
184
|
-
trend && trend.stale.length > 0 && React.createElement("p", { className: "ta-list-hint" }, t('ta.console.stale', { count: trend.stale.length })),
|
|
185
|
-
total === 0 && trend && React.createElement("p", { className: "ta-list-hint" }, t('ta.console.trendEmpty'))));
|
|
74
|
+
const { egress } = quota;
|
|
75
|
+
return (React.createElement(React.Fragment, null,
|
|
76
|
+
React.createElement("div", { className: "ta-console-usage" },
|
|
77
|
+
React.createElement(Meter, { label: t('ta.console.freeMinutes'), value: allowed === undefined
|
|
78
|
+
? `${ConsoleUtil.minutes(minutes.used)} · ${t('ta.console.unlimited')}`
|
|
79
|
+
: `${ConsoleUtil.minutes(minutes.used)} / ${ConsoleUtil.minutes(allowed)}`, share: allowed === undefined ? undefined : ConsoleUtil.share(minutes.used, allowed), hint: [minutes.bonus > 0 ? t('ta.console.bonus', { minutes: minutes.bonus }) : '', t('ta.console.resets', { date: resets })]
|
|
80
|
+
.filter(Boolean)
|
|
81
|
+
.join(' · ') }),
|
|
82
|
+
React.createElement(Meter, { label: t('ta.console.monthTokens'), value: [
|
|
83
|
+
tokens.limit === undefined ? ConsoleUtil.count(tokens.used) : `${ConsoleUtil.count(tokens.used)} / ${ConsoleUtil.count(tokens.limit)}`,
|
|
84
|
+
ConsoleUtil.cost(tokens.cost),
|
|
85
|
+
]
|
|
86
|
+
.filter(Boolean)
|
|
87
|
+
.join(' · '), share: tokens.limit === undefined ? undefined : ConsoleUtil.share(tokens.used, tokens.limit), hint: [
|
|
88
|
+
t(tokens.metered ? 'ta.console.tokensMetered' : 'ta.console.tokensReported'),
|
|
89
|
+
quota.promptsPerMinute !== undefined ? t('ta.console.promptsLimit', { count: quota.promptsPerMinute }) : '',
|
|
90
|
+
quota.connections !== undefined ? t('ta.console.connectionsLimit', { count: quota.connections }) : '',
|
|
91
|
+
]
|
|
92
|
+
.filter(Boolean)
|
|
93
|
+
.join(' · ') }),
|
|
94
|
+
egress && (React.createElement(Meter, { label: t('ta.console.egressBytes'), value: egress.bytes > 0 ? ConsoleUtil.bytes(egress.bytes) : '0 MB', hint: egress.refused.length > 0 ? t('ta.console.egressRefused', { count: egress.refused.length }) : t('ta.console.egressThrough') }))),
|
|
95
|
+
egress && egress.refused.length > 0 && React.createElement(EgressRefused, { refused: egress.refused })));
|
|
186
96
|
}
|
|
187
97
|
function modeOf(value, nullable) {
|
|
188
98
|
return value === null ? 'none' : value === undefined ? (nullable ? 'inherit' : 'none') : 'set';
|
|
@@ -7,7 +7,8 @@ import { Icon, IconButton } from '../components/icon.js';
|
|
|
7
7
|
import { useNotices, useWorkbench } from '../hooks.js';
|
|
8
8
|
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
9
9
|
import { TerminalText } from '../util/terminal-text.js';
|
|
10
|
-
import { Bar, LimitsForm, Meter, QuotaMeters, SectionTitle, Stat,
|
|
10
|
+
import { Bar, LimitsForm, Meter, QuotaMeters, SectionTitle, Stat, usePolled } from './console-parts.js';
|
|
11
|
+
import { TrendCard } from './console-trend.js';
|
|
11
12
|
import { ConsoleUtil } from './console-util.js';
|
|
12
13
|
export const STATUS = {
|
|
13
14
|
starting: 'ta.environment.starting',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TaGatewayTenant } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* What agents took over time, of the gateway or of one account: tokens or dollars by hour (a day) or by day (a week,
|
|
5
|
+
* a month), the totals, and the models and accounts that took most.
|
|
6
|
+
*/
|
|
7
|
+
export declare function TrendCard({ tenantId, tenants, onTenant }: {
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
tenants?: TaGatewayTenant[];
|
|
10
|
+
onTenant?(id: string): void;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Callout } from '../components/callout.js';
|
|
3
|
+
import { Segmented } from '../components/settings-controls.js';
|
|
4
|
+
import { useWorkbench } from '../hooks.js';
|
|
5
|
+
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
6
|
+
import { Bar, usePolled } from './console-parts.js';
|
|
7
|
+
import { ConsoleUtil } from './console-util.js';
|
|
8
|
+
const RANGES = [
|
|
9
|
+
{ value: '1', label: 'ta.console.range1' },
|
|
10
|
+
{ value: '7', label: 'ta.console.range7' },
|
|
11
|
+
{ value: '30', label: 'ta.console.range30' },
|
|
12
|
+
];
|
|
13
|
+
function pointLabel(point, range, language) {
|
|
14
|
+
const date = new Date(point.at);
|
|
15
|
+
return range === 1
|
|
16
|
+
? date.toLocaleTimeString(language, { hour: '2-digit', minute: '2-digit' })
|
|
17
|
+
: date.toLocaleDateString(language, { month: 'numeric', day: 'numeric', weekday: range === 7 ? 'short' : undefined });
|
|
18
|
+
}
|
|
19
|
+
/** Bars of a trend, the one under the pointer said above them. */
|
|
20
|
+
function TrendBars({ points, metric, range }) {
|
|
21
|
+
const t = useT();
|
|
22
|
+
const language = useLanguage();
|
|
23
|
+
const [hovered, setHovered] = React.useState();
|
|
24
|
+
const values = points.map(point => (metric === 'tokens' ? point.tokens : point.cost));
|
|
25
|
+
const max = Math.max(...values, 0);
|
|
26
|
+
const shown = hovered !== undefined ? points[hovered] : undefined;
|
|
27
|
+
const format = (value) => { var _a; return (metric === 'tokens' ? ConsoleUtil.count(value) : ((_a = ConsoleUtil.cost(value)) !== null && _a !== void 0 ? _a : '$0')); };
|
|
28
|
+
const width = 600;
|
|
29
|
+
const height = 120;
|
|
30
|
+
const slot = width / points.length;
|
|
31
|
+
const gap = Math.min(4, slot * 0.25);
|
|
32
|
+
return (React.createElement("div", { className: "ta-console-chart" },
|
|
33
|
+
React.createElement("div", { className: "ta-console-chart-hover" }, shown ? (React.createElement(React.Fragment, null,
|
|
34
|
+
React.createElement("span", null, pointLabel(shown, range, language)),
|
|
35
|
+
React.createElement("strong", null, format(metric === 'tokens' ? shown.tokens : shown.cost)),
|
|
36
|
+
React.createElement("span", null, t('ta.console.turns', { count: shown.turns })))) : (React.createElement("span", null, t('ta.console.peak', { value: format(max) })))),
|
|
37
|
+
React.createElement("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", role: "img", "aria-label": t('ta.console.trend'), onPointerMove: event => {
|
|
38
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
39
|
+
setHovered(Math.min(points.length - 1, Math.max(0, Math.floor(((event.clientX - box.left) / box.width) * points.length))));
|
|
40
|
+
}, onPointerLeave: () => setHovered(undefined) },
|
|
41
|
+
values.map((value, index) => {
|
|
42
|
+
const barHeight = max > 0 ? Math.max(value > 0 ? 2 : 0, (value / max) * (height - 4)) : 0;
|
|
43
|
+
return (React.createElement("rect", { key: points[index].at, x: index * slot + gap / 2, y: height - barHeight, width: Math.max(1, slot - gap), height: barHeight, rx: Math.min(3, (slot - gap) / 3), className: hovered === index ? 'ta-console-chart-bar ta-on' : 'ta-console-chart-bar' }));
|
|
44
|
+
}),
|
|
45
|
+
React.createElement("line", { x1: 0, x2: width, y1: height - 0.5, y2: height - 0.5, className: "ta-console-chart-axis" })),
|
|
46
|
+
React.createElement("div", { className: "ta-console-chart-ticks" },
|
|
47
|
+
React.createElement("span", null, pointLabel(points[0], range, language)),
|
|
48
|
+
React.createElement("span", null, pointLabel(points[Math.floor(points.length / 2)], range, language)),
|
|
49
|
+
React.createElement("span", null, pointLabel(points[points.length - 1], range, language)))));
|
|
50
|
+
}
|
|
51
|
+
function Shares({ rows, total, metric }) {
|
|
52
|
+
return (React.createElement("div", { className: "ta-console-shares" }, rows.map(row => {
|
|
53
|
+
var _a;
|
|
54
|
+
const value = metric === 'tokens' ? row.tokens : row.cost;
|
|
55
|
+
return (React.createElement("div", { key: row.key, className: "ta-console-share" },
|
|
56
|
+
React.createElement("span", { className: "ta-console-share-label ta-ellipsis", title: row.label }, row.label),
|
|
57
|
+
React.createElement(Bar, { share: total > 0 ? Math.round((value / total) * 100) : 0, small: true, part: true }),
|
|
58
|
+
React.createElement("span", { className: "ta-console-share-value" }, metric === 'tokens' ? ConsoleUtil.count(value) : ((_a = ConsoleUtil.cost(value)) !== null && _a !== void 0 ? _a : '—'))));
|
|
59
|
+
})));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* What agents took over time, of the gateway or of one account: tokens or dollars by hour (a day) or by day (a week,
|
|
63
|
+
* a month), the totals, and the models and accounts that took most.
|
|
64
|
+
*/
|
|
65
|
+
export function TrendCard({ tenantId, tenants, onTenant }) {
|
|
66
|
+
var _a, _b, _c, _d, _e, _f;
|
|
67
|
+
const t = useT();
|
|
68
|
+
const [, bench] = useWorkbench();
|
|
69
|
+
const [range, setRange] = React.useState(7);
|
|
70
|
+
const [metric, setMetric] = React.useState('tokens');
|
|
71
|
+
const { value: trend, error } = usePolled(() => bench.gateway.getUsageTrend(range === 1 ? 2 : range, tenantId), `${range}|${tenantId}`, 60000);
|
|
72
|
+
const points = trend ? ConsoleUtil.points(trend, range) : undefined;
|
|
73
|
+
const totals = points === null || points === void 0 ? void 0 : points.reduce((sum, point) => ({ tokens: sum.tokens + point.tokens, cost: sum.cost + point.cost, turns: sum.turns + point.turns }), {
|
|
74
|
+
tokens: 0,
|
|
75
|
+
cost: 0,
|
|
76
|
+
turns: 0,
|
|
77
|
+
});
|
|
78
|
+
const total = metric === 'tokens' ? ((_a = totals === null || totals === void 0 ? void 0 : totals.tokens) !== null && _a !== void 0 ? _a : 0) : ((_b = totals === null || totals === void 0 ? void 0 : totals.cost) !== null && _b !== void 0 ? _b : 0);
|
|
79
|
+
const names = new Map(tenants === null || tenants === void 0 ? void 0 : tenants.map(tenant => [tenant.id, tenant.name || tenant.account]));
|
|
80
|
+
return (React.createElement("div", { className: "ta-console-card" },
|
|
81
|
+
React.createElement("div", { className: "ta-console-card-head" },
|
|
82
|
+
React.createElement("div", { className: "ta-console-total" },
|
|
83
|
+
React.createElement("strong", null, metric === 'tokens' ? ConsoleUtil.count((_c = totals === null || totals === void 0 ? void 0 : totals.tokens) !== null && _c !== void 0 ? _c : 0) : ((_e = ConsoleUtil.cost((_d = totals === null || totals === void 0 ? void 0 : totals.cost) !== null && _d !== void 0 ? _d : 0)) !== null && _e !== void 0 ? _e : '$0')),
|
|
84
|
+
React.createElement("span", null, t('ta.console.turns', { count: (_f = totals === null || totals === void 0 ? void 0 : totals.turns) !== null && _f !== void 0 ? _f : 0 }))),
|
|
85
|
+
React.createElement("div", { className: "ta-console-card-controls" },
|
|
86
|
+
React.createElement(Segmented, { label: t('ta.console.metric'), value: metric, onChange: setMetric, choices: [
|
|
87
|
+
{ value: 'tokens', label: 'ta.console.tokens' },
|
|
88
|
+
{ value: 'cost', label: 'ta.console.cost' },
|
|
89
|
+
] }),
|
|
90
|
+
React.createElement(Segmented, { label: t('ta.console.range'), value: String(range), onChange: value => setRange(Number(value)), choices: RANGES }))),
|
|
91
|
+
error && !trend ? (React.createElement(Callout, { level: "warning" }, error)) : !points ? (React.createElement("div", { className: "ta-console-chart ta-console-chart-loading" })) : (React.createElement(TrendBars, { points: points, metric: metric, range: range })),
|
|
92
|
+
trend && trend.byModel.length > 0 && (React.createElement(React.Fragment, null,
|
|
93
|
+
React.createElement("span", { className: "ta-console-card-label" }, t('ta.console.byModel')),
|
|
94
|
+
React.createElement(Shares, { metric: metric, total: metric === 'tokens'
|
|
95
|
+
? trend.byModel.reduce((sum, row) => sum + row.tokens, 0)
|
|
96
|
+
: trend.byModel.reduce((sum, row) => sum + row.cost, 0), rows: trend.byModel
|
|
97
|
+
.slice(0, 5)
|
|
98
|
+
.map(row => { var _a; return ({ key: row.model, label: (_a = row.model.split('/').pop()) !== null && _a !== void 0 ? _a : row.model, tokens: row.tokens, cost: row.cost }); }) }))),
|
|
99
|
+
trend && tenants && trend.byTenant.length > 0 && (React.createElement(React.Fragment, null,
|
|
100
|
+
React.createElement("span", { className: "ta-console-card-label" }, t('ta.console.byAccount')),
|
|
101
|
+
React.createElement("div", { className: "ta-console-shares" }, trend.byTenant.slice(0, 5).map(row => {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
const value = metric === 'tokens' ? row.tokens : row.cost;
|
|
104
|
+
const all = metric === 'tokens'
|
|
105
|
+
? trend.byTenant.reduce((sum, each) => sum + each.tokens, 0)
|
|
106
|
+
: trend.byTenant.reduce((sum, each) => sum + each.cost, 0);
|
|
107
|
+
return (React.createElement("button", { key: row.tenantId, type: "button", className: "ta-console-share ta-console-share-button", onClick: () => onTenant === null || onTenant === void 0 ? void 0 : onTenant(row.tenantId) },
|
|
108
|
+
React.createElement("span", { className: "ta-console-share-label ta-ellipsis" }, (_a = names.get(row.tenantId)) !== null && _a !== void 0 ? _a : row.tenantId),
|
|
109
|
+
React.createElement(Bar, { share: all > 0 ? Math.round((value / all) * 100) : 0, small: true, part: true }),
|
|
110
|
+
React.createElement("span", { className: "ta-console-share-value" }, metric === 'tokens' ? ConsoleUtil.count(value) : ((_b = ConsoleUtil.cost(value)) !== null && _b !== void 0 ? _b : '—'))));
|
|
111
|
+
})))),
|
|
112
|
+
trend && trend.stale.length > 0 && React.createElement("p", { className: "ta-list-hint" }, t('ta.console.stale', { count: trend.stale.length })),
|
|
113
|
+
total === 0 && trend && React.createElement("p", { className: "ta-list-hint" }, t('ta.console.trendEmpty'))));
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=console-trend.js.map
|
|
@@ -10,8 +10,9 @@ import { Segmented } from '../components/settings-controls.js';
|
|
|
10
10
|
import { WorkbenchToggle } from '../components/workbench-toggle.js';
|
|
11
11
|
import { useNotices, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
12
12
|
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
13
|
-
import { LimitsForm, REFRESH_MS, SectionTitle, Stat,
|
|
13
|
+
import { LimitsForm, REFRESH_MS, SectionTitle, Stat, usePolled } from './console-parts.js';
|
|
14
14
|
import { TenantDetail, TenantRow } from './console-tenant.js';
|
|
15
|
+
import { TrendCard } from './console-trend.js';
|
|
15
16
|
import { ConsoleUtil } from './console-util.js';
|
|
16
17
|
const FILTERS = [
|
|
17
18
|
{ value: 'all', label: 'ta.console.filterAll' },
|
|
@@ -32,6 +33,7 @@ const ACTIONS = {
|
|
|
32
33
|
setSuspended: 'ta.console.auditSuspend',
|
|
33
34
|
setDefaultLimits: 'ta.console.auditDefaults',
|
|
34
35
|
setRole: 'ta.console.auditRole',
|
|
36
|
+
setEgressHosts: 'ta.console.auditEgress',
|
|
35
37
|
allow: 'ta.console.auditAllow',
|
|
36
38
|
dismiss: 'ta.console.auditDismiss',
|
|
37
39
|
disallow: 'ta.console.auditDisallow',
|
|
@@ -145,6 +147,40 @@ function Audit() {
|
|
|
145
147
|
entry.detail)),
|
|
146
148
|
React.createElement("span", { className: "ta-console-activity-time" }, ConsoleUtil.ago(entry.at, language)))))));
|
|
147
149
|
}
|
|
150
|
+
/** The hosts members' sandboxes may reach through the gateway, one a line; owners change them. */
|
|
151
|
+
function Egress({ info, onChanged }) {
|
|
152
|
+
const t = useT();
|
|
153
|
+
const [, bench] = useWorkbench();
|
|
154
|
+
const [, notices] = useNotices();
|
|
155
|
+
const { egress } = info.policy;
|
|
156
|
+
const owner = info.role === 'owner';
|
|
157
|
+
const saved = egress.hosts.join('\n');
|
|
158
|
+
const [draft, setDraft] = React.useState(saved);
|
|
159
|
+
const [busy, setBusy] = React.useState(false);
|
|
160
|
+
React.useEffect(() => setDraft(saved), [saved]);
|
|
161
|
+
if (!egress.enabled) {
|
|
162
|
+
return React.createElement("p", { className: "ta-list-hint" }, t('ta.console.egressOff'));
|
|
163
|
+
}
|
|
164
|
+
const save = () => {
|
|
165
|
+
setBusy(true);
|
|
166
|
+
void bench.gateway
|
|
167
|
+
.setEgressHosts(draft.split(/[\s,]+/).filter(Boolean))
|
|
168
|
+
.then(() => notices.notify(t('ta.console.saved'), { level: 'success' }))
|
|
169
|
+
.then(onChanged)
|
|
170
|
+
.catch(error => notices.error(error))
|
|
171
|
+
.finally(() => setBusy(false));
|
|
172
|
+
};
|
|
173
|
+
return (React.createElement(React.Fragment, null,
|
|
174
|
+
React.createElement("div", { className: "ta-console-card ta-console-egress" },
|
|
175
|
+
React.createElement("div", { className: "ta-console-limit-text" },
|
|
176
|
+
React.createElement("span", null, t('ta.console.egressHosts')),
|
|
177
|
+
React.createElement("span", { className: "ta-console-limit-hint" }, t('ta.console.egressHostsHint'))),
|
|
178
|
+
React.createElement("textarea", { className: "ta-input ta-console-hosts", rows: 4, value: draft, readOnly: !owner, spellCheck: false, placeholder: t('ta.console.egressHostsPlaceholder'), "aria-label": t('ta.console.egressHosts'), onChange: event => setDraft(event.target.value) }),
|
|
179
|
+
owner && (React.createElement("div", { className: "ta-console-actions ta-console-form-actions" },
|
|
180
|
+
React.createElement("button", { type: "button", className: "ta-button", disabled: draft === saved || busy, onClick: () => setDraft(saved) }, t('ta.console.reset')),
|
|
181
|
+
React.createElement("button", { type: "button", className: "ta-button ta-primary", disabled: draft === saved || busy, onClick: save }, busy ? React.createElement("span", { className: "ta-spinner" }) : t('ta.console.save'))))),
|
|
182
|
+
React.createElement("p", { className: "ta-list-hint" }, egress.networks.length > 0 ? t('ta.console.egressNetworks', { networks: egress.networks.join(', ') }) : t('ta.console.egressHint'))));
|
|
183
|
+
}
|
|
148
184
|
function Policy({ info, onChanged }) {
|
|
149
185
|
const t = useT();
|
|
150
186
|
const [, bench] = useWorkbench();
|
|
@@ -166,6 +202,8 @@ function Policy({ info, onChanged }) {
|
|
|
166
202
|
React.createElement("span", { className: "ta-console-tenant-name ta-ellipsis" }, provider.name || provider.id),
|
|
167
203
|
React.createElement("span", { className: "ta-console-tenant-state" }, t('ta.console.modelsOf', { api: provider.api, count: provider.models }))))))),
|
|
168
204
|
React.createElement("p", { className: "ta-list-hint" }, t('ta.console.modelsHint')))),
|
|
205
|
+
React.createElement(SectionTitle, null, t('ta.console.egress')),
|
|
206
|
+
React.createElement(Egress, { info: info, onChanged: onChanged }),
|
|
169
207
|
React.createElement(SectionTitle, null, t('ta.console.managers')),
|
|
170
208
|
React.createElement("div", { className: "ta-list-group" }, info.policy.admins.map(admin => (React.createElement("div", { key: admin.account, className: "ta-console-audit" },
|
|
171
209
|
React.createElement("span", { className: "ta-console-audit-text ta-ellipsis" },
|