@opengeni/react-native 6.2.2-canary.41207200451001 → 6.3.2-canary.41273502873001

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.
@@ -3,7 +3,7 @@ import { ActivityDisclosure, useNativeTimelineMessages, DecisionCard, DecisionAc
3
3
  import { NativeImageViewer } from './chunk-PUHPX2OL.js';
4
4
  import { useOpenNativeLink } from './chunk-6BMCWK7G.js';
5
5
  import { useNativeTimelineTheme, Icon, fontStyle, BAR_MAX_FONT_SCALE } from './chunk-4IFOWV3O.js';
6
- import { buildTimeline, groupTimeline, conversationTimeline, useSessionStartupTimeline, useSessionStart, personalMachineCopy, sessionAdmissionApprovedElsewhereCopy, sessionAdmissionCopy } from '@opengeni/react/session';
6
+ import { buildTimeline, groupTimeline, conversationTimeline, useSessionStartupTimeline, approvalsDecidable, useSessionStart, personalMachineCopy, sessionAdmissionApprovedElsewhereCopy, sessionAdmissionCopy } from '@opengeni/react/session';
7
7
  import { defaultHumanInputFormMessages, createTurnSummaryContext, resolveTurnSummaryFacets, selectTurnSummaryFacets, formatElapsed, turnSummaryFallbackLabel, rollingActivityItem, toolDisplayName, annotationHasNote, annotationDisplayOrdinal, ANNOTATION_MAX_NOTE_LENGTH, timelineTurnsWithOutput, questionNavTarget, timelineGroupIndexAtSequence, QUESTION_NAV_MARGIN_PX, flattenActivityItems, timelineGroupContainsPresentedImage, durationBetween, isPreparingWork, readableWorkStatus, readableWorkShowsPreview, readableWorkDefaultOpen, compactedLandmarkCount, SESSION_STATUS_PRESENTATION, formatRelativeTime, isAgentWorkHumanInput, recordedWaitSummaryText, noticeTone, noticeIsResolvedApproval, noticeDisplayText, agentWorkHumanInputSummary, mergeHumanInputFormMessages, isActionableHumanInputRequest, humanInputHeading, initialDrafts, emptyDraft, humanInputAgentMayDecide, SESSION_STATUS_BADGE, workerRowTitle, startupDuration, STARTUP_WAIT_TITLES, startupPhaseTitle, sandboxRowTitle, toolRowPresentation, presentsToolOutputPreview, annotationQuoteText, truncateAnnotationQuote, annotationNoteNeedsDisclosure, annotationFromSelection, notificationPlainText, pathDirname, pathBasename, formatClockTime, answersFromDrafts, parseNotificationText } from '@opengeni/react/timeline-model';
8
8
  import { createContext, useRef, useMemo, useCallback, useState, useContext, useEffect, Component, useId } from 'react';
9
9
  import { Platform, Pressable, ActivityIndicator, Text, View, TextInput, Linking, useWindowDimensions, Animated as Animated$1, AccessibilityInfo, Easing, PanResponder, Modal, KeyboardAvoidingView, ScrollView, Keyboard, Image, Alert, AppState, ActionSheetIOS } from 'react-native';
@@ -6788,13 +6788,17 @@ function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6788
6788
  const [settled, setSettled] = useState({});
6789
6789
  const [details, setDetails] = useState({});
6790
6790
  const [answers, setAnswers] = useState({});
6791
+ const inFlight = useRef(/* @__PURE__ */ new Set());
6791
6792
  if (approvals.length === 0) return null;
6792
6793
  const decide = async (id, decision, answer, key = id) => {
6794
+ if (inFlight.current.has(key)) return;
6795
+ inFlight.current.add(key);
6793
6796
  setPending((current) => ({ ...current, [key]: decision }));
6794
6797
  try {
6795
6798
  await (answer ? onDecide(id, decision, answer) : onDecide(id, decision));
6796
6799
  setSettled((current) => ({ ...current, [key]: decision }));
6797
6800
  } finally {
6801
+ inFlight.current.delete(key);
6798
6802
  setPending((current) => {
6799
6803
  const next = { ...current };
6800
6804
  delete next[key];
@@ -8541,7 +8545,7 @@ function SessionScreenBody({
8541
8545
  )
8542
8546
  }
8543
8547
  ),
8544
- approvals.length > 0 && status === "requires_action" ? /* @__PURE__ */ jsx(
8548
+ approvals.length > 0 && approvalsDecidable(status) ? /* @__PURE__ */ jsx(
8545
8549
  ApprovalStrip,
8546
8550
  {
8547
8551
  approvals,
@@ -10663,5 +10667,5 @@ function NativeInboxList({
10663
10667
  }
10664
10668
 
10665
10669
  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 };
10666
- //# sourceMappingURL=chunk-L3PAKCJV.js.map
10667
- //# sourceMappingURL=chunk-L3PAKCJV.js.map
10670
+ //# sourceMappingURL=chunk-73AN64IB.js.map
10671
+ //# sourceMappingURL=chunk-73AN64IB.js.map