@celljs/ta-web 4.23.0 → 4.24.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/esm/browser/assistant/assistant-chat-list.js +3 -1
- package/esm/browser/components/app-shell-state.js +2 -1
- package/esm/browser/components/app-view.js +15 -7
- package/esm/browser/components/chat-home-util.d.ts +7 -0
- package/esm/browser/components/chat-home-util.js +10 -0
- package/esm/browser/components/chat-list-util.d.ts +15 -3
- package/esm/browser/components/chat-list-util.js +26 -4
- package/esm/browser/components/chat-list.js +4 -3
- package/esm/browser/components/chat-seen.d.ts +4 -3
- package/esm/browser/components/chat-seen.js +6 -5
- package/esm/browser/components/chats-dot.d.ts +30 -0
- package/esm/browser/components/chats-dot.js +32 -0
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/settings-files.d.ts +7 -0
- package/esm/browser/components/settings-files.js +61 -0
- package/esm/browser/components/settings-more.js +2 -0
- package/esm/browser/components/tool-view.js +23 -7
- package/esm/browser/extension/web-api-contributions.d.ts +2 -1
- package/esm/browser/extension/web-api-partners.d.ts +9 -1
- package/esm/browser/extension/web-view-util.d.ts +5 -0
- package/esm/browser/extension/web-view-util.js +8 -0
- package/esm/browser/i18n/locales.d.ts +10 -1
- package/esm/browser/i18n/messages-ja.js +9 -0
- package/esm/browser/i18n/messages-zh-tw.js +9 -0
- package/esm/browser/i18n/messages.d.ts +9 -0
- package/esm/browser/i18n/messages.js +18 -0
- package/esm/browser/partners/partners-util.d.ts +6 -0
- package/esm/browser/partners/partners-util.js +9 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +1 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +8 -0
- package/esm/browser/util/process.d.ts +3 -1
- package/esm/browser/util/process.js +27 -0
- package/lib/browser/assistant/assistant-chat-list.js +3 -1
- package/lib/browser/components/app-shell-state.js +2 -1
- package/lib/browser/components/app-view.js +15 -7
- package/lib/browser/components/chat-home-util.d.ts +7 -0
- package/lib/browser/components/chat-home-util.js +10 -0
- package/lib/browser/components/chat-list-util.d.ts +15 -3
- package/lib/browser/components/chat-list-util.js +26 -4
- package/lib/browser/components/chat-list.js +4 -3
- package/lib/browser/components/chat-seen.d.ts +4 -3
- package/lib/browser/components/chat-seen.js +6 -5
- package/lib/browser/components/chats-dot.d.ts +31 -0
- package/lib/browser/components/chats-dot.js +68 -0
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/settings-files.d.ts +8 -0
- package/lib/browser/components/settings-files.js +97 -0
- package/lib/browser/components/settings-more.js +2 -0
- package/lib/browser/components/tool-view.js +23 -7
- package/lib/browser/extension/web-api-contributions.d.ts +2 -1
- package/lib/browser/extension/web-api-partners.d.ts +9 -1
- package/lib/browser/extension/web-view-util.d.ts +5 -0
- package/lib/browser/extension/web-view-util.js +8 -0
- package/lib/browser/i18n/locales.d.ts +10 -1
- package/lib/browser/i18n/messages-ja.js +9 -0
- package/lib/browser/i18n/messages-zh-tw.js +9 -0
- package/lib/browser/i18n/messages.d.ts +9 -0
- package/lib/browser/i18n/messages.js +18 -0
- package/lib/browser/partners/partners-util.d.ts +6 -0
- package/lib/browser/partners/partners-util.js +9 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +1 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +8 -0
- package/lib/browser/util/process.d.ts +3 -1
- package/lib/browser/util/process.js +27 -0
- package/package.json +7 -7
|
@@ -42,7 +42,8 @@ export type ProcessStep = {
|
|
|
42
42
|
* A thing ta did, as one line of the work: a call of a tool, with the thoughts that led to it and, for a script of
|
|
43
43
|
* another agent (its REPL), the calls the script made, which that agent reports after it as calls of their own. The
|
|
44
44
|
* other steps stay as they are: what ta said on the way, a card, what the user said, an error; and a thought not
|
|
45
|
-
* followed by a call (the latest, while ta thinks).
|
|
45
|
+
* followed by a call (the latest, while ta thinks). The same call made again right after it (a command polled, a file
|
|
46
|
+
* edited once more, as other agents report it) is the same line: `call` is the latest, `earlier` the ones before it.
|
|
46
47
|
*/
|
|
47
48
|
export type ProcessAct = Exclude<ProcessStep, {
|
|
48
49
|
kind: 'tool';
|
|
@@ -52,6 +53,7 @@ export type ProcessAct = Exclude<ProcessStep, {
|
|
|
52
53
|
call: ContentBlock;
|
|
53
54
|
nested: ContentBlock[];
|
|
54
55
|
thoughts: string[];
|
|
56
|
+
earlier: ContentBlock[];
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
59
|
* How a turn that is over ended, when not with a reply: an error, stopped by the user, cut off in the middle of
|
|
@@ -207,6 +207,9 @@ var ProcessUtil;
|
|
|
207
207
|
function acts(steps, active = true) {
|
|
208
208
|
var _a;
|
|
209
209
|
const out = [];
|
|
210
|
+
// The last call on its own, and what it was: the same one after it goes with it.
|
|
211
|
+
let alone;
|
|
212
|
+
let aloneIs = '';
|
|
210
213
|
let thoughts = [];
|
|
211
214
|
let script;
|
|
212
215
|
for (const step of steps) {
|
|
@@ -218,6 +221,7 @@ var ProcessUtil;
|
|
|
218
221
|
out.push(...thoughts, step);
|
|
219
222
|
thoughts = [];
|
|
220
223
|
script = undefined;
|
|
224
|
+
alone = undefined;
|
|
221
225
|
continue;
|
|
222
226
|
}
|
|
223
227
|
const args = ((_a = step.call.arguments) !== null && _a !== void 0 ? _a : {});
|
|
@@ -228,15 +232,26 @@ var ProcessUtil;
|
|
|
228
232
|
thoughts = [];
|
|
229
233
|
continue;
|
|
230
234
|
}
|
|
235
|
+
const is = callKey(step.call);
|
|
236
|
+
if (alone && is && is === aloneIs) {
|
|
237
|
+
alone.earlier.push(alone.call);
|
|
238
|
+
alone.call = step.call;
|
|
239
|
+
alone.thoughts.push(...thoughts.map(thought => thought.text));
|
|
240
|
+
thoughts = [];
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
231
243
|
const act = {
|
|
232
244
|
kind: 'tool',
|
|
233
245
|
key: step.key,
|
|
234
246
|
call: step.call,
|
|
235
247
|
nested: [],
|
|
236
248
|
thoughts: thoughts.map(thought => thought.text),
|
|
249
|
+
earlier: [],
|
|
237
250
|
};
|
|
238
251
|
thoughts = [];
|
|
239
252
|
script = step.call.name === 'agent_tool' && args.tool === 'REPL' ? act : undefined;
|
|
253
|
+
alone = script ? undefined : act;
|
|
254
|
+
aloneIs = is;
|
|
240
255
|
out.push(act);
|
|
241
256
|
}
|
|
242
257
|
const last = out[out.length - 1];
|
|
@@ -249,6 +264,18 @@ var ProcessUtil;
|
|
|
249
264
|
return out;
|
|
250
265
|
}
|
|
251
266
|
ProcessUtil.acts = acts;
|
|
267
|
+
/**
|
|
268
|
+
* What makes a call the same as another, for one line of them: its tool and its arguments. None for a script
|
|
269
|
+
* (codemode, another agent's REPL), whose calls are its own.
|
|
270
|
+
*/
|
|
271
|
+
function callKey(call) {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
const args = ((_a = call.arguments) !== null && _a !== void 0 ? _a : {});
|
|
274
|
+
if (!call.name || call.name === 'codemode' || (call.name === 'agent_tool' && args.tool === 'REPL')) {
|
|
275
|
+
return '';
|
|
276
|
+
}
|
|
277
|
+
return `${call.name}\0${JSON.stringify((_b = call.arguments) !== null && _b !== void 0 ? _b : {})}`;
|
|
278
|
+
}
|
|
252
279
|
/** The steps shown: all of them, or while it works the latest few when more than two would fold. */
|
|
253
280
|
function fold(steps, active, showAll, visible = exports.VISIBLE_STEPS) {
|
|
254
281
|
if (!active || showAll || steps.length <= visible + 2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.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.24.0",
|
|
37
|
+
"@celljs/react": "4.24.0",
|
|
38
|
+
"@celljs/ta-client": "4.24.0",
|
|
39
|
+
"@celljs/ta-protocol": "4.24.0",
|
|
40
|
+
"@celljs/ta-relay": "4.24.0",
|
|
41
|
+
"@celljs/widget": "4.24.0",
|
|
42
42
|
"@types/three": "^0.187.0",
|
|
43
43
|
"@xterm/addon-fit": "^0.11.0",
|
|
44
44
|
"@xterm/addon-unicode11": "^0.9.0",
|