@opengeni/react-native 4.5.1-canary.39832248373001 → 4.6.1

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.
@@ -20,7 +20,7 @@ import { defaultChatComposerMessages } from '@opengeni/react/composer-messages';
20
20
  import { isLiquidGlassAvailable, GlassView } from 'expo-glass-effect';
21
21
  import { loadSessionFeedback, turnRatingsFromFeedback, feedbackSentimentLabel, feedbackDialogCopy, feedbackSubmission } from '@opengeni/react/session-feedback-model';
22
22
  import { isAuthoritativeQueuedTurn, queuedTurnPresentation, queueNeighborAnchors, queueItemContent, QUEUE_ITEM_CONTENT_UNAVAILABLE, QUEUE_REPLACE_DRAFT_COPY } from '@opengeni/react/queue-presentation-model';
23
- import { sessionAgentsSignal, sessionGoalStateLabel } from '@opengeni/react/session-agents-model';
23
+ import { sessionAgentsSignal, sessionGoalStateLabel, sessionAgentAttention } from '@opengeni/react/session-agents-model';
24
24
  import { modelMarkVendor, MODEL_MARK_PATHS } from '@opengeni/react/model-mark-paths';
25
25
  import { projectClientModelRows, labelReasoningEffort } from '@opengeni/react/model-policy';
26
26
  import { sessionDisplayTitle, recentSessionStatus, recentSessionModelPresentation, sessionRepoLabel, relativeTimeLabel, sessionRenameSeed, SESSION_TITLE_MAX_LENGTH, resolveRenameSubmission } from '@opengeni/react/session-list-model';
@@ -5388,6 +5388,7 @@ function SessionRow({
5388
5388
  onPress,
5389
5389
  onTogglePin,
5390
5390
  workspaceName,
5391
+ attention,
5391
5392
  now
5392
5393
  }) {
5393
5394
  const theme = useNativeTimelineTheme();
@@ -5396,7 +5397,8 @@ function SessionRow({
5396
5397
  const t = useOpenGeniText();
5397
5398
  const rows = useMemo(() => projectClientModelRows(t, [...models]), [t, models]);
5398
5399
  const title = sessionDisplayTitle(session);
5399
- const status = recentSessionStatus(session);
5400
+ const recent = recentSessionStatus(session);
5401
+ const status = attention ? { tone: attention.tone, pulse: false } : recent;
5400
5402
  const model = recentSessionModelPresentation(session.model, rows);
5401
5403
  const repo = sessionRepoLabel(session);
5402
5404
  const meta = [model.label, repo].filter(Boolean).join(" \xB7 ");
@@ -5432,7 +5434,7 @@ function SessionRow({
5432
5434
  Pressable,
5433
5435
  {
5434
5436
  accessibilityRole: "button",
5435
- accessibilityLabel: [title, pinned ? m.pinned : null, workspaceName ?? null].filter(Boolean).join(", "),
5437
+ accessibilityLabel: [title, pinned ? m.pinned : null, workspaceName ?? null].concat(attention ? [attention.word] : []).filter(Boolean).join(", "),
5436
5438
  accessibilityActions: onTogglePin ? [{ name: "pin", label: pinLabel }] : void 0,
5437
5439
  onAccessibilityAction: (event) => {
5438
5440
  if (event.nativeEvent.actionName === "pin") onTogglePin?.();
@@ -5484,13 +5486,13 @@ function SessionRow({
5484
5486
  Text,
5485
5487
  {
5486
5488
  style: {
5487
- ...fontStyle(theme, 400),
5489
+ ...fontStyle(theme, attention ? 500 : 400),
5488
5490
  fontSize: 11,
5489
5491
  lineHeight: 16,
5490
- color: c["fg-subtle"],
5492
+ color: attention ? attention.tone === "failed" ? c["status-failed"] : c["status-waiting"] : c["fg-subtle"],
5491
5493
  fontVariant: ["tabular-nums"]
5492
5494
  },
5493
- children: relativeTimeLabel(t, session.updatedAt, now)
5495
+ children: attention ? attention.word : relativeTimeLabel(t, session.updatedAt, now)
5494
5496
  }
5495
5497
  )
5496
5498
  ] })
@@ -5694,30 +5696,18 @@ function SessionSignals(props) {
5694
5696
  /* @__PURE__ */ jsx(BottomSheet, { open: open === "goal", onClose: close, accessibilityLabel: m.goal, children: goal && props.goal ? /* @__PURE__ */ jsx(GoalPanel, { goal: props.goal, readOnly: props.readOnly }) : null }),
5695
5697
  /* @__PURE__ */ jsxs(BottomSheet, { open: open === "agents", onClose: close, accessibilityLabel: m.agents, children: [
5696
5698
  /* @__PURE__ */ jsx(SheetTitle, { children: m.agents }),
5697
- /* @__PURE__ */ jsx(ScrollView, { style: { paddingHorizontal: 12 }, children: props.agents.map((node) => /* @__PURE__ */ jsxs(View, { children: [
5698
- /* @__PURE__ */ jsx(
5699
- SessionRow,
5700
- {
5701
- session: node.session,
5702
- models: props.models ?? [],
5703
- onPress: () => {
5704
- close();
5705
- props.onOpenSession?.(node.session.id);
5706
- }
5707
- }
5708
- ),
5709
- node.children.map((child) => /* @__PURE__ */ jsx(View, { style: { paddingLeft: 18 }, children: /* @__PURE__ */ jsx(
5710
- SessionRow,
5711
- {
5712
- session: child.session,
5713
- models: props.models ?? [],
5714
- onPress: () => {
5715
- close();
5716
- props.onOpenSession?.(child.session.id);
5717
- }
5699
+ /* @__PURE__ */ jsx(ScrollView, { style: { paddingHorizontal: 12 }, children: props.agents.map((node) => /* @__PURE__ */ jsx(
5700
+ AgentNode,
5701
+ {
5702
+ node,
5703
+ models: props.models ?? [],
5704
+ onOpen: (sessionId) => {
5705
+ close();
5706
+ props.onOpenSession?.(sessionId);
5718
5707
  }
5719
- ) }, child.session.id))
5720
- ] }, node.session.id)) })
5708
+ },
5709
+ node.session.id
5710
+ )) })
5721
5711
  ] }),
5722
5712
  /* @__PURE__ */ jsxs(BottomSheet, { open: open === "commands", onClose: close, accessibilityLabel: m.commands, children: [
5723
5713
  /* @__PURE__ */ jsx(SheetTitle, { children: m.commands }),
@@ -5748,6 +5738,72 @@ function Chip2(props) {
5748
5738
  }
5749
5739
  );
5750
5740
  }
5741
+ function AgentNode(props) {
5742
+ const t = useOpenGeniText();
5743
+ const theme = useNativeTimelineTheme();
5744
+ const c = theme.colors;
5745
+ const [expanded, setExpanded] = useState(false);
5746
+ const { session, children } = props.node;
5747
+ const paused = session.status !== "cancelled" && session.effectiveControl.state !== "active";
5748
+ const attention = sessionAgentAttention(t, session, paused);
5749
+ const count = children.length;
5750
+ return /* @__PURE__ */ jsxs(View, { style: props.nested ? { paddingLeft: 18 } : void 0, children: [
5751
+ /* @__PURE__ */ jsx(
5752
+ SessionRow,
5753
+ {
5754
+ session,
5755
+ models: props.models,
5756
+ attention,
5757
+ onPress: () => props.onOpen(session.id)
5758
+ }
5759
+ ),
5760
+ count > 0 && !props.nested ? /* @__PURE__ */ jsxs(Fragment, { children: [
5761
+ /* @__PURE__ */ jsxs(
5762
+ Pressable,
5763
+ {
5764
+ accessibilityRole: "button",
5765
+ accessibilityState: { expanded },
5766
+ accessibilityLabel: t("counts.agents", { count }),
5767
+ onPress: () => setExpanded((value) => !value),
5768
+ hitSlop: { top: 6, bottom: 6 },
5769
+ style: ({ pressed }) => ({
5770
+ flexDirection: "row",
5771
+ alignItems: "center",
5772
+ gap: 4,
5773
+ alignSelf: "flex-start",
5774
+ marginLeft: 24,
5775
+ marginBottom: 6,
5776
+ paddingHorizontal: 8,
5777
+ paddingVertical: 4,
5778
+ borderRadius: theme.radius.md,
5779
+ backgroundColor: pressed ? c.hover : "transparent"
5780
+ }),
5781
+ children: [
5782
+ /* @__PURE__ */ jsx(
5783
+ Icon,
5784
+ {
5785
+ name: expanded ? "chevron-down" : "chevron-right",
5786
+ size: 12,
5787
+ color: c["fg-subtle"]
5788
+ }
5789
+ ),
5790
+ /* @__PURE__ */ jsx(Text, { style: { ...fontStyle(theme, 500), fontSize: 12, color: c["fg-muted"] }, children: t("counts.agents", { count }) })
5791
+ ]
5792
+ }
5793
+ ),
5794
+ expanded ? children.map((child) => /* @__PURE__ */ jsx(
5795
+ AgentNode,
5796
+ {
5797
+ node: child,
5798
+ models: props.models,
5799
+ onOpen: props.onOpen,
5800
+ nested: true
5801
+ },
5802
+ child.session.id
5803
+ )) : null
5804
+ ] }) : null
5805
+ ] });
5806
+ }
5751
5807
  function SheetTitle({ children }) {
5752
5808
  const theme = useNativeTimelineTheme();
5753
5809
  return /* @__PURE__ */ jsx(