@celljs/ta-web 4.34.0 → 4.36.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/apps/app-icon.d.ts +23 -0
- package/esm/browser/apps/app-icon.js +98 -0
- package/esm/browser/apps/app-settings.d.ts +6 -0
- package/esm/browser/apps/app-settings.js +67 -0
- package/esm/browser/apps/app-window-util.d.ts +23 -0
- package/esm/browser/apps/app-window-util.js +27 -0
- package/esm/browser/apps/app-window.d.ts +9 -0
- package/esm/browser/apps/app-window.js +90 -0
- package/esm/browser/apps/web-apps.d.ts +29 -0
- package/esm/browser/apps/web-apps.js +57 -0
- package/esm/browser/assistant/assistant-thread.js +2 -2
- package/esm/browser/assistant/call-keeper.d.ts +2 -5
- package/esm/browser/assistant/call-keeper.js +7 -11
- package/esm/browser/assistant/mic-capture.d.ts +34 -0
- package/esm/browser/assistant/mic-capture.js +87 -0
- package/esm/browser/assistant/realtime-voice.d.ts +2 -2
- package/esm/browser/assistant/realtime-voice.js +6 -15
- package/esm/browser/components/access-settings.d.ts +6 -0
- package/esm/browser/components/access-settings.js +52 -0
- package/esm/browser/components/app-root.d.ts +6 -0
- package/esm/browser/components/app-root.js +34 -0
- package/esm/browser/components/app-view.d.ts +8 -2
- package/esm/browser/components/app-view.js +1 -25
- package/esm/browser/components/board.d.ts +2 -2
- package/esm/browser/components/board.js +2 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-hooks.d.ts +12 -0
- package/esm/browser/components/composer-box-hooks.js +12 -0
- package/esm/browser/components/composer-box-protocol.d.ts +12 -1
- package/esm/browser/components/composer-box.js +14 -11
- package/esm/browser/components/composer.js +69 -3
- package/esm/browser/components/extension-settings.d.ts +7 -0
- package/esm/browser/components/extension-settings.js +32 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/message-list.js +3 -3
- package/esm/browser/components/message-steps.js +3 -3
- package/esm/browser/components/phone-shell.d.ts +2 -2
- package/esm/browser/components/request-error.d.ts +9 -0
- package/esm/browser/components/request-error.js +21 -0
- package/esm/browser/components/settings-more.js +13 -24
- package/esm/browser/components/storage-settings.d.ts +17 -0
- package/esm/browser/components/storage-settings.js +145 -0
- package/esm/browser/device/screen-awake.d.ts +16 -0
- package/esm/browser/device/screen-awake.js +37 -0
- package/esm/browser/device/sheet-swipe.js +4 -0
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-access.d.ts +16 -0
- package/esm/browser/extension/web-access.js +75 -0
- package/esm/browser/extension/web-api-contributions.d.ts +6 -7
- package/esm/browser/extension/web-api-desktop.d.ts +23 -0
- package/esm/browser/extension/web-api-spec.d.ts +70 -0
- package/esm/browser/extension/web-api-spec.js +225 -0
- package/esm/browser/extension/web-api-targets.d.ts +11 -0
- package/esm/browser/extension/web-api-targets.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +11 -1
- package/esm/browser/extension/web-extension-context.d.ts +3 -2
- package/esm/browser/extension/web-extension-context.js +22 -17
- package/esm/browser/extension/web-extension-run.d.ts +8 -1
- package/esm/browser/extension/web-extension-run.js +37 -0
- package/esm/browser/extension/web-extensions-running.d.ts +20 -1
- package/esm/browser/extension/web-extensions-running.js +107 -9
- package/esm/browser/extension/web-extensions.js +1 -0
- package/esm/browser/extension/web-pages.d.ts +5 -0
- package/esm/browser/extension/web-pages.js +3 -0
- package/esm/browser/game/game-control.d.ts +6 -0
- package/esm/browser/game/game-control.js +28 -0
- package/esm/browser/game/game-host.d.ts +9 -2
- package/esm/browser/game/game-host.js +5 -1
- package/esm/browser/game/game-protocol.d.ts +8 -0
- package/esm/browser/game/game-runner.d.ts +7 -1
- package/esm/browser/game/game-runner.js +24 -2
- package/esm/browser/game/game-target.d.ts +22 -0
- package/esm/browser/game/game-target.js +84 -0
- package/esm/browser/game/game-util.d.ts +2 -0
- package/esm/browser/game/game-util.js +2 -0
- package/esm/browser/game/game-view.d.ts +5 -2
- package/esm/browser/game/game-view.js +4 -4
- package/esm/browser/game/game3d-protocol.d.ts +3 -1
- package/esm/browser/game/game3d-runner.d.ts +6 -1
- package/esm/browser/game/game3d-runner.js +26 -2
- package/esm/browser/i18n/en/chat.d.ts +4 -0
- package/esm/browser/i18n/en/chat.js +4 -0
- package/esm/browser/i18n/en/common.d.ts +1 -0
- package/esm/browser/i18n/en/common.js +1 -0
- package/esm/browser/i18n/en/discover.d.ts +11 -0
- package/esm/browser/i18n/en/discover.js +11 -0
- package/esm/browser/i18n/en/settings.d.ts +43 -0
- package/esm/browser/i18n/en/settings.js +43 -0
- package/esm/browser/i18n/ja/chat.js +4 -0
- package/esm/browser/i18n/ja/common.js +1 -0
- package/esm/browser/i18n/ja/discover.js +11 -0
- package/esm/browser/i18n/ja/settings.js +43 -0
- package/esm/browser/i18n/locales.d.ts +60 -3
- package/esm/browser/i18n/messages.d.ts +59 -2
- package/esm/browser/i18n/zh/chat.js +4 -0
- package/esm/browser/i18n/zh/common.js +1 -0
- package/esm/browser/i18n/zh/discover.js +11 -0
- package/esm/browser/i18n/zh/settings.js +43 -0
- package/esm/browser/i18n/zh-tw/chat.js +4 -0
- package/esm/browser/i18n/zh-tw/common.js +1 -0
- package/esm/browser/i18n/zh-tw/discover.js +11 -0
- package/esm/browser/i18n/zh-tw/settings.js +43 -0
- package/esm/browser/index.d.ts +3 -0
- package/esm/browser/index.js +3 -0
- package/esm/browser/notices/notices.js +1 -0
- package/esm/browser/sandbox/channel/channel.d.ts +56 -0
- package/esm/browser/sandbox/channel/channel.js +124 -0
- package/esm/browser/sandbox/channel/codec.d.ts +80 -0
- package/esm/browser/sandbox/channel/codec.js +251 -0
- package/esm/browser/sandbox/hook-host.d.ts +23 -0
- package/esm/browser/sandbox/hook-host.js +61 -0
- package/esm/browser/sandbox/isolated-host.d.ts +105 -0
- package/esm/browser/sandbox/isolated-host.js +395 -0
- package/esm/browser/sandbox/remote/remote-copy.d.ts +57 -0
- package/esm/browser/sandbox/remote/remote-copy.js +318 -0
- package/esm/browser/sandbox/remote/remote-mirror.d.ts +61 -0
- package/esm/browser/sandbox/remote/remote-mirror.js +341 -0
- package/esm/browser/sandbox/remote/remote-protocol.d.ts +79 -0
- package/esm/browser/sandbox/remote/remote-protocol.js +54 -0
- package/esm/browser/sandbox/remote/remote-styles.d.ts +10 -0
- package/esm/browser/sandbox/remote/remote-styles.js +113 -0
- package/esm/browser/sandbox/remote-root.d.ts +11 -0
- package/esm/browser/sandbox/remote-root.js +81 -0
- package/esm/browser/sandbox/runtime/frame-api.d.ts +28 -0
- package/esm/browser/sandbox/runtime/frame-api.js +147 -0
- package/esm/browser/sandbox/runtime/frame-features.d.ts +6 -0
- package/esm/browser/sandbox/runtime/frame-features.js +50 -0
- package/esm/browser/sandbox/runtime/frame-parts.d.ts +36 -0
- package/esm/browser/sandbox/runtime/frame-parts.js +69 -0
- package/esm/browser/sandbox/runtime/frame-roots.d.ts +26 -0
- package/esm/browser/sandbox/runtime/frame-roots.js +76 -0
- package/esm/browser/sandbox/runtime/frame-store.d.ts +9 -0
- package/esm/browser/sandbox/runtime/frame-store.js +18 -0
- package/esm/browser/sandbox/runtime/sandbox-runtime.d.ts +11 -0
- package/esm/browser/sandbox/runtime/sandbox-runtime.js +45 -0
- package/esm/browser/sandbox/sandbox-features.d.ts +25 -0
- package/esm/browser/sandbox/sandbox-features.js +32 -0
- package/esm/browser/sandbox/sandbox-frame.d.ts +21 -0
- package/esm/browser/sandbox/sandbox-frame.js +75 -0
- package/esm/browser/sandbox/sandbox-guards.d.ts +19 -0
- package/esm/browser/sandbox/sandbox-guards.js +74 -0
- package/esm/browser/sandbox/sandbox-protocol.d.ts +57 -0
- package/esm/browser/sandbox/sandbox-protocol.js +49 -0
- package/esm/browser/sandbox/sandbox-runtime-code.d.ts +1 -0
- package/esm/browser/sandbox/sandbox-runtime-code.js +3 -0
- package/esm/browser/sandbox/web-sandbox.d.ts +28 -0
- package/esm/browser/sandbox/web-sandbox.js +44 -0
- package/esm/browser/settings/agent-settings.js +5 -1
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +4 -0
- package/esm/browser/style/tints.d.ts +2 -0
- package/esm/browser/style/tints.js +10 -0
- package/esm/browser/targets/targets-protocol.d.ts +54 -0
- package/esm/browser/targets/targets-protocol.js +34 -0
- package/esm/browser/targets/targets.d.ts +13 -0
- package/esm/browser/targets/targets.js +64 -0
- package/esm/browser/util/composer.d.ts +4 -2
- package/esm/browser/util/composer.js +7 -1
- package/esm/browser/util/desktop.d.ts +31 -1
- package/esm/browser/util/desktop.js +20 -0
- package/esm/browser/util/message.d.ts +6 -0
- package/esm/browser/util/message.js +21 -0
- package/esm/browser/util/process.d.ts +1 -0
- package/esm/browser/util/process.js +6 -1
- package/esm/browser/util/progress.d.ts +2 -1
- package/esm/browser/util/progress.js +2 -11
- package/esm/browser/view.js +1 -1
- package/lib/browser/apps/app-icon.d.ts +24 -0
- package/lib/browser/apps/app-icon.js +134 -0
- package/lib/browser/apps/app-settings.d.ts +7 -0
- package/lib/browser/apps/app-settings.js +103 -0
- package/lib/browser/apps/app-window-util.d.ts +24 -0
- package/lib/browser/apps/app-window-util.js +30 -0
- package/lib/browser/apps/app-window.d.ts +10 -0
- package/lib/browser/apps/app-window.js +126 -0
- package/lib/browser/apps/web-apps.d.ts +30 -0
- package/lib/browser/apps/web-apps.js +61 -0
- package/lib/browser/assistant/assistant-thread.js +2 -2
- package/lib/browser/assistant/call-keeper.d.ts +2 -5
- package/lib/browser/assistant/call-keeper.js +6 -10
- package/lib/browser/assistant/mic-capture.d.ts +35 -0
- package/lib/browser/assistant/mic-capture.js +91 -0
- package/lib/browser/assistant/realtime-voice.d.ts +2 -2
- package/lib/browser/assistant/realtime-voice.js +6 -15
- package/lib/browser/components/access-settings.d.ts +7 -0
- package/lib/browser/components/access-settings.js +88 -0
- package/lib/browser/components/app-root.d.ts +7 -0
- package/lib/browser/components/app-root.js +70 -0
- package/lib/browser/components/app-view.d.ts +8 -2
- package/lib/browser/components/app-view.js +1 -25
- package/lib/browser/components/board.d.ts +2 -2
- package/lib/browser/components/board.js +2 -2
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-hooks.d.ts +12 -0
- package/lib/browser/components/composer-box-hooks.js +13 -0
- package/lib/browser/components/composer-box-protocol.d.ts +12 -1
- package/lib/browser/components/composer-box.js +13 -10
- package/lib/browser/components/composer.js +69 -3
- package/lib/browser/components/extension-settings.d.ts +8 -0
- package/lib/browser/components/extension-settings.js +69 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/message-list.js +3 -3
- package/lib/browser/components/message-steps.js +3 -3
- package/lib/browser/components/phone-shell.d.ts +2 -2
- package/lib/browser/components/request-error.d.ts +10 -0
- package/lib/browser/components/request-error.js +57 -0
- package/lib/browser/components/settings-more.js +12 -23
- package/lib/browser/components/storage-settings.d.ts +18 -0
- package/lib/browser/components/storage-settings.js +182 -0
- package/lib/browser/device/screen-awake.d.ts +16 -0
- package/lib/browser/device/screen-awake.js +39 -1
- package/lib/browser/device/sheet-swipe.js +4 -0
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-access.d.ts +17 -0
- package/lib/browser/extension/web-access.js +78 -0
- package/lib/browser/extension/web-api-contributions.d.ts +6 -7
- package/lib/browser/extension/web-api-desktop.d.ts +23 -0
- package/lib/browser/extension/web-api-spec.d.ts +71 -0
- package/lib/browser/extension/web-api-spec.js +228 -0
- package/lib/browser/extension/web-api-targets.d.ts +12 -0
- package/lib/browser/extension/web-api-targets.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +11 -1
- package/lib/browser/extension/web-extension-context.d.ts +3 -2
- package/lib/browser/extension/web-extension-context.js +22 -17
- package/lib/browser/extension/web-extension-run.d.ts +8 -1
- package/lib/browser/extension/web-extension-run.js +37 -0
- package/lib/browser/extension/web-extensions-running.d.ts +20 -1
- package/lib/browser/extension/web-extensions-running.js +107 -9
- package/lib/browser/extension/web-extensions.js +1 -0
- package/lib/browser/extension/web-pages.d.ts +5 -0
- package/lib/browser/extension/web-pages.js +3 -0
- package/lib/browser/game/game-control.d.ts +6 -0
- package/lib/browser/game/game-control.js +28 -0
- package/lib/browser/game/game-host.d.ts +9 -2
- package/lib/browser/game/game-host.js +5 -1
- package/lib/browser/game/game-protocol.d.ts +8 -0
- package/lib/browser/game/game-runner.d.ts +7 -1
- package/lib/browser/game/game-runner.js +24 -2
- package/lib/browser/game/game-target.d.ts +23 -0
- package/lib/browser/game/game-target.js +87 -0
- package/lib/browser/game/game-util.d.ts +2 -0
- package/lib/browser/game/game-util.js +2 -0
- package/lib/browser/game/game-view.d.ts +5 -2
- package/lib/browser/game/game-view.js +4 -4
- package/lib/browser/game/game3d-protocol.d.ts +3 -1
- package/lib/browser/game/game3d-runner.d.ts +6 -1
- package/lib/browser/game/game3d-runner.js +26 -2
- package/lib/browser/i18n/en/chat.d.ts +4 -0
- package/lib/browser/i18n/en/chat.js +4 -0
- package/lib/browser/i18n/en/common.d.ts +1 -0
- package/lib/browser/i18n/en/common.js +1 -0
- package/lib/browser/i18n/en/discover.d.ts +11 -0
- package/lib/browser/i18n/en/discover.js +11 -0
- package/lib/browser/i18n/en/settings.d.ts +43 -0
- package/lib/browser/i18n/en/settings.js +43 -0
- package/lib/browser/i18n/ja/chat.js +4 -0
- package/lib/browser/i18n/ja/common.js +1 -0
- package/lib/browser/i18n/ja/discover.js +11 -0
- package/lib/browser/i18n/ja/settings.js +43 -0
- package/lib/browser/i18n/locales.d.ts +60 -3
- package/lib/browser/i18n/messages.d.ts +59 -2
- package/lib/browser/i18n/zh/chat.js +4 -0
- package/lib/browser/i18n/zh/common.js +1 -0
- package/lib/browser/i18n/zh/discover.js +11 -0
- package/lib/browser/i18n/zh/settings.js +43 -0
- package/lib/browser/i18n/zh-tw/chat.js +4 -0
- package/lib/browser/i18n/zh-tw/common.js +1 -0
- package/lib/browser/i18n/zh-tw/discover.js +11 -0
- package/lib/browser/i18n/zh-tw/settings.js +43 -0
- package/lib/browser/index.d.ts +3 -0
- package/lib/browser/index.js +3 -0
- package/lib/browser/notices/notices.js +1 -0
- package/lib/browser/sandbox/channel/channel.d.ts +57 -0
- package/lib/browser/sandbox/channel/channel.js +128 -0
- package/lib/browser/sandbox/channel/codec.d.ts +81 -0
- package/lib/browser/sandbox/channel/codec.js +256 -0
- package/lib/browser/sandbox/hook-host.d.ts +24 -0
- package/lib/browser/sandbox/hook-host.js +98 -0
- package/lib/browser/sandbox/isolated-host.d.ts +106 -0
- package/lib/browser/sandbox/isolated-host.js +432 -0
- package/lib/browser/sandbox/remote/remote-copy.d.ts +58 -0
- package/lib/browser/sandbox/remote/remote-copy.js +322 -0
- package/lib/browser/sandbox/remote/remote-mirror.d.ts +62 -0
- package/lib/browser/sandbox/remote/remote-mirror.js +345 -0
- package/lib/browser/sandbox/remote/remote-protocol.d.ts +80 -0
- package/lib/browser/sandbox/remote/remote-protocol.js +57 -0
- package/lib/browser/sandbox/remote/remote-styles.d.ts +11 -0
- package/lib/browser/sandbox/remote/remote-styles.js +116 -0
- package/lib/browser/sandbox/remote-root.d.ts +12 -0
- package/lib/browser/sandbox/remote-root.js +117 -0
- package/lib/browser/sandbox/runtime/frame-api.d.ts +29 -0
- package/lib/browser/sandbox/runtime/frame-api.js +183 -0
- package/lib/browser/sandbox/runtime/frame-features.d.ts +7 -0
- package/lib/browser/sandbox/runtime/frame-features.js +53 -0
- package/lib/browser/sandbox/runtime/frame-parts.d.ts +37 -0
- package/lib/browser/sandbox/runtime/frame-parts.js +106 -0
- package/lib/browser/sandbox/runtime/frame-roots.d.ts +27 -0
- package/lib/browser/sandbox/runtime/frame-roots.js +113 -0
- package/lib/browser/sandbox/runtime/frame-store.d.ts +10 -0
- package/lib/browser/sandbox/runtime/frame-store.js +22 -0
- package/lib/browser/sandbox/runtime/sandbox-runtime.d.ts +12 -0
- package/lib/browser/sandbox/runtime/sandbox-runtime.js +47 -0
- package/lib/browser/sandbox/sandbox-features.d.ts +26 -0
- package/lib/browser/sandbox/sandbox-features.js +35 -0
- package/lib/browser/sandbox/sandbox-frame.d.ts +22 -0
- package/lib/browser/sandbox/sandbox-frame.js +79 -0
- package/lib/browser/sandbox/sandbox-guards.d.ts +20 -0
- package/lib/browser/sandbox/sandbox-guards.js +77 -0
- package/lib/browser/sandbox/sandbox-protocol.d.ts +58 -0
- package/lib/browser/sandbox/sandbox-protocol.js +52 -0
- package/lib/browser/sandbox/sandbox-runtime-code.d.ts +2 -0
- package/lib/browser/sandbox/sandbox-runtime-code.js +6 -0
- package/lib/browser/sandbox/web-sandbox.d.ts +29 -0
- package/lib/browser/sandbox/web-sandbox.js +47 -0
- package/lib/browser/settings/agent-settings.js +5 -1
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +4 -0
- package/lib/browser/style/tints.d.ts +2 -0
- package/lib/browser/style/tints.js +10 -0
- package/lib/browser/targets/targets-protocol.d.ts +55 -0
- package/lib/browser/targets/targets-protocol.js +37 -0
- package/lib/browser/targets/targets.d.ts +14 -0
- package/lib/browser/targets/targets.js +67 -0
- package/lib/browser/util/composer.d.ts +4 -2
- package/lib/browser/util/composer.js +7 -1
- package/lib/browser/util/desktop.d.ts +31 -1
- package/lib/browser/util/desktop.js +20 -0
- package/lib/browser/util/message.d.ts +6 -0
- package/lib/browser/util/message.js +21 -0
- package/lib/browser/util/process.d.ts +1 -0
- package/lib/browser/util/process.js +6 -1
- package/lib/browser/util/progress.d.ts +2 -1
- package/lib/browser/util/progress.js +2 -11
- package/lib/browser/view.js +2 -2
- package/package.json +8 -8
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TargetInfo, TargetObservation } from '@celljs/ta-protocol';
|
|
2
|
+
import { type TargetSpec, TaTargets } from './targets-protocol';
|
|
3
|
+
/** The targets of the page (TaTargets), the latest registered of an id in front. */
|
|
4
|
+
export declare class TaTargetsImpl implements TaTargets {
|
|
5
|
+
protected readonly specs: TargetSpec[];
|
|
6
|
+
protected readonly listeners: Set<() => void>;
|
|
7
|
+
register(spec: TargetSpec): () => void;
|
|
8
|
+
list(): TargetInfo[];
|
|
9
|
+
get(id: string): TargetSpec | undefined;
|
|
10
|
+
observe(id: string): Promise<TargetObservation | undefined>;
|
|
11
|
+
subscribe(listener: () => void): () => void;
|
|
12
|
+
protected changed(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=targets.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TaTargetsImpl = void 0;
|
|
10
|
+
const core_1 = require("@celljs/core");
|
|
11
|
+
const targets_protocol_1 = require("./targets-protocol");
|
|
12
|
+
/** The targets of the page (TaTargets), the latest registered of an id in front. */
|
|
13
|
+
let TaTargetsImpl = class TaTargetsImpl {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.specs = [];
|
|
16
|
+
this.listeners = new Set();
|
|
17
|
+
}
|
|
18
|
+
register(spec) {
|
|
19
|
+
this.specs.push(spec);
|
|
20
|
+
this.changed();
|
|
21
|
+
return () => {
|
|
22
|
+
const at = this.specs.indexOf(spec);
|
|
23
|
+
if (at >= 0) {
|
|
24
|
+
this.specs.splice(at, 1);
|
|
25
|
+
this.changed();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
list() {
|
|
30
|
+
const seen = new Set();
|
|
31
|
+
const list = [];
|
|
32
|
+
for (const spec of [...this.specs].reverse()) {
|
|
33
|
+
if (!seen.has(spec.id)) {
|
|
34
|
+
seen.add(spec.id);
|
|
35
|
+
list.push(targets_protocol_1.TargetsUtil.info(spec));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return list.reverse();
|
|
39
|
+
}
|
|
40
|
+
get(id) {
|
|
41
|
+
for (let at = this.specs.length - 1; at >= 0; at--) {
|
|
42
|
+
if (this.specs[at].id === id) {
|
|
43
|
+
return this.specs[at];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
async observe(id) {
|
|
49
|
+
const spec = this.get(id);
|
|
50
|
+
const t = Date.now();
|
|
51
|
+
return spec ? { ...(await spec.observe()), t } : undefined;
|
|
52
|
+
}
|
|
53
|
+
subscribe(listener) {
|
|
54
|
+
this.listeners.add(listener);
|
|
55
|
+
return () => this.listeners.delete(listener);
|
|
56
|
+
}
|
|
57
|
+
changed() {
|
|
58
|
+
for (const listener of this.listeners) {
|
|
59
|
+
listener();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.TaTargetsImpl = TaTargetsImpl;
|
|
64
|
+
exports.TaTargetsImpl = TaTargetsImpl = __decorate([
|
|
65
|
+
(0, core_1.Component)(targets_protocol_1.TaTargets)
|
|
66
|
+
], TaTargetsImpl);
|
|
67
|
+
//# sourceMappingURL=targets.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type TaSlashCommand } from '@celljs/ta-protocol';
|
|
2
2
|
import type { MessageId } from '../i18n/messages';
|
|
3
|
-
/** What the text at the caret asks for: a command after `/` at the start, a file after `@`. */
|
|
3
|
+
/** What the text at the caret asks for: a command after `/` at the start, what follows it after its space, a file after `@`. */
|
|
4
4
|
export interface ComposerTrigger {
|
|
5
|
-
kind: 'command' | 'file';
|
|
5
|
+
kind: 'command' | 'argument' | 'file';
|
|
6
6
|
query: string;
|
|
7
|
+
/** For an argument: the command it follows, without its `/`. */
|
|
8
|
+
command?: string;
|
|
7
9
|
/** Where the token starts (at `/` or `@`) and ends (the caret). */
|
|
8
10
|
start: number;
|
|
9
11
|
end: number;
|
|
@@ -13,6 +13,7 @@ exports.MAX_IMAGE_BYTES = 5 * 1024 * 1024;
|
|
|
13
13
|
exports.MAX_IMAGES = 8;
|
|
14
14
|
const FILE_TOKEN = /(^|\s)@([^\s@]*)$/;
|
|
15
15
|
const COMMAND_TOKEN = /^\/(\S*)$/;
|
|
16
|
+
const ARGUMENT_TOKEN = /^\/(\S+) ([^\n]*)$/;
|
|
16
17
|
/** The logic of the message box, apart from React: what a key does, what the caret is on, what is sent. */
|
|
17
18
|
var ComposerUtil;
|
|
18
19
|
(function (ComposerUtil) {
|
|
@@ -36,13 +37,18 @@ var ComposerUtil;
|
|
|
36
37
|
if (file) {
|
|
37
38
|
return { kind: 'file', query: file[2], start: caret - file[2].length - 1, end: caret };
|
|
38
39
|
}
|
|
40
|
+
const argument = ARGUMENT_TOKEN.exec(before);
|
|
41
|
+
if (argument) {
|
|
42
|
+
return { kind: 'argument', command: argument[1], query: argument[2], start: caret - argument[2].length, end: caret };
|
|
43
|
+
}
|
|
39
44
|
return undefined;
|
|
40
45
|
}
|
|
41
46
|
ComposerUtil.trigger = trigger;
|
|
42
47
|
/** The text with the token of `trigger` replaced, and where the caret goes. */
|
|
43
48
|
function replace(text, trigger, insertion) {
|
|
44
49
|
const rest = text.slice(trigger.end);
|
|
45
|
-
|
|
50
|
+
// An argument that ends in a space (`login `) asks for the next one at once.
|
|
51
|
+
const inserted = rest.startsWith(' ') || /\s$/.test(insertion) ? insertion : `${insertion} `;
|
|
46
52
|
return { text: text.slice(0, trigger.start) + inserted + rest, caret: trigger.start + inserted.length };
|
|
47
53
|
}
|
|
48
54
|
ComposerUtil.replace = replace;
|
|
@@ -3,7 +3,35 @@ export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | '
|
|
|
3
3
|
/** It lets the page open the window of a video call (window.open('about:blank', 'ta-video-call')). */
|
|
4
4
|
| 'callWindow'
|
|
5
5
|
/** It pins the window of a video call above every window, or not (callWindowPin). */
|
|
6
|
-
| 'callWindowPin'
|
|
6
|
+
| 'callWindowPin'
|
|
7
|
+
/** It installs pages as apps of the computer, each with a window of its own (docs/design/ta-install-as-app.md). */
|
|
8
|
+
| 'apps';
|
|
9
|
+
/** A page installed as an app of the computer. */
|
|
10
|
+
export interface DesktopApp {
|
|
11
|
+
/** The id of the page, as `ui.showView` takes it. */
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
installedAt: number;
|
|
15
|
+
}
|
|
16
|
+
/** What the page sends to install a page: its name, and its icon, PNGs of 1024 and of 256 pixels (AppIcon). */
|
|
17
|
+
export interface DesktopAppInstall {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
png: Uint8Array;
|
|
21
|
+
small: Uint8Array;
|
|
22
|
+
}
|
|
23
|
+
/** The pages installed as apps of the computer, by Ta Desktop (desktop-apps.ts of apps/ta-desktop). */
|
|
24
|
+
export interface DesktopApps {
|
|
25
|
+
list(): Promise<DesktopApp[]>;
|
|
26
|
+
/** `problem`: its entry of the system could not be written; the app is kept, and opens all the same. */
|
|
27
|
+
install(app: DesktopAppInstall): Promise<DesktopApp & {
|
|
28
|
+
problem?: string;
|
|
29
|
+
}>;
|
|
30
|
+
/** Its entry and icon gone, its window closed. */
|
|
31
|
+
remove(id: string): Promise<void>;
|
|
32
|
+
/** Its window in front, opened when it is not. */
|
|
33
|
+
open(id: string): Promise<void>;
|
|
34
|
+
}
|
|
7
35
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
8
36
|
export interface DesktopFileManager {
|
|
9
37
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -88,6 +116,8 @@ export declare namespace DesktopUtil {
|
|
|
88
116
|
* `pinned` is given; it keeps the choice for the next call. None outside Ta Desktop, nor in an older one.
|
|
89
117
|
*/
|
|
90
118
|
function callWindowPin(scope?: object): ((pinned?: boolean) => Promise<boolean>) | undefined;
|
|
119
|
+
/** The pages installed as apps, where Ta Desktop installs them. */
|
|
120
|
+
function apps(scope?: object): DesktopApps | undefined;
|
|
91
121
|
function browserData(scope?: object): DesktopBrowserData | undefined;
|
|
92
122
|
/** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
|
|
93
123
|
function debugWebview(scope?: object): DebugWebview | undefined;
|
|
@@ -55,6 +55,26 @@ var DesktopUtil;
|
|
|
55
55
|
return has('callWindowPin', scope) && typeof pin === 'function' ? async (pinned) => (await pin(pinned)) === true : undefined;
|
|
56
56
|
}
|
|
57
57
|
DesktopUtil.callWindowPin = callWindowPin;
|
|
58
|
+
/** The pages installed as apps, where Ta Desktop installs them. */
|
|
59
|
+
function apps(scope = globalThis) {
|
|
60
|
+
var _a;
|
|
61
|
+
var _b;
|
|
62
|
+
const { list, install, remove, open } = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.apps) !== null && _b !== void 0 ? _b : {};
|
|
63
|
+
if (!has('apps', scope) || typeof list !== 'function' || typeof install !== 'function' || typeof remove !== 'function' || typeof open !== 'function') {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
return Object.freeze({
|
|
67
|
+
list: async () => { var _a; return (_a = (await list())) !== null && _a !== void 0 ? _a : []; },
|
|
68
|
+
install: async (app) => (await install(app)),
|
|
69
|
+
remove: async (id) => {
|
|
70
|
+
await remove(id);
|
|
71
|
+
},
|
|
72
|
+
open: async (id) => {
|
|
73
|
+
await open(id);
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
DesktopUtil.apps = apps;
|
|
58
78
|
function browserData(scope = globalThis) {
|
|
59
79
|
var _a;
|
|
60
80
|
const data = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.browserData;
|
|
@@ -46,6 +46,12 @@ export declare namespace MessageUtil {
|
|
|
46
46
|
/** A call that ended because the user stopped the turn: not a failure. */
|
|
47
47
|
function cancelled(output: ToolOutput | undefined): boolean;
|
|
48
48
|
function stopReason(message: unknown): string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The last message of the user while nothing came of it yet: after it only thinking, no words and no tool
|
|
51
|
+
* called. Stopped then, it goes back into the box to change and send again (a rewind to it, as pi's
|
|
52
|
+
* `/tree`); one with images does not, since the box would lose them.
|
|
53
|
+
*/
|
|
54
|
+
function unanswered(messages: readonly SessionMessage[]): SessionMessage | undefined;
|
|
49
55
|
function blocks(message: SessionMessage): ContentBlock[];
|
|
50
56
|
function text(content: ContentBlock[] | string | undefined): string;
|
|
51
57
|
/**
|
|
@@ -26,6 +26,27 @@ var MessageUtil;
|
|
|
26
26
|
return stopReason === 'error' && errorMessage && ABORTED.test(errorMessage.trim()) ? 'aborted' : stopReason;
|
|
27
27
|
}
|
|
28
28
|
MessageUtil.stopReason = stopReason;
|
|
29
|
+
/**
|
|
30
|
+
* The last message of the user while nothing came of it yet: after it only thinking, no words and no tool
|
|
31
|
+
* called. Stopped then, it goes back into the box to change and send again (a rewind to it, as pi's
|
|
32
|
+
* `/tree`); one with images does not, since the box would lose them.
|
|
33
|
+
*/
|
|
34
|
+
function unanswered(messages) {
|
|
35
|
+
let index = messages.length - 1;
|
|
36
|
+
for (; index >= 0; index--) {
|
|
37
|
+
const { role } = messages[index];
|
|
38
|
+
if (role === 'user') {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
const done = role !== 'assistant' || blocks(messages[index]).some(block => { var _a; return block.type === 'toolCall' || (block.type === 'text' && !!((_a = block.text) === null || _a === void 0 ? void 0 : _a.trim())); });
|
|
42
|
+
if (done) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const message = messages[index];
|
|
47
|
+
return message && !blocks(message).some(block => block.type === 'image') && text(blocks(message)).trim() ? message : undefined;
|
|
48
|
+
}
|
|
49
|
+
MessageUtil.unanswered = unanswered;
|
|
29
50
|
function blocks(message) {
|
|
30
51
|
const content = message.content;
|
|
31
52
|
if (typeof content === 'string') {
|
|
@@ -106,6 +106,11 @@ var ProcessUtil;
|
|
|
106
106
|
function resumed(message) {
|
|
107
107
|
return message.customType === ta_protocol_1.TA_RESUME_MESSAGE;
|
|
108
108
|
}
|
|
109
|
+
/** The note that the network was back and it went on with the run the network stopped (TaNetworkResume). */
|
|
110
|
+
function resumedOnline(message) {
|
|
111
|
+
var _a;
|
|
112
|
+
return ((_a = message.details) === null || _a === void 0 ? void 0 : _a.reason) === 'network';
|
|
113
|
+
}
|
|
109
114
|
/** `message`, of the user, was written before `previous`, of the agent, came: while the agent worked. */
|
|
110
115
|
function writtenBefore(message, previous) {
|
|
111
116
|
const { role, timestamp } = message;
|
|
@@ -126,7 +131,7 @@ var ProcessUtil;
|
|
|
126
131
|
steps.push({ kind: 'said', key: `${start + offset}.u`, message });
|
|
127
132
|
}
|
|
128
133
|
if (resumed(message)) {
|
|
129
|
-
steps.push({ kind: 'resumed', key: `${start + offset}.r
|
|
134
|
+
steps.push({ kind: 'resumed', key: `${start + offset}.r`, ...(resumedOnline(message) ? { online: true } : {}) });
|
|
130
135
|
}
|
|
131
136
|
if (role !== 'assistant') {
|
|
132
137
|
return;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SessionState } from '@celljs/ta-client';
|
|
2
|
+
import { type TaRequestErrorReason } from '@celljs/ta-protocol';
|
|
2
3
|
import type { WebToolRendererResolver } from '../extension/web-extension-api';
|
|
3
4
|
import type { Translate } from '../i18n/use-t';
|
|
4
5
|
import { type ToolSummary } from './tool';
|
|
@@ -39,7 +40,7 @@ export type Phase = {
|
|
|
39
40
|
error?: string;
|
|
40
41
|
};
|
|
41
42
|
/** Why pi retries, read from the error of the provider: what the loading line says before its countdown. */
|
|
42
|
-
export type RetryReason =
|
|
43
|
+
export type RetryReason = TaRequestErrorReason;
|
|
43
44
|
/** Tokens of the run of now: sent to the model (each request counts its whole context) and received from it. */
|
|
44
45
|
export interface RunTokens {
|
|
45
46
|
input: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProgressUtil = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
4
5
|
const message_1 = require("./message");
|
|
5
6
|
const tool_1 = require("./tool");
|
|
6
7
|
/** pi's estimate, for what a model has not counted yet: four characters a token. */
|
|
@@ -107,17 +108,7 @@ var ProgressUtil;
|
|
|
107
108
|
ProgressUtil.brief = brief;
|
|
108
109
|
/** Why a request failed, as the provider said it: a rate limit, a model too busy, the network, or another error. */
|
|
109
110
|
function retryReason(errorMessage) {
|
|
110
|
-
|
|
111
|
-
if (/\b429\b|rate.?limit|too many requests|quota|usage limit/i.test(message)) {
|
|
112
|
-
return 'rateLimit';
|
|
113
|
-
}
|
|
114
|
-
if (/overload|\b529\b|\b503\b|capacity|unavailable/i.test(message)) {
|
|
115
|
-
return 'overloaded';
|
|
116
|
-
}
|
|
117
|
-
if (/fetch failed|network|socket|ECONN|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|timed? ?out|terminated/i.test(message)) {
|
|
118
|
-
return 'network';
|
|
119
|
-
}
|
|
120
|
-
return 'error';
|
|
111
|
+
return ta_protocol_1.TaRequestErrorUtil.reason(errorMessage);
|
|
121
112
|
}
|
|
122
113
|
ProgressUtil.retryReason = retryReason;
|
|
123
114
|
/** The seconds left of a wait of `delayMs` that began at `since`, rounded up: 0 once it is over. */
|
package/lib/browser/view.js
CHANGED
|
@@ -8,12 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.TaAppPage = void 0;
|
|
10
10
|
const react_1 = require("@celljs/react");
|
|
11
|
-
const
|
|
11
|
+
const app_root_1 = require("./components/app-root");
|
|
12
12
|
/** ta on the web: the conversations, and what the web extensions of packages add. */
|
|
13
13
|
let TaAppPage = class TaAppPage {
|
|
14
14
|
};
|
|
15
15
|
exports.TaAppPage = TaAppPage;
|
|
16
16
|
exports.TaAppPage = TaAppPage = __decorate([
|
|
17
|
-
(0, react_1.View)({ index: true, component:
|
|
17
|
+
(0, react_1.View)({ index: true, component: app_root_1.AppView })
|
|
18
18
|
], TaAppPage);
|
|
19
19
|
//# sourceMappingURL=view.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.36.0",
|
|
4
4
|
"description": "The web client of ta serve: sessions, streaming messages, tool runs with diffs, and dialogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"!**/*.map"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
30
|
+
"build": "bun scripts/sandbox-runtime.ts && tsc -b && bun ../../scripts/build-esm.ts",
|
|
31
31
|
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
32
32
|
"test": "bun test --preload reflect-metadata ./lib",
|
|
33
33
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@celljs/core": "4.
|
|
37
|
-
"@celljs/react": "4.
|
|
38
|
-
"@celljs/ta-client": "4.
|
|
39
|
-
"@celljs/ta-protocol": "4.
|
|
40
|
-
"@celljs/ta-relay": "4.
|
|
41
|
-
"@celljs/widget": "4.
|
|
36
|
+
"@celljs/core": "4.36.0",
|
|
37
|
+
"@celljs/react": "4.36.0",
|
|
38
|
+
"@celljs/ta-client": "4.36.0",
|
|
39
|
+
"@celljs/ta-protocol": "4.36.0",
|
|
40
|
+
"@celljs/ta-relay": "4.36.0",
|
|
41
|
+
"@celljs/widget": "4.36.0",
|
|
42
42
|
"@types/three": "^0.187.0",
|
|
43
43
|
"@xterm/addon-fit": "^0.11.0",
|
|
44
44
|
"@xterm/addon-unicode11": "^0.9.0",
|