@opengeni/react 3.1.0 → 3.3.2
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.
- package/dist/accounts.js +87 -11
- package/dist/accounts.js.map +1 -1
- package/dist/{browser-viewer-AEFHUYZK.js → browser-viewer-MKKFRRRV.js} +3 -3
- package/dist/{chunk-W6NFJXSA.js → chunk-2DZVYHVO.js} +20 -4
- package/dist/chunk-2DZVYHVO.js.map +1 -0
- package/dist/{chunk-YJFGAFBD.js → chunk-3AGBGTRT.js} +226 -95
- package/dist/chunk-3AGBGTRT.js.map +1 -0
- package/dist/{chunk-YFKJ7VZH.js → chunk-7EAFGICR.js} +45 -11
- package/dist/chunk-7EAFGICR.js.map +1 -0
- package/dist/{chunk-MZ2G2XBA.js → chunk-IOLVN74D.js} +31 -4
- package/dist/chunk-IOLVN74D.js.map +1 -0
- package/dist/{chunk-D3UIAJKY.js → chunk-JAQ5K7W6.js} +3 -2
- package/dist/{chunk-D3UIAJKY.js.map → chunk-JAQ5K7W6.js.map} +1 -1
- package/dist/{chunk-LAKLF4PA.js → chunk-VTOREEXF.js} +8 -7
- package/dist/chunk-VTOREEXF.js.map +1 -0
- package/dist/{chunk-RGALCTWO.js → chunk-XYRDDSXF.js} +4 -4
- package/dist/{chunk-HQVCKCLG.js → chunk-YG4QEQF5.js} +354 -255
- package/dist/chunk-YG4QEQF5.js.map +1 -0
- package/dist/{chunk-XXWH2JLC.js → chunk-YVCHAQZY.js} +2 -2
- package/dist/{chunk-OAM4WAAM.js → chunk-ZPBTI3TE.js} +2 -2
- package/dist/components/fleet-tile.d.ts +2 -2
- package/dist/components/model-policy-picker.d.ts +9 -0
- package/dist/components/tip-follow.d.ts +16 -0
- package/dist/composer.js +5 -5
- package/dist/hooks/use-session-events.d.ts +3 -3
- package/dist/index.js +76 -68
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +2 -2
- package/dist/machines.js +2 -2
- package/dist/realtime.js +46 -7
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.js +4 -4
- package/dist/session.js +4 -4
- package/dist/timeline/entrance.d.ts +13 -1
- package/package.json +3 -2
- package/src/accounts.tsx +116 -14
- package/src/components/fleet-tile.tsx +4 -15
- package/src/components/message-timeline.tsx +237 -101
- package/src/components/model-policy-picker.tsx +24 -3
- package/src/components/tip-follow.ts +52 -0
- package/src/components/tooltip.tsx +38 -5
- package/src/hooks/use-available-models.ts +20 -14
- package/src/hooks/use-composer.ts +49 -3
- package/src/hooks/use-goal.ts +31 -7
- package/src/hooks/use-last-started-turn-policy.ts +11 -5
- package/src/hooks/use-session-events.ts +186 -61
- package/src/hooks/use-session-lineage.ts +20 -16
- package/src/hooks/use-session.ts +23 -19
- package/src/hooks/use-workspace-sessions.ts +31 -27
- package/src/lib/format.ts +8 -6
- package/src/realtime/realtime-control.tsx +55 -6
- package/src/timeline/entrance.tsx +28 -3
- package/src/timeline/projection.ts +4 -0
- package/dist/chunk-HQVCKCLG.js.map +0 -1
- package/dist/chunk-LAKLF4PA.js.map +0 -1
- package/dist/chunk-MZ2G2XBA.js.map +0 -1
- package/dist/chunk-W6NFJXSA.js.map +0 -1
- package/dist/chunk-YFKJ7VZH.js.map +0 -1
- package/dist/chunk-YJFGAFBD.js.map +0 -1
- /package/dist/{browser-viewer-AEFHUYZK.js.map → browser-viewer-MKKFRRRV.js.map} +0 -0
- /package/dist/{chunk-RGALCTWO.js.map → chunk-XYRDDSXF.js.map} +0 -0
- /package/dist/{chunk-XXWH2JLC.js.map → chunk-YVCHAQZY.js.map} +0 -0
- /package/dist/{chunk-OAM4WAAM.js.map → chunk-ZPBTI3TE.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isActionableHumanInputRequest,
|
|
6
6
|
mcpToolLeaf,
|
|
7
7
|
toolDisplayName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JAQ5K7W6.js";
|
|
9
9
|
import {
|
|
10
10
|
EmptyQueueStateSurface,
|
|
11
11
|
TimelineAnnotationsChip,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
TooltipProvider,
|
|
19
19
|
TooltipTrigger,
|
|
20
20
|
useLightboxOptional
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7EAFGICR.js";
|
|
22
22
|
import {
|
|
23
23
|
copyTextToClipboard,
|
|
24
24
|
tableElementToTsv
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
stringifyPayload,
|
|
31
31
|
truncate,
|
|
32
32
|
tryParseJson
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VTOREEXF.js";
|
|
34
34
|
import {
|
|
35
35
|
cn
|
|
36
36
|
} from "./chunk-22KP6LR5.js";
|
|
@@ -5362,10 +5362,19 @@ import { jsx as rowJsx, jsxs as rowJsxs } from "react/jsx-runtime";
|
|
|
5362
5362
|
|
|
5363
5363
|
// src/timeline/entrance.tsx
|
|
5364
5364
|
import { createContext as createContext4, useContext as useContext4, useRef as useRef7 } from "react";
|
|
5365
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
5365
5366
|
var EntranceAnimationContext = createContext4(true);
|
|
5366
|
-
var
|
|
5367
|
+
var EntranceAnimationLiveContext = createContext4(true);
|
|
5368
|
+
function EntranceAnimationProvider({
|
|
5369
|
+
value,
|
|
5370
|
+
liveValue = value,
|
|
5371
|
+
children
|
|
5372
|
+
}) {
|
|
5373
|
+
const mountedValue = useRef7(value).current;
|
|
5374
|
+
return /* @__PURE__ */ jsx12(EntranceAnimationContext.Provider, { value: mountedValue, children: /* @__PURE__ */ jsx12(EntranceAnimationLiveContext.Provider, { value: liveValue, children }) });
|
|
5375
|
+
}
|
|
5367
5376
|
function useEntranceAnimationLive() {
|
|
5368
|
-
return useContext4(
|
|
5377
|
+
return useContext4(EntranceAnimationLiveContext);
|
|
5369
5378
|
}
|
|
5370
5379
|
function useEntranceAnimation() {
|
|
5371
5380
|
const enabled = useContext4(EntranceAnimationContext);
|
|
@@ -5382,7 +5391,7 @@ function useSeenActivityIds() {
|
|
|
5382
5391
|
}
|
|
5383
5392
|
|
|
5384
5393
|
// src/timeline/activity-rail.tsx
|
|
5385
|
-
import { Fragment as Fragment4, jsx as
|
|
5394
|
+
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5386
5395
|
var LazyFleetDecisionRow = lazy3(() => import("./fleet-decision-row-GGCAT4E4.js"));
|
|
5387
5396
|
var LazyPlatformActivityRow = lazy3(() => import("./platform-activity-row-BJHUHXAT.js"));
|
|
5388
5397
|
function familyOf(item) {
|
|
@@ -5426,7 +5435,7 @@ function ActivityRail({
|
|
|
5426
5435
|
}
|
|
5427
5436
|
}
|
|
5428
5437
|
});
|
|
5429
|
-
return /* @__PURE__ */
|
|
5438
|
+
return /* @__PURE__ */ jsx13(
|
|
5430
5439
|
"div",
|
|
5431
5440
|
{
|
|
5432
5441
|
className: cn(
|
|
@@ -5450,7 +5459,7 @@ function ActivityRail({
|
|
|
5450
5459
|
loadRetainedScreenshot,
|
|
5451
5460
|
loadRetainedArtifact
|
|
5452
5461
|
);
|
|
5453
|
-
return /* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsx13(
|
|
5454
5463
|
"div",
|
|
5455
5464
|
{
|
|
5456
5465
|
"data-og-timeline-row-anchor": "",
|
|
@@ -5473,7 +5482,7 @@ function renderActivity(item, toolRegistry, onOpenSession, onMemoryClick, loadRe
|
|
|
5473
5482
|
case "reasoning":
|
|
5474
5483
|
case "sandbox":
|
|
5475
5484
|
case "startup-phase":
|
|
5476
|
-
return /* @__PURE__ */
|
|
5485
|
+
return /* @__PURE__ */ jsx13(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx13(
|
|
5477
5486
|
LazyPlatformActivityRow,
|
|
5478
5487
|
{
|
|
5479
5488
|
item,
|
|
@@ -5489,7 +5498,7 @@ function renderActivity(item, toolRegistry, onOpenSession, onMemoryClick, loadRe
|
|
|
5489
5498
|
) });
|
|
5490
5499
|
case "tool-call": {
|
|
5491
5500
|
const Renderer = toolRegistry.resolve(item);
|
|
5492
|
-
return /* @__PURE__ */
|
|
5501
|
+
return /* @__PURE__ */ jsx13(ToolCallTruncationProvider, { value: item.truncation ?? null, children: /* @__PURE__ */ jsx13(
|
|
5493
5502
|
Renderer,
|
|
5494
5503
|
{
|
|
5495
5504
|
item,
|
|
@@ -5499,11 +5508,11 @@ function renderActivity(item, toolRegistry, onOpenSession, onMemoryClick, loadRe
|
|
|
5499
5508
|
) });
|
|
5500
5509
|
}
|
|
5501
5510
|
case "worker":
|
|
5502
|
-
return /* @__PURE__ */
|
|
5511
|
+
return /* @__PURE__ */ jsx13(WorkerRow, { item, onOpenSession });
|
|
5503
5512
|
case "memory":
|
|
5504
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx13(MemoryRow, { item, onMemoryClick });
|
|
5505
5514
|
case "fleet-decision":
|
|
5506
|
-
return /* @__PURE__ */
|
|
5515
|
+
return /* @__PURE__ */ jsx13(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx13(
|
|
5507
5516
|
LazyFleetDecisionRow,
|
|
5508
5517
|
{
|
|
5509
5518
|
item,
|
|
@@ -5536,11 +5545,11 @@ function MemoryRow({
|
|
|
5536
5545
|
return /* @__PURE__ */ jsxs9(
|
|
5537
5546
|
ActivityDisclosure,
|
|
5538
5547
|
{
|
|
5539
|
-
icon: /* @__PURE__ */
|
|
5548
|
+
icon: /* @__PURE__ */ jsx13(BrainCircuitIcon2, { className: "size-3.5" }),
|
|
5540
5549
|
iconTone: "muted",
|
|
5541
5550
|
title: /* @__PURE__ */ jsxs9("span", { className: "inline-flex min-w-0 items-center gap-2", children: [
|
|
5542
|
-
/* @__PURE__ */
|
|
5543
|
-
kindLabel ? /* @__PURE__ */
|
|
5551
|
+
/* @__PURE__ */ jsx13("span", { className: "shrink-0", children: corrected ? "Updated memory" : "Saved to memory" }),
|
|
5552
|
+
kindLabel ? /* @__PURE__ */ jsx13("span", { className: "shrink-0 rounded-og-xs bg-og-surface-2 px-1.5 py-px text-og-xs font-normal leading-tight text-og-fg-subtle", children: kindLabel }) : null
|
|
5544
5553
|
] }),
|
|
5545
5554
|
preview: superseded ? item.replacementPreview : item.preview,
|
|
5546
5555
|
children: [
|
|
@@ -5548,21 +5557,21 @@ function MemoryRow({
|
|
|
5548
5557
|
// The correction as a before → after: the old memory struck through and
|
|
5549
5558
|
// dimmed, the new text in the ordinary body weight below it.
|
|
5550
5559
|
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-1.5", children: [
|
|
5551
|
-
/* @__PURE__ */
|
|
5552
|
-
/* @__PURE__ */
|
|
5560
|
+
/* @__PURE__ */ jsx13("p", { className: "whitespace-pre-wrap text-og-sm leading-6 text-og-fg-subtle line-through", children: item.preview }),
|
|
5561
|
+
/* @__PURE__ */ jsx13("p", { className: "whitespace-pre-wrap text-og-base leading-6 text-og-fg-muted", children: item.replacementPreview })
|
|
5553
5562
|
] })
|
|
5554
5563
|
) : corrected && item.action === "updated" ? (
|
|
5555
5564
|
// Edited in place, no replacement record: the memory is still live, so
|
|
5556
5565
|
// show its current text — NOT the archived treatment.
|
|
5557
5566
|
/* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
5558
|
-
/* @__PURE__ */
|
|
5559
|
-
/* @__PURE__ */
|
|
5567
|
+
/* @__PURE__ */ jsx13("p", { className: "whitespace-pre-wrap text-og-base leading-6 text-og-fg-muted", children: item.preview }),
|
|
5568
|
+
/* @__PURE__ */ jsx13(BodyNote, { tone: "muted", children: "Updated in place." })
|
|
5560
5569
|
] })
|
|
5561
5570
|
) : corrected ? (
|
|
5562
5571
|
// A correction with no replacement (and not an in-place update) archived the record.
|
|
5563
|
-
/* @__PURE__ */
|
|
5564
|
-
) : /* @__PURE__ */
|
|
5565
|
-
item.deduped ? /* @__PURE__ */
|
|
5572
|
+
/* @__PURE__ */ jsx13(BodyNote, { tone: "muted", children: "Archived." })
|
|
5573
|
+
) : /* @__PURE__ */ jsx13("p", { className: "whitespace-pre-wrap text-og-base leading-6 text-og-fg-muted", children: item.preview }),
|
|
5574
|
+
item.deduped ? /* @__PURE__ */ jsx13(BodyNote, { tone: "muted", children: "Merged into an existing memory." }) : null,
|
|
5566
5575
|
deepLink ? /* @__PURE__ */ jsxs9(
|
|
5567
5576
|
"button",
|
|
5568
5577
|
{
|
|
@@ -5574,7 +5583,7 @@ function MemoryRow({
|
|
|
5574
5583
|
),
|
|
5575
5584
|
children: [
|
|
5576
5585
|
"View in memory",
|
|
5577
|
-
/* @__PURE__ */
|
|
5586
|
+
/* @__PURE__ */ jsx13(ArrowRightIcon, { className: "size-3.5 transition-transform duration-150 group-hover/memlink:translate-x-0.5" })
|
|
5578
5587
|
]
|
|
5579
5588
|
}
|
|
5580
5589
|
) : null
|
|
@@ -5593,10 +5602,10 @@ function WorkerRow({
|
|
|
5593
5602
|
const sessionId = item.workerSessionId;
|
|
5594
5603
|
const deepLink = Boolean(sessionId) && Boolean(onOpenSession) && !failed && !cancelled;
|
|
5595
5604
|
const inner = /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
5596
|
-
/* @__PURE__ */
|
|
5597
|
-
/* @__PURE__ */
|
|
5605
|
+
/* @__PURE__ */ jsx13("span", { className: "size-3.5 shrink-0", "aria-hidden": true }),
|
|
5606
|
+
/* @__PURE__ */ jsx13("span", { className: cn("mt-px shrink-0", failed ? "text-og-status-failed" : "text-og-accent"), children: /* @__PURE__ */ jsx13(BotIcon2, { className: "size-3.5" }) }),
|
|
5598
5607
|
/* @__PURE__ */ jsxs9("div", { className: "min-w-0 flex-1", children: [
|
|
5599
|
-
/* @__PURE__ */
|
|
5608
|
+
/* @__PURE__ */ jsx13(
|
|
5600
5609
|
"span",
|
|
5601
5610
|
{
|
|
5602
5611
|
className: cn(
|
|
@@ -5606,16 +5615,16 @@ function WorkerRow({
|
|
|
5606
5615
|
children: title
|
|
5607
5616
|
}
|
|
5608
5617
|
),
|
|
5609
|
-
item.prompt ? /* @__PURE__ */
|
|
5618
|
+
item.prompt ? /* @__PURE__ */ jsx13("p", { className: "mt-0.5 truncate text-og-sm text-og-fg-muted", children: truncate(item.prompt, 140) }) : null,
|
|
5610
5619
|
failed && item.failure ? /* @__PURE__ */ jsxs9("div", { className: "mt-1 min-w-0 text-og-sm text-og-status-failed", children: [
|
|
5611
|
-
/* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5620
|
+
/* @__PURE__ */ jsx13("p", { className: "font-og-mono text-og-xs", children: item.failure.code }),
|
|
5621
|
+
/* @__PURE__ */ jsx13("p", { className: "mt-0.5 break-words", children: item.failure.message })
|
|
5613
5622
|
] }) : null
|
|
5614
5623
|
] }),
|
|
5615
5624
|
failed ? /* @__PURE__ */ jsxs9("span", { className: "inline-flex shrink-0 self-center items-center gap-1.5 font-og-mono text-og-xs leading-none text-og-status-failed", children: [
|
|
5616
|
-
/* @__PURE__ */
|
|
5625
|
+
/* @__PURE__ */ jsx13("span", { className: "size-1.5 rounded-full bg-og-status-failed" }),
|
|
5617
5626
|
"failed"
|
|
5618
|
-
] }) : cancelled ? /* @__PURE__ */
|
|
5627
|
+
] }) : cancelled ? /* @__PURE__ */ jsx13("span", { className: "og-cancelled-chip shrink-0 self-center font-og-mono text-og-xs leading-none text-og-fg-subtle", children: "interrupted" }) : deepLink ? /* @__PURE__ */ jsx13(
|
|
5619
5628
|
ArrowRightIcon,
|
|
5620
5629
|
{
|
|
5621
5630
|
"aria-hidden": true,
|
|
@@ -5624,7 +5633,7 @@ function WorkerRow({
|
|
|
5624
5633
|
) : null
|
|
5625
5634
|
] });
|
|
5626
5635
|
if (deepLink && sessionId && onOpenSession) {
|
|
5627
|
-
return /* @__PURE__ */
|
|
5636
|
+
return /* @__PURE__ */ jsx13(
|
|
5628
5637
|
"button",
|
|
5629
5638
|
{
|
|
5630
5639
|
type: "button",
|
|
@@ -5638,7 +5647,7 @@ function WorkerRow({
|
|
|
5638
5647
|
}
|
|
5639
5648
|
);
|
|
5640
5649
|
}
|
|
5641
|
-
return /* @__PURE__ */
|
|
5650
|
+
return /* @__PURE__ */ jsx13("div", { className: "flex items-start gap-2 px-1.5 py-1.5", children: inner });
|
|
5642
5651
|
}
|
|
5643
5652
|
|
|
5644
5653
|
// src/timeline/turn-summary.tsx
|
|
@@ -5672,7 +5681,7 @@ function inheritFoldRestingState(memory, targetKey, sourceKeys) {
|
|
|
5672
5681
|
}
|
|
5673
5682
|
|
|
5674
5683
|
// src/timeline/turn-summary.tsx
|
|
5675
|
-
import { Fragment as Fragment5, jsx as
|
|
5684
|
+
import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5676
5685
|
var TurnSettleChromeContext = createContext7(false);
|
|
5677
5686
|
function useTurnSettleOpen() {
|
|
5678
5687
|
return useContext7(TurnSettleChromeContext);
|
|
@@ -5843,7 +5852,7 @@ function TurnSummary({
|
|
|
5843
5852
|
const copyable = Boolean(
|
|
5844
5853
|
copyText && copyText.trim().length > 0 && !bare && !liveShell && !open && !settlePhase
|
|
5845
5854
|
);
|
|
5846
|
-
return /* @__PURE__ */
|
|
5855
|
+
return /* @__PURE__ */ jsx14(TurnSettleChromeContext.Provider, { value: settleChrome, children: /* @__PURE__ */ jsxs10("div", { className: cn(copyable && "group/copy relative"), children: [
|
|
5847
5856
|
/* @__PURE__ */ jsxs10(
|
|
5848
5857
|
Collapsible.Root,
|
|
5849
5858
|
{
|
|
@@ -5874,7 +5883,7 @@ function TurnSummary({
|
|
|
5874
5883
|
liveShell && "text-og-fg-subtle"
|
|
5875
5884
|
),
|
|
5876
5885
|
children: [
|
|
5877
|
-
/* @__PURE__ */
|
|
5886
|
+
/* @__PURE__ */ jsx14(
|
|
5878
5887
|
ChevronRightIcon2,
|
|
5879
5888
|
{
|
|
5880
5889
|
className: cn(
|
|
@@ -5883,7 +5892,7 @@ function TurnSummary({
|
|
|
5883
5892
|
)
|
|
5884
5893
|
}
|
|
5885
5894
|
),
|
|
5886
|
-
outcome === "complete" ? null : /* @__PURE__ */
|
|
5895
|
+
outcome === "complete" ? null : /* @__PURE__ */ jsx14(
|
|
5887
5896
|
"span",
|
|
5888
5897
|
{
|
|
5889
5898
|
className: cn(
|
|
@@ -5891,7 +5900,7 @@ function TurnSummary({
|
|
|
5891
5900
|
bare ? "size-3.5" : "size-5",
|
|
5892
5901
|
outcome === "failed" ? "text-og-status-failed" : "text-og-fg-subtle"
|
|
5893
5902
|
),
|
|
5894
|
-
children: outcome === "failed" ? /* @__PURE__ */
|
|
5903
|
+
children: outcome === "failed" ? /* @__PURE__ */ jsx14(TriangleAlertIcon2, { className: "size-3" }) : outcome === "cancelled" ? /* @__PURE__ */ jsx14(CircleSlashIcon, { className: "size-3" }) : /* @__PURE__ */ jsx14("span", { className: "size-1.5 animate-og-pulse rounded-full bg-og-fg-subtle" })
|
|
5895
5904
|
}
|
|
5896
5905
|
),
|
|
5897
5906
|
/* @__PURE__ */ jsxs10(
|
|
@@ -5899,10 +5908,10 @@ function TurnSummary({
|
|
|
5899
5908
|
{
|
|
5900
5909
|
className: cn("min-w-0 flex-1 truncate", bare ? "text-og-sm" : "text-og-fg-muted"),
|
|
5901
5910
|
children: [
|
|
5902
|
-
facets.map(({ facet, result }, index) => /* @__PURE__ */
|
|
5911
|
+
facets.map(({ facet, result }, index) => /* @__PURE__ */ jsx14(FacetRenderBoundary, { children: /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
5903
5912
|
index > 0 ? " \xB7 " : null,
|
|
5904
5913
|
/* @__PURE__ */ jsxs10("span", { "aria-label": result.ariaLabel, title: result.title, children: [
|
|
5905
|
-
result.icon ? /* @__PURE__ */
|
|
5914
|
+
result.icon ? /* @__PURE__ */ jsx14("span", { "aria-hidden": true, className: "mr-1 inline-flex align-[-0.125em]", children: result.icon }) : null,
|
|
5906
5915
|
result.content
|
|
5907
5916
|
] })
|
|
5908
5917
|
] }) }, facet.id)),
|
|
@@ -5910,11 +5919,11 @@ function TurnSummary({
|
|
|
5910
5919
|
" \xB7 ",
|
|
5911
5920
|
failureText
|
|
5912
5921
|
] }) : null,
|
|
5913
|
-
outcome === "cancelled" ? /* @__PURE__ */
|
|
5922
|
+
outcome === "cancelled" ? /* @__PURE__ */ jsx14("span", { className: "text-og-fg-subtle", children: " \xB7 interrupted" }) : null
|
|
5914
5923
|
]
|
|
5915
5924
|
}
|
|
5916
5925
|
),
|
|
5917
|
-
/* @__PURE__ */
|
|
5926
|
+
/* @__PURE__ */ jsx14(
|
|
5918
5927
|
"span",
|
|
5919
5928
|
{
|
|
5920
5929
|
"aria-hidden": true,
|
|
@@ -5931,7 +5940,7 @@ function TurnSummary({
|
|
|
5931
5940
|
]
|
|
5932
5941
|
}
|
|
5933
5942
|
),
|
|
5934
|
-
/* @__PURE__ */
|
|
5943
|
+
/* @__PURE__ */ jsx14(
|
|
5935
5944
|
Collapsible.Content,
|
|
5936
5945
|
{
|
|
5937
5946
|
...nestSuppressLatch ? { forceMount: true } : {},
|
|
@@ -5942,13 +5951,13 @@ function TurnSummary({
|
|
|
5942
5951
|
// Auto-close: slow settle. Manual close (settlePhase cleared): fast.
|
|
5943
5952
|
settlePhase ? "data-[state=closed]:animate-og-settle-collapse" : "data-[state=closed]:animate-og-collapse"
|
|
5944
5953
|
),
|
|
5945
|
-
children: /* @__PURE__ */
|
|
5954
|
+
children: /* @__PURE__ */ jsx14("div", { className: bare ? "pt-1 pl-5" : "pt-2", children })
|
|
5946
5955
|
}
|
|
5947
5956
|
)
|
|
5948
5957
|
]
|
|
5949
5958
|
}
|
|
5950
5959
|
),
|
|
5951
|
-
copyable ? /* @__PURE__ */
|
|
5960
|
+
copyable ? /* @__PURE__ */ jsx14("div", { className: "pointer-events-none absolute top-1.5 right-0 z-10", children: /* @__PURE__ */ jsx14("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx14(CopyButton, { text: copyText, label: "Copy turn", reveal: "group-hover" }) }) }) : null
|
|
5952
5961
|
] }) });
|
|
5953
5962
|
}
|
|
5954
5963
|
function createTurnSummaryContext(items, outcome, failureText, durationMs, contextCompactionCount) {
|
|
@@ -6110,7 +6119,7 @@ import {
|
|
|
6110
6119
|
useRef as useRef10,
|
|
6111
6120
|
useState as useState11
|
|
6112
6121
|
} from "react";
|
|
6113
|
-
import { jsx as
|
|
6122
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6114
6123
|
var FALLBACK_LINE_THRESHOLD = 12;
|
|
6115
6124
|
var FALLBACK_TEXT_THRESHOLD = 900;
|
|
6116
6125
|
var FALLBACK_UNBROKEN_THRESHOLD = 260;
|
|
@@ -6253,7 +6262,7 @@ function UserMessageDisclosureProvider({
|
|
|
6253
6262
|
value,
|
|
6254
6263
|
children
|
|
6255
6264
|
}) {
|
|
6256
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ jsx15(UserMessageDisclosureContext.Provider, { value, children });
|
|
6257
6266
|
}
|
|
6258
6267
|
function userMessageLikelyNeedsDisclosure(text) {
|
|
6259
6268
|
const lines = text.split(/\r?\n/);
|
|
@@ -6412,7 +6421,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
6412
6421
|
"data-og-expanded": expanded ? "true" : "false",
|
|
6413
6422
|
className: cn("relative min-w-0", className),
|
|
6414
6423
|
children: [
|
|
6415
|
-
/* @__PURE__ */
|
|
6424
|
+
/* @__PURE__ */ jsx15(
|
|
6416
6425
|
"span",
|
|
6417
6426
|
{
|
|
6418
6427
|
ref: thresholdRef,
|
|
@@ -6428,7 +6437,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
6428
6437
|
"data-og-user-message-clip": "",
|
|
6429
6438
|
className: cn("relative min-w-0", collapsed && "max-h-56 overflow-hidden sm:max-h-72"),
|
|
6430
6439
|
children: [
|
|
6431
|
-
/* @__PURE__ */
|
|
6440
|
+
/* @__PURE__ */ jsx15(
|
|
6432
6441
|
"div",
|
|
6433
6442
|
{
|
|
6434
6443
|
ref: contentRef,
|
|
@@ -6437,7 +6446,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
6437
6446
|
children
|
|
6438
6447
|
}
|
|
6439
6448
|
),
|
|
6440
|
-
/* @__PURE__ */
|
|
6449
|
+
/* @__PURE__ */ jsx15(
|
|
6441
6450
|
"span",
|
|
6442
6451
|
{
|
|
6443
6452
|
ref: fadeRef,
|
|
@@ -6450,7 +6459,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
6450
6459
|
]
|
|
6451
6460
|
}
|
|
6452
6461
|
),
|
|
6453
|
-
/* @__PURE__ */
|
|
6462
|
+
/* @__PURE__ */ jsx15(
|
|
6454
6463
|
"button",
|
|
6455
6464
|
{
|
|
6456
6465
|
ref: disclosureControlRef,
|
|
@@ -6471,7 +6480,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
6471
6480
|
|
|
6472
6481
|
// src/components/generated-video-player.tsx
|
|
6473
6482
|
import { useEffect as useEffect10, useState as useState12 } from "react";
|
|
6474
|
-
import { jsx as
|
|
6483
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
6475
6484
|
function GeneratedVideoPlayer({
|
|
6476
6485
|
receipt,
|
|
6477
6486
|
loadPlaybackSource,
|
|
@@ -6498,7 +6507,7 @@ function GeneratedVideoPlayer({
|
|
|
6498
6507
|
return () => controller.abort();
|
|
6499
6508
|
}, [loadPlaybackSource, receipt.artifact.artifactId, retry]);
|
|
6500
6509
|
if (state.kind === "loading") {
|
|
6501
|
-
return /* @__PURE__ */
|
|
6510
|
+
return /* @__PURE__ */ jsx16(
|
|
6502
6511
|
"div",
|
|
6503
6512
|
{
|
|
6504
6513
|
"aria-label": `Loading ${label.toLowerCase()}`,
|
|
@@ -6510,7 +6519,7 @@ function GeneratedVideoPlayer({
|
|
|
6510
6519
|
);
|
|
6511
6520
|
}
|
|
6512
6521
|
if (state.kind === "error") {
|
|
6513
|
-
return /* @__PURE__ */
|
|
6522
|
+
return /* @__PURE__ */ jsx16(
|
|
6514
6523
|
"div",
|
|
6515
6524
|
{
|
|
6516
6525
|
role: "status",
|
|
@@ -6522,7 +6531,7 @@ function GeneratedVideoPlayer({
|
|
|
6522
6531
|
}
|
|
6523
6532
|
);
|
|
6524
6533
|
}
|
|
6525
|
-
return /* @__PURE__ */
|
|
6534
|
+
return /* @__PURE__ */ jsx16(
|
|
6526
6535
|
"video",
|
|
6527
6536
|
{
|
|
6528
6537
|
"aria-label": label,
|
|
@@ -6544,7 +6553,7 @@ function GeneratedVideoPlayer({
|
|
|
6544
6553
|
}
|
|
6545
6554
|
|
|
6546
6555
|
// src/components/session-status.tsx
|
|
6547
|
-
import { jsx as
|
|
6556
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6548
6557
|
var SESSION_STATUS_META = {
|
|
6549
6558
|
queued: {
|
|
6550
6559
|
label: "Starting",
|
|
@@ -6608,7 +6617,7 @@ function SessionStatus({ status, label, size = "md", className }) {
|
|
|
6608
6617
|
className
|
|
6609
6618
|
),
|
|
6610
6619
|
children: [
|
|
6611
|
-
/* @__PURE__ */
|
|
6620
|
+
/* @__PURE__ */ jsx17(StatusDot, { status, className: size === "sm" ? "size-1" : "size-1.5" }),
|
|
6612
6621
|
label ?? meta.label
|
|
6613
6622
|
]
|
|
6614
6623
|
}
|
|
@@ -6616,7 +6625,7 @@ function SessionStatus({ status, label, size = "md", className }) {
|
|
|
6616
6625
|
}
|
|
6617
6626
|
function StatusDot({ status, className }) {
|
|
6618
6627
|
const meta = SESSION_STATUS_META[status];
|
|
6619
|
-
return /* @__PURE__ */
|
|
6628
|
+
return /* @__PURE__ */ jsx17(
|
|
6620
6629
|
"span",
|
|
6621
6630
|
{
|
|
6622
6631
|
className: cn(
|
|
@@ -6624,12 +6633,13 @@ function StatusDot({ status, className }) {
|
|
|
6624
6633
|
meta.dotClassName,
|
|
6625
6634
|
className
|
|
6626
6635
|
),
|
|
6627
|
-
children: meta.pulse ? /* @__PURE__ */
|
|
6636
|
+
children: meta.pulse ? /* @__PURE__ */ jsx17("span", { className: cn("absolute inset-0 animate-og-pulse rounded-full", meta.dotClassName) }) : null
|
|
6628
6637
|
}
|
|
6629
6638
|
);
|
|
6630
6639
|
}
|
|
6631
6640
|
|
|
6632
6641
|
// src/components/message-timeline.tsx
|
|
6642
|
+
import { dequal } from "dequal/lite";
|
|
6633
6643
|
import {
|
|
6634
6644
|
ArrowDownIcon as ArrowDownIcon2,
|
|
6635
6645
|
ArrowRightIcon as ArrowRightIcon2,
|
|
@@ -6724,6 +6734,9 @@ function tipFollowNoteGrowth(state, height, now) {
|
|
|
6724
6734
|
if (previous <= 0) {
|
|
6725
6735
|
return { ...state, lastHeight: height };
|
|
6726
6736
|
}
|
|
6737
|
+
if (height < previous && previous - height <= TIP_FOLLOW_SHRINK_EPS_PX) {
|
|
6738
|
+
return state;
|
|
6739
|
+
}
|
|
6727
6740
|
if (height <= previous) {
|
|
6728
6741
|
return { ...state, lastHeight: height };
|
|
6729
6742
|
}
|
|
@@ -6819,6 +6832,28 @@ function tipFollowCompensateShrink(scrollTop, previousHeight, nextHeight, client
|
|
|
6819
6832
|
const maxScroll = Math.max(0, nextHeight - clientHeight);
|
|
6820
6833
|
return Math.max(0, Math.min(maxScroll, scrollTop - delta));
|
|
6821
6834
|
}
|
|
6835
|
+
function tipFollowObserveContentShrink(baseline, previousHeight, previousScrollTop, nextHeight, clientHeight, epsPx = TIP_FOLLOW_SHRINK_EPS_PX) {
|
|
6836
|
+
if (previousHeight <= 0 || nextHeight >= previousHeight) {
|
|
6837
|
+
return { baseline: null, compensatedScrollTop: null };
|
|
6838
|
+
}
|
|
6839
|
+
const retained = baseline ?? {
|
|
6840
|
+
scrollHeight: previousHeight,
|
|
6841
|
+
scrollTop: previousScrollTop
|
|
6842
|
+
};
|
|
6843
|
+
if (retained.scrollHeight - nextHeight <= epsPx) {
|
|
6844
|
+
return { baseline: retained, compensatedScrollTop: null };
|
|
6845
|
+
}
|
|
6846
|
+
return {
|
|
6847
|
+
baseline: null,
|
|
6848
|
+
compensatedScrollTop: tipFollowCompensateShrink(
|
|
6849
|
+
retained.scrollTop,
|
|
6850
|
+
retained.scrollHeight,
|
|
6851
|
+
nextHeight,
|
|
6852
|
+
clientHeight,
|
|
6853
|
+
epsPx
|
|
6854
|
+
)
|
|
6855
|
+
};
|
|
6856
|
+
}
|
|
6822
6857
|
function tipFollowCompensateViewportShrink(scrollTop, previousClientHeight, nextClientHeight, scrollHeight, epsPx = TIP_FOLLOW_SHRINK_EPS_PX) {
|
|
6823
6858
|
if (previousClientHeight <= 0) {
|
|
6824
6859
|
return scrollTop;
|
|
@@ -7011,7 +7046,7 @@ function machineInputSummaryIsUseful(kind, cleanedSummary) {
|
|
|
7011
7046
|
}
|
|
7012
7047
|
|
|
7013
7048
|
// src/components/message-timeline.tsx
|
|
7014
|
-
import { Fragment as Fragment6, jsx as
|
|
7049
|
+
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7015
7050
|
var TimelineAnnotationSelection = lazy4(() => import("./timeline-annotation-selection-3L7LHGG2.js"));
|
|
7016
7051
|
var PIN_THRESHOLD_PX = 48;
|
|
7017
7052
|
var JUMP_TO_LATEST_CATCHUP_DEBT_PX = 240;
|
|
@@ -7134,7 +7169,6 @@ function MessageTimeline({
|
|
|
7134
7169
|
}
|
|
7135
7170
|
return sources;
|
|
7136
7171
|
}, [resolvedItems]);
|
|
7137
|
-
const groups = useStableTimelineGroupKeys(allGroups);
|
|
7138
7172
|
const scrollRef = useRef11(null);
|
|
7139
7173
|
const topSentinelRef = useRef11(null);
|
|
7140
7174
|
const bottomSentinelRef = useRef11(null);
|
|
@@ -7166,6 +7200,7 @@ function MessageTimeline({
|
|
|
7166
7200
|
const lastScrollHeightRef = useRef11(0);
|
|
7167
7201
|
const lastClientHeightRef = useRef11(0);
|
|
7168
7202
|
const readerIntentArmRef = useRef11(false);
|
|
7203
|
+
const readerIntentStartRef = useRef11(null);
|
|
7169
7204
|
const programmaticScrollRef = useRef11(0);
|
|
7170
7205
|
const disclosureKeepsUnpinnedRef = useRef11(false);
|
|
7171
7206
|
const pendingReaderLeaveRef = useRef11(false);
|
|
@@ -7174,12 +7209,13 @@ function MessageTimeline({
|
|
|
7174
7209
|
const userMessageDisclosureMemoryRef = useRef11(/* @__PURE__ */ new Map());
|
|
7175
7210
|
const seenActivityIdsRef = useRef11(/* @__PURE__ */ new Set());
|
|
7176
7211
|
const firstItemGroupKeyRef = useRef11(null);
|
|
7177
|
-
const
|
|
7212
|
+
const firstItemGroupOffsetTopRef = useRef11(null);
|
|
7178
7213
|
const firstItemContentTopRef = useRef11(null);
|
|
7179
7214
|
const firstItemId = resolvedItems[0]?.id ?? null;
|
|
7180
7215
|
const underfillRetryReady = underfillRetryReadyRef.current = !!(underfillSettledAttempt && underfillSettledAttempt === olderLoadAttemptRef.current && hasOlder && onLoadOlder && !loadingOlder);
|
|
7181
7216
|
const firstKeyChangedForBulk = previousBulkFirstKeyRef.current !== void 0 && previousBulkFirstKeyRef.current !== firstGroupKey;
|
|
7182
7217
|
const bulkRender = allGroups.length > 0 && (bulkActive || firstKeyChangedForBulk);
|
|
7218
|
+
const groups = useStableTimelineGroupKeys(allGroups, !bulkRender);
|
|
7183
7219
|
const applyCanSkipTipCatchup = useCallback2((value) => {
|
|
7184
7220
|
if (canSkipTipCatchupRef.current !== value) {
|
|
7185
7221
|
canSkipTipCatchupRef.current = value;
|
|
@@ -7210,6 +7246,7 @@ function MessageTimeline({
|
|
|
7210
7246
|
revealedRef.current = revealed;
|
|
7211
7247
|
const followRef = useRef11(createTipFollowState());
|
|
7212
7248
|
const followFrameRef = useRef11(null);
|
|
7249
|
+
const contentShrinkBaselineRef = useRef11(null);
|
|
7213
7250
|
const syncScrollBaseline = useCallback2((node) => {
|
|
7214
7251
|
lastScrollTopRef.current = node.scrollTop;
|
|
7215
7252
|
lastMaxScrollRef.current = maxScrollOf(node);
|
|
@@ -7238,7 +7275,12 @@ function MessageTimeline({
|
|
|
7238
7275
|
pendingReaderLeaveRef.current = false;
|
|
7239
7276
|
cancelLeaveFallback();
|
|
7240
7277
|
}, [cancelLeaveFallback]);
|
|
7278
|
+
const clearReaderIntent = useCallback2(() => {
|
|
7279
|
+
readerIntentArmRef.current = false;
|
|
7280
|
+
readerIntentStartRef.current = null;
|
|
7281
|
+
}, []);
|
|
7241
7282
|
const stopFollow = useCallback2(() => {
|
|
7283
|
+
contentShrinkBaselineRef.current = null;
|
|
7242
7284
|
followRef.current = tipFollowCancel(followRef.current);
|
|
7243
7285
|
if (followFrameRef.current != null) {
|
|
7244
7286
|
cancelFrame(followFrameRef.current);
|
|
@@ -7253,7 +7295,7 @@ function MessageTimeline({
|
|
|
7253
7295
|
if (node && maxScrollOf(node) <= 1) {
|
|
7254
7296
|
return;
|
|
7255
7297
|
}
|
|
7256
|
-
|
|
7298
|
+
clearReaderIntent();
|
|
7257
7299
|
clearPendingReaderLeave();
|
|
7258
7300
|
stopFollow();
|
|
7259
7301
|
applyPinned(false);
|
|
@@ -7265,7 +7307,7 @@ function MessageTimeline({
|
|
|
7265
7307
|
setOlderPrefetchArmed(true);
|
|
7266
7308
|
}
|
|
7267
7309
|
},
|
|
7268
|
-
[autoFollow, applyPinned, clearPendingReaderLeave, stopFollow]
|
|
7310
|
+
[autoFollow, applyPinned, clearPendingReaderLeave, clearReaderIntent, stopFollow]
|
|
7269
7311
|
);
|
|
7270
7312
|
const releasePinAfterScrollSettled = useCallback2(
|
|
7271
7313
|
(node) => {
|
|
@@ -7322,7 +7364,9 @@ function MessageTimeline({
|
|
|
7322
7364
|
return;
|
|
7323
7365
|
}
|
|
7324
7366
|
disclosureKeepsUnpinnedRef.current = false;
|
|
7367
|
+
const node = event.currentTarget instanceof HTMLElement ? event.currentTarget : scrollRef.current;
|
|
7325
7368
|
readerIntentArmRef.current = true;
|
|
7369
|
+
readerIntentStartRef.current = node ? { scrollTop: node.scrollTop, maxScroll: maxScrollOf(node) } : null;
|
|
7326
7370
|
};
|
|
7327
7371
|
const onKeyDown = (event) => {
|
|
7328
7372
|
if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "PageUp" || event.key === "PageDown" || event.key === "Home" || event.key === "End") {
|
|
@@ -7336,6 +7380,7 @@ function MessageTimeline({
|
|
|
7336
7380
|
};
|
|
7337
7381
|
const snapToBottom = useCallback2(
|
|
7338
7382
|
(node) => {
|
|
7383
|
+
clearReaderIntent();
|
|
7339
7384
|
stopFollow();
|
|
7340
7385
|
cancelLeaveFallback();
|
|
7341
7386
|
writeScrollTop(node, Math.max(0, node.scrollHeight - node.clientHeight));
|
|
@@ -7348,7 +7393,14 @@ function MessageTimeline({
|
|
|
7348
7393
|
};
|
|
7349
7394
|
applyCanSkipTipCatchup(false);
|
|
7350
7395
|
},
|
|
7351
|
-
[
|
|
7396
|
+
[
|
|
7397
|
+
applyCanSkipTipCatchup,
|
|
7398
|
+
cancelLeaveFallback,
|
|
7399
|
+
clearReaderIntent,
|
|
7400
|
+
stopFollow,
|
|
7401
|
+
syncScrollBaseline,
|
|
7402
|
+
writeScrollTop
|
|
7403
|
+
]
|
|
7352
7404
|
);
|
|
7353
7405
|
const beginUserMessageDisclosureChange = useCallback2(
|
|
7354
7406
|
(messageBody, disclosureControl) => {
|
|
@@ -7395,6 +7447,36 @@ function MessageTimeline({
|
|
|
7395
7447
|
}),
|
|
7396
7448
|
[beginUserMessageDisclosureChange]
|
|
7397
7449
|
);
|
|
7450
|
+
const timelineGroupEntryContext = useMemo5(
|
|
7451
|
+
() => ({
|
|
7452
|
+
userMessageDisclosureContext,
|
|
7453
|
+
behavior: {
|
|
7454
|
+
renderMessageText,
|
|
7455
|
+
onOpenSession,
|
|
7456
|
+
onMemoryClick,
|
|
7457
|
+
onReconnect,
|
|
7458
|
+
resolveProviderLogo,
|
|
7459
|
+
toolRegistry,
|
|
7460
|
+
loadRetainedScreenshot,
|
|
7461
|
+
loadRetainedArtifact,
|
|
7462
|
+
loadVideoArtifactPlayback,
|
|
7463
|
+
turnSummary
|
|
7464
|
+
}
|
|
7465
|
+
}),
|
|
7466
|
+
[
|
|
7467
|
+
loadRetainedArtifact,
|
|
7468
|
+
loadRetainedScreenshot,
|
|
7469
|
+
loadVideoArtifactPlayback,
|
|
7470
|
+
onMemoryClick,
|
|
7471
|
+
onOpenSession,
|
|
7472
|
+
onReconnect,
|
|
7473
|
+
renderMessageText,
|
|
7474
|
+
resolveProviderLogo,
|
|
7475
|
+
toolRegistry,
|
|
7476
|
+
turnSummary,
|
|
7477
|
+
userMessageDisclosureContext
|
|
7478
|
+
]
|
|
7479
|
+
);
|
|
7398
7480
|
const requestOlderIfUnderfilled = useCallback2(
|
|
7399
7481
|
(node, retry) => {
|
|
7400
7482
|
let currentAttempt = olderLoadAttemptRef.current;
|
|
@@ -7439,14 +7521,29 @@ function MessageTimeline({
|
|
|
7439
7521
|
}
|
|
7440
7522
|
cancelLeaveFallback();
|
|
7441
7523
|
const now = typeof nowMs === "number" ? nowMs : typeof performance !== "undefined" ? performance.now() : Date.now();
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7524
|
+
let previousHeight = followRef.current.lastHeight;
|
|
7525
|
+
const previousObservedHeight = lastScrollHeightRef.current;
|
|
7526
|
+
if (contentShrinkBaselineRef.current && previousObservedHeight > 0 && node.scrollHeight > previousObservedHeight) {
|
|
7527
|
+
contentShrinkBaselineRef.current = null;
|
|
7528
|
+
if (node.scrollHeight < previousHeight) {
|
|
7529
|
+
followRef.current = {
|
|
7530
|
+
...followRef.current,
|
|
7531
|
+
lastHeight: node.scrollHeight,
|
|
7532
|
+
cameraTop: null
|
|
7533
|
+
};
|
|
7534
|
+
previousHeight = node.scrollHeight;
|
|
7535
|
+
}
|
|
7536
|
+
}
|
|
7537
|
+
const shrinkObservation = tipFollowObserveContentShrink(
|
|
7538
|
+
contentShrinkBaselineRef.current,
|
|
7539
|
+
previousHeight,
|
|
7540
|
+
lastScrollTopRef.current,
|
|
7541
|
+
node.scrollHeight,
|
|
7542
|
+
node.clientHeight
|
|
7543
|
+
);
|
|
7544
|
+
contentShrinkBaselineRef.current = shrinkObservation.baseline;
|
|
7545
|
+
if (shrinkObservation.compensatedScrollTop !== null) {
|
|
7546
|
+
let nextTop = shrinkObservation.compensatedScrollTop;
|
|
7450
7547
|
const previousClient = followRef.current.lastClientHeight;
|
|
7451
7548
|
if (previousClient > 0 && node.clientHeight < previousClient - TIP_FOLLOW_SHRINK_EPS_PX) {
|
|
7452
7549
|
nextTop = tipFollowCompensateViewportShrink(
|
|
@@ -7478,12 +7575,6 @@ function MessageTimeline({
|
|
|
7478
7575
|
}
|
|
7479
7576
|
return;
|
|
7480
7577
|
}
|
|
7481
|
-
if (previousHeight > 0 && node.scrollHeight < previousHeight) {
|
|
7482
|
-
followRef.current = {
|
|
7483
|
-
...followRef.current,
|
|
7484
|
-
lastHeight: node.scrollHeight
|
|
7485
|
-
};
|
|
7486
|
-
}
|
|
7487
7578
|
const result = tipFollowStep(followRef.current, {
|
|
7488
7579
|
scrollTop: node.scrollTop,
|
|
7489
7580
|
scrollHeight: node.scrollHeight,
|
|
@@ -7527,7 +7618,7 @@ function MessageTimeline({
|
|
|
7527
7618
|
}
|
|
7528
7619
|
const previousFirstItemId = previousFirstItemIdRef.current;
|
|
7529
7620
|
const previousFirstItemGroupKey = firstItemGroupKeyRef.current;
|
|
7530
|
-
const
|
|
7621
|
+
const previousFirstItemGroupOffsetTop = firstItemGroupOffsetTopRef.current;
|
|
7531
7622
|
const previousItemContentTop = firstItemContentTopRef.current;
|
|
7532
7623
|
const previousScrollTop = lastScrollTopRef.current;
|
|
7533
7624
|
const previousMaxScroll = lastMaxScrollRef.current;
|
|
@@ -7549,10 +7640,9 @@ function MessageTimeline({
|
|
|
7549
7640
|
}
|
|
7550
7641
|
}
|
|
7551
7642
|
const anchorKey = previousFirstItemGroupKey;
|
|
7552
|
-
const previousAnchorTop = anchorKey != null ? previousGroupOffsetByKey.get(anchorKey) : void 0;
|
|
7553
7643
|
const anchorEl = anchorKey != null ? node.querySelector(`[data-og-group-key="${cssEscapeAttribute(anchorKey)}"]`) : null;
|
|
7554
|
-
if (delta == null && anchorEl instanceof HTMLElement &&
|
|
7555
|
-
const moved = Math.round(anchorEl.offsetTop -
|
|
7644
|
+
if (delta == null && anchorEl instanceof HTMLElement && previousFirstItemGroupOffsetTop != null) {
|
|
7645
|
+
const moved = Math.round(anchorEl.offsetTop - previousFirstItemGroupOffsetTop);
|
|
7556
7646
|
if (moved) {
|
|
7557
7647
|
delta = moved;
|
|
7558
7648
|
}
|
|
@@ -7620,14 +7710,9 @@ function MessageTimeline({
|
|
|
7620
7710
|
firstItemGroupKeyRef.current = groups[0]?.key ?? null;
|
|
7621
7711
|
const needOffsets = prepended || firstItemChanged || !pinnedRef.current || hasNewer || firstItemContentTopRef.current == null;
|
|
7622
7712
|
if (needOffsets) {
|
|
7623
|
-
const
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
if (el instanceof HTMLElement) {
|
|
7627
|
-
nextOffsetByKey.set(key, el.offsetTop);
|
|
7628
|
-
}
|
|
7629
|
-
}
|
|
7630
|
-
groupOffsetByKeyRef.current = nextOffsetByKey;
|
|
7713
|
+
const committedFirstGroupKey = firstItemGroupKeyRef.current;
|
|
7714
|
+
const firstGroupEl = committedFirstGroupKey ? node.querySelector(`[data-og-group-key="${cssEscapeAttribute(committedFirstGroupKey)}"]`) : null;
|
|
7715
|
+
firstItemGroupOffsetTopRef.current = firstGroupEl instanceof HTMLElement ? firstGroupEl.offsetTop : null;
|
|
7631
7716
|
const firstItemEl = firstItemId ? node.querySelector(`[data-og-item="${cssEscapeAttribute(firstItemId)}"]`) : null;
|
|
7632
7717
|
firstItemContentTopRef.current = firstItemId && firstItemEl instanceof HTMLElement ? firstItemEl.getBoundingClientRect().top - node.getBoundingClientRect().top + node.scrollTop : null;
|
|
7633
7718
|
}
|
|
@@ -7703,14 +7788,16 @@ function MessageTimeline({
|
|
|
7703
7788
|
lastScrollHeightRef.current = 0;
|
|
7704
7789
|
lastClientHeightRef.current = 0;
|
|
7705
7790
|
firstItemGroupKeyRef.current = null;
|
|
7706
|
-
|
|
7791
|
+
firstItemGroupOffsetTopRef.current = null;
|
|
7707
7792
|
firstItemContentTopRef.current = null;
|
|
7708
7793
|
foldMemoryRef.current.clear();
|
|
7709
7794
|
userMessageDisclosureMemoryRef.current.clear();
|
|
7710
7795
|
disclosureKeepsUnpinnedRef.current = false;
|
|
7796
|
+
clearReaderIntent();
|
|
7797
|
+
contentShrinkBaselineRef.current = null;
|
|
7711
7798
|
seenActivityIdsRef.current.clear();
|
|
7712
7799
|
applyPinned(true);
|
|
7713
|
-
}, [allGroups.length, revealed, applyPinned]);
|
|
7800
|
+
}, [allGroups.length, revealed, applyPinned, clearReaderIntent]);
|
|
7714
7801
|
useEffect11(() => {
|
|
7715
7802
|
const node = scrollRef.current;
|
|
7716
7803
|
if (node) {
|
|
@@ -7865,6 +7952,13 @@ function MessageTimeline({
|
|
|
7865
7952
|
const readerUp = readerScrollUpPx(previousTop, nextTop, previousMaxScroll, nextMaxScroll);
|
|
7866
7953
|
const maxFell = nextMaxScroll < previousMaxScroll - 1;
|
|
7867
7954
|
const readerArmed = readerIntentArmRef.current;
|
|
7955
|
+
const readerIntentStart = readerIntentStartRef.current;
|
|
7956
|
+
const cumulativeReaderUp = readerArmed && readerIntentStart ? readerScrollUpPx(
|
|
7957
|
+
readerIntentStart.scrollTop,
|
|
7958
|
+
nextTop,
|
|
7959
|
+
readerIntentStart.maxScroll,
|
|
7960
|
+
nextMaxScroll
|
|
7961
|
+
) : readerUp;
|
|
7868
7962
|
const heightShrunk = followRef.current.lastHeight > 0 && nextHeight < followRef.current.lastHeight - TIP_FOLLOW_SHRINK_EPS_PX;
|
|
7869
7963
|
const programmatic = programmaticScrollRef.current > 0;
|
|
7870
7964
|
if (programmatic) {
|
|
@@ -7880,7 +7974,7 @@ function MessageTimeline({
|
|
|
7880
7974
|
const previousClient = followRef.current.lastClientHeight;
|
|
7881
7975
|
const viewportShrunk = previousClient > 0 && node.clientHeight < previousClient - TIP_FOLLOW_SHRINK_EPS_PX;
|
|
7882
7976
|
if (heightShrunk || maxFell || viewportShrunk) {
|
|
7883
|
-
|
|
7977
|
+
clearReaderIntent();
|
|
7884
7978
|
clearPendingReaderLeave();
|
|
7885
7979
|
driveFollow(node);
|
|
7886
7980
|
return;
|
|
@@ -7894,8 +7988,8 @@ function MessageTimeline({
|
|
|
7894
7988
|
if (nearBottomPinned) {
|
|
7895
7989
|
clearPendingReaderLeave();
|
|
7896
7990
|
}
|
|
7897
|
-
if (readerArmed &&
|
|
7898
|
-
|
|
7991
|
+
if (readerArmed && cumulativeReaderUp > TIP_FOLLOW_READER_UP_EPS_PX && !nearBottomPinned) {
|
|
7992
|
+
clearReaderIntent();
|
|
7899
7993
|
releasePinFromReader(node);
|
|
7900
7994
|
rearmOlderPrefetchAfterLeavingTop(node);
|
|
7901
7995
|
return;
|
|
@@ -7949,8 +8043,8 @@ function MessageTimeline({
|
|
|
7949
8043
|
}
|
|
7950
8044
|
releasePinAfterScrollSettled(node);
|
|
7951
8045
|
};
|
|
7952
|
-
return /* @__PURE__ */
|
|
7953
|
-
onAnnotate ? /* @__PURE__ */
|
|
8046
|
+
return /* @__PURE__ */ jsx18(LightboxProvider, { children: /* @__PURE__ */ jsx18(FoldMemoryProvider, { value: foldMemoryRef.current, children: /* @__PURE__ */ jsx18(SeenActivityIdsProvider, { value: seenActivityIdsRef.current, children: /* @__PURE__ */ jsx18(TimelineComputeLabelProvider, { value: computeLabel ?? null, children: /* @__PURE__ */ jsx18(EntranceAnimationProvider, { value: false, children: /* @__PURE__ */ jsx18(TooltipProvider, { delayDuration: 400, children: /* @__PURE__ */ jsxs13("div", { className: cn("og-root relative flex min-h-0 flex-col", className), children: [
|
|
8047
|
+
onAnnotate ? /* @__PURE__ */ jsx18(Suspense4, { fallback: null, children: /* @__PURE__ */ jsx18(
|
|
7954
8048
|
TimelineAnnotationSelection,
|
|
7955
8049
|
{
|
|
7956
8050
|
rootRef: scrollRef,
|
|
@@ -7958,7 +8052,7 @@ function MessageTimeline({
|
|
|
7958
8052
|
onAnnotate
|
|
7959
8053
|
}
|
|
7960
8054
|
) }) : null,
|
|
7961
|
-
/* @__PURE__ */
|
|
8055
|
+
/* @__PURE__ */ jsx18(
|
|
7962
8056
|
"div",
|
|
7963
8057
|
{
|
|
7964
8058
|
ref: scrollRef,
|
|
@@ -7978,11 +8072,11 @@ function MessageTimeline({
|
|
|
7978
8072
|
autoFollow && pinned && !hasNewer ? "[overflow-anchor:none]" : "[overflow-anchor:auto]"
|
|
7979
8073
|
),
|
|
7980
8074
|
children: /* @__PURE__ */ jsxs13("div", { className: "relative mx-auto flex w-full max-w-3xl flex-col gap-5", children: [
|
|
7981
|
-
!groups.length ? emptyState ?? /* @__PURE__ */
|
|
8075
|
+
!groups.length ? emptyState ?? /* @__PURE__ */ jsx18("p", { className: "py-10 text-center text-og-menu text-og-fg-subtle", children: "No activity yet." }) : null,
|
|
7982
8076
|
hasOlder && olderPrefetchArmed ? (
|
|
7983
8077
|
// Overlaid, not a layout row: mounting/unmounting the sentinel
|
|
7984
8078
|
// must never shift content (that shift was itself a wobble).
|
|
7985
|
-
/* @__PURE__ */
|
|
8079
|
+
/* @__PURE__ */ jsx18(
|
|
7986
8080
|
"div",
|
|
7987
8081
|
{
|
|
7988
8082
|
ref: topSentinelRef,
|
|
@@ -7993,49 +8087,22 @@ function MessageTimeline({
|
|
|
7993
8087
|
}
|
|
7994
8088
|
)
|
|
7995
8089
|
) : null,
|
|
7996
|
-
groups.map(({ group, key }, index) => {
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
return /* @__PURE__ */ jsx17("div", { "data-og-timeline-group-anchor": "", "data-og-group-key": key, children: /* @__PURE__ */ jsx17(
|
|
8000
|
-
TimelineGroupRenderBoundary,
|
|
8090
|
+
groups.map(({ group, key, entranceEnabled }, index) => {
|
|
8091
|
+
return /* @__PURE__ */ jsx18(
|
|
8092
|
+
TimelineGroupEntry,
|
|
8001
8093
|
{
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
loadRetainedArtifact,
|
|
8012
|
-
loadVideoArtifactPlayback,
|
|
8013
|
-
turnSummary
|
|
8014
|
-
],
|
|
8015
|
-
children: /* @__PURE__ */ jsx17(UserMessageDisclosureProvider, { value: userMessageDisclosureContext, children: /* @__PURE__ */ jsx17(
|
|
8016
|
-
TimelineGroupView,
|
|
8017
|
-
{
|
|
8018
|
-
group,
|
|
8019
|
-
renderMessageText,
|
|
8020
|
-
onOpenSession,
|
|
8021
|
-
onMemoryClick,
|
|
8022
|
-
onReconnect,
|
|
8023
|
-
resolveProviderLogo,
|
|
8024
|
-
toolRegistry,
|
|
8025
|
-
loadRetainedScreenshot,
|
|
8026
|
-
loadRetainedArtifact,
|
|
8027
|
-
loadVideoArtifactPlayback,
|
|
8028
|
-
turnSummary,
|
|
8029
|
-
foldLiveCluster: isAgentProgress(next),
|
|
8030
|
-
trailingAgentText: trailingAgentTextAfterTurn(group, next),
|
|
8031
|
-
contextCompactionCount: contextCompactionCount > 0 ? contextCompactionCount : void 0
|
|
8032
|
-
}
|
|
8033
|
-
) })
|
|
8034
|
-
}
|
|
8035
|
-
) }, key);
|
|
8094
|
+
groupKey: key,
|
|
8095
|
+
group,
|
|
8096
|
+
nextGroup: groups[index + 1]?.group,
|
|
8097
|
+
entranceEnabled,
|
|
8098
|
+
liveEntranceEnabled: group.kind === "activity" ? !bulkRender : void 0,
|
|
8099
|
+
context: timelineGroupEntryContext
|
|
8100
|
+
},
|
|
8101
|
+
key
|
|
8102
|
+
);
|
|
8036
8103
|
}),
|
|
8037
|
-
groups.length > 0 && trailingState ? /* @__PURE__ */
|
|
8038
|
-
hasNewer ? /* @__PURE__ */
|
|
8104
|
+
groups.length > 0 && trailingState ? /* @__PURE__ */ jsx18("div", { "data-og-timeline-trailing-state": "", children: trailingState }) : null,
|
|
8105
|
+
hasNewer ? /* @__PURE__ */ jsx18(
|
|
8039
8106
|
"div",
|
|
8040
8107
|
{
|
|
8041
8108
|
ref: bottomSentinelRef,
|
|
@@ -8048,7 +8115,7 @@ function MessageTimeline({
|
|
|
8048
8115
|
] })
|
|
8049
8116
|
}
|
|
8050
8117
|
),
|
|
8051
|
-
/* @__PURE__ */
|
|
8118
|
+
/* @__PURE__ */ jsx18(AnimatePresence2, { children: loadingOlder || loadingOldest || hasOlder && onJumpToStart && olderPrefetchArmed || underfillRetryReady ? (
|
|
8052
8119
|
// Floating over the scroller (not a timeline row) so showing and
|
|
8053
8120
|
// hiding it never reflows history under the reader.
|
|
8054
8121
|
/* @__PURE__ */ jsxs13(
|
|
@@ -8062,8 +8129,8 @@ function MessageTimeline({
|
|
|
8062
8129
|
"aria-live": "polite",
|
|
8063
8130
|
className: "absolute inset-x-0 top-3 z-10 flex justify-center",
|
|
8064
8131
|
children: [
|
|
8065
|
-
loadingOlder || loadingOldest ? /* @__PURE__ */
|
|
8066
|
-
hasOlder && !loadingOlder && !loadingOldest && (underfillRetryReady || onJumpToStart) ? /* @__PURE__ */
|
|
8132
|
+
loadingOlder || loadingOldest ? /* @__PURE__ */ jsx18("span", { className: LOADING_CHIP_CLASS, children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: loadingOldest ? "Jumping to start\u2026" : "Loading earlier activity\u2026" }) }) : null,
|
|
8133
|
+
hasOlder && !loadingOlder && !loadingOldest && (underfillRetryReady || onJumpToStart) ? /* @__PURE__ */ jsx18(
|
|
8067
8134
|
"button",
|
|
8068
8135
|
{
|
|
8069
8136
|
type: "button",
|
|
@@ -8107,7 +8174,7 @@ function MessageTimeline({
|
|
|
8107
8174
|
}
|
|
8108
8175
|
)
|
|
8109
8176
|
) : null }),
|
|
8110
|
-
/* @__PURE__ */
|
|
8177
|
+
/* @__PURE__ */ jsx18(AnimatePresence2, { children: loadingNewer ? /* @__PURE__ */ jsx18(
|
|
8111
8178
|
motion2.div,
|
|
8112
8179
|
{
|
|
8113
8180
|
initial: { opacity: 0, y: 6 },
|
|
@@ -8117,10 +8184,10 @@ function MessageTimeline({
|
|
|
8117
8184
|
"data-og-loading-newer": "",
|
|
8118
8185
|
"aria-live": "polite",
|
|
8119
8186
|
className: "pointer-events-none absolute inset-x-0 bottom-14 z-10 flex justify-center",
|
|
8120
|
-
children: /* @__PURE__ */
|
|
8187
|
+
children: /* @__PURE__ */ jsx18("span", { className: LOADING_CHIP_CLASS, children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: "Loading later activity\u2026" }) })
|
|
8121
8188
|
}
|
|
8122
8189
|
) : null }),
|
|
8123
|
-
/* @__PURE__ */
|
|
8190
|
+
/* @__PURE__ */ jsx18(AnimatePresence2, { children: (!pinned && autoFollow || hasNewer || canSkipTipCatchup) && autoFollow ? /* @__PURE__ */ jsxs13(
|
|
8124
8191
|
motion2.button,
|
|
8125
8192
|
{
|
|
8126
8193
|
type: "button",
|
|
@@ -8166,14 +8233,21 @@ function MessageTimeline({
|
|
|
8166
8233
|
"hover:border-og-border-strong"
|
|
8167
8234
|
),
|
|
8168
8235
|
children: [
|
|
8169
|
-
/* @__PURE__ */
|
|
8236
|
+
/* @__PURE__ */ jsx18(ArrowDownIcon2, { className: "size-3.5" }),
|
|
8170
8237
|
"Jump to latest"
|
|
8171
8238
|
]
|
|
8172
8239
|
}
|
|
8173
8240
|
) : null })
|
|
8174
8241
|
] }) }) }) }) }) }) });
|
|
8175
8242
|
}
|
|
8176
|
-
function
|
|
8243
|
+
function timelineGroupsRenderEqual(previous, next) {
|
|
8244
|
+
try {
|
|
8245
|
+
return dequal(previous, next);
|
|
8246
|
+
} catch {
|
|
8247
|
+
return false;
|
|
8248
|
+
}
|
|
8249
|
+
}
|
|
8250
|
+
function useStableTimelineGroupKeys(allGroups, entranceEnabled) {
|
|
8177
8251
|
const previousRef = useRef11([]);
|
|
8178
8252
|
const keyedGroups = useMemo5(() => {
|
|
8179
8253
|
const previousByItemId = /* @__PURE__ */ new Map();
|
|
@@ -8185,25 +8259,29 @@ function useStableTimelineGroupKeys(allGroups) {
|
|
|
8185
8259
|
const usedKeys = /* @__PURE__ */ new Set();
|
|
8186
8260
|
return allGroups.map((group, index) => {
|
|
8187
8261
|
const itemIds = timelineGroupItemIds(group);
|
|
8188
|
-
let
|
|
8262
|
+
let retainedGroup;
|
|
8189
8263
|
for (const itemId of itemIds) {
|
|
8190
8264
|
const previous = previousByItemId.get(itemId);
|
|
8191
8265
|
if (previous && previous.group.kind === group.kind && !usedKeys.has(previous.key)) {
|
|
8192
|
-
|
|
8266
|
+
retainedGroup = previous;
|
|
8193
8267
|
break;
|
|
8194
8268
|
}
|
|
8195
8269
|
}
|
|
8196
8270
|
const canonicalKey = timelineGroupKey(group);
|
|
8197
|
-
let key =
|
|
8271
|
+
let key = retainedGroup?.key ?? canonicalKey;
|
|
8198
8272
|
let collision = 0;
|
|
8199
8273
|
while (usedKeys.has(key)) {
|
|
8200
8274
|
key = `${canonicalKey}:${index}:${collision}`;
|
|
8201
8275
|
collision += 1;
|
|
8202
8276
|
}
|
|
8203
8277
|
usedKeys.add(key);
|
|
8204
|
-
return {
|
|
8278
|
+
return {
|
|
8279
|
+
group: retainedGroup && timelineGroupsRenderEqual(retainedGroup.group, group) ? retainedGroup.group : group,
|
|
8280
|
+
key,
|
|
8281
|
+
entranceEnabled: retainedGroup?.entranceEnabled ?? entranceEnabled
|
|
8282
|
+
};
|
|
8205
8283
|
});
|
|
8206
|
-
}, [allGroups]);
|
|
8284
|
+
}, [allGroups, entranceEnabled]);
|
|
8207
8285
|
useLayoutEffect3(() => {
|
|
8208
8286
|
previousRef.current = keyedGroups;
|
|
8209
8287
|
}, [keyedGroups]);
|
|
@@ -8248,10 +8326,10 @@ var TimelineGroupRenderBoundary = class extends Component2 {
|
|
|
8248
8326
|
role: "status",
|
|
8249
8327
|
className: "flex items-start gap-2 rounded-lg border border-og-border bg-og-surface-muted px-3 py-2 text-og-menu text-og-fg-muted",
|
|
8250
8328
|
children: [
|
|
8251
|
-
/* @__PURE__ */
|
|
8329
|
+
/* @__PURE__ */ jsx18(TriangleAlertIcon3, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }),
|
|
8252
8330
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8253
|
-
/* @__PURE__ */
|
|
8254
|
-
/* @__PURE__ */
|
|
8331
|
+
/* @__PURE__ */ jsx18("p", { className: "font-medium text-og-fg", children: "Timeline item unavailable" }),
|
|
8332
|
+
/* @__PURE__ */ jsx18("p", { children: "This item could not be displayed. The rest of the conversation is still available." })
|
|
8255
8333
|
] })
|
|
8256
8334
|
]
|
|
8257
8335
|
}
|
|
@@ -8260,6 +8338,27 @@ var TimelineGroupRenderBoundary = class extends Component2 {
|
|
|
8260
8338
|
return this.props.children;
|
|
8261
8339
|
}
|
|
8262
8340
|
};
|
|
8341
|
+
var TimelineGroupEntry = memo2(function TimelineGroupEntry2({
|
|
8342
|
+
groupKey,
|
|
8343
|
+
group,
|
|
8344
|
+
nextGroup,
|
|
8345
|
+
entranceEnabled,
|
|
8346
|
+
liveEntranceEnabled,
|
|
8347
|
+
context
|
|
8348
|
+
}) {
|
|
8349
|
+
const { behavior, userMessageDisclosureContext } = context;
|
|
8350
|
+
const contextCompactionCount = group.kind === "turn" ? group.contextCompactionCount ?? 0 : group.kind === "activity" && nextGroup?.kind === "item" && nextGroup.item.kind === "context-compaction" && nextGroup.item.phase === "compacted" ? 1 : 0;
|
|
8351
|
+
return /* @__PURE__ */ jsx18("div", { "data-og-timeline-group-anchor": "", "data-og-group-key": groupKey, children: /* @__PURE__ */ jsx18(EntranceAnimationProvider, { value: entranceEnabled, liveValue: liveEntranceEnabled, children: /* @__PURE__ */ jsx18(TimelineGroupRenderBoundary, { resetKeys: [group, behavior], children: /* @__PURE__ */ jsx18(UserMessageDisclosureProvider, { value: userMessageDisclosureContext, children: /* @__PURE__ */ jsx18(
|
|
8352
|
+
TimelineGroupView,
|
|
8353
|
+
{
|
|
8354
|
+
...behavior,
|
|
8355
|
+
group,
|
|
8356
|
+
foldLiveCluster: isAgentProgress(nextGroup),
|
|
8357
|
+
trailingAgentText: trailingAgentTextAfterTurn(group, nextGroup),
|
|
8358
|
+
contextCompactionCount: contextCompactionCount > 0 ? contextCompactionCount : void 0
|
|
8359
|
+
}
|
|
8360
|
+
) }) }) }) });
|
|
8361
|
+
});
|
|
8263
8362
|
var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
8264
8363
|
group,
|
|
8265
8364
|
renderMessageText,
|
|
@@ -8298,7 +8397,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8298
8397
|
if (insideTurn) {
|
|
8299
8398
|
const useNestedChip = nestClusterChips && activityShouldFold && !containsGeneratedImage;
|
|
8300
8399
|
if (!useNestedChip) {
|
|
8301
|
-
return /* @__PURE__ */
|
|
8400
|
+
return /* @__PURE__ */ jsx18(
|
|
8302
8401
|
ActivityRail,
|
|
8303
8402
|
{
|
|
8304
8403
|
items: group.items,
|
|
@@ -8311,7 +8410,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8311
8410
|
}
|
|
8312
8411
|
);
|
|
8313
8412
|
}
|
|
8314
|
-
return /* @__PURE__ */
|
|
8413
|
+
return /* @__PURE__ */ jsx18(
|
|
8315
8414
|
TurnSummary,
|
|
8316
8415
|
{
|
|
8317
8416
|
items: group.items,
|
|
@@ -8322,7 +8421,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8322
8421
|
foldKey: group.id,
|
|
8323
8422
|
facets: turnSummary?.facets,
|
|
8324
8423
|
contextCompactionCount,
|
|
8325
|
-
children: /* @__PURE__ */
|
|
8424
|
+
children: /* @__PURE__ */ jsx18(
|
|
8326
8425
|
ActivityRail,
|
|
8327
8426
|
{
|
|
8328
8427
|
items: group.items,
|
|
@@ -8338,7 +8437,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8338
8437
|
settleChrome ? "settle" : "rest"
|
|
8339
8438
|
);
|
|
8340
8439
|
}
|
|
8341
|
-
return /* @__PURE__ */
|
|
8440
|
+
return /* @__PURE__ */ jsx18(
|
|
8342
8441
|
TurnSummary,
|
|
8343
8442
|
{
|
|
8344
8443
|
items: group.items,
|
|
@@ -8349,7 +8448,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8349
8448
|
facets: turnSummary?.facets,
|
|
8350
8449
|
settleFold,
|
|
8351
8450
|
contextCompactionCount,
|
|
8352
|
-
children: /* @__PURE__ */
|
|
8451
|
+
children: /* @__PURE__ */ jsx18(FoldBody, { children: /* @__PURE__ */ jsx18(TurnRailFrame, { children: /* @__PURE__ */ jsx18(
|
|
8353
8452
|
ActivityRail,
|
|
8354
8453
|
{
|
|
8355
8454
|
items: group.items,
|
|
@@ -8369,7 +8468,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8369
8468
|
const turnCopyText = collectTurnCopyText(group.groups, trailingAgentText);
|
|
8370
8469
|
const body = group.groups.map((child) => {
|
|
8371
8470
|
const key = timelineGroupKey(child);
|
|
8372
|
-
return /* @__PURE__ */
|
|
8471
|
+
return /* @__PURE__ */ jsx18(
|
|
8373
8472
|
TimelineGroupRenderBoundary,
|
|
8374
8473
|
{
|
|
8375
8474
|
resetKeys: [
|
|
@@ -8385,7 +8484,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8385
8484
|
loadVideoArtifactPlayback,
|
|
8386
8485
|
turnSummary
|
|
8387
8486
|
],
|
|
8388
|
-
children: /* @__PURE__ */
|
|
8487
|
+
children: /* @__PURE__ */ jsx18(
|
|
8389
8488
|
TimelineGroupView2,
|
|
8390
8489
|
{
|
|
8391
8490
|
group: child,
|
|
@@ -8407,7 +8506,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8407
8506
|
key
|
|
8408
8507
|
);
|
|
8409
8508
|
});
|
|
8410
|
-
return /* @__PURE__ */
|
|
8509
|
+
return /* @__PURE__ */ jsx18(
|
|
8411
8510
|
TurnSummary,
|
|
8412
8511
|
{
|
|
8413
8512
|
items: activityItems,
|
|
@@ -8421,16 +8520,16 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8421
8520
|
settleFold,
|
|
8422
8521
|
copyText: insideTurn ? void 0 : turnCopyText,
|
|
8423
8522
|
contextCompactionCount: contextCompactionCount ?? group.contextCompactionCount,
|
|
8424
|
-
children: /* @__PURE__ */
|
|
8523
|
+
children: /* @__PURE__ */ jsx18(FoldBody, { children: insideTurn ? (
|
|
8425
8524
|
// A nested turn is already on an ancestor rail — its body just stacks
|
|
8426
8525
|
// flush (the bare-node body already indents it), so no second rule.
|
|
8427
|
-
/* @__PURE__ */
|
|
8428
|
-
) : /* @__PURE__ */
|
|
8526
|
+
/* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-4", children: body })
|
|
8527
|
+
) : /* @__PURE__ */ jsx18(TurnRailFrame, { children: body }) })
|
|
8429
8528
|
}
|
|
8430
8529
|
);
|
|
8431
8530
|
}
|
|
8432
8531
|
case "item":
|
|
8433
|
-
return /* @__PURE__ */
|
|
8532
|
+
return /* @__PURE__ */ jsx18(
|
|
8434
8533
|
TimelineRow,
|
|
8435
8534
|
{
|
|
8436
8535
|
item: group.item,
|
|
@@ -8444,10 +8543,10 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
8444
8543
|
}
|
|
8445
8544
|
});
|
|
8446
8545
|
function FoldBody({ children }) {
|
|
8447
|
-
return /* @__PURE__ */
|
|
8546
|
+
return /* @__PURE__ */ jsx18(Fragment6, { children });
|
|
8448
8547
|
}
|
|
8449
8548
|
function TurnRailFrame({ children }) {
|
|
8450
|
-
return /* @__PURE__ */
|
|
8549
|
+
return /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-4 border-l-2 border-og-border pl-3 sm:pl-4", children });
|
|
8451
8550
|
}
|
|
8452
8551
|
function useLiveSettleFold(folded) {
|
|
8453
8552
|
const previousFoldedRef = useRef11(folded);
|
|
@@ -8622,25 +8721,25 @@ function TimelineRow({
|
|
|
8622
8721
|
}) {
|
|
8623
8722
|
switch (item.kind) {
|
|
8624
8723
|
case "user-message":
|
|
8625
|
-
return /* @__PURE__ */
|
|
8724
|
+
return /* @__PURE__ */ jsx18(UserMessageRow, { item, renderMessageText });
|
|
8626
8725
|
case "human-input":
|
|
8627
|
-
return /* @__PURE__ */
|
|
8726
|
+
return /* @__PURE__ */ jsx18(HumanInputConversationRow, { item });
|
|
8628
8727
|
case "agent-message":
|
|
8629
|
-
return /* @__PURE__ */
|
|
8728
|
+
return /* @__PURE__ */ jsx18(AgentMessageRow, { item, renderMessageText });
|
|
8630
8729
|
case "worker-completion":
|
|
8631
|
-
return /* @__PURE__ */
|
|
8730
|
+
return /* @__PURE__ */ jsx18(WorkerCompletionRow, { item, onOpenSession });
|
|
8632
8731
|
case "session-status":
|
|
8633
|
-
return /* @__PURE__ */
|
|
8732
|
+
return /* @__PURE__ */ jsx18(SessionStatusRow, { item });
|
|
8634
8733
|
case "goal":
|
|
8635
|
-
return /* @__PURE__ */
|
|
8734
|
+
return /* @__PURE__ */ jsx18(GoalRow, { item });
|
|
8636
8735
|
case "machine-input-batch":
|
|
8637
|
-
return /* @__PURE__ */
|
|
8736
|
+
return /* @__PURE__ */ jsx18(MachineInputBatchRow, { item, loadVideoArtifactPlayback });
|
|
8638
8737
|
case "notice":
|
|
8639
|
-
return /* @__PURE__ */
|
|
8738
|
+
return /* @__PURE__ */ jsx18(NoticeRow, { item });
|
|
8640
8739
|
case "context-compaction":
|
|
8641
|
-
return /* @__PURE__ */
|
|
8740
|
+
return /* @__PURE__ */ jsx18(CompactionRow, { item });
|
|
8642
8741
|
case "auth-needed":
|
|
8643
|
-
return /* @__PURE__ */
|
|
8742
|
+
return /* @__PURE__ */ jsx18(
|
|
8644
8743
|
AuthNeededRow,
|
|
8645
8744
|
{
|
|
8646
8745
|
item,
|
|
@@ -8666,7 +8765,7 @@ function CompactionRow({ item }) {
|
|
|
8666
8765
|
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";
|
|
8667
8766
|
const subtitle = item.phase === "compacted" ? "Chat history above is unchanged" : item.phase === "skipped" ? compactionSkipSubtitle(item.skipReason) : null;
|
|
8668
8767
|
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" ? WAITING_PILL_CLASS : "border-og-border bg-og-surface-1 text-og-fg-muted";
|
|
8669
|
-
return /* @__PURE__ */
|
|
8768
|
+
return /* @__PURE__ */ jsx18("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs13(
|
|
8670
8769
|
"div",
|
|
8671
8770
|
{
|
|
8672
8771
|
className: cn(
|
|
@@ -8676,13 +8775,13 @@ function CompactionRow({ item }) {
|
|
|
8676
8775
|
role: "status",
|
|
8677
8776
|
children: [
|
|
8678
8777
|
/* @__PURE__ */ jsxs13("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
|
|
8679
|
-
/* @__PURE__ */
|
|
8778
|
+
/* @__PURE__ */ jsx18(ShrinkIcon, { className: "size-3.5 shrink-0" }),
|
|
8680
8779
|
/* @__PURE__ */ jsxs13("span", { className: "truncate", children: [
|
|
8681
8780
|
title,
|
|
8682
8781
|
trigger ? ` \xB7 ${trigger}` : ""
|
|
8683
8782
|
] })
|
|
8684
8783
|
] }),
|
|
8685
|
-
subtitle ? /* @__PURE__ */
|
|
8784
|
+
subtitle ? /* @__PURE__ */ jsx18("span", { className: "truncate text-og-xs opacity-80", children: subtitle }) : null
|
|
8686
8785
|
]
|
|
8687
8786
|
}
|
|
8688
8787
|
) });
|
|
@@ -8702,7 +8801,7 @@ function compactionSkipSubtitle(reason) {
|
|
|
8702
8801
|
}
|
|
8703
8802
|
}
|
|
8704
8803
|
function MessageFooterTime({ occurredAt }) {
|
|
8705
|
-
return /* @__PURE__ */
|
|
8804
|
+
return /* @__PURE__ */ jsx18(
|
|
8706
8805
|
"time",
|
|
8707
8806
|
{
|
|
8708
8807
|
dateTime: occurredAt,
|
|
@@ -8721,18 +8820,18 @@ function UserMessageRow({
|
|
|
8721
8820
|
}) {
|
|
8722
8821
|
const enter = useEntranceAnimation();
|
|
8723
8822
|
const deliveryFailed = item.delivery?.state === "failed";
|
|
8724
|
-
return /* @__PURE__ */
|
|
8725
|
-
/* @__PURE__ */
|
|
8823
|
+
return /* @__PURE__ */ jsx18("div", { className: cn(enter && "animate-og-enter", "flex justify-end"), children: /* @__PURE__ */ jsxs13("div", { className: "flex max-w-[85%] min-w-0 flex-col items-end gap-1", children: [
|
|
8824
|
+
/* @__PURE__ */ jsx18(
|
|
8726
8825
|
CopyHoverFrame,
|
|
8727
8826
|
{
|
|
8728
8827
|
copyText: item.text || (item.annotations ?? []).map((annotation) => `${annotation.quote}
|
|
8729
8828
|
${annotation.note}`).join("\n\n"),
|
|
8730
8829
|
label: "Copy message",
|
|
8731
8830
|
className: "w-fit max-w-full min-w-0",
|
|
8732
|
-
trailing: /* @__PURE__ */
|
|
8831
|
+
trailing: /* @__PURE__ */ jsx18(MessageFooterTime, { occurredAt: item.occurredAt }),
|
|
8733
8832
|
children: /* @__PURE__ */ jsxs13("div", { className: MESSAGE_BUBBLE_CLASS, children: [
|
|
8734
|
-
item.text ? /* @__PURE__ */
|
|
8735
|
-
(item.annotations?.length ?? 0) > 0 ? /* @__PURE__ */
|
|
8833
|
+
item.text ? /* @__PURE__ */ jsx18("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx18(UserMessageBody, { messageId: item.id, text: item.text, children: /* @__PURE__ */ jsx18(Markdown, { children: item.text }) }) }) : null,
|
|
8834
|
+
(item.annotations?.length ?? 0) > 0 ? /* @__PURE__ */ jsx18(
|
|
8736
8835
|
TimelineAnnotationsChip,
|
|
8737
8836
|
{
|
|
8738
8837
|
annotations: item.annotations ?? [],
|
|
@@ -8749,10 +8848,10 @@ ${annotation.note}`).join("\n\n"),
|
|
|
8749
8848
|
className: "flex max-w-full items-center gap-2 px-1 text-og-xs text-og-status-failed",
|
|
8750
8849
|
children: [
|
|
8751
8850
|
/* @__PURE__ */ jsxs13("span", { className: "inline-flex items-center gap-1", title: item.delivery?.error, children: [
|
|
8752
|
-
/* @__PURE__ */
|
|
8753
|
-
/* @__PURE__ */
|
|
8851
|
+
/* @__PURE__ */ jsx18(TriangleAlertIcon3, { className: "size-3.5 shrink-0", "aria-hidden": "true" }),
|
|
8852
|
+
/* @__PURE__ */ jsx18("span", { children: "Message not sent" })
|
|
8754
8853
|
] }),
|
|
8755
|
-
item.delivery?.onRetry ? /* @__PURE__ */
|
|
8854
|
+
item.delivery?.onRetry ? /* @__PURE__ */ jsx18(
|
|
8756
8855
|
"button",
|
|
8757
8856
|
{
|
|
8758
8857
|
type: "button",
|
|
@@ -8761,7 +8860,7 @@ ${annotation.note}`).join("\n\n"),
|
|
|
8761
8860
|
children: "Retry"
|
|
8762
8861
|
}
|
|
8763
8862
|
) : null,
|
|
8764
|
-
item.delivery?.onRemove ? /* @__PURE__ */
|
|
8863
|
+
item.delivery?.onRemove ? /* @__PURE__ */ jsx18(
|
|
8765
8864
|
"button",
|
|
8766
8865
|
{
|
|
8767
8866
|
type: "button",
|
|
@@ -8790,10 +8889,10 @@ function HumanInputConversationRow({ item }) {
|
|
|
8790
8889
|
"data-human-input-history": item.requestId,
|
|
8791
8890
|
children: [
|
|
8792
8891
|
/* @__PURE__ */ jsxs13("div", { className: "flex max-w-[90%] items-start gap-3 rounded-og-lg rounded-bl-og-xs border border-og-border bg-og-surface-1 px-3.5 py-3 sm:max-w-[82%]", children: [
|
|
8793
|
-
/* @__PURE__ */
|
|
8892
|
+
/* @__PURE__ */ jsx18("span", { className: "mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-og-md bg-og-status-waiting/10 text-og-status-waiting", children: /* @__PURE__ */ jsx18(MessageCircleQuestionIcon3, { "aria-hidden": "true", className: "size-4" }) }),
|
|
8794
8893
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
8795
|
-
/* @__PURE__ */
|
|
8796
|
-
/* @__PURE__ */
|
|
8894
|
+
/* @__PURE__ */ jsx18("p", { className: "text-og-xs font-medium text-og-fg-subtle", children: "Agent asked" }),
|
|
8895
|
+
/* @__PURE__ */ jsx18("div", { className: "mt-1.5 space-y-3", children: item.questions.length > 0 ? item.questions.map((question, index) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
8797
8896
|
question.label ? /* @__PURE__ */ jsxs13("p", { className: "text-og-sm font-semibold text-og-fg", children: [
|
|
8798
8897
|
multipleQuestions ? /* @__PURE__ */ jsxs13("span", { className: "mr-1.5 tabular-nums text-og-fg-muted", children: [
|
|
8799
8898
|
index + 1,
|
|
@@ -8819,19 +8918,19 @@ function HumanInputConversationRow({ item }) {
|
|
|
8819
8918
|
]
|
|
8820
8919
|
}
|
|
8821
8920
|
)
|
|
8822
|
-
] }, question.id)) : /* @__PURE__ */
|
|
8921
|
+
] }, question.id)) : /* @__PURE__ */ jsx18("p", { className: "text-og-sm text-og-fg-muted", children: "The agent requested structured input." }) })
|
|
8823
8922
|
] })
|
|
8824
8923
|
] }),
|
|
8825
|
-
/* @__PURE__ */
|
|
8924
|
+
/* @__PURE__ */ jsx18("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx18(
|
|
8826
8925
|
CopyHoverFrame,
|
|
8827
8926
|
{
|
|
8828
8927
|
copyText,
|
|
8829
8928
|
label: "Copy answer",
|
|
8830
8929
|
className: "w-fit max-w-[90%] min-w-0 sm:max-w-[82%]",
|
|
8831
|
-
trailing: /* @__PURE__ */
|
|
8930
|
+
trailing: /* @__PURE__ */ jsx18(MessageFooterTime, { occurredAt: item.occurredAt }),
|
|
8832
8931
|
children: /* @__PURE__ */ jsxs13("div", { className: MESSAGE_BUBBLE_CLASS, children: [
|
|
8833
|
-
/* @__PURE__ */
|
|
8834
|
-
item.response.outcome === "answered" ? /* @__PURE__ */
|
|
8932
|
+
/* @__PURE__ */ jsx18("p", { className: "text-og-xs font-medium text-og-fg-subtle", children: settledLabel }),
|
|
8933
|
+
item.response.outcome === "answered" ? /* @__PURE__ */ jsx18("div", { className: "mt-1.5 space-y-3", children: item.answers.length > 0 ? item.answers.map((answer, answerIndex) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
8835
8934
|
multipleQuestions ? /* @__PURE__ */ jsxs13("p", { className: "text-og-sm font-semibold text-og-fg", children: [
|
|
8836
8935
|
/* @__PURE__ */ jsxs13("span", { className: "mr-1.5 tabular-nums text-og-fg-muted", children: [
|
|
8837
8936
|
questionNumberById.get(answer.questionId) ?? answerIndex + 1,
|
|
@@ -8840,8 +8939,8 @@ function HumanInputConversationRow({ item }) {
|
|
|
8840
8939
|
" ",
|
|
8841
8940
|
answer.label
|
|
8842
8941
|
] }) : null,
|
|
8843
|
-
/* @__PURE__ */
|
|
8844
|
-
] }, answer.questionId)) : /* @__PURE__ */
|
|
8942
|
+
/* @__PURE__ */ jsx18("div", { className: cn("text-og-md text-og-fg", multipleQuestions && "mt-0.5"), children: answer.values.length > 1 ? /* @__PURE__ */ jsx18("ul", { className: "list-disc space-y-0.5 pl-5", children: answer.values.map((value) => /* @__PURE__ */ jsx18("li", { children: value }, `${answer.questionId}-${value}`)) }) : /* @__PURE__ */ jsx18("p", { children: answer.values[0] || "Answered" }) })
|
|
8943
|
+
] }, answer.questionId)) : /* @__PURE__ */ jsx18("p", { children: "Answered" }) }) : null
|
|
8845
8944
|
] })
|
|
8846
8945
|
}
|
|
8847
8946
|
) })
|
|
@@ -8868,15 +8967,15 @@ function AgentMessageRow({
|
|
|
8868
8967
|
renderMessageText
|
|
8869
8968
|
}) {
|
|
8870
8969
|
const enter = useEntranceAnimation();
|
|
8871
|
-
const body = renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */
|
|
8872
|
-
return /* @__PURE__ */
|
|
8970
|
+
const body = renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx18(Markdown, { streaming: item.streaming, children: item.text });
|
|
8971
|
+
return /* @__PURE__ */ jsx18("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: /* @__PURE__ */ jsx18(
|
|
8873
8972
|
CopyHoverFrame,
|
|
8874
8973
|
{
|
|
8875
8974
|
copyText: item.text,
|
|
8876
8975
|
label: "Copy message",
|
|
8877
8976
|
align: "start",
|
|
8878
8977
|
className: cn(enter && "animate-og-enter", "min-w-0 text-og-md leading-7 text-og-fg"),
|
|
8879
|
-
trailing: item.streaming ? null : /* @__PURE__ */
|
|
8978
|
+
trailing: item.streaming ? null : /* @__PURE__ */ jsx18(MessageFooterTime, { occurredAt: item.occurredAt }),
|
|
8880
8979
|
children: body
|
|
8881
8980
|
}
|
|
8882
8981
|
) });
|
|
@@ -8928,11 +9027,11 @@ function WorkerCompletionRow({
|
|
|
8928
9027
|
...showPausedReason ? [{ label: "Paused because", value: item.pausedReason.trim(), muted: true }] : []
|
|
8929
9028
|
];
|
|
8930
9029
|
const hasDetails = details.length > 0;
|
|
8931
|
-
return /* @__PURE__ */
|
|
9030
|
+
return /* @__PURE__ */ jsx18("div", { className: cn(enter && "animate-og-enter", "min-w-0"), children: /* @__PURE__ */ jsxs13("div", { className: cn("flex flex-col gap-2 border-l-2 pl-3", meta.accentClass), children: [
|
|
8932
9031
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2.5", children: [
|
|
8933
|
-
/* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
8935
|
-
/* @__PURE__ */
|
|
9032
|
+
/* @__PURE__ */ jsx18("span", { className: cn("mt-0.5 shrink-0", meta.iconClass), children: /* @__PURE__ */ jsx18(Icon, { className: "size-4" }) }),
|
|
9033
|
+
/* @__PURE__ */ jsx18("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs13("p", { className: "text-og-base leading-5 text-og-fg", children: [
|
|
9034
|
+
/* @__PURE__ */ jsx18("span", { className: "font-medium", children: meta.label }),
|
|
8936
9035
|
item.goalText ? /* @__PURE__ */ jsxs13("span", { className: "text-og-fg-muted", children: [
|
|
8937
9036
|
" \xB7 ",
|
|
8938
9037
|
truncate(item.goalText, 90)
|
|
@@ -8950,13 +9049,13 @@ function WorkerCompletionRow({
|
|
|
8950
9049
|
),
|
|
8951
9050
|
children: [
|
|
8952
9051
|
"View session",
|
|
8953
|
-
/* @__PURE__ */
|
|
9052
|
+
/* @__PURE__ */ jsx18(ArrowRightIcon2, { className: "size-3.5" })
|
|
8954
9053
|
]
|
|
8955
9054
|
}
|
|
8956
9055
|
) : null
|
|
8957
9056
|
] }),
|
|
8958
9057
|
hasDetails ? /* @__PURE__ */ jsxs13(Collapsible2.Root, { open, onOpenChange: setOpen, children: [
|
|
8959
|
-
/* @__PURE__ */
|
|
9058
|
+
/* @__PURE__ */ jsx18(Collapsible2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
8960
9059
|
"button",
|
|
8961
9060
|
{
|
|
8962
9061
|
type: "button",
|
|
@@ -8965,14 +9064,14 @@ function WorkerCompletionRow({
|
|
|
8965
9064
|
"outline-hidden transition-colors duration-150 hover:text-og-fg-muted focus-visible:ring-2 focus-visible:ring-og-accent"
|
|
8966
9065
|
),
|
|
8967
9066
|
children: [
|
|
8968
|
-
/* @__PURE__ */
|
|
9067
|
+
/* @__PURE__ */ jsx18(ChevronRightIcon3, { className: "size-3 transition-transform duration-150 ease-og-in-out group-data-[state=open]/wc:rotate-90" }),
|
|
8969
9068
|
open ? "Hide details" : "Show details"
|
|
8970
9069
|
]
|
|
8971
9070
|
}
|
|
8972
9071
|
) }),
|
|
8973
|
-
/* @__PURE__ */
|
|
8974
|
-
/* @__PURE__ */
|
|
8975
|
-
/* @__PURE__ */
|
|
9072
|
+
/* @__PURE__ */ jsx18(Collapsible2.Content, { className: "overflow-hidden data-[state=closed]:animate-og-collapse data-[state=open]:animate-og-expand", children: /* @__PURE__ */ jsx18("div", { className: "ml-1 mt-1.5 flex flex-col gap-2.5", children: details.map((detail) => /* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
9073
|
+
/* @__PURE__ */ jsx18("p", { className: "mb-1 text-og-xs font-medium uppercase tracking-[0.08em] text-og-fg-subtle", children: detail.label }),
|
|
9074
|
+
/* @__PURE__ */ jsx18(
|
|
8976
9075
|
"p",
|
|
8977
9076
|
{
|
|
8978
9077
|
className: cn(
|
|
@@ -8998,14 +9097,14 @@ function SessionStatusRow({ item }) {
|
|
|
8998
9097
|
),
|
|
8999
9098
|
role: "status",
|
|
9000
9099
|
children: [
|
|
9001
|
-
/* @__PURE__ */
|
|
9100
|
+
/* @__PURE__ */ jsx18("span", { className: "h-px flex-1 bg-og-border" }),
|
|
9002
9101
|
/* @__PURE__ */ jsxs13("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
9003
|
-
/* @__PURE__ */
|
|
9102
|
+
/* @__PURE__ */ jsx18(StatusDot, { status: item.status, className: "size-1" }),
|
|
9004
9103
|
meta.label.toLowerCase(),
|
|
9005
9104
|
" \xB7 ",
|
|
9006
9105
|
formatRelativeTime(item.occurredAt)
|
|
9007
9106
|
] }),
|
|
9008
|
-
/* @__PURE__ */
|
|
9107
|
+
/* @__PURE__ */ jsx18("span", { className: "h-px flex-1 bg-og-border" })
|
|
9009
9108
|
]
|
|
9010
9109
|
}
|
|
9011
9110
|
);
|
|
@@ -9040,7 +9139,7 @@ var GOAL_META = {
|
|
|
9040
9139
|
function GoalRow({ item }) {
|
|
9041
9140
|
const enter = useEntranceAnimation();
|
|
9042
9141
|
const { label, pill, icon: Icon } = GOAL_META[item.action];
|
|
9043
|
-
return /* @__PURE__ */
|
|
9142
|
+
return /* @__PURE__ */ jsx18("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs13(
|
|
9044
9143
|
"span",
|
|
9045
9144
|
{
|
|
9046
9145
|
className: cn(
|
|
@@ -9048,7 +9147,7 @@ function GoalRow({ item }) {
|
|
|
9048
9147
|
pill
|
|
9049
9148
|
),
|
|
9050
9149
|
children: [
|
|
9051
|
-
/* @__PURE__ */
|
|
9150
|
+
/* @__PURE__ */ jsx18(Icon, { className: "size-3.5 shrink-0" }),
|
|
9052
9151
|
/* @__PURE__ */ jsxs13("span", { className: "truncate", children: [
|
|
9053
9152
|
label,
|
|
9054
9153
|
item.text ? `: ${truncate(item.text, 90)}` : ""
|
|
@@ -9065,7 +9164,7 @@ function MachineInputBatchRow({
|
|
|
9065
9164
|
const label = machineInputBatchLabel(item.members);
|
|
9066
9165
|
const single = item.members.length === 1 ? item.members[0] : null;
|
|
9067
9166
|
if (single?.kind === "media_generation_result" && single.result) {
|
|
9068
|
-
return /* @__PURE__ */
|
|
9167
|
+
return /* @__PURE__ */ jsx18(
|
|
9069
9168
|
VideoGenerationResultRow,
|
|
9070
9169
|
{
|
|
9071
9170
|
result: single.result,
|
|
@@ -9077,7 +9176,7 @@ function MachineInputBatchRow({
|
|
|
9077
9176
|
const showCollapsedSummary = single != null && machineInputSummaryIsUseful(single.kind, singleSummary);
|
|
9078
9177
|
return /* @__PURE__ */ jsxs13("div", { className: cn(enter && "animate-og-enter", "flex flex-col items-center gap-1.5"), children: [
|
|
9079
9178
|
/* @__PURE__ */ jsxs13("details", { className: "group w-full max-w-full", "data-og-machine-input-batch": "", children: [
|
|
9080
|
-
/* @__PURE__ */
|
|
9179
|
+
/* @__PURE__ */ jsx18("summary", { className: "flex cursor-pointer list-none justify-center [&::-webkit-details-marker]:hidden", children: /* @__PURE__ */ jsxs13(
|
|
9081
9180
|
"span",
|
|
9082
9181
|
{
|
|
9083
9182
|
className: cn(
|
|
@@ -9085,18 +9184,18 @@ function MachineInputBatchRow({
|
|
|
9085
9184
|
NEUTRAL_PILL
|
|
9086
9185
|
),
|
|
9087
9186
|
children: [
|
|
9088
|
-
/* @__PURE__ */
|
|
9187
|
+
/* @__PURE__ */ jsx18(
|
|
9089
9188
|
ChevronRightIcon3,
|
|
9090
9189
|
{
|
|
9091
9190
|
"aria-hidden": true,
|
|
9092
9191
|
className: "size-3.5 shrink-0 transition-transform group-open:rotate-90"
|
|
9093
9192
|
}
|
|
9094
9193
|
),
|
|
9095
|
-
/* @__PURE__ */
|
|
9194
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate", children: label })
|
|
9096
9195
|
]
|
|
9097
9196
|
}
|
|
9098
9197
|
) }),
|
|
9099
|
-
/* @__PURE__ */
|
|
9198
|
+
/* @__PURE__ */ jsx18("div", { className: "mx-auto mt-2 w-full max-w-lg space-y-2 border-t border-og-border/50 pt-2", children: item.members.map((member) => /* @__PURE__ */ jsx18(
|
|
9100
9199
|
MachineInputRow,
|
|
9101
9200
|
{
|
|
9102
9201
|
member,
|
|
@@ -9105,7 +9204,7 @@ function MachineInputBatchRow({
|
|
|
9105
9204
|
member.id
|
|
9106
9205
|
)) })
|
|
9107
9206
|
] }),
|
|
9108
|
-
showCollapsedSummary ? /* @__PURE__ */
|
|
9207
|
+
showCollapsedSummary ? /* @__PURE__ */ jsx18("p", { className: "max-w-lg px-3 text-center text-og-xs leading-4 text-og-fg-subtle", children: truncate(singleSummary, 160) }) : null
|
|
9109
9208
|
] });
|
|
9110
9209
|
}
|
|
9111
9210
|
function MachineInputRow({
|
|
@@ -9113,7 +9212,7 @@ function MachineInputRow({
|
|
|
9113
9212
|
loadVideoArtifactPlayback
|
|
9114
9213
|
}) {
|
|
9115
9214
|
if (member.kind === "media_generation_result" && member.result) {
|
|
9116
|
-
return /* @__PURE__ */
|
|
9215
|
+
return /* @__PURE__ */ jsx18(
|
|
9117
9216
|
VideoGenerationResultRow,
|
|
9118
9217
|
{
|
|
9119
9218
|
result: member.result,
|
|
@@ -9125,14 +9224,14 @@ function MachineInputRow({
|
|
|
9125
9224
|
const source = readableMachineInputSource(member.sourceId);
|
|
9126
9225
|
const summary = cleanMachineInputSummary(member.summary);
|
|
9127
9226
|
return /* @__PURE__ */ jsxs13("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
9128
|
-
/* @__PURE__ */
|
|
9227
|
+
/* @__PURE__ */ jsx18("span", { className: "mt-2 size-1.5 shrink-0 rounded-full bg-og-fg-subtle", "aria-hidden": true }),
|
|
9129
9228
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
9130
|
-
/* @__PURE__ */
|
|
9229
|
+
/* @__PURE__ */ jsx18("span", { className: "text-og-control font-medium text-og-fg-muted", children: MACHINE_INPUT_META[member.kind] }),
|
|
9131
9230
|
source && /* @__PURE__ */ jsxs13("span", { className: "ml-1.5 text-og-control text-og-fg-subtle", children: [
|
|
9132
9231
|
"from ",
|
|
9133
9232
|
source
|
|
9134
9233
|
] }),
|
|
9135
|
-
summary ? /* @__PURE__ */
|
|
9234
|
+
summary ? /* @__PURE__ */ jsx18("p", { className: "mt-0.5 whitespace-pre-wrap break-words text-og-menu leading-5 text-og-fg", children: truncate(summary, 320) }) : null
|
|
9136
9235
|
] })
|
|
9137
9236
|
] });
|
|
9138
9237
|
}
|
|
@@ -9152,10 +9251,10 @@ function VideoGenerationResultRow({
|
|
|
9152
9251
|
),
|
|
9153
9252
|
children: [
|
|
9154
9253
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 text-og-sm font-medium text-og-status-failed", children: [
|
|
9155
|
-
/* @__PURE__ */
|
|
9254
|
+
/* @__PURE__ */ jsx18(XCircleIcon, { "aria-hidden": true, className: "size-4" }),
|
|
9156
9255
|
"Video generation failed"
|
|
9157
9256
|
] }),
|
|
9158
|
-
/* @__PURE__ */
|
|
9257
|
+
/* @__PURE__ */ jsx18("p", { className: "mt-1 text-og-sm leading-5 text-og-fg-muted", children: result.boundedPublicReason })
|
|
9159
9258
|
]
|
|
9160
9259
|
}
|
|
9161
9260
|
);
|
|
@@ -9172,17 +9271,17 @@ function VideoGenerationResultRow({
|
|
|
9172
9271
|
compact && "max-w-lg"
|
|
9173
9272
|
),
|
|
9174
9273
|
children: [
|
|
9175
|
-
loadVideoArtifactPlayback ? /* @__PURE__ */
|
|
9274
|
+
loadVideoArtifactPlayback ? /* @__PURE__ */ jsx18(
|
|
9176
9275
|
GeneratedVideoPlayer,
|
|
9177
9276
|
{
|
|
9178
9277
|
receipt,
|
|
9179
9278
|
loadPlaybackSource: loadVideoArtifactPlayback,
|
|
9180
9279
|
className: "rounded-none border-0 shadow-none"
|
|
9181
9280
|
}
|
|
9182
|
-
) : /* @__PURE__ */
|
|
9281
|
+
) : /* @__PURE__ */ jsx18("div", { className: "flex aspect-video items-center justify-center bg-og-surface-2 text-og-fg-subtle", children: /* @__PURE__ */ jsx18(PlayIcon2, { "aria-hidden": true, className: "size-6" }) }),
|
|
9183
9282
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-4 px-3.5 py-2.5", children: [
|
|
9184
9283
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
9185
|
-
/* @__PURE__ */
|
|
9284
|
+
/* @__PURE__ */ jsx18("p", { className: "text-og-sm font-medium text-og-fg", children: "Generated video" }),
|
|
9186
9285
|
/* @__PURE__ */ jsxs13("p", { className: "truncate text-og-xs text-og-fg-subtle", children: [
|
|
9187
9286
|
facts.width,
|
|
9188
9287
|
"\xD7",
|
|
@@ -9192,7 +9291,7 @@ function VideoGenerationResultRow({
|
|
|
9192
9291
|
facts.hasAudio ? " \xB7 Audio" : ""
|
|
9193
9292
|
] })
|
|
9194
9293
|
] }),
|
|
9195
|
-
/* @__PURE__ */
|
|
9294
|
+
/* @__PURE__ */ jsx18(CheckCircle2Icon, { "aria-label": "Ready", className: "size-4 shrink-0 text-og-status-success" })
|
|
9196
9295
|
] })
|
|
9197
9296
|
]
|
|
9198
9297
|
}
|
|
@@ -9214,20 +9313,20 @@ function NoticeRow({ item }) {
|
|
|
9214
9313
|
),
|
|
9215
9314
|
role: "status",
|
|
9216
9315
|
children: [
|
|
9217
|
-
/* @__PURE__ */
|
|
9316
|
+
/* @__PURE__ */ jsx18(
|
|
9218
9317
|
TriangleAlertIcon3,
|
|
9219
9318
|
{
|
|
9220
9319
|
className: cn("mt-0.5 size-4 shrink-0", item.tone === "cancelled" && "opacity-60")
|
|
9221
9320
|
}
|
|
9222
9321
|
),
|
|
9223
9322
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
9224
|
-
/* @__PURE__ */
|
|
9323
|
+
/* @__PURE__ */ jsx18("span", { className: "whitespace-pre-wrap break-words", children: item.text }),
|
|
9225
9324
|
item.details ? /* @__PURE__ */ jsxs13("details", { className: "mt-2 text-og-control", children: [
|
|
9226
|
-
/* @__PURE__ */
|
|
9227
|
-
/* @__PURE__ */
|
|
9325
|
+
/* @__PURE__ */ jsx18("summary", { className: "cursor-pointer font-medium", children: item.details.label }),
|
|
9326
|
+
/* @__PURE__ */ jsx18("pre", { className: "mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-all rounded-og-sm bg-black/5 p-2 font-mono dark:bg-white/5", children: JSON.stringify(item.details.value, null, 2) })
|
|
9228
9327
|
] }) : null
|
|
9229
9328
|
] }),
|
|
9230
|
-
item.action ? /* @__PURE__ */
|
|
9329
|
+
item.action ? /* @__PURE__ */ jsx18(
|
|
9231
9330
|
"a",
|
|
9232
9331
|
{
|
|
9233
9332
|
className: "shrink-0 rounded-og-sm border border-current/25 px-2 py-1 text-og-control font-medium hover:bg-current/10",
|
|
@@ -9273,7 +9372,7 @@ function AuthNeededRow({
|
|
|
9273
9372
|
return /* @__PURE__ */ jsxs13("div", { className: cn(enter && "animate-og-enter", "flex flex-col gap-2"), role: "status", children: [
|
|
9274
9373
|
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3 rounded-og-lg border border-og-border bg-og-surface-1 px-3.5 py-3 sm:flex-row sm:items-center", children: [
|
|
9275
9374
|
/* @__PURE__ */ jsxs13("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
9276
|
-
/* @__PURE__ */
|
|
9375
|
+
/* @__PURE__ */ jsx18(
|
|
9277
9376
|
AuthProviderLogo,
|
|
9278
9377
|
{
|
|
9279
9378
|
src: resolveProviderLogo?.(item.providerDomain) ?? null,
|
|
@@ -9281,8 +9380,8 @@ function AuthNeededRow({
|
|
|
9281
9380
|
}
|
|
9282
9381
|
),
|
|
9283
9382
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
9284
|
-
/* @__PURE__ */
|
|
9285
|
-
/* @__PURE__ */
|
|
9383
|
+
/* @__PURE__ */ jsx18("p", { className: "truncate text-og-md font-medium text-og-fg", children: title }),
|
|
9384
|
+
/* @__PURE__ */ jsx18("p", { className: "line-clamp-2 text-og-sm text-og-fg-subtle", children: reasonLine }),
|
|
9286
9385
|
recommendation ? /* @__PURE__ */ jsxs13("p", { className: "mt-1 truncate text-og-xs text-og-fg-muted", children: [
|
|
9287
9386
|
"Provider: ",
|
|
9288
9387
|
item.providerDomain
|
|
@@ -9304,7 +9403,7 @@ function AuthNeededRow({
|
|
|
9304
9403
|
"transition-colors hover:bg-og-accent-strong disabled:opacity-70 pointer-coarse:min-h-9"
|
|
9305
9404
|
),
|
|
9306
9405
|
children: [
|
|
9307
|
-
/* @__PURE__ */
|
|
9406
|
+
/* @__PURE__ */ jsx18(RefreshCwIcon, { className: cn("size-3.5", busy && "animate-og-spin"), "aria-hidden": true }),
|
|
9308
9407
|
busy ? "Opening\u2026" : actionLabel
|
|
9309
9408
|
]
|
|
9310
9409
|
}
|
|
@@ -9319,13 +9418,13 @@ function AuthNeededRow({
|
|
|
9319
9418
|
"transition-colors hover:bg-og-accent-strong pointer-coarse:min-h-9"
|
|
9320
9419
|
),
|
|
9321
9420
|
children: [
|
|
9322
|
-
/* @__PURE__ */
|
|
9421
|
+
/* @__PURE__ */ jsx18(RefreshCwIcon, { className: "size-3.5", "aria-hidden": true }),
|
|
9323
9422
|
actionLabel
|
|
9324
9423
|
]
|
|
9325
9424
|
}
|
|
9326
9425
|
) : null
|
|
9327
9426
|
] }),
|
|
9328
|
-
!unavailable ? /* @__PURE__ */
|
|
9427
|
+
!unavailable ? /* @__PURE__ */ jsx18("p", { className: "px-1 text-og-xs text-og-fg-subtle", children: recommendation ? "No access has been granted. Review and confirm the provider before continuing." : `This tool call wasn't replayed. After ${missing ? "connecting" : "reconnecting"}, send a new message to try again.` }) : null,
|
|
9329
9428
|
failed ? /* @__PURE__ */ jsxs13("p", { className: "px-1 text-og-xs text-og-status-failed", children: [
|
|
9330
9429
|
"Couldn't start ",
|
|
9331
9430
|
missing ? "connecting" : "reconnecting",
|
|
@@ -9339,12 +9438,12 @@ function AuthProviderLogo({ src, label }) {
|
|
|
9339
9438
|
const [failed, setFailed] = useState13(false);
|
|
9340
9439
|
useEffect11(() => setFailed(false), [src]);
|
|
9341
9440
|
const showImage = src && !failed;
|
|
9342
|
-
return /* @__PURE__ */
|
|
9441
|
+
return /* @__PURE__ */ jsx18(
|
|
9343
9442
|
"span",
|
|
9344
9443
|
{
|
|
9345
9444
|
className: "relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-og-md border border-og-border bg-og-surface-2 text-og-menu font-semibold text-og-fg-muted",
|
|
9346
9445
|
"aria-hidden": true,
|
|
9347
|
-
children: showImage ? /* @__PURE__ */
|
|
9446
|
+
children: showImage ? /* @__PURE__ */ jsx18(
|
|
9348
9447
|
"img",
|
|
9349
9448
|
{
|
|
9350
9449
|
src,
|
|
@@ -9354,7 +9453,7 @@ function AuthProviderLogo({ src, label }) {
|
|
|
9354
9453
|
className: "size-full object-contain p-1.5",
|
|
9355
9454
|
onError: () => setFailed(true)
|
|
9356
9455
|
}
|
|
9357
|
-
) : /* @__PURE__ */
|
|
9456
|
+
) : /* @__PURE__ */ jsx18("span", { children: monogram(label) })
|
|
9358
9457
|
}
|
|
9359
9458
|
);
|
|
9360
9459
|
}
|
|
@@ -9455,4 +9554,4 @@ export {
|
|
|
9455
9554
|
MessageTimeline,
|
|
9456
9555
|
TimelineRow
|
|
9457
9556
|
};
|
|
9458
|
-
//# sourceMappingURL=chunk-
|
|
9557
|
+
//# sourceMappingURL=chunk-YG4QEQF5.js.map
|