@opengeni/react-native 5.5.2-canary.40597288395001 → 5.5.2-canary.40656248492001

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.
@@ -4,7 +4,7 @@ import { useOpenNativeLink } from './chunk-6BMCWK7G.js';
4
4
  import { ActivityDisclosure, useNativeTimelineMessages, useReleaseFollow, ShimmerText, withAlpha, ReleaseFollowProvider, blendOver, NativeTimelineMessagesProvider, ROW_MIN_HEIGHT, PulseDot, BodyNote, PayloadBlock, TermBlock, Chip, RunningPreview } from './chunk-ZVECFJAA.js';
5
5
  import { useNativeTimelineTheme, Icon, fontStyle, BAR_MAX_FONT_SCALE } from './chunk-NSSMTM2B.js';
6
6
  import { buildTimeline, groupTimeline, conversationTimeline, useSessionStart, personalMachineCopy, sessionAdmissionCopy } from '@opengeni/react/session';
7
- import { defaultHumanInputFormMessages, createTurnSummaryContext, resolveTurnSummaryFacets, selectTurnSummaryFacets, formatElapsed, turnSummaryFallbackLabel, rollingActivityItem, toolDisplayName, annotationHasNote, annotationDisplayOrdinal, ANNOTATION_MAX_NOTE_LENGTH, questionNavTarget, timelineGroupIndexAtSequence, QUESTION_NAV_MARGIN_PX, flattenActivityItems, timelineGroupContainsPresentedImage, durationBetween, isPreparingWork, readableWorkStatus, readableWorkShowsPreview, readableWorkDefaultOpen, compactedLandmarkCount, SESSION_STATUS_PRESENTATION, formatRelativeTime, isAgentWorkHumanInput, recordedWaitSummaryText, noticeTone, noticeIsResolvedApproval, noticeDisplayText, agentWorkHumanInputSummary, isActionableHumanInputRequest, humanInputHeading, initialDrafts, emptyDraft, SESSION_STATUS_BADGE, workerRowTitle, startupDuration, STARTUP_WAIT_TITLES, startupPhaseTitle, sandboxRowTitle, toolRowPresentation, presentsToolOutputPreview, GENIE_WAITING_PHRASES, GENIE_PREPARING_PHRASES, truncateAnnotationQuote, annotationNoteNeedsDisclosure, annotationFromSelection, notificationPlainText, pathDirname, pathBasename, formatClockTime, answersFromDrafts, parseNotificationText } from '@opengeni/react/timeline-model';
7
+ import { defaultHumanInputFormMessages, createTurnSummaryContext, resolveTurnSummaryFacets, selectTurnSummaryFacets, formatElapsed, turnSummaryFallbackLabel, rollingActivityItem, toolDisplayName, annotationHasNote, annotationDisplayOrdinal, ANNOTATION_MAX_NOTE_LENGTH, 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, SESSION_STATUS_BADGE, workerRowTitle, startupDuration, STARTUP_WAIT_TITLES, startupPhaseTitle, sandboxRowTitle, toolRowPresentation, presentsToolOutputPreview, GENIE_WAITING_PHRASES, GENIE_PREPARING_PHRASES, 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';
10
10
  import Animated, { FadeIn, FadeOut, FadeOutUp, FadeInDown, useAnimatedKeyboard, useAnimatedStyle, useReducedMotion, useSharedValue, cancelAnimation, withRepeat, withTiming, Easing as Easing$1 } from 'react-native-reanimated';
@@ -6079,7 +6079,7 @@ function HumanInputCard({
6079
6079
  }) {
6080
6080
  const t = useOpenGeniText();
6081
6081
  const merged = useMemo(
6082
- () => ({ ...defaultHumanInputFormMessages(t), ...messages }),
6082
+ () => mergeHumanInputFormMessages(defaultHumanInputFormMessages(t), messages),
6083
6083
  [t, messages]
6084
6084
  );
6085
6085
  const mergedSecret = useMemo(
@@ -6362,7 +6362,7 @@ function HumanInputForm({
6362
6362
  DecisionButton,
6363
6363
  {
6364
6364
  kind: "primary",
6365
- label: last ? busy ? messages.submitting : messages.submit : t("humanInputForm.next"),
6365
+ label: !last ? t("humanInputForm.next") : busy ? messages.submitting : total === 1 ? messages.submitOne ?? messages.submit : messages.submit,
6366
6366
  busy: last && busy,
6367
6367
  disabled: busy,
6368
6368
  onPress: last ? send : next
@@ -6576,6 +6576,26 @@ var defaultApprovalStripMessages = (t) => ({
6576
6576
  rejected: t("native.timeline.decisions.rejected"),
6577
6577
  formatToolName: (name) => formatApprovalToolName(t, name)
6578
6578
  });
6579
+ function ReviewBody({ maxHeight, children }) {
6580
+ const scroll = useRef(null);
6581
+ const flashed = useRef(false);
6582
+ return /* @__PURE__ */ jsx(
6583
+ ScrollView,
6584
+ {
6585
+ ref: scroll,
6586
+ style: { maxHeight, flexGrow: 0 },
6587
+ contentContainerStyle: { gap: 12 },
6588
+ nestedScrollEnabled: true,
6589
+ persistentScrollbar: true,
6590
+ onContentSizeChange: (_width, contentHeight) => {
6591
+ if (flashed.current || contentHeight <= maxHeight) return;
6592
+ flashed.current = true;
6593
+ scroll.current?.flashScrollIndicators();
6594
+ },
6595
+ children
6596
+ }
6597
+ );
6598
+ }
6579
6599
  function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6580
6600
  const t = useOpenGeniText();
6581
6601
  const messages = { ...defaultApprovalStripMessages(t), ...overrides };
@@ -6667,67 +6687,66 @@ function ApprovalStrip({ approvals, onDecide, messages: overrides }) {
6667
6687
  ]
6668
6688
  }
6669
6689
  ),
6670
- /* @__PURE__ */ jsxs(
6671
- ScrollView,
6672
- {
6673
- style: { maxHeight: bodyMaxHeight, flexGrow: 0 },
6674
- contentContainerStyle: { gap: 12 },
6675
- nestedScrollEnabled: true,
6676
- children: [
6677
- note ? /* @__PURE__ */ jsx(Text, { style: { ...body, color: c["fg-muted"] }, children: note }) : null,
6678
- facts.effects.length > 0 ? /* @__PURE__ */ jsx(View, { accessibilityLabel: t("toolActionReview.alsoChanges"), style: { gap: 2 }, children: facts.effects.map((effect) => /* @__PURE__ */ jsxs(Text, { style: { ...body, color: c.fg }, children: [
6679
- "\u2022 ",
6680
- effect
6681
- ] }, effect)) }) : null,
6682
- facts.shown.length > 0 ? /* @__PURE__ */ jsxs(
6683
- View,
6684
- {
6685
- style: {
6686
- gap: 10,
6687
- padding: 12,
6688
- borderRadius: theme.radius.md,
6689
- backgroundColor: withAlpha(c.fg, 0.035)
6690
- },
6691
- children: [
6692
- facts.shown.map((field) => /* @__PURE__ */ jsxs(View, { style: { gap: 1 }, children: [
6693
- /* @__PURE__ */ jsx(Text, { style: { ...small, color: c["fg-muted"] }, children: field.label }),
6694
- /* @__PURE__ */ jsx(Text, { numberOfLines: 6, style: { ...body, color: c.fg }, children: field.preview })
6695
- ] }, field.path)),
6696
- facts.hiddenFields > 0 ? /* @__PURE__ */ jsx(Text, { style: { ...small, color: c["fg-muted"] }, children: facts.hiddenFields === 1 ? t("toolActionReview.n1MoreValue") : t("toolActionReview.hiddenfieldsMoreValues", {
6697
- hiddenFields: facts.hiddenFields
6698
- }) }) : null
6699
- ]
6700
- }
6701
- ) : null,
6702
- !canApprove ? /* @__PURE__ */ jsx(Text, { style: { ...body, color: c.fg }, children: t("toolActionReview.theDetailsOfThisOlder") }) : null,
6703
- showDetails ? /* @__PURE__ */ jsx(
6704
- View,
6705
- {
6706
- style: {
6707
- padding: 12,
6708
- borderRadius: theme.radius.md,
6709
- borderWidth: 1,
6710
- borderColor: c.border,
6711
- backgroundColor: withAlpha(c.fg, 0.035)
6712
- },
6713
- children: /* @__PURE__ */ jsx(
6690
+ /* @__PURE__ */ jsxs(ReviewBody, { maxHeight: bodyMaxHeight, children: [
6691
+ note ? /* @__PURE__ */ jsx(Text, { style: { ...body, color: c["fg-muted"] }, children: note }) : null,
6692
+ facts.effects.length > 0 ? /* @__PURE__ */ jsx(View, { accessibilityLabel: t("toolActionReview.alsoChanges"), style: { gap: 2 }, children: facts.effects.map((effect) => /* @__PURE__ */ jsxs(Text, { style: { ...body, color: c.fg }, children: [
6693
+ "\u2022 ",
6694
+ effect
6695
+ ] }, effect)) }) : null,
6696
+ facts.shown.length > 0 ? /* @__PURE__ */ jsxs(
6697
+ View,
6698
+ {
6699
+ style: {
6700
+ gap: 10,
6701
+ padding: 12,
6702
+ borderRadius: theme.radius.md,
6703
+ backgroundColor: withAlpha(c.fg, 0.035)
6704
+ },
6705
+ children: [
6706
+ facts.shown.map((field) => /* @__PURE__ */ jsxs(View, { style: { gap: 1 }, children: [
6707
+ /* @__PURE__ */ jsx(Text, { style: { ...small, color: c["fg-muted"] }, children: field.label }),
6708
+ /* @__PURE__ */ jsx(
6714
6709
  Text,
6715
6710
  {
6716
- selectable: true,
6717
- style: {
6718
- ...fontStyle(theme, 400, "mono"),
6719
- fontSize: theme.size.sm,
6720
- lineHeight: 20,
6721
- color: c["fg-muted"]
6722
- },
6723
- children: payload
6711
+ numberOfLines: field.truncated ? 6 : void 0,
6712
+ style: { ...body, color: c.fg },
6713
+ children: field.preview
6724
6714
  }
6725
6715
  )
6716
+ ] }, field.path)),
6717
+ facts.hiddenFields > 0 ? /* @__PURE__ */ jsx(Text, { style: { ...small, color: c["fg-muted"] }, children: facts.hiddenFields === 1 ? t("toolActionReview.n1MoreValue") : t("toolActionReview.hiddenfieldsMoreValues", {
6718
+ hiddenFields: facts.hiddenFields
6719
+ }) }) : null
6720
+ ]
6721
+ }
6722
+ ) : null,
6723
+ !canApprove ? /* @__PURE__ */ jsx(Text, { style: { ...body, color: c.fg }, children: t("toolActionReview.theDetailsOfThisOlder") }) : null,
6724
+ showDetails ? /* @__PURE__ */ jsx(
6725
+ View,
6726
+ {
6727
+ style: {
6728
+ padding: 12,
6729
+ borderRadius: theme.radius.md,
6730
+ borderWidth: 1,
6731
+ borderColor: c.border,
6732
+ backgroundColor: withAlpha(c.fg, 0.035)
6733
+ },
6734
+ children: /* @__PURE__ */ jsx(
6735
+ Text,
6736
+ {
6737
+ selectable: true,
6738
+ style: {
6739
+ ...fontStyle(theme, 400, "mono"),
6740
+ fontSize: theme.size.sm,
6741
+ lineHeight: 20,
6742
+ color: c["fg-muted"]
6743
+ },
6744
+ children: payload
6726
6745
  }
6727
- ) : null
6728
- ]
6729
- }
6730
- ),
6746
+ )
6747
+ }
6748
+ ) : null
6749
+ ] }),
6731
6750
  /* @__PURE__ */ jsx(
6732
6751
  DecisionActions,
6733
6752
  {
@@ -10343,5 +10362,5 @@ function NativeInboxList({
10343
10362
  }
10344
10363
 
10345
10364
  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 };
10346
- //# sourceMappingURL=chunk-OYROAJ67.js.map
10347
- //# sourceMappingURL=chunk-OYROAJ67.js.map
10365
+ //# sourceMappingURL=chunk-WX6PNZQR.js.map
10366
+ //# sourceMappingURL=chunk-WX6PNZQR.js.map