@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.
Files changed (71) hide show
  1. package/esm/browser/assistant/assistant-chat-list.js +3 -1
  2. package/esm/browser/components/app-shell-state.js +2 -1
  3. package/esm/browser/components/app-view.js +15 -7
  4. package/esm/browser/components/chat-home-util.d.ts +7 -0
  5. package/esm/browser/components/chat-home-util.js +10 -0
  6. package/esm/browser/components/chat-list-util.d.ts +15 -3
  7. package/esm/browser/components/chat-list-util.js +26 -4
  8. package/esm/browser/components/chat-list.js +4 -3
  9. package/esm/browser/components/chat-seen.d.ts +4 -3
  10. package/esm/browser/components/chat-seen.js +6 -5
  11. package/esm/browser/components/chats-dot.d.ts +30 -0
  12. package/esm/browser/components/chats-dot.js +32 -0
  13. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  14. package/esm/browser/components/host-view.d.ts +1 -1
  15. package/esm/browser/components/settings-files.d.ts +7 -0
  16. package/esm/browser/components/settings-files.js +61 -0
  17. package/esm/browser/components/settings-more.js +2 -0
  18. package/esm/browser/components/tool-view.js +23 -7
  19. package/esm/browser/extension/web-api-contributions.d.ts +2 -1
  20. package/esm/browser/extension/web-api-partners.d.ts +9 -1
  21. package/esm/browser/extension/web-view-util.d.ts +5 -0
  22. package/esm/browser/extension/web-view-util.js +8 -0
  23. package/esm/browser/i18n/locales.d.ts +10 -1
  24. package/esm/browser/i18n/messages-ja.js +9 -0
  25. package/esm/browser/i18n/messages-zh-tw.js +9 -0
  26. package/esm/browser/i18n/messages.d.ts +9 -0
  27. package/esm/browser/i18n/messages.js +18 -0
  28. package/esm/browser/partners/partners-util.d.ts +6 -0
  29. package/esm/browser/partners/partners-util.js +9 -0
  30. package/esm/browser/style/conversation.d.ts +1 -1
  31. package/esm/browser/style/conversation.js +1 -0
  32. package/esm/browser/style/pages.d.ts +1 -1
  33. package/esm/browser/style/pages.js +8 -0
  34. package/esm/browser/util/process.d.ts +3 -1
  35. package/esm/browser/util/process.js +27 -0
  36. package/lib/browser/assistant/assistant-chat-list.js +3 -1
  37. package/lib/browser/components/app-shell-state.js +2 -1
  38. package/lib/browser/components/app-view.js +15 -7
  39. package/lib/browser/components/chat-home-util.d.ts +7 -0
  40. package/lib/browser/components/chat-home-util.js +10 -0
  41. package/lib/browser/components/chat-list-util.d.ts +15 -3
  42. package/lib/browser/components/chat-list-util.js +26 -4
  43. package/lib/browser/components/chat-list.js +4 -3
  44. package/lib/browser/components/chat-seen.d.ts +4 -3
  45. package/lib/browser/components/chat-seen.js +6 -5
  46. package/lib/browser/components/chats-dot.d.ts +31 -0
  47. package/lib/browser/components/chats-dot.js +68 -0
  48. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  49. package/lib/browser/components/host-view.d.ts +1 -1
  50. package/lib/browser/components/settings-files.d.ts +8 -0
  51. package/lib/browser/components/settings-files.js +97 -0
  52. package/lib/browser/components/settings-more.js +2 -0
  53. package/lib/browser/components/tool-view.js +23 -7
  54. package/lib/browser/extension/web-api-contributions.d.ts +2 -1
  55. package/lib/browser/extension/web-api-partners.d.ts +9 -1
  56. package/lib/browser/extension/web-view-util.d.ts +5 -0
  57. package/lib/browser/extension/web-view-util.js +8 -0
  58. package/lib/browser/i18n/locales.d.ts +10 -1
  59. package/lib/browser/i18n/messages-ja.js +9 -0
  60. package/lib/browser/i18n/messages-zh-tw.js +9 -0
  61. package/lib/browser/i18n/messages.d.ts +9 -0
  62. package/lib/browser/i18n/messages.js +18 -0
  63. package/lib/browser/partners/partners-util.d.ts +6 -0
  64. package/lib/browser/partners/partners-util.js +9 -0
  65. package/lib/browser/style/conversation.d.ts +1 -1
  66. package/lib/browser/style/conversation.js +1 -0
  67. package/lib/browser/style/pages.d.ts +1 -1
  68. package/lib/browser/style/pages.js +8 -0
  69. package/lib/browser/util/process.d.ts +3 -1
  70. package/lib/browser/util/process.js +27 -0
  71. 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.23.0",
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.23.0",
37
- "@celljs/react": "4.23.0",
38
- "@celljs/ta-client": "4.23.0",
39
- "@celljs/ta-protocol": "4.23.0",
40
- "@celljs/ta-relay": "4.23.0",
41
- "@celljs/widget": "4.23.0",
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",