@opengeni/react-native 6.5.2-canary.41607687019001 → 6.7.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.
@@ -1,6 +1,6 @@
1
+ import { secretInputTraits, defaultSecretFieldMessages, humanInputAnswerLines, isSecretQuestion, initialSecretDraft, secretUsernameTraits, secretCanGenerate, SECRET_SAVE_TO_OPTIONS, secretSubmission, secretPatternMismatch } from './chunk-6D7LKJOZ.js';
1
2
  import { ActivityDisclosure, useNativeTimelineMessages, DecisionCard, DecisionActions, DecisionButton, useReleaseFollow, ShimmerText, withAlpha, ReleaseFollowProvider, DecisionMark, DecisionMeta, DecisionLink, blendOver, NativeTimelineMessagesProvider, ROW_MIN_HEIGHT, PulseDot, BodyNote, PayloadBlock, TermBlock, Chip, RunningPreview } from './chunk-23Y3ABT4.js';
2
3
  import { NativeImageViewer } from './chunk-PUHPX2OL.js';
3
- import { secretInputTraits, defaultSecretFieldMessages, humanInputAnswerLines, isSecretQuestion, initialSecretDraft, secretUsernameTraits, secretCanGenerate, SECRET_SAVE_TO_OPTIONS, secretSubmission, secretPatternMismatch } from './chunk-6D7LKJOZ.js';
4
4
  import { useOpenNativeLink } from './chunk-6BMCWK7G.js';
5
5
  import { useNativeTimelineTheme, Icon, fontStyle, BAR_MAX_FONT_SCALE } from './chunk-4IFOWV3O.js';
6
6
  import { buildTimeline, groupTimeline, conversationTimeline, useSessionStartupTimeline, approvalsDecidable, useSessionStart, personalMachineCopy, sessionAdmissionApprovedElsewhereCopy, sessionAdmissionCopy } from '@opengeni/react/session';
@@ -6787,6 +6787,7 @@ function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6787
6787
  const [pending, setPending] = useState({});
6788
6788
  const [settled, setSettled] = useState({});
6789
6789
  const [details, setDetails] = useState({});
6790
+ const [failures, setFailures] = useState({});
6790
6791
  const [answers, setAnswers] = useState({});
6791
6792
  const inFlight = useRef(/* @__PURE__ */ new Set());
6792
6793
  if (approvals.length === 0) return null;
@@ -6794,9 +6795,17 @@ function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6794
6795
  if (inFlight.current.has(key)) return;
6795
6796
  inFlight.current.add(key);
6796
6797
  setPending((current) => ({ ...current, [key]: decision }));
6798
+ setFailures((current) => {
6799
+ const next = { ...current };
6800
+ delete next[key];
6801
+ return next;
6802
+ });
6797
6803
  try {
6798
6804
  await (answer ? onDecide(id, decision, answer) : onDecide(id, decision));
6799
6805
  setSettled((current) => ({ ...current, [key]: decision }));
6806
+ } catch (error) {
6807
+ const message = error instanceof Error && error.message ? error.message : String(error);
6808
+ setFailures((current) => ({ ...current, [key]: message }));
6800
6809
  } finally {
6801
6810
  inFlight.current.delete(key);
6802
6811
  setPending((current) => {
@@ -6925,6 +6934,7 @@ function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6925
6934
  }
6926
6935
  ) : null
6927
6936
  ] }) : null,
6937
+ failures[key] ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "alert", style: { ...small, color: c["status-failed"] }, children: failures[key] }) : null,
6928
6938
  note && !answering ? /* @__PURE__ */ jsx(Text, { style: { ...body, color: c["fg-muted"] }, children: note }) : null,
6929
6939
  facts.effects.length > 0 && !answering ? /* @__PURE__ */ jsx(View, { accessibilityLabel: t("toolActionReview.alsoChanges"), style: { gap: 2 }, children: facts.effects.map((effect) => /* @__PURE__ */ jsxs(Text, { style: { ...body, color: c.fg }, children: [
6930
6940
  "\u2022 ",
@@ -10667,5 +10677,5 @@ function NativeInboxList({
10667
10677
  }
10668
10678
 
10669
10679
  export { ActivityRail, ActivityRow, AnnotationsChip, AnnotationsSheet, ApprovalStrip, AttachmentChips, BottomSheet, Button, ComposerPill, FeedbackSheet, HumanInputCard, IconButton, MessageTimeline, ModelMark, ModelPickerSheet, NativeAuthNeededRow, NativeConnectSetup, NativeInboxList, NativeIntegrationCapabilityCard, NativeMcpCapabilityCard, NativeMessageAttachments, NativePreparedMcpSetupCard, NativeSessionScreen, PreparingState, PresentedToolRow, QueueDock, RollingActivity, SectionLabel, SecureValueInput, SessionActionsButton, SessionCommandsList, SessionComposer, SessionHeaderTitle, SessionRow, SessionRowList, SessionSignals, SessionStatusBadge, StatusDot, TurnFeedbackButtons, TurnRailFrame, TurnSummary, defaultApprovalStripMessages, isNeedsYouKind, nativeConnectWindowHost, nativeInboxAttentionCount, useNativeInChatConnect, useNativeInbox, useTurnRatings };
10670
- //# sourceMappingURL=chunk-7ISTEDPD.js.map
10671
- //# sourceMappingURL=chunk-7ISTEDPD.js.map
10680
+ //# sourceMappingURL=chunk-6SF5EQRS.js.map
10681
+ //# sourceMappingURL=chunk-6SF5EQRS.js.map