@celljs/ta-web 4.24.0 → 4.25.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/components/account-menu.js +5 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +10 -10
- package/esm/browser/components/app-shell-state.d.ts +1 -0
- package/esm/browser/components/app-shell-state.js +19 -0
- package/esm/browser/components/app-view.js +5 -7
- package/esm/browser/components/chat-home.js +3 -3
- package/esm/browser/components/chat-list-hooks.d.ts +2 -0
- package/esm/browser/components/chat-list-hooks.js +6 -0
- package/esm/browser/components/chat-list-row.js +2 -2
- package/esm/browser/components/chat-list.js +2 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/editor-actions.d.ts +10 -0
- package/esm/browser/components/editor-actions.js +13 -0
- package/esm/browser/components/editor-area.js +7 -3
- package/esm/browser/components/fold-text.d.ts +4 -2
- package/esm/browser/components/fold-text.js +5 -4
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/image-swipe.d.ts +20 -0
- package/esm/browser/components/image-swipe.js +75 -0
- package/esm/browser/components/image-viewer.d.ts +2 -2
- package/esm/browser/components/image-viewer.js +2 -2
- package/esm/browser/components/list-motion.d.ts +44 -0
- package/esm/browser/components/list-motion.js +197 -0
- package/esm/browser/components/message-user.js +5 -3
- package/esm/browser/components/partner-row.js +1 -1
- package/esm/browser/components/relay-services.d.ts +1 -1
- package/esm/browser/components/relay-services.js +11 -91
- package/esm/browser/components/said-text.d.ts +6 -2
- package/esm/browser/components/said-text.js +8 -2
- package/esm/browser/components/side-lists.d.ts +7 -0
- package/esm/browser/components/side-lists.js +16 -0
- package/esm/browser/components/sortable.js +15 -0
- package/esm/browser/components/workbench-tabs.d.ts +5 -2
- package/esm/browser/components/workbench-tabs.js +13 -6
- package/esm/browser/components/workbench-toggle.d.ts +5 -0
- package/esm/browser/components/workbench-toggle.js +10 -0
- package/esm/browser/extension/extension-view.d.ts +1 -1
- package/esm/browser/extension/web-api-contributions.d.ts +4 -12
- package/esm/browser/extension/web-api-editors.d.ts +32 -0
- package/esm/browser/extension/web-api-editors.js +2 -0
- package/esm/browser/extension/web-api-menus.d.ts +40 -0
- package/esm/browser/extension/web-api-menus.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +9 -26
- package/esm/browser/extension/web-extension-context.js +5 -9
- package/esm/browser/extension/web-extension-protocol.d.ts +3 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +15 -0
- package/esm/browser/extension/web-session-notices.js +8 -0
- package/esm/browser/i18n/locales.d.ts +5 -2
- package/esm/browser/i18n/messages-ja.js +6 -3
- package/esm/browser/i18n/messages-zh-tw.js +6 -3
- package/esm/browser/i18n/messages.d.ts +4 -1
- package/esm/browser/i18n/messages.js +13 -7
- package/esm/browser/notices/chime.d.ts +16 -0
- package/esm/browser/notices/chime.js +67 -0
- package/esm/browser/notices/session-notices.d.ts +8 -0
- package/esm/browser/notices/session-notices.js +23 -2
- package/esm/browser/partners/partners-view.js +4 -1
- package/esm/browser/share/shared-page.js +2 -1
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +7 -0
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +2 -0
- package/esm/browser/style/device.js +5 -2
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +28 -6
- package/esm/browser/style/shared.d.ts +1 -1
- package/esm/browser/style/shared.js +1 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +7 -2
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +1 -0
- package/esm/browser/util/image-swipe.d.ts +14 -3
- package/esm/browser/util/image-swipe.js +26 -3
- package/esm/browser/util/process.d.ts +5 -0
- package/esm/browser/util/process.js +22 -1
- package/lib/browser/components/account-menu.js +4 -0
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +8 -8
- package/lib/browser/components/app-shell-state.d.ts +1 -0
- package/lib/browser/components/app-shell-state.js +19 -0
- package/lib/browser/components/app-view.js +4 -6
- package/lib/browser/components/chat-home.js +3 -3
- package/lib/browser/components/chat-list-hooks.d.ts +2 -0
- package/lib/browser/components/chat-list-hooks.js +7 -0
- package/lib/browser/components/chat-list-row.js +2 -2
- package/lib/browser/components/chat-list.js +1 -1
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/editor-actions.d.ts +11 -0
- package/lib/browser/components/editor-actions.js +50 -0
- package/lib/browser/components/editor-area.js +7 -3
- package/lib/browser/components/fold-text.d.ts +4 -2
- package/lib/browser/components/fold-text.js +5 -4
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/image-swipe.d.ts +20 -0
- package/lib/browser/components/image-swipe.js +75 -0
- package/lib/browser/components/image-viewer.d.ts +2 -2
- package/lib/browser/components/image-viewer.js +2 -2
- package/lib/browser/components/list-motion.d.ts +45 -0
- package/lib/browser/components/list-motion.js +234 -0
- package/lib/browser/components/message-user.js +5 -3
- package/lib/browser/components/partner-row.js +1 -1
- package/lib/browser/components/relay-services.d.ts +1 -1
- package/lib/browser/components/relay-services.js +9 -89
- package/lib/browser/components/said-text.d.ts +6 -2
- package/lib/browser/components/said-text.js +8 -2
- package/lib/browser/components/side-lists.d.ts +7 -0
- package/lib/browser/components/side-lists.js +16 -0
- package/lib/browser/components/sortable.js +15 -0
- package/lib/browser/components/workbench-tabs.d.ts +5 -2
- package/lib/browser/components/workbench-tabs.js +12 -5
- package/lib/browser/components/workbench-toggle.d.ts +5 -0
- package/lib/browser/components/workbench-toggle.js +11 -0
- package/lib/browser/extension/extension-view.d.ts +1 -1
- package/lib/browser/extension/web-api-contributions.d.ts +4 -12
- package/lib/browser/extension/web-api-editors.d.ts +33 -0
- package/lib/browser/extension/web-api-editors.js +3 -0
- package/lib/browser/extension/web-api-menus.d.ts +41 -0
- package/lib/browser/extension/web-api-menus.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +9 -26
- package/lib/browser/extension/web-extension-context.js +5 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +3 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +15 -0
- package/lib/browser/extension/web-session-notices.js +8 -0
- package/lib/browser/i18n/locales.d.ts +5 -2
- package/lib/browser/i18n/messages-ja.js +6 -3
- package/lib/browser/i18n/messages-zh-tw.js +6 -3
- package/lib/browser/i18n/messages.d.ts +4 -1
- package/lib/browser/i18n/messages.js +13 -7
- package/lib/browser/notices/chime.d.ts +17 -0
- package/lib/browser/notices/chime.js +71 -0
- package/lib/browser/notices/session-notices.d.ts +8 -0
- package/lib/browser/notices/session-notices.js +23 -2
- package/lib/browser/partners/partners-view.js +4 -1
- package/lib/browser/share/shared-page.js +2 -1
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +7 -0
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +2 -0
- package/lib/browser/style/device.js +5 -2
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +28 -6
- package/lib/browser/style/shared.d.ts +1 -1
- package/lib/browser/style/shared.js +1 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +7 -2
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +1 -0
- package/lib/browser/util/image-swipe.d.ts +14 -3
- package/lib/browser/util/image-swipe.js +26 -3
- package/lib/browser/util/process.d.ts +5 -0
- package/lib/browser/util/process.js +22 -1
- package/package.json +7 -7
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ImageSwipeUtil = void 0;
|
|
4
4
|
const swipe_util_1 = require("../device/swipe-util");
|
|
5
5
|
/**
|
|
6
|
-
* A finger that swipes a picture sideways goes to the one beside it, as the viewers of pictures of a phone do
|
|
7
|
-
* the picture follows
|
|
8
|
-
* for it. Zoomed in, the finger scrolls the picture, and only from its edge goes on to the next. Pure, for the tests.
|
|
6
|
+
* A finger that swipes a picture sideways goes to the one beside it, as the viewers of pictures of a phone do,
|
|
7
|
+
* and two fingers on a trackpad: the picture follows them with the one beside it in sight, and let go far
|
|
8
|
+
* enough, or flicked, slides out for it. Zoomed in, the finger scrolls the picture, and only from its edge goes on to the next. Pure, for the tests.
|
|
9
9
|
*/
|
|
10
10
|
var ImageSwipeUtil;
|
|
11
11
|
(function (ImageSwipeUtil) {
|
|
@@ -17,6 +17,10 @@ var ImageSwipeUtil;
|
|
|
17
17
|
ImageSwipeUtil.FAR = 0.25;
|
|
18
18
|
/** How long it slides on, let go slowly. */
|
|
19
19
|
ImageSwipeUtil.SETTLE_MS = 320;
|
|
20
|
+
/** Two fingers on a trackpad (wheels sideways) that went this far of its width go on at once, still moving. */
|
|
21
|
+
ImageSwipeUtil.WHEEL_FAR = 0.4;
|
|
22
|
+
/** No wheel for this long, the fingers (and the scroll that coasts on after them) let go. */
|
|
23
|
+
ImageSwipeUtil.WHEEL_QUIET_MS = 140;
|
|
20
24
|
/** Within this of an edge, it is at that edge (scrolls are fractional). */
|
|
21
25
|
const EDGE_PX = 1;
|
|
22
26
|
function edges(scrollLeft, scrollWidth, clientWidth) {
|
|
@@ -60,6 +64,25 @@ var ImageSwipeUtil;
|
|
|
60
64
|
return beside.next ? 'next' : undefined;
|
|
61
65
|
}
|
|
62
66
|
ImageSwipeUtil.goes = goes;
|
|
67
|
+
/** A wheel's `delta` in pixels: `mode` is WheelEvent's `deltaMode` (pixels, lines, pages `page` wide). */
|
|
68
|
+
function wheelPixels(delta, mode, page) {
|
|
69
|
+
return mode === 1 ? delta * 16 : mode === 2 ? delta * page : delta;
|
|
70
|
+
}
|
|
71
|
+
ImageSwipeUtil.wheelPixels = wheelPixels;
|
|
72
|
+
/**
|
|
73
|
+
* Where two fingers on a trackpad go while they still move, `dx` from where they set off in a box `width`
|
|
74
|
+
* wide: on, once WHEEL_FAR toward a picture; else nowhere yet (it is told when they let go, as by `goes`).
|
|
75
|
+
*/
|
|
76
|
+
function wheelGoes(dx, width, beside) {
|
|
77
|
+
if (Math.abs(dx) < width * ImageSwipeUtil.WHEEL_FAR) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
if (dx > 0) {
|
|
81
|
+
return beside.previous ? 'previous' : undefined;
|
|
82
|
+
}
|
|
83
|
+
return beside.next ? 'next' : undefined;
|
|
84
|
+
}
|
|
85
|
+
ImageSwipeUtil.wheelGoes = wheelGoes;
|
|
63
86
|
/** Where it slides to: out of sight for the picture beside, or back. */
|
|
64
87
|
function rest(way, width) {
|
|
65
88
|
return way === 'next' ? -(width + ImageSwipeUtil.GAP) : way === 'previous' ? width + ImageSwipeUtil.GAP : 0;
|
|
@@ -84,6 +84,11 @@ export interface TurnItem {
|
|
|
84
84
|
last?: SessionMessage;
|
|
85
85
|
/** The agent is still at it. */
|
|
86
86
|
active: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The work went on in the next turn after messages an extension showed in the middle of it (a card of
|
|
89
|
+
* ta-initiative): it was not cut off where it stopped.
|
|
90
|
+
*/
|
|
91
|
+
continued?: boolean;
|
|
87
92
|
}
|
|
88
93
|
export type ThreadItem = MessageItem | TurnItem;
|
|
89
94
|
/** While the agent works, only the latest steps show; the earlier ones fold into one row. */
|
|
@@ -56,6 +56,7 @@ var ProcessUtil;
|
|
|
56
56
|
if (working && ((_a = items[items.length - 1]) === null || _a === void 0 ? void 0 : _a.kind) !== 'turn') {
|
|
57
57
|
items.push({ kind: 'turn', key: `t${offset + messages.length}`, messages: [], steps: [], reply: [], active: true });
|
|
58
58
|
}
|
|
59
|
+
markContinued(items);
|
|
59
60
|
return items;
|
|
60
61
|
}
|
|
61
62
|
ProcessUtil.items = items;
|
|
@@ -81,6 +82,26 @@ var ProcessUtil;
|
|
|
81
82
|
return false;
|
|
82
83
|
}
|
|
83
84
|
ProcessUtil.steered = steered;
|
|
85
|
+
/**
|
|
86
|
+
* A turn followed only by messages of extensions (role custom, a card shown in the middle of the work) and then by
|
|
87
|
+
* another turn: the work went on after them, so the turn was not cut off where it stopped.
|
|
88
|
+
*/
|
|
89
|
+
function markContinued(items) {
|
|
90
|
+
var _a;
|
|
91
|
+
for (let index = 0; index < items.length; index++) {
|
|
92
|
+
const item = items[index];
|
|
93
|
+
if (item.kind !== 'turn' || item.active) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
let next = index + 1;
|
|
97
|
+
while (next < items.length && items[next].kind === 'message' && items[next].message.role === 'custom') {
|
|
98
|
+
next++;
|
|
99
|
+
}
|
|
100
|
+
if (next > index + 1 && ((_a = items[next]) === null || _a === void 0 ? void 0 : _a.kind) === 'turn') {
|
|
101
|
+
item.continued = true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
84
105
|
/** The note that Ta restarted in the middle of a run and went on with it (TaSessionResume). */
|
|
85
106
|
function resumed(message) {
|
|
86
107
|
return message.customType === ta_protocol_1.TA_RESUME_MESSAGE;
|
|
@@ -173,7 +194,7 @@ var ProcessUtil;
|
|
|
173
194
|
}
|
|
174
195
|
const roles = item.messages.map(message => message.role).filter(role => TURN_ROLES.has(role));
|
|
175
196
|
if (roles[roles.length - 1] === 'toolResult' || stopReason === 'toolUse') {
|
|
176
|
-
return 'interrupted';
|
|
197
|
+
return item.continued ? undefined : 'interrupted';
|
|
177
198
|
}
|
|
178
199
|
// An external agent that compacted its context (/compact) ends its turn with the summary, not a reply.
|
|
179
200
|
if (((_a = item.steps[item.steps.length - 1]) === null || _a === void 0 ? void 0 : _a.kind) === 'summary') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.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"
|
|
@@ -33,12 +33,12 @@
|
|
|
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.25.0",
|
|
37
|
+
"@celljs/react": "4.25.0",
|
|
38
|
+
"@celljs/ta-client": "4.25.0",
|
|
39
|
+
"@celljs/ta-protocol": "4.25.0",
|
|
40
|
+
"@celljs/ta-relay": "4.25.0",
|
|
41
|
+
"@celljs/widget": "4.25.0",
|
|
42
42
|
"@types/three": "^0.187.0",
|
|
43
43
|
"@xterm/addon-fit": "^0.11.0",
|
|
44
44
|
"@xterm/addon-unicode11": "^0.9.0",
|