@tangle-network/agent-app 1.0.19 → 1.0.21

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.
@@ -2,7 +2,7 @@ import {
2
2
  ReasoningRow,
3
3
  chatToolCallPart,
4
4
  resolveToolPresentation
5
- } from "../chunk-4XGDZPHB.js";
5
+ } from "../chunk-GN5JME4V.js";
6
6
  import "../chunk-UHSUY6H6.js";
7
7
  import "../chunk-3HUFJ5LO.js";
8
8
  import "../chunk-7PULOECS.js";
@@ -25,8 +25,8 @@ import {
25
25
  import "../chunk-ZAMHLXNS.js";
26
26
  import "../chunk-SJWIZT7B.js";
27
27
  import "../chunk-RASGKEAL.js";
28
- import "../chunk-TEZETVLE.js";
29
- import "../chunk-ZA56ZOIT.js";
28
+ import "../chunk-23FH5TF5.js";
29
+ import "../chunk-OTSNOIFJ.js";
30
30
  import {
31
31
  AsyncView
32
32
  } from "../chunk-AVP5SNIG.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  presentHubAction
3
- } from "./chunk-ZA56ZOIT.js";
3
+ } from "./chunk-OTSNOIFJ.js";
4
4
 
5
5
  // src/hub-approvals-react/feedback.tsx
6
6
  import { forwardRef, useEffect, useId, useImperativeHandle, useRef, useState } from "react";
@@ -191,4 +191,4 @@ export {
191
191
  ReviewFeedbackForm,
192
192
  HubPreviewFeedback
193
193
  };
194
- //# sourceMappingURL=chunk-TEZETVLE.js.map
194
+ //# sourceMappingURL=chunk-23FH5TF5.js.map
@@ -46,7 +46,7 @@ import {
46
46
  } from "./chunk-SJWIZT7B.js";
47
47
  import {
48
48
  ReviewFeedbackForm
49
- } from "./chunk-TEZETVLE.js";
49
+ } from "./chunk-23FH5TF5.js";
50
50
  import {
51
51
  AsyncView
52
52
  } from "./chunk-AVP5SNIG.js";
@@ -7037,7 +7037,7 @@ function comparisonOrder(items, seed) {
7037
7037
  function ordered(items) {
7038
7038
  return [...items].sort((left, right) => left.createdAt - right.createdAt || (left.id < right.id ? -1 : left.id > right.id ? 1 : 0));
7039
7039
  }
7040
- function ReviewInbox({ items, initialSelectedId, renderItem, renderCompareBrief, onVerdict, onFeedback, loading = false, error, onRefresh }) {
7040
+ function ReviewInbox({ items, initialSelectedId, renderItem, renderCompareBrief, onVerdict, resolveCurrentRevision, onFeedback, loading = false, error, onRefresh }) {
7041
7041
  const [round2, setRound] = useState24(() => ordered(items).map((item) => item.id));
7042
7042
  const [answered, setAnswered] = useState24(/* @__PURE__ */ new Set());
7043
7043
  const [resolvedElsewhere, setResolvedElsewhere] = useState24(/* @__PURE__ */ new Set());
@@ -7115,6 +7115,12 @@ function ReviewInbox({ items, initialSelectedId, renderItem, renderCompareBrief,
7115
7115
  pending.current = true;
7116
7116
  setBusy(true);
7117
7117
  try {
7118
+ if (resolveCurrentRevision) {
7119
+ const current = await resolveCurrentRevision(item);
7120
+ if (current !== void 0 && current !== item.revision) {
7121
+ throw new Error(`This item changed after it was shown (revision ${String(item.revision)} \u2192 ${String(current)}). Review the updated item before deciding.`);
7122
+ }
7123
+ }
7118
7124
  await onVerdict(item, { ...value, ...comparisons.current.get(item.id) ? { comparison: positionOf(item) } : {} });
7119
7125
  const nextAnswered = new Set(answered).add(revisionKey(item));
7120
7126
  setAnswered(nextAnswered);
@@ -8735,4 +8741,4 @@ export {
8735
8741
  AgentProfileChoices,
8736
8742
  ComposerProfilePill
8737
8743
  };
8738
- //# sourceMappingURL=chunk-4XGDZPHB.js.map
8744
+ //# sourceMappingURL=chunk-GN5JME4V.js.map