@adecore/agents-react 0.55.1 → 0.55.2

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 (53) hide show
  1. package/dist/agents/account-limits.js +5 -2
  2. package/dist/chat/logic/resume-compaction.js +2 -2
  3. package/dist/chat/logic/timeline.d.ts +1 -0
  4. package/dist/chat/logic/timeline.js +4 -1
  5. package/dist/chat/ui/RunSettings.js +63 -58
  6. package/dist/chat/ui/index.d.ts +1 -1
  7. package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +130 -121
  8. package/dist/chat/ui/intelligent-ui/UiReply.js +28 -9
  9. package/dist/chat/ui/intelligent-ui/render-context.d.ts +2 -0
  10. package/dist/chat/ui/intelligent-ui/renderers/data.js +124 -94
  11. package/dist/chat/ui/intelligent-ui/use-ui-queries.d.ts +8 -2
  12. package/dist/chat/ui/intelligent-ui/use-ui-queries.js +162 -74
  13. package/dist/chat/ui/rows/MessageRows.d.ts +2 -1
  14. package/dist/chat/ui/rows/MessageRows.js +48 -40
  15. package/dist/chat/ui/rows/Rows.js +32 -30
  16. package/dist/locales/en/agent-chat.d.ts +3 -0
  17. package/dist/locales/en/agent-chat.js +3 -0
  18. package/dist/locales/en/agent-usage.d.ts +10 -0
  19. package/dist/locales/en/agent-usage.js +10 -0
  20. package/dist/locales/nl/agent-chat.d.ts +3 -0
  21. package/dist/locales/nl/agent-chat.js +3 -0
  22. package/dist/locales/nl/agent-usage.d.ts +10 -0
  23. package/dist/locales/nl/agent-usage.js +10 -0
  24. package/dist/theme.css +9 -4
  25. package/dist/usage/LimitProvenance.d.ts +5 -0
  26. package/dist/usage/LimitProvenance.js +104 -0
  27. package/dist/usage/LimitsList.js +153 -131
  28. package/dist/usage/UsageLimits.d.ts +1 -1
  29. package/dist/usage/UsageLimits.js +241 -158
  30. package/dist/usage/limit-groups.d.ts +2 -0
  31. package/dist/usage/limit-groups.js +12 -3
  32. package/package.json +9 -9
  33. package/src/agents/account-limits.ts +6 -2
  34. package/src/chat/logic/resume-compaction.ts +2 -2
  35. package/src/chat/logic/timeline.ts +7 -2
  36. package/src/chat/ui/RunSettings.tsx +9 -3
  37. package/src/chat/ui/index.ts +1 -0
  38. package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +5 -2
  39. package/src/chat/ui/intelligent-ui/UiReply.tsx +25 -6
  40. package/src/chat/ui/intelligent-ui/render-context.ts +5 -0
  41. package/src/chat/ui/intelligent-ui/renderers/data.tsx +58 -27
  42. package/src/chat/ui/intelligent-ui/use-ui-queries.ts +81 -61
  43. package/src/chat/ui/rows/MessageRows.tsx +11 -2
  44. package/src/chat/ui/rows/Rows.tsx +1 -1
  45. package/src/locales/en/agent-chat.ts +3 -0
  46. package/src/locales/en/agent-usage.ts +10 -0
  47. package/src/locales/nl/agent-chat.ts +3 -0
  48. package/src/locales/nl/agent-usage.ts +10 -0
  49. package/src/theme.css +9 -4
  50. package/src/usage/LimitProvenance.tsx +23 -0
  51. package/src/usage/LimitsList.tsx +10 -4
  52. package/src/usage/UsageLimits.tsx +88 -18
  53. package/src/usage/limit-groups.ts +16 -3
@@ -41,7 +41,10 @@ export function continueTargets(accounts, snapshot, kind, current) {
41
41
  export function continueTarget(accounts, snapshot, kind, current) {
42
42
  return continueTargets(accounts, snapshot, kind, current)[0] ?? null;
43
43
  }
44
- /* Whether another account a chat could go on under has no numbers yet, since the machine only reads one in use by itself. */
44
+ /* Whether another account needs a first read or a retry before its room can be offered. */
45
45
  export function hasUnreadAccount(accounts, snapshot, kind, current) {
46
- return others(accounts, kind, current).some(entry => (limitsOfAccount(snapshot, entry.id)?.checkedAt ?? 0) === 0);
46
+ return others(accounts, kind, current).some(entry => {
47
+ const reading = limitsOfAccount(snapshot, entry.id);
48
+ return (reading?.checkedAt ?? 0) === 0 || reading?.unavailable?.reason === 'failed';
49
+ });
47
50
  }
@@ -35,8 +35,8 @@ function offerableTurn({
35
35
  if (turn === null || turn.endedAt === null || turn.id === dismissedTurnId) {
36
36
  return null;
37
37
  }
38
- // `contextTokens` keeps the old number until the next request, so the offer would return right after
39
- // a compaction. A native one is a turn without a message of the person, hence the look at the turn.
38
+ // A host from before compactions moved the meter, or a CLI whose estimate after the fold stays large,
39
+ // would bring the offer back right after a compaction. That is a turn without a message of the person, hence the look at the turn.
40
40
  if (items.some(item => item.kind === 'compaction' && item.turnId === turn.id)) {
41
41
  return null;
42
42
  }
@@ -85,6 +85,7 @@ export type TimelineRow = {
85
85
  kind: 'compaction';
86
86
  id: string;
87
87
  preTokens: number | null;
88
+ postTokens?: number;
88
89
  } | {
89
90
  kind: 'selection-switch';
90
91
  id: string;
@@ -429,7 +429,10 @@ function rowsForItems(items, options, children) {
429
429
  rows.push({
430
430
  kind: 'compaction',
431
431
  id: item.id,
432
- preTokens: item.preTokens
432
+ preTokens: item.preTokens,
433
+ ...(item.postTokens === undefined ? {} : {
434
+ postTokens: item.postTokens
435
+ })
433
436
  });
434
437
  break;
435
438
  case 'turn':
@@ -1221,7 +1221,7 @@ function ContextRing(t0) {
1221
1221
  }
1222
1222
  /* How full the context is and what fills it, and the one thing to do about a full context. */
1223
1223
  function ContextUsage(t0) {
1224
- const $ = _c(35);
1224
+ const $ = _c(37);
1225
1225
  const {
1226
1226
  usage,
1227
1227
  disabled,
@@ -1232,6 +1232,7 @@ function ContextUsage(t0) {
1232
1232
  } = useTranslation("agent-chat");
1233
1233
  let T0;
1234
1234
  let fraction;
1235
+ let pending;
1235
1236
  let t1;
1236
1237
  let t2;
1237
1238
  let t3;
@@ -1241,33 +1242,34 @@ function ContextUsage(t0) {
1241
1242
  const percent = Math.round(fraction * 100);
1242
1243
  const segments = contextSegments(usage);
1243
1244
  const used = formatTokens(usage.contextTokens);
1245
+ pending = usage.contextPending === true;
1244
1246
  T0 = Menu.Group;
1245
1247
  t1 = "flex flex-col gap-2 px-2.5 py-1.5";
1246
1248
  let t5;
1247
- if ($[8] !== t) {
1249
+ if ($[9] !== t) {
1248
1250
  t5 = t("contextMeter.title");
1249
- $[8] = t;
1250
- $[9] = t5;
1251
+ $[9] = t;
1252
+ $[10] = t5;
1251
1253
  } else {
1252
- t5 = $[9];
1254
+ t5 = $[10];
1253
1255
  }
1254
1256
  let t6;
1255
- if ($[10] !== t5) {
1257
+ if ($[11] !== t5) {
1256
1258
  t6 = /*#__PURE__*/_jsx(Menu.GroupLabel, {
1257
1259
  unstyled: true,
1258
1260
  className: "min-w-0 grow truncate text-sm font-medium text-text",
1259
1261
  children: t5
1260
1262
  });
1261
- $[10] = t5;
1262
- $[11] = t6;
1263
+ $[11] = t5;
1264
+ $[12] = t6;
1263
1265
  } else {
1264
- t6 = $[11];
1266
+ t6 = $[12];
1265
1267
  }
1266
1268
  t2 = /*#__PURE__*/_jsxs("div", {
1267
1269
  className: "flex items-center gap-2",
1268
1270
  children: [t6, /*#__PURE__*/_jsx("span", {
1269
1271
  className: clsx("shrink-0 text-xs tabular-nums", fraction >= 0.7 ? contextTone(fraction) : "text-text-faint"),
1270
- children: usage.contextWindow ? t("contextMeter.of", {
1272
+ children: pending ? t("contextMeter.pending") : usage.contextWindow ? t("contextMeter.of", {
1271
1273
  used,
1272
1274
  window: formatTokens(usage.contextWindow)
1273
1275
  }) : t("contextMeter.used", {
@@ -1275,7 +1277,7 @@ function ContextUsage(t0) {
1275
1277
  })
1276
1278
  })]
1277
1279
  });
1278
- t3 = usage.contextWindow ? /*#__PURE__*/_jsx("div", {
1280
+ t3 = usage.contextWindow && !pending ? /*#__PURE__*/_jsx("div", {
1279
1281
  role: "meter",
1280
1282
  "aria-valuenow": percent,
1281
1283
  "aria-valuemin": 0,
@@ -1313,62 +1315,65 @@ function ContextUsage(t0) {
1313
1315
  $[1] = usage;
1314
1316
  $[2] = T0;
1315
1317
  $[3] = fraction;
1316
- $[4] = t1;
1317
- $[5] = t2;
1318
- $[6] = t3;
1319
- $[7] = t4;
1318
+ $[4] = pending;
1319
+ $[5] = t1;
1320
+ $[6] = t2;
1321
+ $[7] = t3;
1322
+ $[8] = t4;
1320
1323
  } else {
1321
1324
  T0 = $[2];
1322
1325
  fraction = $[3];
1323
- t1 = $[4];
1324
- t2 = $[5];
1325
- t3 = $[6];
1326
- t4 = $[7];
1326
+ pending = $[4];
1327
+ t1 = $[5];
1328
+ t2 = $[6];
1329
+ t3 = $[7];
1330
+ t4 = $[8];
1327
1331
  }
1328
1332
  let t5;
1329
- if ($[12] !== fraction || $[13] !== t || $[14] !== usage.contextWindow) {
1330
- t5 = usage.contextWindow ? t("contextMeter.percentUsed", {
1333
+ if ($[13] !== fraction || $[14] !== pending || $[15] !== t || $[16] !== usage.contextWindow) {
1334
+ t5 = usage.contextWindow && !pending ? t("contextMeter.percentUsed", {
1331
1335
  percent: formatPercent(fraction * 100)
1332
1336
  }) : null;
1333
- $[12] = fraction;
1334
- $[13] = t;
1335
- $[14] = usage.contextWindow;
1336
- $[15] = t5;
1337
+ $[13] = fraction;
1338
+ $[14] = pending;
1339
+ $[15] = t;
1340
+ $[16] = usage.contextWindow;
1341
+ $[17] = t5;
1337
1342
  } else {
1338
- t5 = $[15];
1343
+ t5 = $[17];
1339
1344
  }
1340
1345
  let t6;
1341
- if ($[16] !== t5) {
1346
+ if ($[18] !== t5) {
1342
1347
  t6 = /*#__PURE__*/_jsx("span", {
1343
1348
  className: "min-w-0 grow truncate",
1344
1349
  children: t5
1345
1350
  });
1346
- $[16] = t5;
1347
- $[17] = t6;
1351
+ $[18] = t5;
1352
+ $[19] = t6;
1348
1353
  } else {
1349
- t6 = $[17];
1354
+ t6 = $[19];
1350
1355
  }
1351
1356
  const t7 = disabled || usage.contextTokens === 0 || usage.turns === 0;
1352
1357
  let t8;
1353
- if ($[18] !== t) {
1358
+ if ($[20] !== t) {
1354
1359
  t8 = t("contextMeter.compactNow");
1355
- $[18] = t;
1356
- $[19] = t8;
1360
+ $[20] = t;
1361
+ $[21] = t8;
1357
1362
  } else {
1358
- t8 = $[19];
1363
+ t8 = $[21];
1359
1364
  }
1360
1365
  let t9;
1361
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
1366
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
1362
1367
  t9 = /*#__PURE__*/_jsx(Icon, {
1363
1368
  icon: ChevronRight,
1364
1369
  size: 12
1365
1370
  });
1366
- $[20] = t9;
1371
+ $[22] = t9;
1367
1372
  } else {
1368
- t9 = $[20];
1373
+ t9 = $[22];
1369
1374
  }
1370
1375
  let t10;
1371
- if ($[21] !== onCompact || $[22] !== t7 || $[23] !== t8) {
1376
+ if ($[23] !== onCompact || $[24] !== t7 || $[25] !== t8) {
1372
1377
  t10 = /*#__PURE__*/_jsxs(Menu.Item, {
1373
1378
  unstyled: true,
1374
1379
  className: "flex shrink-0 cursor-default items-center gap-0.5 rounded font-medium text-accent outline-none data-disabled:opacity-50 data-highlighted:underline",
@@ -1376,40 +1381,40 @@ function ContextUsage(t0) {
1376
1381
  onClick: onCompact,
1377
1382
  children: [t8, t9]
1378
1383
  });
1379
- $[21] = onCompact;
1380
- $[22] = t7;
1381
- $[23] = t8;
1382
- $[24] = t10;
1384
+ $[23] = onCompact;
1385
+ $[24] = t7;
1386
+ $[25] = t8;
1387
+ $[26] = t10;
1383
1388
  } else {
1384
- t10 = $[24];
1389
+ t10 = $[26];
1385
1390
  }
1386
1391
  let t11;
1387
- if ($[25] !== t10 || $[26] !== t6) {
1392
+ if ($[27] !== t10 || $[28] !== t6) {
1388
1393
  t11 = /*#__PURE__*/_jsxs("div", {
1389
1394
  className: "flex items-center gap-2 text-xs text-text-faint tabular-nums",
1390
1395
  children: [t6, t10]
1391
1396
  });
1392
- $[25] = t10;
1393
- $[26] = t6;
1394
- $[27] = t11;
1397
+ $[27] = t10;
1398
+ $[28] = t6;
1399
+ $[29] = t11;
1395
1400
  } else {
1396
- t11 = $[27];
1401
+ t11 = $[29];
1397
1402
  }
1398
1403
  let t12;
1399
- if ($[28] !== T0 || $[29] !== t1 || $[30] !== t11 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4) {
1404
+ if ($[30] !== T0 || $[31] !== t1 || $[32] !== t11 || $[33] !== t2 || $[34] !== t3 || $[35] !== t4) {
1400
1405
  t12 = /*#__PURE__*/_jsxs(T0, {
1401
1406
  className: t1,
1402
1407
  children: [t2, t3, t4, t11]
1403
1408
  });
1404
- $[28] = T0;
1405
- $[29] = t1;
1406
- $[30] = t11;
1407
- $[31] = t2;
1408
- $[32] = t3;
1409
- $[33] = t4;
1410
- $[34] = t12;
1411
- } else {
1412
- t12 = $[34];
1409
+ $[30] = T0;
1410
+ $[31] = t1;
1411
+ $[32] = t11;
1412
+ $[33] = t2;
1413
+ $[34] = t3;
1414
+ $[35] = t4;
1415
+ $[36] = t12;
1416
+ } else {
1417
+ t12 = $[36];
1413
1418
  }
1414
1419
  return t12;
1415
1420
  }
@@ -39,7 +39,7 @@ export { UiReply } from './intelligent-ui/UiReply.js';
39
39
  export { uiChartData, type UiChartSeries, type UiChartValues, type UiChartData } from './intelligent-ui/chart-data.js';
40
40
  export { uiNodeLabel } from './intelligent-ui/node-text.js';
41
41
  export { UI_RENDERERS } from './intelligent-ui/registry.js';
42
- export type { UiRenderContext, UiRendererProps, UiLinkTarget, UiLink, UiPlacePoint, UiAnswer, UiLiveStatus, UiLiveValue, UiRenderer, UiRenderers } from './intelligent-ui/render-context.js';
42
+ export type { UiRenderContext, UiRendererProps, UiLinkTarget, UiLink, UiPlacePoint, UiAnswer, UiLiveStatus, UiLiveValue, UiLiveNodeState, UiRenderer, UiRenderers } from './intelligent-ui/render-context.js';
43
43
  export { uiTableColumns, type UiColumnKind, type UiTableColumn } from './intelligent-ui/table-data.js';
44
44
  export type { QuoteTaker } from './quote-selection.js';
45
45
  export { ReplyContext } from './reply-context.js';
@@ -14,7 +14,7 @@ const NO_FIXES = [];
14
14
  const READING_SPINNER_MS = 1000;
15
15
  /* The one sign of a live block: what it reads, and when it last read it. A reading spins only after a second. */
16
16
  function LivePart(t0) {
17
- const $ = _c(39);
17
+ const $ = _c(33);
18
18
  const {
19
19
  live
20
20
  } = t0;
@@ -85,44 +85,31 @@ function LivePart(t0) {
85
85
  }
86
86
  const words = t3;
87
87
  let t4;
88
- if ($[11] !== live.code || $[12] !== live.reason || $[13] !== live.state || $[14] !== t) {
89
- t4 = live.state === "failed" || live.state === "refused" ? uiReasonText(t, live.code, live.reason) : undefined;
90
- $[11] = live.code;
91
- $[12] = live.reason;
92
- $[13] = live.state;
93
- $[14] = t;
94
- $[15] = t4;
95
- } else {
96
- t4 = $[15];
97
- }
98
- const reason = t4;
99
- let t5;
100
- if ($[16] !== live.sources || $[17] !== reason || $[18] !== t) {
101
- t5 = reason !== undefined ? reason : live.sources.length > 0 ? t("blocks.live.sources", {
88
+ if ($[11] !== live.sources || $[12] !== t) {
89
+ t4 = live.sources.length > 0 ? t("blocks.live.sources", {
102
90
  sources: live.sources.join(", ")
103
91
  }) : null;
104
- $[16] = live.sources;
105
- $[17] = reason;
106
- $[18] = t;
107
- $[19] = t5;
92
+ $[11] = live.sources;
93
+ $[12] = t;
94
+ $[13] = t4;
108
95
  } else {
109
- t5 = $[19];
96
+ t4 = $[13];
110
97
  }
111
- const hint = t5;
112
- const t6 = hint === null ? undefined : 0;
113
- let t7;
114
- if ($[20] !== words) {
115
- t7 = /*#__PURE__*/_jsx("span", {
98
+ const hint = t4;
99
+ const t5 = hint === null ? undefined : 0;
100
+ let t6;
101
+ if ($[14] !== words) {
102
+ t6 = /*#__PURE__*/_jsx("span", {
116
103
  children: words
117
104
  });
118
- $[20] = words;
119
- $[21] = t7;
105
+ $[14] = words;
106
+ $[15] = t6;
120
107
  } else {
121
- t7 = $[21];
108
+ t6 = $[15];
122
109
  }
123
- let t8;
124
- if ($[22] !== ago || $[23] !== live.state || $[24] !== readAt) {
125
- t8 = readAt !== null && live.state !== "refused" && /*#__PURE__*/_jsxs(_Fragment, {
110
+ let t7;
111
+ if ($[16] !== ago || $[17] !== live.state || $[18] !== readAt) {
112
+ t7 = readAt !== null && live.state !== "refused" && /*#__PURE__*/_jsxs(_Fragment, {
126
113
  children: [/*#__PURE__*/_jsx("span", {
127
114
  "aria-hidden": true,
128
115
  children: "\xB7"
@@ -134,16 +121,16 @@ function LivePart(t0) {
134
121
  })
135
122
  })]
136
123
  });
137
- $[22] = ago;
138
- $[23] = live.state;
139
- $[24] = readAt;
140
- $[25] = t8;
124
+ $[16] = ago;
125
+ $[17] = live.state;
126
+ $[18] = readAt;
127
+ $[19] = t7;
141
128
  } else {
142
- t8 = $[25];
129
+ t7 = $[19];
143
130
  }
144
- let t9;
145
- if ($[26] !== fresh || $[27] !== readAt || $[28] !== t) {
146
- t9 = readAt === null && fresh && /*#__PURE__*/_jsxs(_Fragment, {
131
+ let t8;
132
+ if ($[20] !== fresh || $[21] !== readAt || $[22] !== t) {
133
+ t8 = readAt === null && fresh && /*#__PURE__*/_jsxs(_Fragment, {
147
134
  children: [/*#__PURE__*/_jsx("span", {
148
135
  "aria-hidden": true,
149
136
  children: "\xB7"
@@ -151,47 +138,47 @@ function LivePart(t0) {
151
138
  children: t("blocks.live.notRead")
152
139
  })]
153
140
  });
154
- $[26] = fresh;
155
- $[27] = readAt;
156
- $[28] = t;
157
- $[29] = t9;
141
+ $[20] = fresh;
142
+ $[21] = readAt;
143
+ $[22] = t;
144
+ $[23] = t8;
158
145
  } else {
159
- t9 = $[29];
146
+ t8 = $[23];
160
147
  }
161
- let t10;
162
- if ($[30] !== icon || $[31] !== t6 || $[32] !== t7 || $[33] !== t8 || $[34] !== t9) {
163
- t10 = /*#__PURE__*/_jsxs("span", {
164
- tabIndex: t6,
148
+ let t9;
149
+ if ($[24] !== icon || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8) {
150
+ t9 = /*#__PURE__*/_jsxs("span", {
151
+ tabIndex: t5,
165
152
  className: "flex items-center gap-1.5",
166
- children: [icon, t7, t8, t9]
153
+ children: [icon, t6, t7, t8]
167
154
  });
168
- $[30] = icon;
169
- $[31] = t6;
170
- $[32] = t7;
171
- $[33] = t8;
172
- $[34] = t9;
173
- $[35] = t10;
155
+ $[24] = icon;
156
+ $[25] = t5;
157
+ $[26] = t6;
158
+ $[27] = t7;
159
+ $[28] = t8;
160
+ $[29] = t9;
174
161
  } else {
175
- t10 = $[35];
162
+ t9 = $[29];
176
163
  }
177
- const body = t10;
178
- let t11;
179
- if ($[36] !== body || $[37] !== hint) {
180
- t11 = hint === null ? body : /*#__PURE__*/_jsx(Tooltip, {
164
+ const body = t9;
165
+ let t10;
166
+ if ($[30] !== body || $[31] !== hint) {
167
+ t10 = hint === null ? body : /*#__PURE__*/_jsx(Tooltip, {
181
168
  label: hint,
182
169
  children: body
183
170
  });
184
- $[36] = body;
185
- $[37] = hint;
186
- $[38] = t11;
171
+ $[30] = body;
172
+ $[31] = hint;
173
+ $[32] = t10;
187
174
  } else {
188
- t11 = $[38];
175
+ t10 = $[32];
189
176
  }
190
- return t11;
177
+ return t10;
191
178
  }
192
179
  /* The line under a block, only when it has something to say: live, answered, noted or drawn as text, in that order. */
193
180
  function UiBlockFooter(t0) {
194
- const $ = _c(25);
181
+ const $ = _c(31);
195
182
  const {
196
183
  live: t1,
197
184
  answered: t2,
@@ -211,18 +198,28 @@ function UiBlockFooter(t0) {
211
198
  return null;
212
199
  }
213
200
  let t5;
214
- if ($[0] !== live) {
215
- t5 = live !== null && /*#__PURE__*/_jsx(LivePart, {
216
- live: live
217
- });
201
+ if ($[0] !== live || $[1] !== t) {
202
+ t5 = live !== null && (live.state === "failed" || live.state === "refused") ? uiReasonText(t, live.code, live.reason) : undefined;
218
203
  $[0] = live;
219
- $[1] = t5;
204
+ $[1] = t;
205
+ $[2] = t5;
220
206
  } else {
221
- t5 = $[1];
207
+ t5 = $[2];
222
208
  }
209
+ const reason = t5;
223
210
  let t6;
224
- if ($[2] !== answered || $[3] !== t) {
225
- t6 = answered !== null && /*#__PURE__*/_jsxs("span", {
211
+ if ($[3] !== live) {
212
+ t6 = live !== null && /*#__PURE__*/_jsx(LivePart, {
213
+ live: live
214
+ });
215
+ $[3] = live;
216
+ $[4] = t6;
217
+ } else {
218
+ t6 = $[4];
219
+ }
220
+ let t7;
221
+ if ($[5] !== answered || $[6] !== t) {
222
+ t7 = answered !== null && /*#__PURE__*/_jsxs("span", {
226
223
  className: "flex items-center gap-1.5",
227
224
  children: [/*#__PURE__*/_jsx("span", {
228
225
  children: t("blocks.answered", {
@@ -236,15 +233,15 @@ function UiBlockFooter(t0) {
236
233
  children: formatMoment(answered.at)
237
234
  })]
238
235
  });
239
- $[2] = answered;
240
- $[3] = t;
241
- $[4] = t6;
236
+ $[5] = answered;
237
+ $[6] = t;
238
+ $[7] = t7;
242
239
  } else {
243
- t6 = $[4];
240
+ t7 = $[7];
244
241
  }
245
- let t7;
246
- if ($[5] !== fixes.length || $[6] !== fixesOpen || $[7] !== listId || $[8] !== t) {
247
- t7 = fixes.length > 0 && /*#__PURE__*/_jsxs("button", {
242
+ let t8;
243
+ if ($[8] !== fixes.length || $[9] !== fixesOpen || $[10] !== listId || $[11] !== t) {
244
+ t8 = fixes.length > 0 && /*#__PURE__*/_jsxs("button", {
248
245
  type: "button",
249
246
  "aria-expanded": fixesOpen,
250
247
  "aria-controls": listId,
@@ -257,17 +254,17 @@ function UiBlockFooter(t0) {
257
254
  count: fixes.length
258
255
  })]
259
256
  });
260
- $[5] = fixes.length;
261
- $[6] = fixesOpen;
262
- $[7] = listId;
263
- $[8] = t;
264
- $[9] = t7;
257
+ $[8] = fixes.length;
258
+ $[9] = fixesOpen;
259
+ $[10] = listId;
260
+ $[11] = t;
261
+ $[12] = t8;
265
262
  } else {
266
- t7 = $[9];
263
+ t8 = $[12];
267
264
  }
268
- let t8;
269
- if ($[10] !== shownAsText || $[11] !== t) {
270
- t8 = shownAsText !== null && /*#__PURE__*/_jsxs("span", {
265
+ let t9;
266
+ if ($[13] !== shownAsText || $[14] !== t) {
267
+ t9 = shownAsText !== null && /*#__PURE__*/_jsxs("span", {
271
268
  className: "flex items-center gap-1.5",
272
269
  children: [/*#__PURE__*/_jsx("span", {
273
270
  children: t("blocks.shownAsText")
@@ -278,54 +275,66 @@ function UiBlockFooter(t0) {
278
275
  children: shownAsText
279
276
  })]
280
277
  });
281
- $[10] = shownAsText;
282
- $[11] = t;
283
- $[12] = t8;
278
+ $[13] = shownAsText;
279
+ $[14] = t;
280
+ $[15] = t9;
284
281
  } else {
285
- t8 = $[12];
282
+ t9 = $[15];
286
283
  }
287
- let t9;
288
- if ($[13] !== t5 || $[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
289
- t9 = /*#__PURE__*/_jsxs("div", {
284
+ let t10;
285
+ if ($[16] !== t6 || $[17] !== t7 || $[18] !== t8 || $[19] !== t9) {
286
+ t10 = /*#__PURE__*/_jsxs("div", {
290
287
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
291
- children: [t5, t6, t7, t8]
288
+ children: [t6, t7, t8, t9]
292
289
  });
293
- $[13] = t5;
294
- $[14] = t6;
295
- $[15] = t7;
296
- $[16] = t8;
297
- $[17] = t9;
290
+ $[16] = t6;
291
+ $[17] = t7;
292
+ $[18] = t8;
293
+ $[19] = t9;
294
+ $[20] = t10;
298
295
  } else {
299
- t9 = $[17];
296
+ t10 = $[20];
300
297
  }
301
- let t10;
302
- if ($[18] !== fixes || $[19] !== fixesOpen || $[20] !== listId) {
303
- t10 = fixes.length > 0 && /*#__PURE__*/_jsx("ul", {
298
+ let t11;
299
+ if ($[21] !== reason) {
300
+ t11 = reason !== undefined && reason !== "" && /*#__PURE__*/_jsx("p", {
301
+ "data-ui-live-reason": true,
302
+ children: reason
303
+ });
304
+ $[21] = reason;
305
+ $[22] = t11;
306
+ } else {
307
+ t11 = $[22];
308
+ }
309
+ let t12;
310
+ if ($[23] !== fixes || $[24] !== fixesOpen || $[25] !== listId) {
311
+ t12 = fixes.length > 0 && /*#__PURE__*/_jsx("ul", {
304
312
  id: listId,
305
313
  hidden: !fixesOpen,
306
314
  className: "flex flex-col gap-0.5 text-text-muted",
307
315
  children: fixes.map(_temp)
308
316
  });
309
- $[18] = fixes;
310
- $[19] = fixesOpen;
311
- $[20] = listId;
312
- $[21] = t10;
317
+ $[23] = fixes;
318
+ $[24] = fixesOpen;
319
+ $[25] = listId;
320
+ $[26] = t12;
313
321
  } else {
314
- t10 = $[21];
322
+ t12 = $[26];
315
323
  }
316
- let t11;
317
- if ($[22] !== t10 || $[23] !== t9) {
318
- t11 = /*#__PURE__*/_jsxs("div", {
324
+ let t13;
325
+ if ($[27] !== t10 || $[28] !== t11 || $[29] !== t12) {
326
+ t13 = /*#__PURE__*/_jsxs("div", {
319
327
  className: "flex flex-col gap-1.5 text-2xs text-text-faint",
320
- children: [t9, t10]
328
+ children: [t10, t11, t12]
321
329
  });
322
- $[22] = t10;
323
- $[23] = t9;
324
- $[24] = t11;
330
+ $[27] = t10;
331
+ $[28] = t11;
332
+ $[29] = t12;
333
+ $[30] = t13;
325
334
  } else {
326
- t11 = $[24];
335
+ t13 = $[30];
327
336
  }
328
- return t11;
337
+ return t13;
329
338
  }
330
339
  function _temp(fix, index) {
331
340
  return /*#__PURE__*/_jsxs("li", {