@opengeni/react 0.45.0 → 0.48.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.
Files changed (141) hide show
  1. package/README.md +68 -12
  2. package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
  3. package/dist/chunk-FK6VG4LL.js.map +1 -0
  4. package/dist/{chunk-HFO4ERGQ.js → chunk-FWXGSNXT.js} +2 -2
  5. package/dist/{chunk-SRFUT2ZU.js → chunk-I4MPFDRP.js} +119 -63
  6. package/dist/chunk-I4MPFDRP.js.map +1 -0
  7. package/dist/{chunk-EB67J347.js → chunk-KZ73RL76.js} +111 -31
  8. package/dist/chunk-KZ73RL76.js.map +1 -0
  9. package/dist/{chunk-LWR4MXSS.js → chunk-LHLYWG5R.js} +10 -1
  10. package/dist/chunk-LHLYWG5R.js.map +1 -0
  11. package/dist/{chunk-L3EWO3UK.js → chunk-NJ7M2B6Z.js} +445 -84
  12. package/dist/chunk-NJ7M2B6Z.js.map +1 -0
  13. package/dist/{chunk-VCBFUSUZ.js → chunk-O4VXOBGF.js} +3 -3
  14. package/dist/{chunk-VCBFUSUZ.js.map → chunk-O4VXOBGF.js.map} +1 -1
  15. package/dist/{chunk-6EDV6YFE.js → chunk-OL6QVXGF.js} +121 -29
  16. package/dist/chunk-OL6QVXGF.js.map +1 -0
  17. package/dist/chunk-VZTQ73XT.js +86 -0
  18. package/dist/chunk-VZTQ73XT.js.map +1 -0
  19. package/dist/{chunk-EHSYZ4KP.js → chunk-WYA65Y3F.js} +16 -16
  20. package/dist/chunk-WYA65Y3F.js.map +1 -0
  21. package/dist/{chunk-FD72GJMK.js → chunk-XCNTXWBB.js} +274 -125
  22. package/dist/chunk-XCNTXWBB.js.map +1 -0
  23. package/dist/client.d.ts +1 -1
  24. package/dist/components/chat-composer.d.ts +7 -2
  25. package/dist/components/composer-transcription-control.d.ts +2 -0
  26. package/dist/components/composer.d.ts +14 -0
  27. package/dist/components/machines/machine-detail.d.ts +3 -1
  28. package/dist/components/machines-dashboard.d.ts +3 -3
  29. package/dist/components/message-timeline.d.ts +12 -2
  30. package/dist/components/sandbox-files.d.ts +2 -2
  31. package/dist/components/sandbox-terminal.d.ts +29 -0
  32. package/dist/components/sandbox-workspace.d.ts +5 -1
  33. package/dist/components/workspace-dock.d.ts +3 -1
  34. package/dist/composer.d.ts +2 -2
  35. package/dist/composer.js +6 -6
  36. package/dist/hooks/internal.d.ts +6 -0
  37. package/dist/hooks/use-codex-accounts.d.ts +1 -1
  38. package/dist/hooks/use-environments.d.ts +10 -4
  39. package/dist/hooks/use-machines.d.ts +7 -0
  40. package/dist/hooks/use-sandbox-files.d.ts +19 -0
  41. package/dist/hooks/use-sandbox-git.d.ts +7 -0
  42. package/dist/hooks/use-transcription.d.ts +2 -2
  43. package/dist/hooks/use-voice-input.d.ts +13 -4
  44. package/dist/index.d.ts +6 -5
  45. package/dist/index.js +904 -538
  46. package/dist/index.js.map +1 -1
  47. package/dist/lib/composer-responsive-context.d.ts +9 -0
  48. package/dist/lib/use-portal-token-style.d.ts +14 -3
  49. package/dist/machines.js +2 -2
  50. package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-U5JFG7HT.js} +19 -18
  51. package/dist/queue-surface-implementation-U5JFG7HT.js.map +1 -0
  52. package/dist/realtime/realtime-control.d.ts +9 -0
  53. package/dist/realtime.js +29 -32
  54. package/dist/realtime.js.map +1 -1
  55. package/dist/session-ui.js +5 -5
  56. package/dist/session.js +4 -4
  57. package/dist/timeline/activity-rail.d.ts +3 -2
  58. package/dist/timeline/index.d.ts +2 -2
  59. package/dist/timeline/parsers.d.ts +3 -3
  60. package/dist/timeline/registry.d.ts +3 -0
  61. package/dist/timeline/screenshot-lightbox.d.ts +1 -1
  62. package/dist/timeline/types.d.ts +4 -0
  63. package/dist/voice-recording-store.d.ts +8 -2
  64. package/package.json +20 -4
  65. package/src/client.ts +3 -0
  66. package/src/components/chat-composer.tsx +12 -2
  67. package/src/components/code-editor.tsx +1 -1
  68. package/src/components/command-palette.tsx +1 -1
  69. package/src/components/composer-transcription-control.tsx +41 -16
  70. package/src/components/composer.tsx +52 -26
  71. package/src/components/copy-button.tsx +2 -2
  72. package/src/components/desktop-viewer.tsx +2 -2
  73. package/src/components/file-browser.tsx +39 -17
  74. package/src/components/human-input-form.tsx +2 -2
  75. package/src/components/machine-card.tsx +1 -1
  76. package/src/components/machines/machine-detail.tsx +39 -15
  77. package/src/components/machines-dashboard.tsx +7 -6
  78. package/src/components/message-timeline.tsx +44 -11
  79. package/src/components/model-picker.tsx +2 -2
  80. package/src/components/model-policy-picker.tsx +16 -15
  81. package/src/components/queue-surface-implementation.tsx +20 -16
  82. package/src/components/queue-surface-state.tsx +2 -2
  83. package/src/components/sandbox-files.tsx +140 -60
  84. package/src/components/sandbox-terminal.tsx +24 -5
  85. package/src/components/sandbox-workspace.tsx +180 -142
  86. package/src/components/session-chrome.tsx +14 -14
  87. package/src/components/tooltip.tsx +13 -16
  88. package/src/components/user-message-body.tsx +1 -1
  89. package/src/components/workbench-changes.tsx +4 -4
  90. package/src/components/workspace-dock.tsx +13 -5
  91. package/src/composer.ts +3 -0
  92. package/src/hooks/internal.ts +132 -38
  93. package/src/hooks/use-codex-accounts.ts +4 -4
  94. package/src/hooks/use-environments.ts +24 -5
  95. package/src/hooks/use-file-attachments.ts +70 -32
  96. package/src/hooks/use-goal.ts +17 -5
  97. package/src/hooks/use-machines.ts +47 -1
  98. package/src/hooks/use-sandbox-files.ts +310 -59
  99. package/src/hooks/use-sandbox-git.ts +148 -41
  100. package/src/hooks/use-session-capabilities.ts +35 -24
  101. package/src/hooks/use-session-events.ts +18 -4
  102. package/src/hooks/use-transcription.ts +4 -14
  103. package/src/hooks/use-turn-queue.ts +17 -5
  104. package/src/hooks/use-voice-input.ts +481 -36
  105. package/src/hooks/use-windowed-sections.ts +9 -7
  106. package/src/index.ts +11 -6
  107. package/src/lib/composer-responsive-context.ts +15 -0
  108. package/src/lib/use-portal-token-style.ts +60 -15
  109. package/src/provider.tsx +52 -7
  110. package/src/realtime/dropdown-menu.tsx +15 -19
  111. package/src/realtime/realtime-control.tsx +18 -7
  112. package/src/timeline/activity-rail.tsx +15 -6
  113. package/src/timeline/index.ts +1 -1
  114. package/src/timeline/parsers.ts +33 -20
  115. package/src/timeline/projection.ts +23 -0
  116. package/src/timeline/registry.ts +7 -0
  117. package/src/timeline/screenshot-lightbox.tsx +15 -4
  118. package/src/timeline/shared.tsx +8 -8
  119. package/src/timeline/tool-renderers.tsx +166 -22
  120. package/src/timeline/turn-summary.tsx +6 -6
  121. package/src/timeline/types.ts +4 -0
  122. package/src/voice-recording-store.ts +15 -0
  123. package/styles/compiled.css +5065 -0
  124. package/styles/compiled.d.ts +2 -0
  125. package/styles/effective-tokens.css +27 -0
  126. package/styles/index.css +3 -0
  127. package/styles/responsive.css +196 -0
  128. package/styles/responsive.d.ts +2 -0
  129. package/styles/tokens.css +50 -17
  130. package/dist/chunk-6EDV6YFE.js.map +0 -1
  131. package/dist/chunk-EB67J347.js.map +0 -1
  132. package/dist/chunk-EHSYZ4KP.js.map +0 -1
  133. package/dist/chunk-FD72GJMK.js.map +0 -1
  134. package/dist/chunk-JB5725BI.js +0 -48
  135. package/dist/chunk-JB5725BI.js.map +0 -1
  136. package/dist/chunk-L3EWO3UK.js.map +0 -1
  137. package/dist/chunk-LWR4MXSS.js.map +0 -1
  138. package/dist/chunk-SRFUT2ZU.js.map +0 -1
  139. package/dist/chunk-U3CSCMWA.js.map +0 -1
  140. package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
  141. /package/dist/{chunk-HFO4ERGQ.js.map → chunk-FWXGSNXT.js.map} +0 -0
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  EmptyQueueStateSurface,
3
3
  requestQueueDraftEdit
4
- } from "./chunk-VCBFUSUZ.js";
4
+ } from "./chunk-O4VXOBGF.js";
5
5
  import {
6
6
  buildTimeline,
7
7
  groupTimeline,
8
8
  mcpToolLeaf,
9
9
  toolDisplayName
10
- } from "./chunk-LWR4MXSS.js";
10
+ } from "./chunk-LHLYWG5R.js";
11
11
  import {
12
12
  Tooltip,
13
13
  TooltipContent,
14
14
  TooltipProvider,
15
15
  TooltipTrigger
16
- } from "./chunk-U3CSCMWA.js";
16
+ } from "./chunk-FK6VG4LL.js";
17
17
  import {
18
18
  formatClockTime,
19
19
  formatRelativeTime,
@@ -21,6 +21,9 @@ import {
21
21
  truncate,
22
22
  tryParseJson
23
23
  } from "./chunk-LAKLF4PA.js";
24
+ import {
25
+ usePortalTokenStyle
26
+ } from "./chunk-VZTQ73XT.js";
24
27
  import {
25
28
  cn
26
29
  } from "./chunk-22KP6LR5.js";
@@ -29,7 +32,7 @@ import {
29
32
  import { Loader2Icon } from "lucide-react";
30
33
  import { lazy, Suspense } from "react";
31
34
  import { jsx, jsxs } from "react/jsx-runtime";
32
- var loadQueueSurface = () => import("./queue-surface-implementation-J4XJFKRW.js");
35
+ var loadQueueSurface = () => import("./queue-surface-implementation-U5JFG7HT.js");
33
36
  var QueueSurface = createQueueSurface(loadQueueSurface);
34
37
  function createQueueSurface(loadImplementation) {
35
38
  const LazyQueueSurface = lazy(async () => ({
@@ -426,12 +429,12 @@ function SessionChrome({
426
429
  "transition-[background-color,border-color,box-shadow] motion-reduce:transition-none"
427
430
  ),
428
431
  style: {
429
- borderRadius: "var(--og-session-chrome-radius)",
430
- background: open ? "var(--og-session-chrome-surface-open)" : "var(--og-session-chrome-surface)",
431
- borderColor: open ? "var(--og-session-chrome-border-open)" : "var(--og-session-chrome-border)",
432
+ borderRadius: "var(--_og-session-chrome-radius)",
433
+ background: open ? "var(--_og-session-chrome-surface-open)" : "var(--_og-session-chrome-surface)",
434
+ borderColor: open ? "var(--_og-session-chrome-border-open)" : "var(--_og-session-chrome-border)",
432
435
  boxShadow: open ? "var(--og-session-chrome-shadow-open)" : "var(--og-session-chrome-shadow)",
433
436
  transitionDuration: "var(--og-session-chrome-duration)",
434
- transitionTimingFunction: "var(--og-session-chrome-ease)"
437
+ transitionTimingFunction: "var(--_og-session-chrome-ease)"
435
438
  },
436
439
  children: [
437
440
  /* @__PURE__ */ jsx2(
@@ -459,8 +462,8 @@ function SessionChrome({
459
462
  "aria-hidden": true,
460
463
  className: "pointer-events-none absolute left-0 top-0 rounded-og-md",
461
464
  style: {
462
- background: "var(--og-session-chrome-highlight)",
463
- boxShadow: "inset 0 0 0 1px var(--og-session-chrome-highlight-ring)"
465
+ background: "var(--_og-session-chrome-highlight)",
466
+ boxShadow: "inset 0 0 0 1px var(--_og-session-chrome-highlight-ring)"
464
467
  },
465
468
  initial: false,
466
469
  animate: {
@@ -489,7 +492,7 @@ function SessionChrome({
489
492
  "data-og-session-chrome-signal": signal.id,
490
493
  onClick: () => setActive(selected ? null : signal.id),
491
494
  className: cn(
492
- "group relative z-[1] inline-flex min-h-[var(--og-session-chrome-chip-min-height)] max-w-full items-center gap-1 rounded-og-md py-1 text-left text-og-xs outline-none",
495
+ "group relative z-[1] inline-flex min-h-[var(--og-session-chrome-chip-min-height)] max-w-full items-center gap-1 rounded-og-md py-1 text-left text-og-xs outline-hidden",
493
496
  // Coarse pointers keep a 44px target (session-pins acceptance).
494
497
  "pointer-coarse:min-h-11",
495
498
  "transition-colors duration-150 motion-reduce:transition-none",
@@ -588,7 +591,7 @@ function IncomingPanel({
588
591
  children: inputs.map((input) => /* @__PURE__ */ jsxs2(
589
592
  "li",
590
593
  {
591
- className: "group flex items-start gap-1.5 rounded-og-sm px-1.5 py-1 transition-colors hover:bg-[var(--og-session-chrome-row-hover)]",
594
+ className: "group flex items-start gap-1.5 rounded-og-sm px-1.5 py-1 transition-colors hover:bg-[var(--_og-session-chrome-row-hover)]",
592
595
  children: [
593
596
  /* @__PURE__ */ jsx2(
594
597
  "span",
@@ -666,7 +669,7 @@ function QueuePanel({
666
669
  "li",
667
670
  {
668
671
  "data-queue-turn-id": turn.id,
669
- className: "group flex flex-col gap-1 rounded-og-sm px-1.5 py-1 transition-colors hover:bg-[var(--og-session-chrome-row-hover)]",
672
+ className: "group flex flex-col gap-1 rounded-og-sm px-1.5 py-1 transition-colors hover:bg-[var(--_og-session-chrome-row-hover)]",
670
673
  children: [
671
674
  /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-1.5", children: [
672
675
  voice ? /* @__PURE__ */ jsx2(
@@ -811,7 +814,7 @@ function GoalPanel({
811
814
  type: "button",
812
815
  disabled: goal.updating,
813
816
  onClick: () => void (record.status === "paused" ? goal.resume() : goal.pause("Paused from session chrome")),
814
- className: "inline-flex h-6 items-center gap-1 rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-none transition-colors hover:bg-og-surface-3/70 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50",
817
+ className: "inline-flex h-6 items-center gap-1 rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-hidden transition-colors hover:bg-og-surface-3/70 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50",
815
818
  children: [
816
819
  goal.updating ? /* @__PURE__ */ jsx2(Loader2Icon2, { className: "size-3 animate-og-spin" }) : record.status === "paused" ? /* @__PURE__ */ jsx2(PlayIcon, { className: "size-3" }) : /* @__PURE__ */ jsx2(PauseIcon, { className: "size-3" }),
817
820
  record.status === "paused" ? "Resume" : "Pause"
@@ -824,7 +827,7 @@ function GoalPanel({
824
827
  type: "button",
825
828
  disabled: goal.updating,
826
829
  onClick: () => void goal.deleteGoal(),
827
- className: "inline-flex h-6 items-center gap-1 rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-subtle outline-none transition-colors hover:bg-og-surface-3/70 hover:text-og-danger focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50",
830
+ className: "inline-flex h-6 items-center gap-1 rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-subtle outline-hidden transition-colors hover:bg-og-surface-3/70 hover:text-og-danger focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50",
828
831
  children: [
829
832
  /* @__PURE__ */ jsx2(Trash2Icon, { className: "size-3" }),
830
833
  "Clear"
@@ -858,7 +861,7 @@ function IconAction({
858
861
  disabled,
859
862
  onClick,
860
863
  className: cn(
861
- "inline-flex size-6 items-center justify-center rounded-og-sm text-og-fg-subtle outline-none transition-colors",
864
+ "inline-flex size-6 items-center justify-center rounded-og-sm text-og-fg-subtle outline-hidden transition-colors",
862
865
  "hover:bg-og-surface-2 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40",
863
866
  "disabled:pointer-events-none disabled:opacity-40 pointer-coarse:size-9",
864
867
  danger && "hover:text-og-danger"
@@ -1275,7 +1278,7 @@ function QuestionControls({
1275
1278
  "aria-describedby": describedBy,
1276
1279
  autoFocus,
1277
1280
  rows: 2,
1278
- className: "min-h-14 w-full resize-y rounded-og-md border border-og-border bg-og-surface-1 px-3 py-2 text-og-sm text-og-fg outline-none placeholder:text-og-fg-subtle focus:border-og-accent"
1281
+ className: "min-h-14 w-full resize-y rounded-og-md border border-og-border bg-og-surface-1 px-3 py-2 text-og-sm text-og-fg outline-hidden placeholder:text-og-fg-subtle focus:border-og-accent"
1279
1282
  }
1280
1283
  ) : /* @__PURE__ */ jsxs3(
1281
1284
  "div",
@@ -1354,7 +1357,7 @@ function QuestionControls({
1354
1357
  ...current,
1355
1358
  other: event.target.value
1356
1359
  })),
1357
- className: "mt-1.5 w-full rounded-og-sm border border-og-border bg-og-surface-1 px-2 py-1.5 text-og-sm text-og-fg outline-none focus:border-og-accent disabled:opacity-50"
1360
+ className: "mt-1.5 w-full rounded-og-sm border border-og-border bg-og-surface-1 px-2 py-1.5 text-og-sm text-og-fg outline-hidden focus:border-og-accent disabled:opacity-50"
1358
1361
  }
1359
1362
  )
1360
1363
  ] })
@@ -1822,20 +1825,6 @@ function isApplyPatch(item) {
1822
1825
  const name = item.name;
1823
1826
  return name === "apply_patch_call" || name === "apply_patch" || name.endsWith("__apply_patch");
1824
1827
  }
1825
- var SECRET_KEY = /^(value|secret|token|password|api[_-]?key|signing[_-]?key)$/i;
1826
- function redactSecrets(value) {
1827
- if (Array.isArray(value)) {
1828
- return value.map(redactSecrets);
1829
- }
1830
- if (value && typeof value === "object") {
1831
- const out = {};
1832
- for (const [k, v] of Object.entries(value)) {
1833
- out[k] = SECRET_KEY.test(k) ? "\u2022\u2022\u2022\u2022" : redactSecrets(v);
1834
- }
1835
- return out;
1836
- }
1837
- return value;
1838
- }
1839
1828
  function parseToolArgs(args) {
1840
1829
  if (args == null) {
1841
1830
  return {};
@@ -1907,6 +1896,26 @@ function screenshotDataUrl(out) {
1907
1896
  }
1908
1897
  return null;
1909
1898
  }
1899
+ function retainedScreenshotMetadata(out) {
1900
+ if (typeof out === "string" && (out.startsWith("{") || out.startsWith("["))) {
1901
+ const parsed = tryParseJson(out);
1902
+ if (parsed !== void 0 && parsed !== out) return retainedScreenshotMetadata(parsed);
1903
+ }
1904
+ if (Array.isArray(out)) {
1905
+ for (const entry of out) {
1906
+ const metadata = retainedScreenshotMetadata(entry);
1907
+ if (metadata) return metadata;
1908
+ }
1909
+ return null;
1910
+ }
1911
+ if (!out || typeof out !== "object") return null;
1912
+ const value = out;
1913
+ if (typeof value.artifactId !== "string" || typeof value.available !== "boolean") return null;
1914
+ if (!value.available) {
1915
+ return typeof value.reason === "string" ? value : null;
1916
+ }
1917
+ return value.kind === "computer_screenshot" && value.contentType === "image/png" && typeof value.originalBytes === "number" && typeof value.sha256 === "string" && value.dimensions !== null && typeof value.dimensions === "object" && value.retention !== null && typeof value.retention === "object" && value.retention.policy === "session_screenshot" ? value : null;
1918
+ }
1910
1919
  function mediaPreviewFact(out) {
1911
1920
  if (typeof out === "string" && (out.startsWith("{") || out.startsWith("["))) {
1912
1921
  const parsed = tryParseJson(out);
@@ -1998,13 +2007,20 @@ function LightboxProvider({ children }) {
1998
2007
  }
1999
2008
  function LightboxRoot({ children }) {
2000
2009
  const [state, setState] = useState3(null);
2001
- const open = useCallback((src, caption) => {
2010
+ const [tokenSource, setTokenSource] = useState3(null);
2011
+ const portalStyle = usePortalTokenStyle(tokenSource);
2012
+ const open = useCallback((src, caption, source) => {
2013
+ setTokenSource(source ?? null);
2002
2014
  setState(caption ? { src, caption } : { src });
2003
2015
  }, []);
2016
+ const close = useCallback(() => {
2017
+ setState(null);
2018
+ setTokenSource(null);
2019
+ }, []);
2004
2020
  const controller = useMemo3(() => ({ open }), [open]);
2005
2021
  return /* @__PURE__ */ jsxs4(LightboxContext.Provider, { value: controller, children: [
2006
2022
  children,
2007
- /* @__PURE__ */ jsx6(Dialog.Root, { open: state !== null, onOpenChange: (next) => !next && setState(null), children: /* @__PURE__ */ jsx6(AnimatePresence2, { children: state !== null ? /* @__PURE__ */ jsxs4(Dialog.Portal, { forceMount: true, children: [
2023
+ /* @__PURE__ */ jsx6(Dialog.Root, { open: state !== null, onOpenChange: (next) => !next && close(), children: /* @__PURE__ */ jsx6(AnimatePresence2, { children: state !== null ? /* @__PURE__ */ jsxs4(Dialog.Portal, { forceMount: true, children: [
2008
2024
  /* @__PURE__ */ jsx6(Dialog.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx6(
2009
2025
  motion2.div,
2010
2026
  {
@@ -2012,7 +2028,8 @@ function LightboxRoot({ children }) {
2012
2028
  animate: { opacity: 1 },
2013
2029
  exit: { opacity: 0 },
2014
2030
  transition: { duration: 0.15 },
2015
- className: "og-root fixed inset-0 z-50 bg-black/90 backdrop-blur-md"
2031
+ className: "og-root fixed inset-0 z-50 bg-black/90 backdrop-blur-md",
2032
+ style: portalStyle
2016
2033
  }
2017
2034
  ) }),
2018
2035
  /* @__PURE__ */ jsx6(
@@ -2031,10 +2048,11 @@ function LightboxRoot({ children }) {
2031
2048
  transition: { duration: 0.18, ease: [0.16, 1, 0.3, 1] },
2032
2049
  onClick: (event) => {
2033
2050
  if (event.target === event.currentTarget) {
2034
- setState(null);
2051
+ close();
2035
2052
  }
2036
2053
  },
2037
2054
  className: "og-root fixed inset-0 z-50 flex items-center justify-center p-6 sm:p-12",
2055
+ style: portalStyle,
2038
2056
  children: [
2039
2057
  /* @__PURE__ */ jsx6(Dialog.Title, { className: "sr-only", children: "Screenshot" }),
2040
2058
  /* @__PURE__ */ jsxs4("figure", { className: "m-0 flex max-h-full max-w-5xl flex-col items-center gap-3", children: [
@@ -2104,12 +2122,12 @@ function ActivityDisclosure({
2104
2122
  const rowClass = cn(
2105
2123
  "group/disclosure flex w-full min-w-0 items-center gap-2 rounded-og-sm px-1.5 py-1.5 text-left text-og-base",
2106
2124
  "text-og-fg-muted transition-colors duration-150",
2107
- // A tool row is a touch target on coarse pointers: grow its padding so the
2108
- // hit area clears the 40px minimum without loosening the dense desktop rail.
2109
- "pointer-coarse:py-2.5"
2125
+ // A tool row is a touch target on coarse pointers: grow its hit area to the
2126
+ // 44px mobile minimum without loosening the dense desktop rail.
2127
+ "pointer-coarse:min-h-11 pointer-coarse:py-2.5"
2110
2128
  );
2111
2129
  const inner = /* @__PURE__ */ jsxs5(Fragment4, { children: [
2112
- hasBody ? /* @__PURE__ */ jsx7(ChevronRightIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle transition-transform duration-[var(--og-duration-disclose)] ease-og-in-out group-data-[state=open]/disclosure:rotate-90" }) : /* @__PURE__ */ jsx7("span", { className: "size-3.5 shrink-0" }),
2130
+ hasBody ? /* @__PURE__ */ jsx7(ChevronRightIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle transition-transform duration-[var(--_og-duration-disclose)] ease-og-in-out group-data-[state=open]/disclosure:rotate-90" }) : /* @__PURE__ */ jsx7("span", { className: "size-3.5 shrink-0" }),
2113
2131
  /* @__PURE__ */ jsx7("span", { className: cn("shrink-0", ICON_TONE[iconTone]), children: icon }),
2114
2132
  /* @__PURE__ */ jsx7(
2115
2133
  "span",
@@ -2147,7 +2165,7 @@ function ActivityDisclosure({
2147
2165
  "data-status": dataStatus,
2148
2166
  className: cn(
2149
2167
  rowClass,
2150
- "cursor-pointer outline-none hover:bg-og-surface-1 hover:text-og-fg",
2168
+ "cursor-pointer outline-hidden hover:bg-og-surface-1 hover:text-og-fg",
2151
2169
  "focus-visible:ring-2 focus-visible:ring-og-accent focus-visible:ring-offset-0"
2152
2170
  ),
2153
2171
  children: inner
@@ -2307,7 +2325,7 @@ function Thumbnail({
2307
2325
  type: "button",
2308
2326
  onClick: (event) => {
2309
2327
  event.stopPropagation();
2310
- lightbox.open(src, caption);
2328
+ lightbox.open(src, caption, event.currentTarget);
2311
2329
  },
2312
2330
  onKeyDown: (event) => {
2313
2331
  if (event.key === "Enter" || event.key === " ") {
@@ -2316,7 +2334,7 @@ function Thumbnail({
2316
2334
  },
2317
2335
  className: cn(
2318
2336
  MEDIA_BOX,
2319
- "group/thumb relative inline-flex overflow-hidden bg-og-bg outline-none",
2337
+ "group/thumb relative inline-flex overflow-hidden bg-og-bg outline-hidden",
2320
2338
  "focus-visible:ring-2 focus-visible:ring-og-accent"
2321
2339
  ),
2322
2340
  "aria-label": "Expand screenshot",
@@ -2346,7 +2364,7 @@ function ScreenshotFigure({
2346
2364
  "button",
2347
2365
  {
2348
2366
  type: "button",
2349
- onClick: () => lightbox.open(src, caption),
2367
+ onClick: (event) => lightbox.open(src, caption, event.currentTarget),
2350
2368
  className: surface,
2351
2369
  "aria-label": "Expand screenshot",
2352
2370
  children: img
@@ -2538,6 +2556,7 @@ import {
2538
2556
  TerminalIcon,
2539
2557
  WrenchIcon
2540
2558
  } from "lucide-react";
2559
+ import { useEffect as useEffect6, useState as useState8 } from "react";
2541
2560
 
2542
2561
  // src/timeline/compute-label.tsx
2543
2562
  import { createContext as createContext3, useContext as useContext3 } from "react";
@@ -2991,7 +3010,7 @@ function asComputerArgs(args) {
2991
3010
  ...typeof record.button === "string" ? { button: record.button } : {}
2992
3011
  };
2993
3012
  }
2994
- function ComputerCallRenderer({ item }) {
3013
+ function ComputerCallRenderer({ item, loadRetainedScreenshot }) {
2995
3014
  const raw = item.raw ?? {};
2996
3015
  const functionAction = !raw.action && item.name.startsWith("computer_") && item.name !== "computer_call" ? { type: item.name.slice("computer_".length), ...asComputerArgs(item.arguments) } : void 0;
2997
3016
  const action = raw.action ?? functionAction;
@@ -3002,6 +3021,7 @@ function ComputerCallRenderer({ item }) {
3002
3021
  const rejected = raw.providerData?.approvalStatus === "rejected";
3003
3022
  const readOnly = typeof out === "string" && out.includes("read-only");
3004
3023
  const shotUrl = screenshotDataUrl(out);
3024
+ const retained = retainedScreenshotMetadata(out);
3005
3025
  const omittedMedia = mediaPreviewFact(out);
3006
3026
  const empty = out === "" || out == null;
3007
3027
  const batched = actions.length > 1 ? actions.map((a) => computerVerb(a)).join(" \xB7 ") : null;
@@ -3047,6 +3067,42 @@ function ComputerCallRenderer({ item }) {
3047
3067
  }
3048
3068
  const isFailed = item.status === "failed";
3049
3069
  const isCancelled = item.status === "cancelled";
3070
+ if (retained) {
3071
+ if (!retained.available) {
3072
+ const state = retained.reason === "expired" || retained.reason === "deleted" ? retained.reason : "unavailable";
3073
+ return /* @__PURE__ */ jsx10(
3074
+ ActivityDisclosure,
3075
+ {
3076
+ icon: /* @__PURE__ */ jsx10(CameraOffIcon2, { className: ICON_SIZE }),
3077
+ iconTone: isFailed ? "failed" : "muted",
3078
+ title: `${verb}${countSuffix} \xB7 ${state}`,
3079
+ failed: isFailed,
3080
+ cancelled: isCancelled,
3081
+ preview: `screenshot ${state}`,
3082
+ media: /* @__PURE__ */ jsx10(MediaEmpty, {}),
3083
+ children: /* @__PURE__ */ jsxs7(BodyNote, { tone: isFailed ? "error" : void 0, children: [
3084
+ "Screenshot ",
3085
+ state,
3086
+ ": ",
3087
+ retained.reason.replaceAll("_", " "),
3088
+ "."
3089
+ ] })
3090
+ }
3091
+ );
3092
+ }
3093
+ return /* @__PURE__ */ jsx10(
3094
+ RetainedScreenshotDisclosure,
3095
+ {
3096
+ artifact: retained,
3097
+ load: loadRetainedScreenshot,
3098
+ verb,
3099
+ countSuffix,
3100
+ batched,
3101
+ failed: isFailed,
3102
+ cancelled: isCancelled
3103
+ }
3104
+ );
3105
+ }
3050
3106
  if (shotUrl) {
3051
3107
  const caption = `${verb}${actions.length > 1 ? ` (+${actions.length - 1} more)` : ""}`;
3052
3108
  return /* @__PURE__ */ jsxs7(
@@ -3121,6 +3177,75 @@ function ComputerCallRenderer({ item }) {
3121
3177
  }
3122
3178
  );
3123
3179
  }
3180
+ function RetainedScreenshotDisclosure({
3181
+ artifact,
3182
+ load,
3183
+ verb,
3184
+ countSuffix,
3185
+ batched,
3186
+ failed,
3187
+ cancelled
3188
+ }) {
3189
+ const [state, setState] = useState8({ kind: "loading" });
3190
+ useEffect6(() => {
3191
+ if (!load) {
3192
+ setState({ kind: "unavailable", label: "retrieval is not configured" });
3193
+ return;
3194
+ }
3195
+ const controller = new AbortController();
3196
+ let objectUrl = null;
3197
+ setState({ kind: "loading" });
3198
+ void load(artifact, controller.signal).then((bytes) => {
3199
+ if (controller.signal.aborted) return;
3200
+ if (!bytes) {
3201
+ setState({ kind: "unavailable", label: "bytes are unavailable" });
3202
+ return;
3203
+ }
3204
+ objectUrl = URL.createObjectURL(new Blob([Uint8Array.from(bytes)], { type: "image/png" }));
3205
+ setState({ kind: "ready", url: objectUrl });
3206
+ }).catch((error) => {
3207
+ if (controller.signal.aborted) return;
3208
+ const status = error && typeof error === "object" && "status" in error ? Number(error.status) : null;
3209
+ setState(
3210
+ status === 404 ? { kind: "unavailable", label: "deleted" } : status === 410 ? { kind: "unavailable", label: "expired or unavailable" } : {
3211
+ kind: "error",
3212
+ message: "retrieval failed"
3213
+ }
3214
+ );
3215
+ });
3216
+ return () => {
3217
+ controller.abort();
3218
+ if (objectUrl) URL.revokeObjectURL(objectUrl);
3219
+ };
3220
+ }, [artifact, load]);
3221
+ const caption = `${verb}${countSuffix}`;
3222
+ return /* @__PURE__ */ jsxs7(
3223
+ ActivityDisclosure,
3224
+ {
3225
+ icon: /* @__PURE__ */ jsx10(CameraIcon2, { className: ICON_SIZE }),
3226
+ iconTone: failed ? "failed" : state.kind === "ready" ? "accent" : "muted",
3227
+ title: caption,
3228
+ failed,
3229
+ cancelled,
3230
+ preview: state.kind === "loading" ? "loading retained screenshot\u2026" : state.kind === "error" ? "screenshot retrieval failed" : state.kind === "unavailable" ? `screenshot ${state.label}` : void 0,
3231
+ media: state.kind === "ready" ? /* @__PURE__ */ jsx10(Thumbnail, { src: state.url, caption }) : state.kind === "loading" ? /* @__PURE__ */ jsx10(MediaSkeleton, {}) : /* @__PURE__ */ jsx10(MediaEmpty, {}),
3232
+ children: [
3233
+ state.kind === "ready" ? /* @__PURE__ */ jsx10(ScreenshotFigure, { src: state.url, caption }) : state.kind === "loading" ? /* @__PURE__ */ jsx10(BodyNote, { children: "Loading the retained screenshot\u2026" }) : state.kind === "unavailable" ? /* @__PURE__ */ jsxs7(BodyNote, { children: [
3234
+ "Screenshot ",
3235
+ state.label,
3236
+ "."
3237
+ ] }) : /* @__PURE__ */ jsxs7(BodyNote, { tone: "error", children: [
3238
+ "Screenshot retrieval failed: ",
3239
+ state.message
3240
+ ] }),
3241
+ batched ? /* @__PURE__ */ jsxs7(BodyNote, { children: [
3242
+ "batched: ",
3243
+ batched
3244
+ ] }) : null
3245
+ ]
3246
+ }
3247
+ );
3248
+ }
3124
3249
  function webSearchQueryFromArguments(args) {
3125
3250
  if (typeof args === "string") {
3126
3251
  const trimmed = args.trim();
@@ -3331,7 +3456,7 @@ function SecretSetRenderer({ item }) {
3331
3456
  title: `Set ${name}`,
3332
3457
  running: true,
3333
3458
  preview: /* @__PURE__ */ jsx10(RunningPreview, { children: "setting\u2026" }),
3334
- children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) })
3459
+ children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args })
3335
3460
  }
3336
3461
  );
3337
3462
  }
@@ -3346,7 +3471,7 @@ function SecretSetRenderer({ item }) {
3346
3471
  failed: true,
3347
3472
  preview: errorText ?? "variable write failed",
3348
3473
  children: [
3349
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3474
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3350
3475
  errorText ? /* @__PURE__ */ jsx10(PayloadBlock, { label: "Error", value: errorText, failed: true }) : /* @__PURE__ */ jsx10(BodyNote, { tone: "error", children: "the tool call failed with no output." })
3351
3476
  ]
3352
3477
  }
@@ -3359,10 +3484,10 @@ function SecretSetRenderer({ item }) {
3359
3484
  iconTone: "muted",
3360
3485
  title: `Set ${name}`,
3361
3486
  cancelled: item.status === "cancelled",
3362
- preview: "value write-only \xB7 never returned",
3487
+ preview: "exact value preserved",
3363
3488
  children: [
3364
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3365
- /* @__PURE__ */ jsx10(BodyNote, { children: "the value is a secret \u2014 redacted in every view; the API never returns it." })
3489
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3490
+ /* @__PURE__ */ jsx10(BodyNote, { children: "The configured value is preserved exactly and available through authorized secret reads." })
3366
3491
  ]
3367
3492
  }
3368
3493
  );
@@ -3472,7 +3597,7 @@ function ToolSearchRenderer({ item }) {
3472
3597
  "capability query: ",
3473
3598
  query2
3474
3599
  ] }) : null,
3475
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(parseToolArgs(item.arguments)) })
3600
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: parseToolArgs(item.arguments) })
3476
3601
  ]
3477
3602
  }
3478
3603
  );
@@ -3492,7 +3617,7 @@ function ToolSearchRenderer({ item }) {
3492
3617
  "capability query: ",
3493
3618
  query2
3494
3619
  ] }) : null,
3495
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(parseToolArgs(item.arguments)) }),
3620
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: parseToolArgs(item.arguments) }),
3496
3621
  /* @__PURE__ */ jsx10(PayloadBlock, { label: "Error", value: outText, failed: true })
3497
3622
  ]
3498
3623
  }
@@ -3524,7 +3649,7 @@ function ToolSearchRenderer({ item }) {
3524
3649
  " more"
3525
3650
  ] }) : null
3526
3651
  ] }) : tools && tools.length === 0 ? /* @__PURE__ */ jsx10(BodyNote, { children: "no deferred tools matched this capability query." }) : null,
3527
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(parseToolArgs(item.arguments)) }),
3652
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: parseToolArgs(item.arguments) }),
3528
3653
  tools == null && outText ? /* @__PURE__ */ jsx10(PayloadBlock, { label: "Result", value: outText }) : null
3529
3654
  ]
3530
3655
  }
@@ -3544,7 +3669,7 @@ function DocsSearchRenderer({ item }) {
3544
3669
  title,
3545
3670
  running: true,
3546
3671
  preview: /* @__PURE__ */ jsx10(RunningPreview, { children: "Searching\u2026" }),
3547
- children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) })
3672
+ children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args })
3548
3673
  }
3549
3674
  );
3550
3675
  }
@@ -3559,7 +3684,7 @@ function DocsSearchRenderer({ item }) {
3559
3684
  failed: true,
3560
3685
  preview: truncatePreview(outText, 80) || "Search failed",
3561
3686
  children: [
3562
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3687
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3563
3688
  /* @__PURE__ */ jsx10(PayloadBlock, { label: "Error", value: outText, failed: true })
3564
3689
  ]
3565
3690
  }
@@ -3580,7 +3705,7 @@ function DocsSearchRenderer({ item }) {
3580
3705
  /* @__PURE__ */ jsx10("div", { className: "truncate text-og-sm font-medium text-og-fg", children: hit.title }),
3581
3706
  hit.snippet ? /* @__PURE__ */ jsx10("div", { className: "mt-0.5 line-clamp-2 text-og-xs text-og-fg-muted", children: hit.snippet }) : null
3582
3707
  ] }, `${hit.title}\0${hit.snippet}`)) }) : null,
3583
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3708
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3584
3709
  /* @__PURE__ */ jsx10(PayloadBlock, { label: "Result", value: outText })
3585
3710
  ]
3586
3711
  }
@@ -3601,7 +3726,7 @@ function SetSessionTitleRenderer({ item }) {
3601
3726
  title: display,
3602
3727
  running: true,
3603
3728
  preview: previewTitle ? /* @__PURE__ */ jsx10(RunningPreview, { children: previewTitle }) : /* @__PURE__ */ jsx10(RunningPreview, { children: "Setting title\u2026" }),
3604
- children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) })
3729
+ children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args })
3605
3730
  }
3606
3731
  );
3607
3732
  }
@@ -3616,7 +3741,7 @@ function SetSessionTitleRenderer({ item }) {
3616
3741
  failed: true,
3617
3742
  preview: truncatePreview(outText, 80) || "Rename failed",
3618
3743
  children: [
3619
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3744
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3620
3745
  /* @__PURE__ */ jsx10(PayloadBlock, { label: "Error", value: outText, failed: true })
3621
3746
  ]
3622
3747
  }
@@ -3641,7 +3766,7 @@ function SetSessionTitleRenderer({ item }) {
3641
3766
  cancelled: item.status === "cancelled",
3642
3767
  preview: item.status === "cancelled" ? void 0 : settledTitle || void 0,
3643
3768
  children: [
3644
- /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) }),
3769
+ /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args }),
3645
3770
  outText ? /* @__PURE__ */ jsx10(PayloadBlock, { label: "Result", value: outText }) : null
3646
3771
  ]
3647
3772
  }
@@ -3677,7 +3802,7 @@ function MemoryProposeRenderer({ item }) {
3677
3802
  title,
3678
3803
  running: true,
3679
3804
  preview: /* @__PURE__ */ jsx10(RunningPreview, { children: "Proposing\u2026" }),
3680
- children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: redactSecrets(args) })
3805
+ children: /* @__PURE__ */ jsx10(PayloadBlock, { label: "Arguments", value: args })
3681
3806
  }
3682
3807
  );
3683
3808
  }
@@ -3732,7 +3857,7 @@ function askToolPreview(args) {
3732
3857
  return questions.length > 1 ? `${preview} \xB7 ${questions.length} questions` : preview;
3733
3858
  }
3734
3859
  function AskRenderer({ item }) {
3735
- const args = redactSecrets(parseToolArgs(item.arguments));
3860
+ const args = parseToolArgs(item.arguments);
3736
3861
  const preview = askToolPreview(args);
3737
3862
  const icon = /* @__PURE__ */ jsx10(MessageCircleQuestionIcon2, { className: ICON_SIZE });
3738
3863
  const title = "Ask";
@@ -3808,7 +3933,7 @@ function runOnOpPreview(args) {
3808
3933
  }
3809
3934
  function RunOnRenderer({ item }) {
3810
3935
  const parsedArgs = parseToolArgs(item.arguments);
3811
- const args = redactSecrets(parsedArgs);
3936
+ const args = parsedArgs;
3812
3937
  const targetName = runOnTargetName(item.output);
3813
3938
  const title = targetName ? `Run on ${targetName}` : "Run on";
3814
3939
  const opPreview = runOnOpPreview(parsedArgs);
@@ -3860,7 +3985,7 @@ function RunOnRenderer({ item }) {
3860
3985
  }
3861
3986
  function GenericRenderer({ item }) {
3862
3987
  const running = item.status === "running";
3863
- const args = redactSecrets(parseToolArgs(item.arguments));
3988
+ const args = parseToolArgs(item.arguments);
3864
3989
  const display = toolDisplayName(item.name);
3865
3990
  const icon = /* @__PURE__ */ jsx10(GenericToolIcon, { name: item.name });
3866
3991
  const goalPreview = goalToolPreview(item.name, args);
@@ -4023,7 +4148,7 @@ function tableElementToTsv(table) {
4023
4148
 
4024
4149
  // src/components/copy-button.tsx
4025
4150
  import { CheckIcon, CopyIcon } from "lucide-react";
4026
- import { useEffect as useEffect6, useRef as useRef4, useState as useState8 } from "react";
4151
+ import { useEffect as useEffect7, useRef as useRef4, useState as useState9 } from "react";
4027
4152
  import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
4028
4153
  var COPIED_MS = 1600;
4029
4154
  function CopyButton({
@@ -4032,10 +4157,10 @@ function CopyButton({
4032
4157
  className,
4033
4158
  reveal = "group-hover"
4034
4159
  }) {
4035
- const [copied, setCopied] = useState8(false);
4036
- const [tipOpen, setTipOpen] = useState8(false);
4160
+ const [copied, setCopied] = useState9(false);
4161
+ const [tipOpen, setTipOpen] = useState9(false);
4037
4162
  const timerRef = useRef4(null);
4038
- useEffect6(() => {
4163
+ useEffect7(() => {
4039
4164
  return () => {
4040
4165
  if (timerRef.current !== null) {
4041
4166
  clearTimeout(timerRef.current);
@@ -4086,10 +4211,10 @@ function CopyButton({
4086
4211
  "aria-label": tip,
4087
4212
  onClick,
4088
4213
  className: cn(
4089
- "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
4214
+ "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm pointer-coarse:size-11",
4090
4215
  "text-og-fg-subtle transition-[opacity,color,background-color] duration-150",
4091
4216
  "hover:bg-og-surface-2/80 hover:text-og-fg",
4092
- "focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-og-accent/40",
4217
+ "focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/40",
4093
4218
  reveal === "group-hover" && "opacity-0 group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-70",
4094
4219
  copied && "opacity-100 text-og-accent",
4095
4220
  className
@@ -4136,10 +4261,10 @@ import {
4136
4261
  Children,
4137
4262
  isValidElement,
4138
4263
  memo,
4139
- useEffect as useEffect7,
4264
+ useEffect as useEffect8,
4140
4265
  useReducer,
4141
4266
  useRef as useRef5,
4142
- useState as useState9
4267
+ useState as useState10
4143
4268
  } from "react";
4144
4269
  import ReactMarkdown from "react-markdown";
4145
4270
  import remarkGfm from "remark-gfm";
@@ -4624,7 +4749,7 @@ function MarkdownImpl({ children, className, streaming = false }) {
4624
4749
  const revealRef = useRef5(null);
4625
4750
  const bodyRef = useRef5(null);
4626
4751
  const [, bump] = useReducer((n) => n + 1, 0);
4627
- const [settling, setSettling] = useState9(false);
4752
+ const [settling, setSettling] = useState10(false);
4628
4753
  const hadRevealRef = useRef5(false);
4629
4754
  const now = typeof performance !== "undefined" ? performance.now() : Date.now();
4630
4755
  const crystallize = (mutate) => {
@@ -4645,7 +4770,7 @@ function MarkdownImpl({ children, className, streaming = false }) {
4645
4770
  }
4646
4771
  const revealActive = reveal !== null && (streaming || reveal.hasActive(now));
4647
4772
  const rehypePlugins = revealActive && reveal !== null ? [[rehypeStreamReveal, { reveal, now }]] : void 0;
4648
- useEffect7(() => {
4773
+ useEffect8(() => {
4649
4774
  if (streaming || revealRef.current === null) {
4650
4775
  return;
4651
4776
  }
@@ -4672,7 +4797,7 @@ function MarkdownImpl({ children, className, streaming = false }) {
4672
4797
  };
4673
4798
  }, [streaming]);
4674
4799
  const wasStreamingRef = useRef5(streaming);
4675
- useEffect7(() => {
4800
+ useEffect8(() => {
4676
4801
  const ended = wasStreamingRef.current && !streaming;
4677
4802
  wasStreamingRef.current = streaming;
4678
4803
  if (!ended || revealRef.current !== null || prefersReducedMotion()) {
@@ -4752,6 +4877,7 @@ function ActivityRail({
4752
4877
  toolRegistry = defaultToolRegistry,
4753
4878
  onOpenSession,
4754
4879
  onMemoryClick,
4880
+ loadRetainedScreenshot,
4755
4881
  bare,
4756
4882
  className
4757
4883
  }) {
@@ -4796,7 +4922,13 @@ function ActivityRail({
4796
4922
  ),
4797
4923
  children: items.map((item, index) => {
4798
4924
  const newFamily = index > 0 && familyOf(item) !== familyOf(items[index - 1]);
4799
- const row = renderActivity(item, toolRegistry, onOpenSession, onMemoryClick);
4925
+ const row = renderActivity(
4926
+ item,
4927
+ toolRegistry,
4928
+ onOpenSession,
4929
+ onMemoryClick,
4930
+ loadRetainedScreenshot
4931
+ );
4800
4932
  return /* @__PURE__ */ jsx13(
4801
4933
  "div",
4802
4934
  {
@@ -4813,13 +4945,13 @@ function ActivityRail({
4813
4945
  function assertNever(item) {
4814
4946
  throw new Error(`ActivityRail: unhandled activity item ${JSON.stringify(item)}`);
4815
4947
  }
4816
- function renderActivity(item, toolRegistry, onOpenSession, onMemoryClick) {
4948
+ function renderActivity(item, toolRegistry, onOpenSession, onMemoryClick, loadRetainedScreenshot) {
4817
4949
  switch (item.kind) {
4818
4950
  case "reasoning":
4819
4951
  return /* @__PURE__ */ jsx13(ReasoningRow, { item });
4820
4952
  case "tool-call": {
4821
4953
  const Renderer = toolRegistry.resolve(item);
4822
- return /* @__PURE__ */ jsx13(Renderer, { item });
4954
+ return /* @__PURE__ */ jsx13(Renderer, { item, loadRetainedScreenshot });
4823
4955
  }
4824
4956
  case "worker":
4825
4957
  return /* @__PURE__ */ jsx13(WorkerRow, { item, onOpenSession });
@@ -4908,7 +5040,7 @@ function MemoryRow({
4908
5040
  onClick: () => onMemoryClick?.(targetId),
4909
5041
  className: cn(
4910
5042
  "group/memlink -mx-1 inline-flex w-fit items-center gap-1 rounded-og-sm px-1 py-0.5 text-left text-og-sm text-og-fg-subtle",
4911
- "outline-none transition-colors duration-150 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent"
5043
+ "outline-hidden transition-colors duration-150 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent"
4912
5044
  ),
4913
5045
  children: [
4914
5046
  "View in memory",
@@ -4994,8 +5126,8 @@ function WorkerRow({
4994
5126
  onClick: () => onOpenSession(sessionId),
4995
5127
  className: cn(
4996
5128
  "group/worker -mx-1.5 flex w-full items-start gap-2 rounded-og-sm px-1.5 py-1.5 text-left",
4997
- "outline-none transition-colors duration-150 hover:bg-og-surface-1 focus-visible:ring-2 focus-visible:ring-og-accent",
4998
- "pointer-coarse:py-2.5"
5129
+ "outline-hidden transition-colors duration-150 hover:bg-og-surface-1 focus-visible:ring-2 focus-visible:ring-og-accent",
5130
+ "pointer-coarse:min-h-11 pointer-coarse:py-2.5"
4999
5131
  ),
5000
5132
  children: inner
5001
5133
  }
@@ -5010,10 +5142,10 @@ import {
5010
5142
  Component,
5011
5143
  createContext as createContext7,
5012
5144
  useContext as useContext7,
5013
- useEffect as useEffect8,
5145
+ useEffect as useEffect9,
5014
5146
  useMemo as useMemo4,
5015
5147
  useRef as useRef8,
5016
- useState as useState10
5148
+ useState as useState11
5017
5149
  } from "react";
5018
5150
  import { Collapsible } from "radix-ui";
5019
5151
 
@@ -5071,11 +5203,11 @@ function TurnSummary({
5071
5203
  const remembered = foldKey !== void 0 ? foldMemory?.get(foldKey) : void 0;
5072
5204
  const restingOpen = remembered === "closed" ? false : remembered === "open" ? true : defaultOpen ?? forcedDefaultOpen ?? false;
5073
5205
  const initialSettle = Boolean(settleFold) && !restingOpen && remembered === void 0;
5074
- const [settling, setSettling] = useState10(initialSettle);
5075
- const [open, setOpen] = useState10(initialSettle ? true : restingOpen);
5076
- const [settlePhase, setSettlePhase] = useState10(initialSettle);
5077
- const [nestSuppressLatch, setNestSuppressLatch] = useState10(initialSettle);
5078
- const [expandReady, setExpandReady] = useState10(!initialSettle);
5206
+ const [settling, setSettling] = useState11(initialSettle);
5207
+ const [open, setOpen] = useState11(initialSettle ? true : restingOpen);
5208
+ const [settlePhase, setSettlePhase] = useState11(initialSettle);
5209
+ const [nestSuppressLatch, setNestSuppressLatch] = useState11(initialSettle);
5210
+ const [expandReady, setExpandReady] = useState11(!initialSettle);
5079
5211
  const settleTimerRef = useRef8(null);
5080
5212
  const settleCloseDoneRef = useRef8(null);
5081
5213
  const nestLatchClearRef = useRef8(null);
@@ -5129,7 +5261,7 @@ function TurnSummary({
5129
5261
  }, SETTLE_FOLD_BEAT_MS);
5130
5262
  };
5131
5263
  const mountSettleRef = useRef8(initialSettle);
5132
- useEffect8(() => {
5264
+ useEffect9(() => {
5133
5265
  if (mountSettleRef.current) {
5134
5266
  armSettleCollapse();
5135
5267
  }
@@ -5138,7 +5270,7 @@ function TurnSummary({
5138
5270
  settleArmedRef.current = false;
5139
5271
  };
5140
5272
  }, []);
5141
- useEffect8(() => {
5273
+ useEffect9(() => {
5142
5274
  const was = settleFoldSeenRef.current;
5143
5275
  settleFoldSeenRef.current = Boolean(settleFold);
5144
5276
  if (!was && settleFold) {
@@ -5173,7 +5305,7 @@ function TurnSummary({
5173
5305
  }
5174
5306
  };
5175
5307
  const enter = useEntranceAnimation();
5176
- const [allowEnterAnimation] = useState10(
5308
+ const [allowEnterAnimation] = useState11(
5177
5309
  () => Boolean(enter && !bare && !initialSettle && !restingOpen)
5178
5310
  );
5179
5311
  const context = useMemo4(
@@ -5227,8 +5359,8 @@ function TurnSummary({
5227
5359
  // as a turn landmark above any nested cluster rows it groups.
5228
5360
  "group flex w-full items-center rounded-og-sm text-left transition-colors",
5229
5361
  // A folded turn is a touch target on coarse pointers: grow the row so it
5230
- // clears the 40px minimum without disturbing the calm desktop rhythm.
5231
- "pointer-coarse:py-2.5",
5362
+ // clears the 44px minimum without disturbing the calm desktop rhythm.
5363
+ "pointer-coarse:min-h-11 pointer-coarse:py-2.5",
5232
5364
  bare ? "gap-2 px-1.5 py-1.5 text-og-sm text-og-fg-muted" : "-mx-2 gap-2.5 px-2 py-1.5 text-og-base text-og-fg-muted",
5233
5365
  // A failed fold keeps its red accent (glyph + inline reason below) and a
5234
5366
  // faint red hover wash so attention still lands there; every other
@@ -5242,7 +5374,7 @@ function TurnSummary({
5242
5374
  {
5243
5375
  className: cn(
5244
5376
  "size-3.5 shrink-0 text-og-fg-subtle transition-transform ease-og-in-out group-data-[state=open]:rotate-90",
5245
- settlePhase ? "duration-[var(--og-duration-disclose-settle)]" : "duration-[var(--og-duration-disclose)]"
5377
+ settlePhase ? "duration-[var(--_og-duration-disclose-settle)]" : "duration-[var(--_og-duration-disclose)]"
5246
5378
  )
5247
5379
  }
5248
5380
  ),
@@ -5407,7 +5539,7 @@ var BUILT_IN_TURN_SUMMARY_FACETS = Object.freeze([
5407
5539
  id: "compacted",
5408
5540
  summarize: ({ contextCompactionCount }) => contextCompactionCount > 0 ? {
5409
5541
  content: contextCompactionCount === 1 ? "compacted" : `${contextCompactionCount} compacts`,
5410
- ariaLabel: contextCompactionCount === 1 ? "Conversation memory compacted" : `${contextCompactionCount} conversation memory compactions`
5542
+ ariaLabel: contextCompactionCount === 1 ? "Conversation history compacted" : `${contextCompactionCount} conversation history compactions`
5411
5543
  } : null
5412
5544
  },
5413
5545
  {
@@ -5471,7 +5603,7 @@ import {
5471
5603
  useId as useId3,
5472
5604
  useLayoutEffect as useLayoutEffect3,
5473
5605
  useRef as useRef9,
5474
- useState as useState11
5606
+ useState as useState12
5475
5607
  } from "react";
5476
5608
  import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
5477
5609
  var FALLBACK_LINE_THRESHOLD = 12;
@@ -5566,10 +5698,10 @@ function userMessageLikelyNeedsDisclosure(text) {
5566
5698
  }
5567
5699
  function UserMessageBody({ messageId, text, children, className }) {
5568
5700
  const disclosure = useContext8(UserMessageDisclosureContext);
5569
- const [expanded, setExpanded] = useState11(
5701
+ const [expanded, setExpanded] = useState12(
5570
5702
  () => disclosure?.expandedByMessageId.get(messageId) ?? false
5571
5703
  );
5572
- const [collapsible, setCollapsible] = useState11(() => userMessageLikelyNeedsDisclosure(text));
5704
+ const [collapsible, setCollapsible] = useState12(() => userMessageLikelyNeedsDisclosure(text));
5573
5705
  const rootRef = useRef9(null);
5574
5706
  const clipRef = useRef9(null);
5575
5707
  const contentRef = useRef9(null);
@@ -5724,7 +5856,7 @@ function UserMessageBody({ messageId, text, children, className }) {
5724
5856
  "aria-controls": contentId,
5725
5857
  "aria-expanded": expanded,
5726
5858
  "data-og-user-message-disclosure": "",
5727
- className: "mt-1.5 inline-flex min-h-7 items-center rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-none transition-colors hover:bg-og-surface-3/60 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/45 pointer-coarse:min-h-11",
5859
+ className: "mt-1.5 inline-flex min-h-7 items-center rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-hidden transition-colors hover:bg-og-surface-3/60 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/45 pointer-coarse:min-h-11",
5728
5860
  onClick: (event) => toggle(event.currentTarget),
5729
5861
  children: expanded ? "Show less" : "Show more"
5730
5862
  }
@@ -5846,11 +5978,11 @@ import {
5846
5978
  Component as Component2,
5847
5979
  memo as memo2,
5848
5980
  useCallback as useCallback3,
5849
- useEffect as useEffect9,
5981
+ useEffect as useEffect10,
5850
5982
  useLayoutEffect as useLayoutEffect4,
5851
5983
  useMemo as useMemo5,
5852
5984
  useRef as useRef10,
5853
- useState as useState12
5985
+ useState as useState13
5854
5986
  } from "react";
5855
5987
 
5856
5988
  // src/components/tip-follow.ts
@@ -6226,8 +6358,10 @@ function MessageTimeline({
6226
6358
  onOpenSession,
6227
6359
  onMemoryClick,
6228
6360
  onReconnect,
6361
+ shouldRenderAuthNeeded,
6229
6362
  resolveProviderLogo,
6230
6363
  toolRegistry = defaultToolRegistry,
6364
+ loadRetainedScreenshot,
6231
6365
  computeLabel = null,
6232
6366
  turnSummary,
6233
6367
  autoFollow = true,
@@ -6240,24 +6374,31 @@ function MessageTimeline({
6240
6374
  loadingNewer = false,
6241
6375
  onLoadNewer,
6242
6376
  onJumpToLatest,
6377
+ trailingState,
6243
6378
  emptyState,
6244
6379
  className
6245
6380
  }) {
6246
- const resolvedItems = useMemo5(() => items ?? buildTimeline(events ?? []), [items, events]);
6381
+ const resolvedItems = useMemo5(() => {
6382
+ const projected = items ?? buildTimeline(events ?? []);
6383
+ if (!shouldRenderAuthNeeded) {
6384
+ return projected;
6385
+ }
6386
+ return projected.filter((item) => item.kind !== "auth-needed" || shouldRenderAuthNeeded(item));
6387
+ }, [items, events, shouldRenderAuthNeeded]);
6247
6388
  const allGroups = useMemo5(() => groupTimeline(resolvedItems), [resolvedItems]);
6248
6389
  const groups = useStableTimelineGroupKeys(allGroups);
6249
6390
  const scrollRef = useRef10(null);
6250
6391
  const topSentinelRef = useRef10(null);
6251
6392
  const bottomSentinelRef = useRef10(null);
6252
6393
  const previousBulkFirstKeyRef = useRef10(void 0);
6253
- const [pinned, setPinned] = useState12(true);
6254
- const [bulkActive, setBulkActive] = useState12(true);
6394
+ const [pinned, setPinned] = useState13(true);
6395
+ const [bulkActive, setBulkActive] = useState13(true);
6255
6396
  const olderPrefetchArmedRef = useRef10(false);
6256
- const [olderPrefetchArmed, setOlderPrefetchArmed] = useState12(false);
6397
+ const [olderPrefetchArmed, setOlderPrefetchArmed] = useState13(false);
6257
6398
  const olderLoadGateRef = useRef10("armed");
6258
6399
  const resizeFollowRafRef = useRef10(null);
6259
6400
  const firstGroupKey = allGroups[0] ? timelineGroupKey(allGroups[0]) : null;
6260
- const [revealed, setRevealed] = useState12(false);
6401
+ const [revealed, setRevealed] = useState13(false);
6261
6402
  const pinnedRef = useRef10(true);
6262
6403
  const hasNewerRef = useRef10(hasNewer);
6263
6404
  hasNewerRef.current = hasNewer;
@@ -6568,8 +6709,8 @@ function MessageTimeline({
6568
6709
  [cancelLeaveFallback, stopFollow, syncScrollBaseline, writeScrollTop]
6569
6710
  );
6570
6711
  driveFollowRef.current = driveFollow;
6571
- useEffect9(() => stopFollow, [stopFollow]);
6572
- useEffect9(() => () => cancelLeaveFallback(), [cancelLeaveFallback]);
6712
+ useEffect10(() => stopFollow, [stopFollow]);
6713
+ useEffect10(() => () => cancelLeaveFallback(), [cancelLeaveFallback]);
6573
6714
  useLayoutEffect4(() => {
6574
6715
  const node = scrollRef.current;
6575
6716
  if (!node) {
@@ -6722,7 +6863,7 @@ function MessageTimeline({
6722
6863
  const frame = requestFrame(() => setBulkActive(false));
6723
6864
  return () => cancelFrame(frame);
6724
6865
  }, [bulkRender, firstGroupKey]);
6725
- useEffect9(() => {
6866
+ useEffect10(() => {
6726
6867
  const root = scrollRef.current;
6727
6868
  const target = topSentinelRef.current;
6728
6869
  if (!root || !target || !olderPrefetchArmed || !hasOlder || loadingOlder || !onLoadOlder || typeof IntersectionObserver === "undefined") {
@@ -6746,7 +6887,7 @@ function MessageTimeline({
6746
6887
  observer.observe(target);
6747
6888
  return () => observer.disconnect();
6748
6889
  }, [olderPrefetchArmed, hasOlder, loadingOlder, onLoadOlder, firstGroupKey]);
6749
- useEffect9(() => {
6890
+ useEffect10(() => {
6750
6891
  const root = scrollRef.current;
6751
6892
  const target = bottomSentinelRef.current;
6752
6893
  if (!root || !target || !hasNewer || loadingNewer || !onLoadNewer || typeof IntersectionObserver === "undefined") {
@@ -6763,7 +6904,7 @@ function MessageTimeline({
6763
6904
  observer.observe(target);
6764
6905
  return () => observer.disconnect();
6765
6906
  }, [hasNewer, loadingNewer, onLoadNewer, firstGroupKey]);
6766
- useEffect9(() => {
6907
+ useEffect10(() => {
6767
6908
  const node = scrollRef.current;
6768
6909
  const inner = node?.firstElementChild;
6769
6910
  if (!node || !inner || typeof ResizeObserver === "undefined") {
@@ -6799,7 +6940,7 @@ function MessageTimeline({
6799
6940
  }
6800
6941
  };
6801
6942
  }, [autoFollow, driveFollow, snapToBottom]);
6802
- useEffect9(() => {
6943
+ useEffect10(() => {
6803
6944
  if (hasNewer) {
6804
6945
  stopFollow();
6805
6946
  applyPinned(false);
@@ -6939,7 +7080,7 @@ function MessageTimeline({
6939
7080
  className: cn(
6940
7081
  // tabIndex=-1 is programmatic only — never paint a focus ring on
6941
7082
  // the whole scroller (click + Shift used to flash a blue outline).
6942
- "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6 sm:px-6 outline-none",
7083
+ "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6 sm:px-6 outline-hidden",
6943
7084
  autoFollow && pinned && !hasNewer ? "[overflow-anchor:none]" : "[overflow-anchor:auto]"
6944
7085
  ),
6945
7086
  children: /* @__PURE__ */ jsxs14("div", { className: "relative mx-auto flex w-full max-w-3xl flex-col gap-5", children: [
@@ -6972,6 +7113,7 @@ function MessageTimeline({
6972
7113
  onReconnect,
6973
7114
  resolveProviderLogo,
6974
7115
  toolRegistry,
7116
+ loadRetainedScreenshot,
6975
7117
  turnSummary
6976
7118
  ],
6977
7119
  children: /* @__PURE__ */ jsx17(UserMessageDisclosureProvider, { value: userMessageDisclosureContext, children: /* @__PURE__ */ jsx17(
@@ -6984,6 +7126,7 @@ function MessageTimeline({
6984
7126
  onReconnect,
6985
7127
  resolveProviderLogo,
6986
7128
  toolRegistry,
7129
+ loadRetainedScreenshot,
6987
7130
  turnSummary,
6988
7131
  foldLiveCluster: isAgentProgress(next),
6989
7132
  trailingAgentText: trailingAgentTextAfterTurn(group, next),
@@ -6993,6 +7136,7 @@ function MessageTimeline({
6993
7136
  }
6994
7137
  ) }, key);
6995
7138
  }),
7139
+ groups.length > 0 && trailingState ? /* @__PURE__ */ jsx17("div", { "data-og-timeline-trailing-state": "", children: trailingState }) : null,
6996
7140
  hasNewer ? /* @__PURE__ */ jsx17(
6997
7141
  "div",
6998
7142
  {
@@ -7118,7 +7262,7 @@ function MessageTimeline({
7118
7262
  }
7119
7263
  },
7120
7264
  className: cn(
7121
- "absolute bottom-4 left-1/2 -translate-x-1/2",
7265
+ "absolute inset-x-0 bottom-4 mx-auto w-fit",
7122
7266
  "inline-flex items-center gap-1.5 rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1.5",
7123
7267
  "text-og-control font-medium text-og-fg shadow-og-md backdrop-blur",
7124
7268
  "hover:border-og-border-strong"
@@ -7226,6 +7370,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7226
7370
  onReconnect,
7227
7371
  resolveProviderLogo,
7228
7372
  toolRegistry,
7373
+ loadRetainedScreenshot,
7229
7374
  turnSummary,
7230
7375
  insideTurn = false,
7231
7376
  nestClusterChips = false,
@@ -7259,6 +7404,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7259
7404
  onOpenSession,
7260
7405
  onMemoryClick,
7261
7406
  toolRegistry,
7407
+ loadRetainedScreenshot,
7262
7408
  bare: true
7263
7409
  }
7264
7410
  );
@@ -7281,6 +7427,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7281
7427
  onOpenSession,
7282
7428
  onMemoryClick,
7283
7429
  toolRegistry,
7430
+ loadRetainedScreenshot,
7284
7431
  bare: true
7285
7432
  }
7286
7433
  )
@@ -7306,6 +7453,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7306
7453
  onOpenSession,
7307
7454
  onMemoryClick,
7308
7455
  toolRegistry,
7456
+ loadRetainedScreenshot,
7309
7457
  bare: true
7310
7458
  }
7311
7459
  ) }) })
@@ -7328,6 +7476,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7328
7476
  onReconnect,
7329
7477
  resolveProviderLogo,
7330
7478
  toolRegistry,
7479
+ loadRetainedScreenshot,
7331
7480
  turnSummary
7332
7481
  ],
7333
7482
  children: /* @__PURE__ */ jsx17(
@@ -7340,6 +7489,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
7340
7489
  onReconnect,
7341
7490
  resolveProviderLogo,
7342
7491
  toolRegistry,
7492
+ loadRetainedScreenshot,
7343
7493
  turnSummary,
7344
7494
  insideTurn: true,
7345
7495
  nestClusterChips: nestClusters
@@ -7589,7 +7739,7 @@ function CompactionRow({ item }) {
7589
7739
  const trigger = item.trigger && item.phase !== "started" ? COMPACTION_TRIGGER_LABEL[item.trigger] : null;
7590
7740
  const before = item.estimatedTokensBefore !== null ? Math.round(item.estimatedTokensBefore).toLocaleString("en-US") : null;
7591
7741
  const after = item.estimatedTokensAfter !== null ? Math.round(item.estimatedTokensAfter).toLocaleString("en-US") : null;
7592
- const title = item.phase === "started" ? "Compacting conversation memory\u2026" : item.phase === "compacted" ? before && after ? `Conversation memory compacted \xB7 ~${before} \u2192 ~${after} tokens` : "Conversation memory compacted" : "Couldn\u2019t compact conversation memory";
7742
+ const title = item.phase === "started" ? "Compacting conversation history\u2026" : item.phase === "compacted" ? before && after ? `Conversation history compacted \xB7 ~${before} \u2192 ~${after} estimated history tokens` : "Conversation history compacted" : "Couldn\u2019t compact conversation history";
7593
7743
  const subtitle = item.phase === "compacted" ? "Chat history above is unchanged" : item.phase === "skipped" ? compactionSkipSubtitle(item.skipReason) : null;
7594
7744
  const pill = item.phase === "skipped" && item.skipReason === "summarization_failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.phase === "started" ? "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting" : "border-og-border bg-og-surface-1 text-og-fg-muted";
7595
7745
  return /* @__PURE__ */ jsx17("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs14(
@@ -7635,7 +7785,7 @@ function MessageFooterTime({ occurredAt }) {
7635
7785
  className: cn(
7636
7786
  "shrink-0 tabular-nums text-og-xs text-og-fg-subtle",
7637
7787
  "opacity-0 transition-opacity duration-150",
7638
- "group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-70"
7788
+ "group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-100"
7639
7789
  ),
7640
7790
  children: formatClockTime(occurredAt)
7641
7791
  }
@@ -7712,7 +7862,7 @@ function WorkerCompletionRow({
7712
7862
  onOpenSession
7713
7863
  }) {
7714
7864
  const enter = useEntranceAnimation();
7715
- const [open, setOpen] = useState12(false);
7865
+ const [open, setOpen] = useState13(false);
7716
7866
  const meta = workerCompletionMeta(item);
7717
7867
  const Icon = meta.icon;
7718
7868
  const showPausedReason = item.childStatus !== "failed" && item.goalStatus === "paused" && Boolean(item.pausedReason?.trim());
@@ -7739,7 +7889,7 @@ function WorkerCompletionRow({
7739
7889
  onClick: () => onOpenSession(item.childSessionId),
7740
7890
  className: cn(
7741
7891
  "-my-0.5 -mr-1 inline-flex shrink-0 items-center gap-1 rounded-og-sm px-2 py-1 text-og-sm font-medium text-og-fg-muted pointer-coarse:py-2",
7742
- "outline-none transition-colors duration-150 hover:bg-og-surface-2 hover:text-og-fg",
7892
+ "outline-hidden transition-colors duration-150 hover:bg-og-surface-2 hover:text-og-fg",
7743
7893
  "focus-visible:ring-2 focus-visible:ring-og-accent"
7744
7894
  ),
7745
7895
  children: [
@@ -7756,7 +7906,7 @@ function WorkerCompletionRow({
7756
7906
  type: "button",
7757
7907
  className: cn(
7758
7908
  "group/wc -mx-1 inline-flex w-fit items-center gap-1 rounded-og-sm px-1 py-0.5 text-og-xs font-medium text-og-fg-subtle",
7759
- "outline-none transition-colors duration-150 hover:text-og-fg-muted focus-visible:ring-2 focus-visible:ring-og-accent"
7909
+ "outline-hidden transition-colors duration-150 hover:text-og-fg-muted focus-visible:ring-2 focus-visible:ring-og-accent"
7760
7910
  ),
7761
7911
  children: [
7762
7912
  /* @__PURE__ */ jsx17(ChevronRightIcon3, { className: "size-3 transition-transform duration-150 ease-og-in-out group-data-[state=open]/wc:rotate-90" }),
@@ -7939,9 +8089,9 @@ function AuthNeededRow({
7939
8089
  resolveProviderLogo
7940
8090
  }) {
7941
8091
  const enter = useEntranceAnimation();
7942
- const [busy, setBusy] = useState12(false);
7943
- const [failed, setFailed] = useState12(false);
7944
- const provider = providerLabel(item.providerDomain);
8092
+ const [busy, setBusy] = useState13(false);
8093
+ const [failed, setFailed] = useState13(false);
8094
+ const provider = item.serverId === "codex_apps" ? "Codex Apps" : providerLabel(item.providerDomain);
7945
8095
  const unavailable = item.reason === "personal_authority_unavailable" || item.reason === "unsupported_auth" || item.reason === "resource_scope_unavailable";
7946
8096
  const missing = item.reason === "missing_connection";
7947
8097
  const actionLabel = missing ? "Connect" : "Reconnect";
@@ -8021,8 +8171,8 @@ function AuthNeededRow({
8021
8171
  ] });
8022
8172
  }
8023
8173
  function AuthProviderLogo({ src, label }) {
8024
- const [failed, setFailed] = useState12(false);
8025
- useEffect9(() => setFailed(false), [src]);
8174
+ const [failed, setFailed] = useState13(false);
8175
+ useEffect10(() => setFailed(false), [src]);
8026
8176
  const showImage = src && !failed;
8027
8177
  return /* @__PURE__ */ jsx17(
8028
8178
  "span",
@@ -8103,7 +8253,6 @@ export {
8103
8253
  applyPatchOps,
8104
8254
  applyPatchOpsFromToolItem,
8105
8255
  isApplyPatch,
8106
- redactSecrets,
8107
8256
  parseToolArgs,
8108
8257
  tailPeek,
8109
8258
  unwrapMcpOutput,
@@ -8140,4 +8289,4 @@ export {
8140
8289
  MessageTimeline,
8141
8290
  TimelineRow
8142
8291
  };
8143
- //# sourceMappingURL=chunk-FD72GJMK.js.map
8292
+ //# sourceMappingURL=chunk-XCNTXWBB.js.map