@celljs/ta-web 4.33.0 → 4.35.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 +3 -1
- package/esm/browser/assistant/assistant-view.js +8 -4
- package/esm/browser/assistant/call-keeper.d.ts +2 -5
- package/esm/browser/assistant/call-keeper.js +7 -11
- 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/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/context-act.d.ts +4 -0
- package/esm/browser/components/context-act.js +8 -0
- package/esm/browser/components/context-line.d.ts +19 -0
- package/esm/browser/components/context-line.js +71 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/message-list.js +12 -6
- package/esm/browser/components/message-steps.js +1 -1
- package/esm/browser/components/session-settings.d.ts +8 -4
- package/esm/browser/components/session-settings.js +10 -5
- package/esm/browser/components/session-view.js +12 -8
- package/esm/browser/components/settings-more.js +6 -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-desktop.d.ts +23 -0
- package/esm/browser/extension/web-api-spec.d.ts +70 -0
- package/esm/browser/extension/web-api-spec.js +223 -0
- package/esm/browser/extension/web-extension-api.d.ts +6 -0
- package/esm/browser/extension/web-extension-context.js +11 -2
- package/esm/browser/extension/web-extension-run.d.ts +6 -1
- package/esm/browser/extension/web-extension-run.js +25 -0
- package/esm/browser/extension/web-extensions-running.d.ts +18 -1
- package/esm/browser/extension/web-extensions-running.js +102 -9
- package/esm/browser/extension/web-pages.d.ts +5 -0
- package/esm/browser/extension/web-pages.js +3 -0
- package/esm/browser/i18n/en/chat.d.ts +16 -2
- package/esm/browser/i18n/en/chat.js +16 -2
- 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 +54 -0
- package/esm/browser/i18n/en/settings.js +57 -3
- package/esm/browser/i18n/en/tools.d.ts +1 -0
- package/esm/browser/i18n/en/tools.js +1 -0
- package/esm/browser/i18n/ja/chat.js +16 -2
- 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 +57 -3
- package/esm/browser/i18n/ja/tools.js +1 -0
- package/esm/browser/i18n/locales.d.ts +84 -5
- package/esm/browser/i18n/messages.d.ts +83 -4
- package/esm/browser/i18n/zh/chat.js +16 -2
- 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 +57 -3
- package/esm/browser/i18n/zh/tools.js +1 -0
- package/esm/browser/i18n/zh-tw/chat.js +16 -2
- 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 +57 -3
- package/esm/browser/i18n/zh-tw/tools.js +1 -0
- package/esm/browser/index.d.ts +1 -0
- package/esm/browser/index.js +1 -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 +56 -0
- package/esm/browser/sandbox/remote/remote-copy.js +302 -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 +12 -2
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +20 -1
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +5 -0
- package/esm/browser/style/tints.d.ts +2 -0
- package/esm/browser/style/tints.js +10 -0
- package/esm/browser/util/context-view.d.ts +16 -0
- package/esm/browser/util/context-view.js +42 -0
- package/esm/browser/util/desktop.d.ts +31 -1
- package/esm/browser/util/desktop.js +20 -0
- package/esm/browser/util/progress.d.ts +4 -0
- package/esm/browser/util/progress.js +9 -3
- 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 +3 -1
- package/lib/browser/assistant/assistant-view.js +8 -4
- package/lib/browser/assistant/call-keeper.d.ts +2 -5
- package/lib/browser/assistant/call-keeper.js +6 -10
- 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/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/context-act.d.ts +5 -0
- package/lib/browser/components/context-act.js +44 -0
- package/lib/browser/components/context-line.d.ts +20 -0
- package/lib/browser/components/context-line.js +109 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/message-list.js +12 -6
- package/lib/browser/components/message-steps.js +1 -1
- package/lib/browser/components/session-settings.d.ts +8 -4
- package/lib/browser/components/session-settings.js +10 -5
- package/lib/browser/components/session-view.js +12 -8
- package/lib/browser/components/settings-more.js +6 -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-desktop.d.ts +23 -0
- package/lib/browser/extension/web-api-spec.d.ts +71 -0
- package/lib/browser/extension/web-api-spec.js +226 -0
- package/lib/browser/extension/web-extension-api.d.ts +6 -0
- package/lib/browser/extension/web-extension-context.js +11 -2
- package/lib/browser/extension/web-extension-run.d.ts +6 -1
- package/lib/browser/extension/web-extension-run.js +25 -0
- package/lib/browser/extension/web-extensions-running.d.ts +18 -1
- package/lib/browser/extension/web-extensions-running.js +102 -9
- package/lib/browser/extension/web-pages.d.ts +5 -0
- package/lib/browser/extension/web-pages.js +3 -0
- package/lib/browser/i18n/en/chat.d.ts +16 -2
- package/lib/browser/i18n/en/chat.js +16 -2
- 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 +54 -0
- package/lib/browser/i18n/en/settings.js +57 -3
- package/lib/browser/i18n/en/tools.d.ts +1 -0
- package/lib/browser/i18n/en/tools.js +1 -0
- package/lib/browser/i18n/ja/chat.js +16 -2
- 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 +57 -3
- package/lib/browser/i18n/ja/tools.js +1 -0
- package/lib/browser/i18n/locales.d.ts +84 -5
- package/lib/browser/i18n/messages.d.ts +83 -4
- package/lib/browser/i18n/zh/chat.js +16 -2
- 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 +57 -3
- package/lib/browser/i18n/zh/tools.js +1 -0
- package/lib/browser/i18n/zh-tw/chat.js +16 -2
- 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 +57 -3
- package/lib/browser/i18n/zh-tw/tools.js +1 -0
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.js +1 -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 +57 -0
- package/lib/browser/sandbox/remote/remote-copy.js +306 -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 +12 -2
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +20 -1
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +5 -0
- package/lib/browser/style/tints.d.ts +2 -0
- package/lib/browser/style/tints.js +10 -0
- package/lib/browser/util/context-view.d.ts +17 -0
- package/lib/browser/util/context-view.js +45 -0
- package/lib/browser/util/desktop.d.ts +31 -1
- package/lib/browser/util/desktop.js +20 -0
- package/lib/browser/util/progress.d.ts +4 -0
- package/lib/browser/util/progress.js +9 -3
- package/lib/browser/view.js +2 -2
- package/package.json +8 -8
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaWebApps = void 0;
|
|
4
|
+
const use_t_1 = require("../i18n/use-t");
|
|
5
|
+
const tints_1 = require("../style/tints");
|
|
6
|
+
const desktop_1 = require("../util/desktop");
|
|
7
|
+
const app_icon_1 = require("./app-icon");
|
|
8
|
+
/**
|
|
9
|
+
* `ui.apps` (docs/design/ta-install-as-app.md 2): a page installed with the title and the tile the launcher shows it
|
|
10
|
+
* with, through Ta Desktop (DesktopUtil.apps), which knows pages by id, name and icon alone.
|
|
11
|
+
*/
|
|
12
|
+
class TaWebApps {
|
|
13
|
+
constructor(desktop, host) {
|
|
14
|
+
this.desktop = desktop;
|
|
15
|
+
this.host = host;
|
|
16
|
+
}
|
|
17
|
+
/** Where Ta Desktop installs pages as apps; none elsewhere. */
|
|
18
|
+
static of(host) {
|
|
19
|
+
const desktop = desktop_1.DesktopUtil.apps();
|
|
20
|
+
return desktop ? new TaWebApps(desktop, host) : undefined;
|
|
21
|
+
}
|
|
22
|
+
get installable() {
|
|
23
|
+
return this.host.settings.state.settings.installApps;
|
|
24
|
+
}
|
|
25
|
+
async list() {
|
|
26
|
+
return (await this.desktop.list()).map(({ id, name, installedAt }) => ({ id, name, installedAt }));
|
|
27
|
+
}
|
|
28
|
+
async install(id) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const say = (0, use_t_1.translator)(this.host.settings.state.language);
|
|
31
|
+
if (!this.installable) {
|
|
32
|
+
throw new Error(say('ta.apps.off'));
|
|
33
|
+
}
|
|
34
|
+
const page = this.host.pages().find(candidate => candidate.id === id);
|
|
35
|
+
if (!page) {
|
|
36
|
+
throw new Error(say('ta.apps.gone'));
|
|
37
|
+
}
|
|
38
|
+
const tint = (_a = page.tint) !== null && _a !== void 0 ? _a : tints_1.TintUtil.of(page.extension);
|
|
39
|
+
const glyph = (_b = page.icon) !== null && _b !== void 0 ? _b : this.host.fallbackIcon;
|
|
40
|
+
const [png, small] = await Promise.all([
|
|
41
|
+
app_icon_1.AppIcon.draw(glyph, this.host.fallbackIcon, tint, app_icon_1.AppIcon.SIZE),
|
|
42
|
+
app_icon_1.AppIcon.draw(glyph, this.host.fallbackIcon, tint, app_icon_1.AppIcon.SMALL),
|
|
43
|
+
]);
|
|
44
|
+
const installed = await this.desktop.install({ id, name: page.title, png, small });
|
|
45
|
+
await this.desktop.open(id);
|
|
46
|
+
if (installed.problem) {
|
|
47
|
+
this.host.notices.notify(say('ta.apps.noEntry', { name: page.title }), { level: 'warning', detail: installed.problem });
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.host.notices.notify(say('ta.apps.installed', { name: page.title }));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
remove(id) {
|
|
54
|
+
return this.desktop.remove(id);
|
|
55
|
+
}
|
|
56
|
+
open(id) {
|
|
57
|
+
return this.desktop.open(id);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.TaWebApps = TaWebApps;
|
|
61
|
+
//# sourceMappingURL=web-apps.js.map
|
|
@@ -38,6 +38,7 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
|
38
38
|
const lucide_react_1 = require("lucide-react");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const callout_1 = require("../components/callout");
|
|
41
|
+
const context_line_1 = require("../components/context-line");
|
|
41
42
|
const conversation_scroll_util_1 = require("../components/conversation-scroll-util");
|
|
42
43
|
const icon_1 = require("../components/icon");
|
|
43
44
|
const markdown_1 = require("../components/markdown");
|
|
@@ -181,6 +182,7 @@ exports.AssistantThread = React.memo(function AssistantThread({ state, reply, ta
|
|
|
181
182
|
React.createElement(code_renderers_1.CodeAnswer.Provider, { value: answers[index] },
|
|
182
183
|
React.createElement(DoubleRow, { item: item, tools: state.tools, mood: turn ? process_1.ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn, started: started, onTask: onTask, t: t }))));
|
|
183
184
|
}),
|
|
184
|
-
status && !onHead && React.createElement("div", { className: `ta-run-line ${inSteps ? 'ta-run-steps' : ''}` }, status)
|
|
185
|
+
status && !onHead && React.createElement("div", { className: `ta-run-line ${inSteps ? 'ta-run-steps' : ''}` }, status),
|
|
186
|
+
React.createElement(context_line_1.ContextLine, { state: state }))));
|
|
185
187
|
});
|
|
186
188
|
//# sourceMappingURL=assistant-thread.js.map
|
|
@@ -43,6 +43,8 @@ const callout_1 = require("../components/callout");
|
|
|
43
43
|
const composer_1 = require("../components/composer");
|
|
44
44
|
const composer_addons_1 = require("../components/composer-addons");
|
|
45
45
|
const connection_bar_1 = require("../components/connection-bar");
|
|
46
|
+
const context_act_1 = require("../components/context-act");
|
|
47
|
+
const context_line_1 = require("../components/context-line");
|
|
46
48
|
const conversation_scroll_hooks_1 = require("../components/conversation-scroll-hooks");
|
|
47
49
|
const dialog_view_1 = require("../components/dialog-view");
|
|
48
50
|
const earlier_messages_1 = require("../components/earlier-messages");
|
|
@@ -227,7 +229,8 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
|
|
|
227
229
|
const fail = (cause) => notices.error(cause);
|
|
228
230
|
// A choice in a card of a reply answers the double's conversation, as in any conversation (session-view.tsx).
|
|
229
231
|
const answerCard = React.useCallback((text) => store.prompt(text, { streamingBehavior: 'followUp' }).then(() => undefined), [store]);
|
|
230
|
-
const
|
|
232
|
+
const contextAct = (0, context_act_1.useContextAct)(store);
|
|
233
|
+
const session = (0, session_settings_1.useSessionSettings)(bench.server, bench.settings, store, state, t, fail, contextAct);
|
|
231
234
|
// Its own directory, which its tools work in; its tasks open in the default one.
|
|
232
235
|
const cwd = (_c = (_a = workbench.sessions.find(open => open.sessionId === store.sessionId)) === null || _a === void 0 ? void 0 : _a.cwd) !== null && _c !== void 0 ? _c : (_b = workbench.server) === null || _b === void 0 ? void 0 : _b.cwd;
|
|
233
236
|
const messageActions = (0, message_actions_1.useMessageActions)(store, bench.server, state.working, cwd, box, () => undefined);
|
|
@@ -344,9 +347,10 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
|
|
|
344
347
|
React.createElement(ta_avatar_1.TaAvatar, { mood: mood, size: 112, className: "ta-hero-avatar", roam: true }),
|
|
345
348
|
React.createElement("h1", null, t('ta.assistant.hello')),
|
|
346
349
|
React.createElement(hero_cards_1.HeroSteps, { steps: STEPS }),
|
|
347
|
-
React.createElement(hero_cards_1.HeroCards, { suggestions: SUGGESTIONS, onPick: send }))) : (React.createElement(
|
|
348
|
-
React.createElement(
|
|
349
|
-
React.createElement(
|
|
350
|
+
React.createElement(hero_cards_1.HeroCards, { suggestions: SUGGESTIONS, onPick: send }))) : (React.createElement(context_line_1.ContextActions.Provider, { value: contextAct },
|
|
351
|
+
React.createElement(message_footer_1.MessageActions.Provider, { value: messageActions },
|
|
352
|
+
React.createElement(message_images_1.MessageImages.Provider, { value: images },
|
|
353
|
+
React.createElement(assistant_thread_1.AssistantThread, { state: state, reply: answerCard, tasks: allTasks, origin: assistant.sessionFile, rows: rows, onTask: openTask, t: t }))))))),
|
|
350
354
|
React.createElement("div", { className: "ta-composer-area" },
|
|
351
355
|
React.createElement("div", { className: "ta-chat-col" },
|
|
352
356
|
asks.map(ask => (React.createElement("div", { key: ask.id, className: "ta-attention" },
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ScreenAwake } from '../device/screen-awake';
|
|
2
1
|
import { type StateSpec, TaState } from '../state/state-protocol';
|
|
3
2
|
import type { VoiceCall } from './voice-call';
|
|
4
3
|
import type { CallPhase } from './voice-call-protocol';
|
|
@@ -139,10 +138,8 @@ export declare class TaCallKeeperImpl implements TaCallKeeper {
|
|
|
139
138
|
/** Follows the call shared: another page asked this one's to hang up, or one went on or ended elsewhere. */
|
|
140
139
|
protected follow(): void;
|
|
141
140
|
protected drop(): void;
|
|
142
|
-
/**
|
|
143
|
-
protected
|
|
144
|
-
/** The screen stays on while a call goes on: locked, the device stops hearing the user. */
|
|
145
|
-
protected readonly awake: ScreenAwake;
|
|
141
|
+
/** Held while a call goes on: the screen stays on (locked, the device stops hearing the user), Ta Desktop awake. */
|
|
142
|
+
protected letAwakeGo?: () => void;
|
|
146
143
|
protected changed(): void;
|
|
147
144
|
}
|
|
148
145
|
//# sourceMappingURL=call-keeper.d.ts.map
|
|
@@ -14,7 +14,6 @@ const core_1 = require("@celljs/core");
|
|
|
14
14
|
const device_protocol_1 = require("../device/device-protocol");
|
|
15
15
|
const screen_awake_1 = require("../device/screen-awake");
|
|
16
16
|
const state_protocol_1 = require("../state/state-protocol");
|
|
17
|
-
const desktop_1 = require("../util/desktop");
|
|
18
17
|
const call_window_1 = require("../video-call/call-window");
|
|
19
18
|
exports.TaCallKeeper = Symbol('TaCallKeeper');
|
|
20
19
|
var CallKeeperUtil;
|
|
@@ -93,10 +92,6 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
|
|
|
93
92
|
/** This page, as the call it shares says (SharedCall.page). */
|
|
94
93
|
this.page = Math.random().toString(36).slice(2, 10);
|
|
95
94
|
this.sharedAt = 0;
|
|
96
|
-
/** What Ta Desktop was told last: whether a call goes on. */
|
|
97
|
-
this.told = false;
|
|
98
|
-
/** The screen stays on while a call goes on: locked, the device stops hearing the user. */
|
|
99
|
-
this.awake = new screen_awake_1.ScreenAwake();
|
|
100
95
|
}
|
|
101
96
|
get kept() {
|
|
102
97
|
return this.current;
|
|
@@ -295,12 +290,13 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
|
|
|
295
290
|
this.viewless = false;
|
|
296
291
|
}
|
|
297
292
|
changed() {
|
|
298
|
-
var _a;
|
|
299
293
|
const calling = this.current !== undefined;
|
|
300
|
-
if (calling
|
|
301
|
-
this.
|
|
302
|
-
|
|
303
|
-
|
|
294
|
+
if (calling && !this.letAwakeGo) {
|
|
295
|
+
this.letAwakeGo = screen_awake_1.KeepAwake.shared.hold();
|
|
296
|
+
}
|
|
297
|
+
else if (!calling && this.letAwakeGo) {
|
|
298
|
+
this.letAwakeGo();
|
|
299
|
+
this.letAwakeGo = undefined;
|
|
304
300
|
}
|
|
305
301
|
for (const listener of [...this.listeners]) {
|
|
306
302
|
listener();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RowEntry } from './settings-controls';
|
|
2
|
+
/**
|
|
3
|
+
* The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
|
|
4
|
+
* they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAccessRows(): RowEntry[];
|
|
7
|
+
//# sourceMappingURL=access-settings.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useAccessRows = useAccessRows;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const hooks_1 = require("../hooks");
|
|
39
|
+
const use_t_1 = require("../i18n/use-t");
|
|
40
|
+
const sandbox_protocol_1 = require("../sandbox/sandbox-protocol");
|
|
41
|
+
const settings_controls_1 = require("./settings-controls");
|
|
42
|
+
const TRUSTS = ['off', 'browser', 'ask', 'all'];
|
|
43
|
+
/** How far packages of others are trusted, read from ta serve: undefined until read. */
|
|
44
|
+
function useTrust() {
|
|
45
|
+
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
46
|
+
const [trust, setTrust] = React.useState();
|
|
47
|
+
const [, notices] = (0, hooks_1.useNotices)();
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
if (workbench.status === 'online') {
|
|
50
|
+
bench.packages.getAccessTrust().then(setTrust, () => undefined);
|
|
51
|
+
}
|
|
52
|
+
}, [workbench.status, bench]);
|
|
53
|
+
const set = React.useCallback((next) => {
|
|
54
|
+
setTrust(next);
|
|
55
|
+
bench.packages
|
|
56
|
+
.setAccessTrust(next)
|
|
57
|
+
.then(() => bench.packages.listWebExtensions())
|
|
58
|
+
.catch(error => {
|
|
59
|
+
// One let in without the switch of the team (extensions.trust): told why, with a way to ask for it.
|
|
60
|
+
notices.error(error);
|
|
61
|
+
bench.packages.getAccessTrust().then(setTrust, () => undefined);
|
|
62
|
+
});
|
|
63
|
+
}, [bench, notices]);
|
|
64
|
+
return [trust, set];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
|
|
68
|
+
* they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
|
|
69
|
+
*/
|
|
70
|
+
function useAccessRows() {
|
|
71
|
+
const t = (0, use_t_1.useT)();
|
|
72
|
+
const [trust, setTrust] = useTrust();
|
|
73
|
+
const [options, setOptions] = (0, hooks_1.usePersisted)(sandbox_protocol_1.SandboxOptionsUtil.SPEC);
|
|
74
|
+
const option = (key, label, description) => (0, settings_controls_1.row)(`sandbox-${key}`, [label, description], React.createElement(settings_controls_1.Row, { label: label, description: description },
|
|
75
|
+
React.createElement(settings_controls_1.Switch, { label: label, checked: options[key], onChange: checked => setOptions({ ...options, [key]: checked }) })));
|
|
76
|
+
return [
|
|
77
|
+
(0, settings_controls_1.row)('access-trust', [t('ta.settings.trust'), t('ta.settings.trustDescription')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.trust'), description: t(`ta.settings.trust.${trust !== null && trust !== void 0 ? trust : 'ask'}Hint`), stacked: true },
|
|
78
|
+
React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.trust'), value: trust !== null && trust !== void 0 ? trust : '', choices: TRUSTS.map(value => ({ value, label: t(`ta.settings.trust.${value}`) })), onChange: value => setTrust(value) }))),
|
|
79
|
+
option('isolate', t('ta.settings.sandbox'), t('ta.settings.sandboxDescription')),
|
|
80
|
+
...(options.isolate
|
|
81
|
+
? [
|
|
82
|
+
option('local', t('ta.settings.sandboxLocal'), t('ta.settings.sandboxLocalDescription')),
|
|
83
|
+
option('parts', t('ta.settings.sandboxParts'), t('ta.settings.sandboxPartsDescription')),
|
|
84
|
+
]
|
|
85
|
+
: []),
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=access-settings.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
|
|
4
|
+
* the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
|
|
5
|
+
*/
|
|
6
|
+
export declare function AppView(): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=app-root.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AppView = AppView;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const app_window_1 = require("../apps/app-window");
|
|
39
|
+
const app_window_util_1 = require("../apps/app-window-util");
|
|
40
|
+
const device_page_1 = require("../cloud/device-page");
|
|
41
|
+
const launch_screen_1 = require("../device/launch-screen");
|
|
42
|
+
const shared_link_1 = require("../share/shared-link");
|
|
43
|
+
const shared_page_1 = require("../share/shared-page");
|
|
44
|
+
const app_view_1 = require("./app-view");
|
|
45
|
+
const device_sign_in_page_1 = require("./device-sign-in-page");
|
|
46
|
+
const dino_look_1 = require("./dino-look");
|
|
47
|
+
/**
|
|
48
|
+
* The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
|
|
49
|
+
* the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
|
|
50
|
+
*/
|
|
51
|
+
function AppView() {
|
|
52
|
+
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
53
|
+
const [shared] = React.useState(() => shared_link_1.SharedPageUtil.link());
|
|
54
|
+
// A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
|
|
55
|
+
const [device] = React.useState(() => (shared ? undefined : device_page_1.DevicePageUtil.take()));
|
|
56
|
+
// A page installed as an app, in a window of Ta Desktop of its own (docs/design/ta-install-as-app.md).
|
|
57
|
+
const [app] = React.useState(() => (shared || device ? undefined : app_window_util_1.AppWindowUtil.id()));
|
|
58
|
+
// The launch picture of the app of a phone goes once the page is whole.
|
|
59
|
+
React.useEffect(() => launch_screen_1.LaunchScreenUtil.start(), []);
|
|
60
|
+
if (shared) {
|
|
61
|
+
return React.createElement(shared_page_1.SharedPage, { link: shared });
|
|
62
|
+
}
|
|
63
|
+
if (device) {
|
|
64
|
+
return React.createElement(device_sign_in_page_1.DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
|
|
65
|
+
}
|
|
66
|
+
return (React.createElement(dino_look_1.LooksProvider, null,
|
|
67
|
+
app ? React.createElement(app_window_1.AppWindow, { id: app }) : React.createElement(app_view_1.AppShell, null),
|
|
68
|
+
React.createElement(dino_look_1.DinoLookHost, null)));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=app-root.js.map
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
|
|
4
|
+
* extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
|
|
5
|
+
* open), and the panel of their cards.
|
|
6
|
+
* The sidebar, the tabs and the panel can be resized and collapsed; on narrow screens they open over
|
|
7
|
+
* the conversation instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function AppShell(): React.JSX.Element;
|
|
4
10
|
//# sourceMappingURL=app-view.d.ts.map
|
|
@@ -33,19 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.AppShell = AppShell;
|
|
37
37
|
const lucide_react_1 = require("lucide-react");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const assistant_chat_list_1 = require("../assistant/assistant-chat-list");
|
|
40
40
|
const chat_view_1 = require("../chat/chat-view");
|
|
41
|
-
const device_page_1 = require("../cloud/device-page");
|
|
42
41
|
const device_protocol_1 = require("../device/device-protocol");
|
|
43
|
-
const launch_screen_1 = require("../device/launch-screen");
|
|
44
42
|
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
45
43
|
const hooks_1 = require("../hooks");
|
|
46
44
|
const notices_1 = require("../notices/notices");
|
|
47
|
-
const shared_link_1 = require("../share/shared-link");
|
|
48
|
-
const shared_page_1 = require("../share/shared-page");
|
|
49
45
|
const app_contexts_1 = require("./app-contexts");
|
|
50
46
|
const app_nav_1 = require("./app-nav");
|
|
51
47
|
const app_shell_hooks_1 = require("./app-shell-hooks");
|
|
@@ -58,8 +54,6 @@ const chat_seen_1 = require("./chat-seen");
|
|
|
58
54
|
const chats_dot_1 = require("./chats-dot");
|
|
59
55
|
const connection_bar_1 = require("./connection-bar");
|
|
60
56
|
const custom_host_1 = require("./custom-host");
|
|
61
|
-
const device_sign_in_page_1 = require("./device-sign-in-page");
|
|
62
|
-
const dino_look_1 = require("./dino-look");
|
|
63
57
|
const discover_view_1 = require("./discover-view");
|
|
64
58
|
const editor_area_1 = require("./editor-area");
|
|
65
59
|
const entry_holds_1 = require("./entry-holds");
|
|
@@ -420,22 +414,4 @@ function PhoneHome({ pushable, busy, onBusy, busyList, children, }) {
|
|
|
420
414
|
}
|
|
421
415
|
return React.createElement(phone_shell_1.PhoneStack, { base: children, top: (busy || drawn) && busyList(), open: busy, onClose: () => onBusy(false) });
|
|
422
416
|
}
|
|
423
|
-
/** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
|
|
424
|
-
function AppView() {
|
|
425
|
-
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
426
|
-
const [shared] = React.useState(() => shared_link_1.SharedPageUtil.link());
|
|
427
|
-
// A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
|
|
428
|
-
const [device] = React.useState(() => (shared ? undefined : device_page_1.DevicePageUtil.take()));
|
|
429
|
-
// The launch picture of the app of a phone goes once the page is whole.
|
|
430
|
-
React.useEffect(() => launch_screen_1.LaunchScreenUtil.start(), []);
|
|
431
|
-
if (shared) {
|
|
432
|
-
return React.createElement(shared_page_1.SharedPage, { link: shared });
|
|
433
|
-
}
|
|
434
|
-
if (device) {
|
|
435
|
-
return React.createElement(device_sign_in_page_1.DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
|
|
436
|
-
}
|
|
437
|
-
return (React.createElement(dino_look_1.LooksProvider, null,
|
|
438
|
-
React.createElement(AppShell, null),
|
|
439
|
-
React.createElement(dino_look_1.DinoLookHost, null)));
|
|
440
|
-
}
|
|
441
417
|
//# sourceMappingURL=app-view.js.map
|