@adecore/agents-react 0.48.2 → 0.48.4

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.
@@ -257,49 +257,33 @@ function flushTools(buffer, rows, options) {
257
257
  return;
258
258
  }
259
259
  const tools = buffer.splice(0);
260
- const live = tools.filter(tool => tool.state === 'running');
261
- const settled = tools.filter(tool => tool.state !== 'running');
262
- if (settled.length === 1) {
263
- rows.push({
264
- kind: 'work',
265
- id: settled[0].id,
266
- tool: settled[0]
267
- });
268
- } else if (settled.length > 1) {
269
- const id = `group-${settled[0].id}`;
270
- const expanded = options.expandedGroups.has(id);
271
- const looked = lookSummary(settled, options.commandLooks);
272
- rows.push(looked === null ? {
273
- kind: 'work-group',
274
- id,
275
- tools: settled,
276
- summary: summarizeGroup(settled),
277
- expanded
278
- } : {
279
- kind: 'work-group',
280
- id,
281
- tools: settled,
282
- summary: looked.summary,
283
- expanded,
284
- look: looked.look
285
- });
286
- if (expanded) {
287
- for (const tool of settled) {
288
- rows.push({
289
- kind: 'work',
290
- id: tool.id,
291
- tool
292
- });
293
- }
260
+ const first = tools[0];
261
+ const id = `group-${first.id}`;
262
+ const expanded = options.expandedGroups.has(id);
263
+ const looked = lookSummary(tools, options.commandLooks);
264
+ rows.push(looked === null ? {
265
+ kind: 'work-group',
266
+ id,
267
+ tools,
268
+ summary: summarizeGroup(tools),
269
+ expanded
270
+ } : {
271
+ kind: 'work-group',
272
+ id,
273
+ tools,
274
+ summary: looked.summary,
275
+ expanded,
276
+ look: looked.look
277
+ });
278
+ if (expanded) {
279
+ for (const tool of tools) {
280
+ rows.push({
281
+ kind: tool.state === 'running' ? 'work-live' : 'work',
282
+ id: tool.id,
283
+ tool
284
+ });
294
285
  }
295
286
  }
296
- for (const tool of live) {
297
- rows.push({
298
- kind: 'work-live',
299
- id: tool.id,
300
- tool
301
- });
302
- }
303
287
  }
304
288
  function isImageRow(row) {
305
289
  return (row.kind === 'work' || row.kind === 'work-live') && isImageGeneration(row.tool);
@@ -474,7 +458,7 @@ function lastAssistantRow(rows) {
474
458
  refused.add(row.item.toolUseId);
475
459
  continue;
476
460
  }
477
- if (row.kind === 'work' && refused.has(row.tool.toolUseId)) {
461
+ if (row.kind === 'work' && refused.has(row.tool.toolUseId) || row.kind === 'work-group' && row.tools.length === 1 && refused.has(row.tools[0].toolUseId)) {
478
462
  continue;
479
463
  }
480
464
  if (row.kind !== 'note' && !isImageRow(row)) {
@@ -496,7 +480,8 @@ function withLiveThought(rows, items) {
496
480
  return rows;
497
481
  }
498
482
  const after = new Set(items.slice(thoughtAt + 1).map(item => item.id));
499
- const index = rows.findIndex(row => row.kind === 'work-live' && after.has(row.tool.id));
483
+ const grouped = new Set(rows.flatMap(row => row.kind === 'work-group' ? row.tools.map(tool => tool.id) : []));
484
+ const index = rows.findIndex(row => row.kind === 'work-live' && after.has(row.tool.id) && !grouped.has(row.tool.id));
500
485
  const call = rows[index];
501
486
  const shownAt = rows.findIndex(row => row.kind === 'thinking' && row.id === thought.id);
502
487
  const inSight = shownAt !== -1 && shownAt < index && !rows.slice(shownAt + 1, index).some(row => row.kind === 'work' || row.kind === 'work-group');
@@ -206,7 +206,7 @@ function LookTags(t0) {
206
206
  * not a button. `time` shows at the right edge while the line is hovered or focused.
207
207
  */
208
208
  export function ToggleLine(t0) {
209
- const $ = _c(48);
209
+ const $ = _c(49);
210
210
  const {
211
211
  icon,
212
212
  label,
@@ -225,10 +225,10 @@ export function ToggleLine(t0) {
225
225
  } = t0;
226
226
  const open = t1 === undefined ? false : t1;
227
227
  const t2 = onToggle !== undefined && "hover:bg-surface-hover";
228
- const t3 = failed && "text-status-error";
228
+ const t3 = failed ? "text-status-error" : "text-text-muted";
229
229
  let t4;
230
230
  if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
231
- t4 = clsx("group/line -mx-1 mb-0.5 flex h-7 w-[calc(100%+8px)] items-center gap-2 rounded-md px-1 text-left text-xs text-text-muted", t2, t3, className);
231
+ t4 = clsx("group/line -mx-1 mb-0.5 flex h-7 w-[calc(100%+8px)] items-center gap-2 rounded-md px-1 text-left text-xs", t2, t3, className);
232
232
  $[0] = className;
233
233
  $[1] = t2;
234
234
  $[2] = t3;
@@ -411,18 +411,20 @@ export function ToggleLine(t0) {
411
411
  return t20;
412
412
  }
413
413
  let t20;
414
- if ($[44] !== classes || $[45] !== content || $[46] !== onToggle) {
414
+ if ($[44] !== classes || $[45] !== content || $[46] !== onToggle || $[47] !== open) {
415
415
  t20 = /*#__PURE__*/_jsx("button", {
416
416
  className: classes,
417
417
  onClick: onToggle,
418
+ "aria-expanded": open,
418
419
  children: content
419
420
  });
420
421
  $[44] = classes;
421
422
  $[45] = content;
422
423
  $[46] = onToggle;
423
- $[47] = t20;
424
+ $[47] = open;
425
+ $[48] = t20;
424
426
  } else {
425
- t20 = $[47];
427
+ t20 = $[48];
426
428
  }
427
429
  return t20;
428
430
  }
@@ -1501,7 +1503,7 @@ function _temp3(o) {
1501
1503
  return !o;
1502
1504
  }
1503
1505
  export function WorkGroupRow(t0) {
1504
- const $ = _c(15);
1506
+ const $ = _c(27);
1505
1507
  const {
1506
1508
  tools,
1507
1509
  summary,
@@ -1509,65 +1511,115 @@ export function WorkGroupRow(t0) {
1509
1511
  expanded,
1510
1512
  onToggle
1511
1513
  } = t0;
1514
+ const {
1515
+ t
1516
+ } = useTranslation("agent-chat");
1512
1517
  let t1;
1513
1518
  if ($[0] !== tools) {
1514
- t1 = tools.some(_temp4);
1519
+ t1 = tools.filter(_temp4);
1515
1520
  $[0] = tools;
1516
1521
  $[1] = t1;
1517
1522
  } else {
1518
1523
  t1 = $[1];
1519
1524
  }
1520
- const failed = t1;
1525
+ const running = t1.length;
1521
1526
  let t2;
1522
- if ($[2] !== look || $[3] !== tools[0].name) {
1523
- t2 = look === undefined ? toolIcon(tools[0].name) : /*#__PURE__*/_jsx(look.Mark, {
1524
- size: 12
1525
- });
1526
- $[2] = look;
1527
- $[3] = tools[0].name;
1528
- $[4] = t2;
1527
+ if ($[2] !== tools) {
1528
+ t2 = tools.some(_temp5);
1529
+ $[2] = tools;
1530
+ $[3] = t2;
1529
1531
  } else {
1530
- t2 = $[4];
1532
+ t2 = $[3];
1531
1533
  }
1534
+ const failed = t2;
1532
1535
  let t3;
1533
- if ($[5] !== look || $[6] !== summary) {
1534
- t3 = look?.brand === undefined ? summary : withBrand(summary, [look.brand]);
1535
- $[5] = look;
1536
- $[6] = summary;
1536
+ if ($[4] !== look || $[5] !== running || $[6] !== tools[0].name) {
1537
+ t3 = running > 0 ? /*#__PURE__*/_jsx(Spinner, {
1538
+ size: 12
1539
+ }) : look === undefined ? toolIcon(tools[0].name) : /*#__PURE__*/_jsx(look.Mark, {
1540
+ size: 12
1541
+ });
1542
+ $[4] = look;
1543
+ $[5] = running;
1544
+ $[6] = tools[0].name;
1537
1545
  $[7] = t3;
1538
1546
  } else {
1539
1547
  t3 = $[7];
1540
1548
  }
1541
1549
  let t4;
1542
- if ($[8] !== expanded || $[9] !== failed || $[10] !== onToggle || $[11] !== t2 || $[12] !== t3 || $[13] !== tools[0].createdAt) {
1543
- t4 = /*#__PURE__*/_jsx("div", {
1550
+ if ($[8] !== look || $[9] !== running || $[10] !== summary || $[11] !== t || $[12] !== tools.length) {
1551
+ t4 = running > 0 ? t("group.toolCalls", {
1552
+ count: tools.length
1553
+ }) : look?.brand === undefined ? summary : withBrand(summary, [look.brand]);
1554
+ $[8] = look;
1555
+ $[9] = running;
1556
+ $[10] = summary;
1557
+ $[11] = t;
1558
+ $[12] = tools.length;
1559
+ $[13] = t4;
1560
+ } else {
1561
+ t4 = $[13];
1562
+ }
1563
+ let t5;
1564
+ if ($[14] !== t4) {
1565
+ t5 = /*#__PURE__*/_jsx("span", {
1566
+ className: "tabular-nums",
1567
+ children: t4
1568
+ });
1569
+ $[14] = t4;
1570
+ $[15] = t5;
1571
+ } else {
1572
+ t5 = $[15];
1573
+ }
1574
+ let t6;
1575
+ if ($[16] !== running || $[17] !== t) {
1576
+ t6 = running > 0 && /*#__PURE__*/_jsx("span", {
1577
+ className: "shrink-0 text-text-faint tabular-nums",
1578
+ children: t("group.running", {
1579
+ count: running
1580
+ })
1581
+ });
1582
+ $[16] = running;
1583
+ $[17] = t;
1584
+ $[18] = t6;
1585
+ } else {
1586
+ t6 = $[18];
1587
+ }
1588
+ let t7;
1589
+ if ($[19] !== expanded || $[20] !== failed || $[21] !== onToggle || $[22] !== t3 || $[23] !== t5 || $[24] !== t6 || $[25] !== tools[0].createdAt) {
1590
+ t7 = /*#__PURE__*/_jsx("div", {
1544
1591
  children: /*#__PURE__*/_jsx(ToggleLine, {
1545
- icon: t2,
1546
- label: t3,
1592
+ icon: t3,
1593
+ label: t5,
1547
1594
  open: expanded,
1548
1595
  onToggle: onToggle,
1549
1596
  failed: failed,
1597
+ trailing: t6,
1550
1598
  time: tools[0].createdAt
1551
1599
  })
1552
1600
  });
1553
- $[8] = expanded;
1554
- $[9] = failed;
1555
- $[10] = onToggle;
1556
- $[11] = t2;
1557
- $[12] = t3;
1558
- $[13] = tools[0].createdAt;
1559
- $[14] = t4;
1601
+ $[19] = expanded;
1602
+ $[20] = failed;
1603
+ $[21] = onToggle;
1604
+ $[22] = t3;
1605
+ $[23] = t5;
1606
+ $[24] = t6;
1607
+ $[25] = tools[0].createdAt;
1608
+ $[26] = t7;
1560
1609
  } else {
1561
- t4 = $[14];
1610
+ t7 = $[26];
1562
1611
  }
1563
- return t4;
1612
+ return t7;
1564
1613
  }
1565
1614
  /*
1566
1615
  * A settled turn folded behind how long it took and what it did. A line and not a button, like the
1567
1616
  * tool lines it hides; the work reads fainter than the time so the eye lands on the time first.
1568
1617
  */
1618
+ function _temp5(tool_0) {
1619
+ return tool_0.state === "error";
1620
+ }
1569
1621
  function _temp4(tool) {
1570
- return tool.state === "error";
1622
+ return tool.state === "running";
1571
1623
  }
1572
1624
  export function TurnFoldRow(t0) {
1573
1625
  const $ = _c(39);
@@ -1587,7 +1639,7 @@ export function TurnFoldRow(t0) {
1587
1639
  let t2;
1588
1640
  let t3;
1589
1641
  if ($[0] !== commandLooks || $[1] !== expandable || $[2] !== expanded || $[3] !== label || $[4] !== turn.state || $[5] !== work) {
1590
- const brands = commandLooks?.flatMap(_temp5) ?? [];
1642
+ const brands = commandLooks?.flatMap(_temp6) ?? [];
1591
1643
  const t4 = expandable && "hover:bg-surface-hover";
1592
1644
  const t5 = turn.state === "error" && "text-status-error";
1593
1645
  let t6;
@@ -1731,7 +1783,7 @@ export function TurnFoldRow(t0) {
1731
1783
  }
1732
1784
  return t7;
1733
1785
  }
1734
- function _temp5(t0) {
1786
+ function _temp6(t0) {
1735
1787
  const {
1736
1788
  brand
1737
1789
  } = t0;
@@ -1847,7 +1899,7 @@ function ChangedFilesCard(t0) {
1847
1899
  let t2;
1848
1900
  let t3;
1849
1901
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1850
- t2 = () => setExpanded(_temp6);
1902
+ t2 = () => setExpanded(_temp7);
1851
1903
  t3 = /*#__PURE__*/_jsx(Icon, {
1852
1904
  icon: FileDiff,
1853
1905
  size: 12,
@@ -2004,7 +2056,7 @@ function ChangedFilesCard(t0) {
2004
2056
  * checkpoint but no stored diff asks the host for one, which is also how a running turn gets it.
2005
2057
  * A diff the thread keeps only the first files of (`heldBack`) asks for the whole when a person does.
2006
2058
  */
2007
- function _temp6(value) {
2059
+ function _temp7(value) {
2008
2060
  return !value;
2009
2061
  }
2010
2062
  export function ChangedFilesRow(t0) {
@@ -2054,7 +2106,7 @@ export function ChangedFilesRow(t0) {
2054
2106
  if (alive) {
2055
2107
  setFetched(answer);
2056
2108
  }
2057
- }).catch(_temp7);
2109
+ }).catch(_temp8);
2058
2110
  return () => {
2059
2111
  alive = false;
2060
2112
  };
@@ -2076,7 +2128,7 @@ export function ChangedFilesRow(t0) {
2076
2128
  const {
2077
2129
  keyOf
2078
2130
  } = useChatScope();
2079
- const flash = useTimelineFlash(_temp8);
2131
+ const flash = useTimelineFlash(_temp9);
2080
2132
  let t6;
2081
2133
  if ($[13] !== chatId || $[14] !== flash || $[15] !== keyOf || $[16] !== turnId) {
2082
2134
  t6 = flash !== null && flash.opens && flash.key === keyOf(chatId) && flash.rowId === `files-${turnId}` ? flash.nonce : 0;
@@ -2095,7 +2147,7 @@ export function ChangedFilesRow(t0) {
2095
2147
  const t8 = checkpointDiff.truncated;
2096
2148
  let t9;
2097
2149
  if ($[18] !== files) {
2098
- t9 = files.reduce(_temp9, 0);
2150
+ t9 = files.reduce(_temp0, 0);
2099
2151
  $[18] = files;
2100
2152
  $[19] = t9;
2101
2153
  } else {
@@ -2103,7 +2155,7 @@ export function ChangedFilesRow(t0) {
2103
2155
  }
2104
2156
  let t10;
2105
2157
  if ($[20] !== files) {
2106
- t10 = files.reduce(_temp0, 0);
2158
+ t10 = files.reduce(_temp1, 0);
2107
2159
  $[20] = files;
2108
2160
  $[21] = t10;
2109
2161
  } else {
@@ -2193,16 +2245,16 @@ export function ChangedFilesRow(t0) {
2193
2245
  }
2194
2246
  return t7;
2195
2247
  }
2196
- function _temp0(sum_0, file_0) {
2248
+ function _temp1(sum_0, file_0) {
2197
2249
  return sum_0 + file_0.deleted;
2198
2250
  }
2199
- function _temp9(sum, file) {
2251
+ function _temp0(sum, file) {
2200
2252
  return sum + file.added;
2201
2253
  }
2202
- function _temp8(s) {
2254
+ function _temp9(s) {
2203
2255
  return s.target;
2204
2256
  }
2205
- function _temp7() {}
2257
+ function _temp8() {}
2206
2258
  function ProviderReviewFiles(t0) {
2207
2259
  const $ = _c(16);
2208
2260
  const {
@@ -2228,7 +2280,7 @@ function ProviderReviewFiles(t0) {
2228
2280
  } else {
2229
2281
  t2 = $[4];
2230
2282
  }
2231
- t1 = reviews.filter(t2).flatMap(_temp1);
2283
+ t1 = reviews.filter(t2).flatMap(_temp10);
2232
2284
  $[0] = open;
2233
2285
  $[1] = reviews;
2234
2286
  $[2] = t1;
@@ -2286,7 +2338,7 @@ function ProviderReviewFiles(t0) {
2286
2338
  return t2;
2287
2339
  }
2288
2340
  /* The fallback card, built from what the CLI itself reported about its edits. */
2289
- function _temp1(t0) {
2341
+ function _temp10(t0) {
2290
2342
  const {
2291
2343
  reviews: reviews_0
2292
2344
  } = t0;
@@ -2328,7 +2380,7 @@ function ProviderChangedFiles(t0) {
2328
2380
  entryFor(change.path || tool.id).edits.push(change);
2329
2381
  }
2330
2382
  }
2331
- t1 = [...byPath].map(_temp10);
2383
+ t1 = [...byPath].map(_temp11);
2332
2384
  $[0] = tools;
2333
2385
  $[1] = byPath;
2334
2386
  $[2] = t1;
@@ -2368,7 +2420,7 @@ function ProviderChangedFiles(t0) {
2368
2420
  return t3;
2369
2421
  }
2370
2422
  /* "Working for 00:14". */
2371
- function _temp10(t0) {
2423
+ function _temp11(t0) {
2372
2424
  const [path_0, entry] = t0;
2373
2425
  return {
2374
2426
  path: path_0,
@@ -259,6 +259,8 @@ declare const _default: {
259
259
  };
260
260
  };
261
261
  group: {
262
+ running_one: string;
263
+ running_other: string;
262
264
  tools: {
263
265
  Read_one: string;
264
266
  Read_other: string;
@@ -259,6 +259,8 @@ export default {
259
259
  }
260
260
  },
261
261
  group: {
262
+ running_one: '{{count}} running',
263
+ running_other: '{{count}} running',
262
264
  tools: {
263
265
  Read_one: 'Read {{count}} file',
264
266
  Read_other: 'Read {{count}} files',
@@ -259,6 +259,8 @@ declare const _default: {
259
259
  };
260
260
  };
261
261
  group: {
262
+ running_one: string;
263
+ running_other: string;
262
264
  tools: {
263
265
  Read_one: string;
264
266
  Read_other: string;
@@ -259,6 +259,8 @@ export default {
259
259
  }
260
260
  },
261
261
  group: {
262
+ running_one: '{{count}} actief',
263
+ running_other: '{{count}} actief',
262
264
  tools: {
263
265
  Read_one: '{{count}} bestand gelezen',
264
266
  Read_other: '{{count}} bestanden gelezen',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents-react",
3
- "version": "0.48.2",
3
+ "version": "0.48.4",
4
4
  "description": "React agent chat threads, composers, approvals, provider accounts and usage views.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -72,11 +72,11 @@
72
72
  "test:visuals": "bun --config=integration.bunfig.toml --conditions=source test ./src/chat/visual-viewport.integration.test.ts"
73
73
  },
74
74
  "dependencies": {
75
- "@adecore/agent-contracts": "0.48.2",
76
- "@adecore/editor": "0.48.2",
77
- "@adecore/editor-react": "0.48.2",
78
- "@adecore/intelligent-ui": "0.48.2",
79
- "@adecore/merge": "0.48.2",
75
+ "@adecore/agent-contracts": "0.48.4",
76
+ "@adecore/editor": "0.48.4",
77
+ "@adecore/editor-react": "0.48.4",
78
+ "@adecore/intelligent-ui": "0.48.4",
79
+ "@adecore/merge": "0.48.4",
80
80
  "@codemirror/commands": "^6.11.1",
81
81
  "@codemirror/language": "^6.13.1",
82
82
  "@codemirror/state": "^6.7.6",
@@ -100,14 +100,14 @@
100
100
  "zustand": "^5.0.16"
101
101
  },
102
102
  "peerDependencies": {
103
- "@adecore/ui": "^0.48.2",
103
+ "@adecore/ui": "^0.48.4",
104
104
  "i18next": "^26.4.2",
105
105
  "react": "^19.3.0",
106
106
  "react-dom": "^19.3.0",
107
107
  "react-i18next": "^17.0.15"
108
108
  },
109
109
  "devDependencies": {
110
- "@adecore/ui": "0.48.2",
110
+ "@adecore/ui": "0.48.4",
111
111
  "@types/bun": "^1.4.4",
112
112
  "@types/react": "^19.3.0",
113
113
  "@types/react-dom": "^19.3.0",
@@ -352,32 +352,22 @@ function flushTools(buffer: ChatToolItem[], rows: TimelineRow[], options: Timeli
352
352
  }
353
353
 
354
354
  const tools = buffer.splice(0);
355
- const live = tools.filter((tool) => tool.state === 'running');
356
- const settled = tools.filter((tool) => tool.state !== 'running');
357
-
358
- if (settled.length === 1) {
359
- rows.push({ kind: 'work', id: settled[0]!.id, tool: settled[0]! });
360
- } else if (settled.length > 1) {
361
- const id = `group-${settled[0]!.id}`;
362
- const expanded = options.expandedGroups.has(id);
363
- const looked = lookSummary(settled, options.commandLooks);
364
-
365
- rows.push(
366
- looked === null
367
- ? { kind: 'work-group', id, tools: settled, summary: summarizeGroup(settled), expanded }
368
- : { kind: 'work-group', id, tools: settled, summary: looked.summary, expanded, look: looked.look }
369
- );
355
+ const first = tools[0]!;
356
+ const id = `group-${first.id}`;
357
+ const expanded = options.expandedGroups.has(id);
358
+ const looked = lookSummary(tools, options.commandLooks);
359
+
360
+ rows.push(
361
+ looked === null
362
+ ? { kind: 'work-group', id, tools, summary: summarizeGroup(tools), expanded }
363
+ : { kind: 'work-group', id, tools, summary: looked.summary, expanded, look: looked.look }
364
+ );
370
365
 
371
- if (expanded) {
372
- for (const tool of settled) {
373
- rows.push({ kind: 'work', id: tool.id, tool });
374
- }
366
+ if (expanded) {
367
+ for (const tool of tools) {
368
+ rows.push({ kind: tool.state === 'running' ? 'work-live' : 'work', id: tool.id, tool });
375
369
  }
376
370
  }
377
-
378
- for (const tool of live) {
379
- rows.push({ kind: 'work-live', id: tool.id, tool });
380
- }
381
371
  }
382
372
 
383
373
  function isImageRow(row: TimelineRow): boolean {
@@ -539,7 +529,10 @@ function lastAssistantRow(rows: TimelineRow[]): TimelineRow | null {
539
529
  continue;
540
530
  }
541
531
 
542
- if (row.kind === 'work' && refused.has(row.tool.toolUseId)) {
532
+ if (
533
+ (row.kind === 'work' && refused.has(row.tool.toolUseId)) ||
534
+ (row.kind === 'work-group' && row.tools.length === 1 && refused.has(row.tools[0]!.toolUseId))
535
+ ) {
543
536
  continue;
544
537
  }
545
538
 
@@ -566,7 +559,8 @@ function withLiveThought(rows: TimelineRow[], items: readonly ChatItem[]): Timel
566
559
  }
567
560
 
568
561
  const after = new Set(items.slice(thoughtAt + 1).map((item) => item.id));
569
- const index = rows.findIndex((row) => row.kind === 'work-live' && after.has(row.tool.id));
562
+ const grouped = new Set(rows.flatMap((row) => (row.kind === 'work-group' ? row.tools.map((tool) => tool.id) : [])));
563
+ const index = rows.findIndex((row) => row.kind === 'work-live' && after.has(row.tool.id) && !grouped.has(row.tool.id));
570
564
  const call = rows[index];
571
565
  const shownAt = rows.findIndex((row) => row.kind === 'thinking' && row.id === thought.id);
572
566
  const inSight = shownAt !== -1 && shownAt < index && !rows.slice(shownAt + 1, index).some((row) => row.kind === 'work' || row.kind === 'work-group');
@@ -160,9 +160,9 @@ export function ToggleLine({
160
160
  }) {
161
161
  const classes = clsx(
162
162
  // Fix the width so long commands reach the truncation inside the negative margins.
163
- 'group/line -mx-1 mb-0.5 flex h-7 w-[calc(100%+8px)] items-center gap-2 rounded-md px-1 text-left text-xs text-text-muted',
163
+ 'group/line -mx-1 mb-0.5 flex h-7 w-[calc(100%+8px)] items-center gap-2 rounded-md px-1 text-left text-xs',
164
164
  onToggle !== undefined && 'hover:bg-surface-hover',
165
- failed && 'text-status-error',
165
+ failed ? 'text-status-error' : 'text-text-muted',
166
166
  className
167
167
  );
168
168
 
@@ -208,7 +208,7 @@ export function ToggleLine({
208
208
  }
209
209
 
210
210
  return (
211
- <button className={classes} onClick={onToggle}>
211
+ <button className={classes} onClick={onToggle} aria-expanded={open}>
212
212
  {content}
213
213
  </button>
214
214
  );
@@ -536,16 +536,23 @@ export function WorkGroupRow({
536
536
  expanded: boolean;
537
537
  onToggle(): void;
538
538
  }) {
539
+ const { t } = useTranslation('agent-chat');
540
+ const running = tools.filter((tool) => tool.state === 'running').length;
539
541
  const failed = tools.some((tool) => tool.state === 'error');
540
542
 
541
543
  return (
542
544
  <div>
543
545
  <ToggleLine
544
- icon={look === undefined ? toolIcon(tools[0]!.name) : <look.Mark size={12} />}
545
- label={look?.brand === undefined ? summary : withBrand(summary, [look.brand])}
546
+ icon={running > 0 ? <Spinner size={12} /> : look === undefined ? toolIcon(tools[0]!.name) : <look.Mark size={12} />}
547
+ label={
548
+ <span className="tabular-nums">
549
+ {running > 0 ? t('group.toolCalls', { count: tools.length }) : look?.brand === undefined ? summary : withBrand(summary, [look.brand])}
550
+ </span>
551
+ }
546
552
  open={expanded}
547
553
  onToggle={onToggle}
548
554
  failed={failed}
555
+ trailing={running > 0 && <span className="shrink-0 text-text-faint tabular-nums">{t('group.running', { count: running })}</span>}
549
556
  time={tools[0]!.createdAt}
550
557
  />
551
558
  </div>
@@ -259,6 +259,8 @@ export default {
259
259
  }
260
260
  },
261
261
  group: {
262
+ running_one: '{{count}} running',
263
+ running_other: '{{count}} running',
262
264
  tools: {
263
265
  Read_one: 'Read {{count}} file',
264
266
  Read_other: 'Read {{count}} files',
@@ -259,6 +259,8 @@ export default {
259
259
  }
260
260
  },
261
261
  group: {
262
+ running_one: '{{count}} actief',
263
+ running_other: '{{count}} actief',
262
264
  tools: {
263
265
  Read_one: '{{count}} bestand gelezen',
264
266
  Read_other: '{{count}} bestanden gelezen',