@opengeni/react 0.44.5 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/{chunk-L3EWO3UK.js → chunk-3PB7MIT6.js} +243 -22
- package/dist/chunk-3PB7MIT6.js.map +1 -0
- package/dist/{chunk-EHSYZ4KP.js → chunk-FGZUCXZF.js} +2 -2
- package/dist/{chunk-EHSYZ4KP.js.map → chunk-FGZUCXZF.js.map} +1 -1
- package/dist/{chunk-LYRJUU5V.js → chunk-LGVMUIRV.js} +543 -200
- package/dist/chunk-LGVMUIRV.js.map +1 -0
- package/dist/components/user-message-body.d.ts +36 -0
- package/dist/composer.js +2 -2
- package/dist/hooks/use-voice-input.d.ts +8 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/realtime.js +4 -4
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.d.ts +2 -0
- package/dist/session-ui.js +7 -3
- package/package.json +2 -2
- package/src/components/composer.tsx +4 -4
- package/src/components/copy-button.tsx +1 -1
- package/src/components/markdown.tsx +1 -1
- package/src/components/message-timeline.tsx +134 -25
- package/src/components/model-picker.tsx +1 -1
- package/src/components/model-policy-picker.tsx +1 -1
- package/src/components/user-message-body.tsx +341 -0
- package/src/hooks/use-codex-accounts.ts +1 -1
- package/src/hooks/use-voice-input.ts +320 -19
- package/src/index.ts +2 -0
- package/src/realtime/realtime-control.tsx +3 -3
- package/src/session-ui.ts +2 -0
- package/src/timeline/activity-rail.tsx +1 -1
- package/src/timeline/shared.tsx +3 -3
- package/src/timeline/turn-summary.tsx +4 -4
- package/dist/chunk-L3EWO3UK.js.map +0 -1
- package/dist/chunk-LYRJUU5V.js.map +0 -1
|
@@ -2104,9 +2104,9 @@ function ActivityDisclosure({
|
|
|
2104
2104
|
const rowClass = cn(
|
|
2105
2105
|
"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
2106
|
"text-og-fg-muted transition-colors duration-150",
|
|
2107
|
-
// A tool row is a touch target on coarse pointers: grow its
|
|
2108
|
-
//
|
|
2109
|
-
"pointer-coarse:py-2.5"
|
|
2107
|
+
// A tool row is a touch target on coarse pointers: grow its hit area to the
|
|
2108
|
+
// 44px mobile minimum without loosening the dense desktop rail.
|
|
2109
|
+
"pointer-coarse:min-h-11 pointer-coarse:py-2.5"
|
|
2110
2110
|
);
|
|
2111
2111
|
const inner = /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
2112
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" }),
|
|
@@ -4086,7 +4086,7 @@ function CopyButton({
|
|
|
4086
4086
|
"aria-label": tip,
|
|
4087
4087
|
onClick,
|
|
4088
4088
|
className: cn(
|
|
4089
|
-
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
|
|
4089
|
+
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm pointer-coarse:size-11",
|
|
4090
4090
|
"text-og-fg-subtle transition-[opacity,color,background-color] duration-150",
|
|
4091
4091
|
"hover:bg-og-surface-2/80 hover:text-og-fg",
|
|
4092
4092
|
"focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-og-accent/40",
|
|
@@ -4457,7 +4457,7 @@ var components = {
|
|
|
4457
4457
|
a: ({ children, ...props }) => /* @__PURE__ */ jsx12(
|
|
4458
4458
|
"a",
|
|
4459
4459
|
{
|
|
4460
|
-
className: "break-words font-medium text-og-accent underline-offset-2 hover:underline",
|
|
4460
|
+
className: "break-words font-medium text-og-accent-strong underline-offset-2 hover:underline",
|
|
4461
4461
|
target: "_blank",
|
|
4462
4462
|
rel: "noreferrer noopener",
|
|
4463
4463
|
...props,
|
|
@@ -4995,7 +4995,7 @@ function WorkerRow({
|
|
|
4995
4995
|
className: cn(
|
|
4996
4996
|
"group/worker -mx-1.5 flex w-full items-start gap-2 rounded-og-sm px-1.5 py-1.5 text-left",
|
|
4997
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"
|
|
4998
|
+
"pointer-coarse:min-h-11 pointer-coarse:py-2.5"
|
|
4999
4999
|
),
|
|
5000
5000
|
children: inner
|
|
5001
5001
|
}
|
|
@@ -5227,8 +5227,8 @@ function TurnSummary({
|
|
|
5227
5227
|
// as a turn landmark above any nested cluster rows it groups.
|
|
5228
5228
|
"group flex w-full items-center rounded-og-sm text-left transition-colors",
|
|
5229
5229
|
// A folded turn is a touch target on coarse pointers: grow the row so it
|
|
5230
|
-
// clears the
|
|
5231
|
-
"pointer-coarse:py-2.5",
|
|
5230
|
+
// clears the 44px minimum without disturbing the calm desktop rhythm.
|
|
5231
|
+
"pointer-coarse:min-h-11 pointer-coarse:py-2.5",
|
|
5232
5232
|
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
5233
|
// A failed fold keeps its red accent (glyph + inline reason below) and a
|
|
5234
5234
|
// faint red hover wash so attention still lands there; every other
|
|
@@ -5407,7 +5407,7 @@ var BUILT_IN_TURN_SUMMARY_FACETS = Object.freeze([
|
|
|
5407
5407
|
id: "compacted",
|
|
5408
5408
|
summarize: ({ contextCompactionCount }) => contextCompactionCount > 0 ? {
|
|
5409
5409
|
content: contextCompactionCount === 1 ? "compacted" : `${contextCompactionCount} compacts`,
|
|
5410
|
-
ariaLabel: contextCompactionCount === 1 ? "Conversation
|
|
5410
|
+
ariaLabel: contextCompactionCount === 1 ? "Conversation history compacted" : `${contextCompactionCount} conversation history compactions`
|
|
5411
5411
|
} : null
|
|
5412
5412
|
},
|
|
5413
5413
|
{
|
|
@@ -5463,8 +5463,279 @@ function formatDurationFacet(durationMs) {
|
|
|
5463
5463
|
return `${hours}h ${String(minutes).padStart(2, "0")}m`;
|
|
5464
5464
|
}
|
|
5465
5465
|
|
|
5466
|
-
// src/components/
|
|
5466
|
+
// src/components/user-message-body.tsx
|
|
5467
|
+
import {
|
|
5468
|
+
createContext as createContext8,
|
|
5469
|
+
useCallback as useCallback2,
|
|
5470
|
+
useContext as useContext8,
|
|
5471
|
+
useId as useId3,
|
|
5472
|
+
useLayoutEffect as useLayoutEffect3,
|
|
5473
|
+
useRef as useRef9,
|
|
5474
|
+
useState as useState11
|
|
5475
|
+
} from "react";
|
|
5467
5476
|
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5477
|
+
var FALLBACK_LINE_THRESHOLD = 12;
|
|
5478
|
+
var FALLBACK_TEXT_THRESHOLD = 900;
|
|
5479
|
+
var FALLBACK_UNBROKEN_THRESHOLD = 260;
|
|
5480
|
+
var INTERACTIVE_DESCENDANT_SELECTOR = [
|
|
5481
|
+
"a[href]",
|
|
5482
|
+
"area[href]",
|
|
5483
|
+
"button",
|
|
5484
|
+
"input:not([type='hidden'])",
|
|
5485
|
+
"select",
|
|
5486
|
+
"textarea",
|
|
5487
|
+
"iframe",
|
|
5488
|
+
"object",
|
|
5489
|
+
"embed",
|
|
5490
|
+
"audio[controls]",
|
|
5491
|
+
"video[controls]",
|
|
5492
|
+
"summary",
|
|
5493
|
+
"[contenteditable]:not([contenteditable='false'])",
|
|
5494
|
+
"[tabindex]",
|
|
5495
|
+
"[role='button']",
|
|
5496
|
+
"[role='link']",
|
|
5497
|
+
"[role='checkbox']",
|
|
5498
|
+
"[role='radio']",
|
|
5499
|
+
"[role='switch']",
|
|
5500
|
+
"[role='slider']",
|
|
5501
|
+
"[role='spinbutton']",
|
|
5502
|
+
"[role='textbox']",
|
|
5503
|
+
"[role='combobox']",
|
|
5504
|
+
"[role='listbox']",
|
|
5505
|
+
"[role='menuitem']",
|
|
5506
|
+
"[role='option']",
|
|
5507
|
+
"[role='tab']",
|
|
5508
|
+
"[role='treeitem']"
|
|
5509
|
+
].join(",");
|
|
5510
|
+
function composedParentElement(element) {
|
|
5511
|
+
if (element.assignedSlot) {
|
|
5512
|
+
return element.assignedSlot;
|
|
5513
|
+
}
|
|
5514
|
+
if (element.parentElement) {
|
|
5515
|
+
return element.parentElement;
|
|
5516
|
+
}
|
|
5517
|
+
const root = element.getRootNode();
|
|
5518
|
+
return typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot ? root.host : null;
|
|
5519
|
+
}
|
|
5520
|
+
function hasComposedInertAncestor(element, boundary) {
|
|
5521
|
+
let current = element;
|
|
5522
|
+
while (current) {
|
|
5523
|
+
if (current.hasAttribute("inert")) {
|
|
5524
|
+
return true;
|
|
5525
|
+
}
|
|
5526
|
+
if (current === boundary) {
|
|
5527
|
+
return false;
|
|
5528
|
+
}
|
|
5529
|
+
current = composedParentElement(current);
|
|
5530
|
+
}
|
|
5531
|
+
return false;
|
|
5532
|
+
}
|
|
5533
|
+
function collectInteractionBoundaries(root) {
|
|
5534
|
+
const boundaries = [];
|
|
5535
|
+
const scopes = [root];
|
|
5536
|
+
for (let scopeIndex = 0; scopeIndex < scopes.length; scopeIndex += 1) {
|
|
5537
|
+
for (const element of scopes[scopeIndex].querySelectorAll("*")) {
|
|
5538
|
+
if (!(element instanceof HTMLElement)) {
|
|
5539
|
+
continue;
|
|
5540
|
+
}
|
|
5541
|
+
const shadowRoot = element.shadowRoot;
|
|
5542
|
+
const opaqueCustomElement = element.localName.includes("-") && !shadowRoot;
|
|
5543
|
+
if (element.matches(INTERACTIVE_DESCENDANT_SELECTOR) || opaqueCustomElement) {
|
|
5544
|
+
boundaries.push(element);
|
|
5545
|
+
}
|
|
5546
|
+
if (shadowRoot) {
|
|
5547
|
+
scopes.push(shadowRoot);
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
return boundaries;
|
|
5552
|
+
}
|
|
5553
|
+
function isFullyInsideVisiblePreview(rect, clipRect) {
|
|
5554
|
+
return rect.width > 0 && rect.height > 0 && rect.top >= clipRect.top - 1 && rect.bottom <= clipRect.bottom + 1 && rect.left >= clipRect.left - 1 && rect.right <= clipRect.right + 1;
|
|
5555
|
+
}
|
|
5556
|
+
var UserMessageDisclosureContext = createContext8(null);
|
|
5557
|
+
function UserMessageDisclosureProvider({
|
|
5558
|
+
value,
|
|
5559
|
+
children
|
|
5560
|
+
}) {
|
|
5561
|
+
return /* @__PURE__ */ jsx15(UserMessageDisclosureContext.Provider, { value, children });
|
|
5562
|
+
}
|
|
5563
|
+
function userMessageLikelyNeedsDisclosure(text) {
|
|
5564
|
+
const lines = text.split(/\r?\n/);
|
|
5565
|
+
return lines.length > FALLBACK_LINE_THRESHOLD || text.length > FALLBACK_TEXT_THRESHOLD || lines.some((line) => line.length > FALLBACK_UNBROKEN_THRESHOLD);
|
|
5566
|
+
}
|
|
5567
|
+
function UserMessageBody({ messageId, text, children, className }) {
|
|
5568
|
+
const disclosure = useContext8(UserMessageDisclosureContext);
|
|
5569
|
+
const [expanded, setExpanded] = useState11(
|
|
5570
|
+
() => disclosure?.expandedByMessageId.get(messageId) ?? false
|
|
5571
|
+
);
|
|
5572
|
+
const [collapsible, setCollapsible] = useState11(() => userMessageLikelyNeedsDisclosure(text));
|
|
5573
|
+
const rootRef = useRef9(null);
|
|
5574
|
+
const clipRef = useRef9(null);
|
|
5575
|
+
const contentRef = useRef9(null);
|
|
5576
|
+
const thresholdRef = useRef9(null);
|
|
5577
|
+
const pendingRestoreRef = useRef9(null);
|
|
5578
|
+
const managedInertDescendantsRef = useRef9(/* @__PURE__ */ new Set());
|
|
5579
|
+
const contentId = `og-user-message-${useId3().replace(/:/g, "")}`;
|
|
5580
|
+
const collapsed = collapsible && !expanded;
|
|
5581
|
+
const restoreManagedInertDescendants = useCallback2(() => {
|
|
5582
|
+
for (const descendant of managedInertDescendantsRef.current) {
|
|
5583
|
+
if (descendant.hasAttribute("data-og-user-message-managed-inert")) {
|
|
5584
|
+
descendant.removeAttribute("inert");
|
|
5585
|
+
descendant.removeAttribute("data-og-user-message-managed-inert");
|
|
5586
|
+
}
|
|
5587
|
+
}
|
|
5588
|
+
managedInertDescendantsRef.current.clear();
|
|
5589
|
+
}, []);
|
|
5590
|
+
const syncCollapsedInteractivity = useCallback2(() => {
|
|
5591
|
+
restoreManagedInertDescendants();
|
|
5592
|
+
if (!collapsed) {
|
|
5593
|
+
return;
|
|
5594
|
+
}
|
|
5595
|
+
const clip = clipRef.current;
|
|
5596
|
+
const content = contentRef.current;
|
|
5597
|
+
if (!clip || !content) {
|
|
5598
|
+
return;
|
|
5599
|
+
}
|
|
5600
|
+
const clipRect = clip.getBoundingClientRect();
|
|
5601
|
+
if (clipRect.height <= 0) {
|
|
5602
|
+
return;
|
|
5603
|
+
}
|
|
5604
|
+
for (const descendant of collectInteractionBoundaries(content)) {
|
|
5605
|
+
if (hasComposedInertAncestor(descendant, content)) {
|
|
5606
|
+
continue;
|
|
5607
|
+
}
|
|
5608
|
+
const rect = descendant.getBoundingClientRect();
|
|
5609
|
+
if (isFullyInsideVisiblePreview(rect, clipRect)) {
|
|
5610
|
+
continue;
|
|
5611
|
+
}
|
|
5612
|
+
descendant.setAttribute("inert", "");
|
|
5613
|
+
descendant.setAttribute("data-og-user-message-managed-inert", "");
|
|
5614
|
+
managedInertDescendantsRef.current.add(descendant);
|
|
5615
|
+
}
|
|
5616
|
+
}, [collapsed, restoreManagedInertDescendants]);
|
|
5617
|
+
const measure = useCallback2(() => {
|
|
5618
|
+
const content = contentRef.current;
|
|
5619
|
+
const threshold = thresholdRef.current;
|
|
5620
|
+
if (!content || !threshold) {
|
|
5621
|
+
return;
|
|
5622
|
+
}
|
|
5623
|
+
const renderedHeight = Math.max(content.scrollHeight, content.getBoundingClientRect().height);
|
|
5624
|
+
const collapseHeight = Math.max(
|
|
5625
|
+
threshold.offsetHeight,
|
|
5626
|
+
threshold.getBoundingClientRect().height
|
|
5627
|
+
);
|
|
5628
|
+
setCollapsible(
|
|
5629
|
+
renderedHeight > 0 && collapseHeight > 0 ? renderedHeight > collapseHeight + 1 : userMessageLikelyNeedsDisclosure(text)
|
|
5630
|
+
);
|
|
5631
|
+
}, [text]);
|
|
5632
|
+
useLayoutEffect3(() => {
|
|
5633
|
+
measure();
|
|
5634
|
+
const content = contentRef.current;
|
|
5635
|
+
const threshold = thresholdRef.current;
|
|
5636
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => {
|
|
5637
|
+
measure();
|
|
5638
|
+
syncCollapsedInteractivity();
|
|
5639
|
+
});
|
|
5640
|
+
if (content) {
|
|
5641
|
+
observer?.observe(content);
|
|
5642
|
+
}
|
|
5643
|
+
if (threshold) {
|
|
5644
|
+
observer?.observe(threshold);
|
|
5645
|
+
}
|
|
5646
|
+
const handleResize = () => {
|
|
5647
|
+
measure();
|
|
5648
|
+
syncCollapsedInteractivity();
|
|
5649
|
+
};
|
|
5650
|
+
window.addEventListener("resize", handleResize);
|
|
5651
|
+
return () => {
|
|
5652
|
+
observer?.disconnect();
|
|
5653
|
+
window.removeEventListener("resize", handleResize);
|
|
5654
|
+
};
|
|
5655
|
+
}, [measure, syncCollapsedInteractivity]);
|
|
5656
|
+
useLayoutEffect3(() => {
|
|
5657
|
+
syncCollapsedInteractivity();
|
|
5658
|
+
return restoreManagedInertDescendants;
|
|
5659
|
+
});
|
|
5660
|
+
useLayoutEffect3(() => {
|
|
5661
|
+
const restore = pendingRestoreRef.current;
|
|
5662
|
+
pendingRestoreRef.current = null;
|
|
5663
|
+
restore?.();
|
|
5664
|
+
}, [expanded]);
|
|
5665
|
+
const toggle = (control) => {
|
|
5666
|
+
const root = rootRef.current;
|
|
5667
|
+
pendingRestoreRef.current = root && disclosure ? disclosure.beginChange(root, control) : null;
|
|
5668
|
+
const next = !expanded;
|
|
5669
|
+
if (!next && contentRef.current?.contains(document.activeElement)) {
|
|
5670
|
+
control.focus({ preventScroll: true });
|
|
5671
|
+
}
|
|
5672
|
+
disclosure?.expandedByMessageId.set(messageId, next);
|
|
5673
|
+
setExpanded(next);
|
|
5674
|
+
};
|
|
5675
|
+
return /* @__PURE__ */ jsxs12(
|
|
5676
|
+
"div",
|
|
5677
|
+
{
|
|
5678
|
+
ref: rootRef,
|
|
5679
|
+
"data-og-user-message-body": "",
|
|
5680
|
+
"data-og-message-id": messageId,
|
|
5681
|
+
"data-og-expanded": expanded ? "true" : "false",
|
|
5682
|
+
className: cn("relative min-w-0", className),
|
|
5683
|
+
children: [
|
|
5684
|
+
/* @__PURE__ */ jsx15(
|
|
5685
|
+
"span",
|
|
5686
|
+
{
|
|
5687
|
+
ref: thresholdRef,
|
|
5688
|
+
"aria-hidden": "true",
|
|
5689
|
+
className: "pointer-events-none absolute h-56 w-0 invisible sm:h-72"
|
|
5690
|
+
}
|
|
5691
|
+
),
|
|
5692
|
+
/* @__PURE__ */ jsxs12(
|
|
5693
|
+
"div",
|
|
5694
|
+
{
|
|
5695
|
+
ref: clipRef,
|
|
5696
|
+
id: contentId,
|
|
5697
|
+
"data-og-user-message-clip": "",
|
|
5698
|
+
className: cn("relative min-w-0", collapsed && "max-h-56 overflow-hidden sm:max-h-72"),
|
|
5699
|
+
children: [
|
|
5700
|
+
/* @__PURE__ */ jsx15(
|
|
5701
|
+
"div",
|
|
5702
|
+
{
|
|
5703
|
+
ref: contentRef,
|
|
5704
|
+
"data-og-user-message-content": "",
|
|
5705
|
+
className: "min-w-0 [overflow-wrap:anywhere]",
|
|
5706
|
+
children
|
|
5707
|
+
}
|
|
5708
|
+
),
|
|
5709
|
+
collapsed ? /* @__PURE__ */ jsx15(
|
|
5710
|
+
"span",
|
|
5711
|
+
{
|
|
5712
|
+
"aria-hidden": "true",
|
|
5713
|
+
"data-og-user-message-fade": "",
|
|
5714
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-og-surface-2 via-og-surface-2/90 to-transparent"
|
|
5715
|
+
}
|
|
5716
|
+
) : null
|
|
5717
|
+
]
|
|
5718
|
+
}
|
|
5719
|
+
),
|
|
5720
|
+
collapsible ? /* @__PURE__ */ jsx15(
|
|
5721
|
+
"button",
|
|
5722
|
+
{
|
|
5723
|
+
type: "button",
|
|
5724
|
+
"aria-controls": contentId,
|
|
5725
|
+
"aria-expanded": expanded,
|
|
5726
|
+
"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",
|
|
5728
|
+
onClick: (event) => toggle(event.currentTarget),
|
|
5729
|
+
children: expanded ? "Show less" : "Show more"
|
|
5730
|
+
}
|
|
5731
|
+
) : null
|
|
5732
|
+
]
|
|
5733
|
+
}
|
|
5734
|
+
);
|
|
5735
|
+
}
|
|
5736
|
+
|
|
5737
|
+
// src/components/session-status.tsx
|
|
5738
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5468
5739
|
var SESSION_STATUS_META = {
|
|
5469
5740
|
queued: {
|
|
5470
5741
|
label: "Queued",
|
|
@@ -5517,7 +5788,7 @@ var SESSION_STATUS_META = {
|
|
|
5517
5788
|
};
|
|
5518
5789
|
function SessionStatus({ status, label, size = "md", className }) {
|
|
5519
5790
|
const meta = SESSION_STATUS_META[status];
|
|
5520
|
-
return /* @__PURE__ */
|
|
5791
|
+
return /* @__PURE__ */ jsxs13(
|
|
5521
5792
|
"span",
|
|
5522
5793
|
{
|
|
5523
5794
|
"data-status": status,
|
|
@@ -5528,7 +5799,7 @@ function SessionStatus({ status, label, size = "md", className }) {
|
|
|
5528
5799
|
className
|
|
5529
5800
|
),
|
|
5530
5801
|
children: [
|
|
5531
|
-
/* @__PURE__ */
|
|
5802
|
+
/* @__PURE__ */ jsx16(StatusDot, { status, className: size === "sm" ? "size-1" : "size-1.5" }),
|
|
5532
5803
|
label ?? meta.label
|
|
5533
5804
|
]
|
|
5534
5805
|
}
|
|
@@ -5536,7 +5807,7 @@ function SessionStatus({ status, label, size = "md", className }) {
|
|
|
5536
5807
|
}
|
|
5537
5808
|
function StatusDot({ status, className }) {
|
|
5538
5809
|
const meta = SESSION_STATUS_META[status];
|
|
5539
|
-
return /* @__PURE__ */
|
|
5810
|
+
return /* @__PURE__ */ jsx16(
|
|
5540
5811
|
"span",
|
|
5541
5812
|
{
|
|
5542
5813
|
className: cn(
|
|
@@ -5544,7 +5815,7 @@ function StatusDot({ status, className }) {
|
|
|
5544
5815
|
meta.dotClassName,
|
|
5545
5816
|
className
|
|
5546
5817
|
),
|
|
5547
|
-
children: meta.pulse ? /* @__PURE__ */
|
|
5818
|
+
children: meta.pulse ? /* @__PURE__ */ jsx16("span", { className: cn("absolute inset-0 animate-og-pulse rounded-full", meta.dotClassName) }) : null
|
|
5548
5819
|
}
|
|
5549
5820
|
);
|
|
5550
5821
|
}
|
|
@@ -5574,12 +5845,12 @@ import { Collapsible as Collapsible2 } from "radix-ui";
|
|
|
5574
5845
|
import {
|
|
5575
5846
|
Component as Component2,
|
|
5576
5847
|
memo as memo2,
|
|
5577
|
-
useCallback as
|
|
5848
|
+
useCallback as useCallback3,
|
|
5578
5849
|
useEffect as useEffect9,
|
|
5579
|
-
useLayoutEffect as
|
|
5850
|
+
useLayoutEffect as useLayoutEffect4,
|
|
5580
5851
|
useMemo as useMemo5,
|
|
5581
|
-
useRef as
|
|
5582
|
-
useState as
|
|
5852
|
+
useRef as useRef10,
|
|
5853
|
+
useState as useState12
|
|
5583
5854
|
} from "react";
|
|
5584
5855
|
|
|
5585
5856
|
// src/components/tip-follow.ts
|
|
@@ -5908,7 +6179,7 @@ function machineInputSummaryIsUseful(kind, cleanedSummary) {
|
|
|
5908
6179
|
}
|
|
5909
6180
|
|
|
5910
6181
|
// src/components/message-timeline.tsx
|
|
5911
|
-
import { Fragment as Fragment7, jsx as
|
|
6182
|
+
import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5912
6183
|
var PIN_THRESHOLD_PX = 48;
|
|
5913
6184
|
var OLDER_PREFETCH_MARGIN_PX = 400;
|
|
5914
6185
|
var OLDER_PREFETCH_ROOT_MARGIN = `${OLDER_PREFETCH_MARGIN_PX}px 0px 0px 0px`;
|
|
@@ -5975,58 +6246,60 @@ function MessageTimeline({
|
|
|
5975
6246
|
const resolvedItems = useMemo5(() => items ?? buildTimeline(events ?? []), [items, events]);
|
|
5976
6247
|
const allGroups = useMemo5(() => groupTimeline(resolvedItems), [resolvedItems]);
|
|
5977
6248
|
const groups = useStableTimelineGroupKeys(allGroups);
|
|
5978
|
-
const scrollRef =
|
|
5979
|
-
const topSentinelRef =
|
|
5980
|
-
const bottomSentinelRef =
|
|
5981
|
-
const previousBulkFirstKeyRef =
|
|
5982
|
-
const [pinned, setPinned] =
|
|
5983
|
-
const [bulkActive, setBulkActive] =
|
|
5984
|
-
const olderPrefetchArmedRef =
|
|
5985
|
-
const [olderPrefetchArmed, setOlderPrefetchArmed] =
|
|
5986
|
-
const olderLoadGateRef =
|
|
5987
|
-
const resizeFollowRafRef =
|
|
6249
|
+
const scrollRef = useRef10(null);
|
|
6250
|
+
const topSentinelRef = useRef10(null);
|
|
6251
|
+
const bottomSentinelRef = useRef10(null);
|
|
6252
|
+
const previousBulkFirstKeyRef = useRef10(void 0);
|
|
6253
|
+
const [pinned, setPinned] = useState12(true);
|
|
6254
|
+
const [bulkActive, setBulkActive] = useState12(true);
|
|
6255
|
+
const olderPrefetchArmedRef = useRef10(false);
|
|
6256
|
+
const [olderPrefetchArmed, setOlderPrefetchArmed] = useState12(false);
|
|
6257
|
+
const olderLoadGateRef = useRef10("armed");
|
|
6258
|
+
const resizeFollowRafRef = useRef10(null);
|
|
5988
6259
|
const firstGroupKey = allGroups[0] ? timelineGroupKey(allGroups[0]) : null;
|
|
5989
|
-
const [revealed, setRevealed] =
|
|
5990
|
-
const pinnedRef =
|
|
5991
|
-
const hasNewerRef =
|
|
6260
|
+
const [revealed, setRevealed] = useState12(false);
|
|
6261
|
+
const pinnedRef = useRef10(true);
|
|
6262
|
+
const hasNewerRef = useRef10(hasNewer);
|
|
5992
6263
|
hasNewerRef.current = hasNewer;
|
|
5993
|
-
const wantPinRef =
|
|
5994
|
-
const pendingJumpToStartRef =
|
|
5995
|
-
const jumpToStartSeqRef =
|
|
5996
|
-
const previousFirstItemIdRef =
|
|
5997
|
-
const previousScrollHeightRef =
|
|
5998
|
-
const lastScrollTopRef =
|
|
5999
|
-
const lastMaxScrollRef =
|
|
6000
|
-
const lastScrollHeightRef =
|
|
6001
|
-
const lastClientHeightRef =
|
|
6002
|
-
const readerIntentArmRef =
|
|
6003
|
-
const programmaticScrollRef =
|
|
6004
|
-
const
|
|
6005
|
-
const
|
|
6006
|
-
const
|
|
6007
|
-
const
|
|
6008
|
-
const
|
|
6009
|
-
const
|
|
6264
|
+
const wantPinRef = useRef10(false);
|
|
6265
|
+
const pendingJumpToStartRef = useRef10(false);
|
|
6266
|
+
const jumpToStartSeqRef = useRef10(0);
|
|
6267
|
+
const previousFirstItemIdRef = useRef10(null);
|
|
6268
|
+
const previousScrollHeightRef = useRef10(0);
|
|
6269
|
+
const lastScrollTopRef = useRef10(0);
|
|
6270
|
+
const lastMaxScrollRef = useRef10(0);
|
|
6271
|
+
const lastScrollHeightRef = useRef10(0);
|
|
6272
|
+
const lastClientHeightRef = useRef10(0);
|
|
6273
|
+
const readerIntentArmRef = useRef10(false);
|
|
6274
|
+
const programmaticScrollRef = useRef10(0);
|
|
6275
|
+
const disclosureKeepsUnpinnedRef = useRef10(false);
|
|
6276
|
+
const pendingReaderLeaveRef = useRef10(false);
|
|
6277
|
+
const leaveFallbackRafRef = useRef10(null);
|
|
6278
|
+
const foldMemoryRef = useRef10(/* @__PURE__ */ new Map());
|
|
6279
|
+
const userMessageDisclosureMemoryRef = useRef10(/* @__PURE__ */ new Map());
|
|
6280
|
+
const seenActivityIdsRef = useRef10(/* @__PURE__ */ new Set());
|
|
6281
|
+
const groupKeyByItemIdRef = useRef10(/* @__PURE__ */ new Map());
|
|
6282
|
+
const groupOffsetByKeyRef = useRef10(/* @__PURE__ */ new Map());
|
|
6010
6283
|
const firstItemId = resolvedItems[0]?.id ?? null;
|
|
6011
6284
|
const firstKeyChangedForBulk = previousBulkFirstKeyRef.current !== void 0 && previousBulkFirstKeyRef.current !== firstGroupKey;
|
|
6012
6285
|
const bulkRender = allGroups.length > 0 && (bulkActive || firstKeyChangedForBulk);
|
|
6013
|
-
const applyPinned =
|
|
6286
|
+
const applyPinned = useCallback3((value) => {
|
|
6014
6287
|
if (pinnedRef.current !== value) {
|
|
6015
6288
|
pinnedRef.current = value;
|
|
6016
6289
|
setPinned(value);
|
|
6017
6290
|
}
|
|
6018
6291
|
}, []);
|
|
6019
|
-
const revealedRef =
|
|
6292
|
+
const revealedRef = useRef10(revealed);
|
|
6020
6293
|
revealedRef.current = revealed;
|
|
6021
|
-
const followRef =
|
|
6022
|
-
const followFrameRef =
|
|
6023
|
-
const syncScrollBaseline =
|
|
6294
|
+
const followRef = useRef10(createTipFollowState());
|
|
6295
|
+
const followFrameRef = useRef10(null);
|
|
6296
|
+
const syncScrollBaseline = useCallback3((node) => {
|
|
6024
6297
|
lastScrollTopRef.current = node.scrollTop;
|
|
6025
6298
|
lastMaxScrollRef.current = maxScrollOf(node);
|
|
6026
6299
|
lastScrollHeightRef.current = node.scrollHeight;
|
|
6027
6300
|
lastClientHeightRef.current = node.clientHeight;
|
|
6028
6301
|
}, []);
|
|
6029
|
-
const writeScrollTop =
|
|
6302
|
+
const writeScrollTop = useCallback3((node, top) => {
|
|
6030
6303
|
const next = Math.max(0, top);
|
|
6031
6304
|
const before = node.scrollTop;
|
|
6032
6305
|
if (before === next) {
|
|
@@ -6038,24 +6311,24 @@ function MessageTimeline({
|
|
|
6038
6311
|
programmaticScrollRef.current -= 1;
|
|
6039
6312
|
}
|
|
6040
6313
|
}, []);
|
|
6041
|
-
const cancelLeaveFallback =
|
|
6314
|
+
const cancelLeaveFallback = useCallback3(() => {
|
|
6042
6315
|
if (leaveFallbackRafRef.current !== null) {
|
|
6043
6316
|
cancelFrame(leaveFallbackRafRef.current);
|
|
6044
6317
|
leaveFallbackRafRef.current = null;
|
|
6045
6318
|
}
|
|
6046
6319
|
}, []);
|
|
6047
|
-
const clearPendingReaderLeave =
|
|
6320
|
+
const clearPendingReaderLeave = useCallback3(() => {
|
|
6048
6321
|
pendingReaderLeaveRef.current = false;
|
|
6049
6322
|
cancelLeaveFallback();
|
|
6050
6323
|
}, [cancelLeaveFallback]);
|
|
6051
|
-
const stopFollow =
|
|
6324
|
+
const stopFollow = useCallback3(() => {
|
|
6052
6325
|
followRef.current = tipFollowCancel(followRef.current);
|
|
6053
6326
|
if (followFrameRef.current !== null) {
|
|
6054
6327
|
cancelFrame(followFrameRef.current);
|
|
6055
6328
|
followFrameRef.current = null;
|
|
6056
6329
|
}
|
|
6057
6330
|
}, []);
|
|
6058
|
-
const releasePinFromReader =
|
|
6331
|
+
const releasePinFromReader = useCallback3(
|
|
6059
6332
|
(node) => {
|
|
6060
6333
|
if (!autoFollow || !pinnedRef.current || hasNewerRef.current) {
|
|
6061
6334
|
return;
|
|
@@ -6077,7 +6350,7 @@ function MessageTimeline({
|
|
|
6077
6350
|
},
|
|
6078
6351
|
[autoFollow, applyPinned, clearPendingReaderLeave, stopFollow]
|
|
6079
6352
|
);
|
|
6080
|
-
const releasePinAfterScrollSettled =
|
|
6353
|
+
const releasePinAfterScrollSettled = useCallback3(
|
|
6081
6354
|
(node) => {
|
|
6082
6355
|
if (!autoFollow || !pinnedRef.current || hasNewerRef.current) {
|
|
6083
6356
|
return;
|
|
@@ -6099,7 +6372,7 @@ function MessageTimeline({
|
|
|
6099
6372
|
},
|
|
6100
6373
|
[autoFollow, clearPendingReaderLeave, releasePinFromReader]
|
|
6101
6374
|
);
|
|
6102
|
-
const scheduleLeaveFallback =
|
|
6375
|
+
const scheduleLeaveFallback = useCallback3(() => {
|
|
6103
6376
|
if (supportsScrollEndEvent()) {
|
|
6104
6377
|
return;
|
|
6105
6378
|
}
|
|
@@ -6113,15 +6386,16 @@ function MessageTimeline({
|
|
|
6113
6386
|
});
|
|
6114
6387
|
}, [cancelLeaveFallback, releasePinAfterScrollSettled]);
|
|
6115
6388
|
const onWheel = (event) => {
|
|
6116
|
-
if (event.deltaY >= 0) {
|
|
6117
|
-
return;
|
|
6118
|
-
}
|
|
6119
6389
|
if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) {
|
|
6120
6390
|
return;
|
|
6121
6391
|
}
|
|
6122
6392
|
if (wheelConsumedByNestedScrollable(event)) {
|
|
6123
6393
|
return;
|
|
6124
6394
|
}
|
|
6395
|
+
disclosureKeepsUnpinnedRef.current = false;
|
|
6396
|
+
if (event.deltaY >= 0) {
|
|
6397
|
+
return;
|
|
6398
|
+
}
|
|
6125
6399
|
const node = event.currentTarget instanceof HTMLElement ? event.currentTarget : scrollRef.current;
|
|
6126
6400
|
releasePinFromReader(node);
|
|
6127
6401
|
};
|
|
@@ -6132,16 +6406,20 @@ function MessageTimeline({
|
|
|
6132
6406
|
if (event.target instanceof Element && event.target.closest("button, a, input, textarea, select, [role='button']")) {
|
|
6133
6407
|
return;
|
|
6134
6408
|
}
|
|
6409
|
+
disclosureKeepsUnpinnedRef.current = false;
|
|
6135
6410
|
readerIntentArmRef.current = true;
|
|
6136
6411
|
};
|
|
6137
6412
|
const onKeyDown = (event) => {
|
|
6413
|
+
if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "PageUp" || event.key === "PageDown" || event.key === "Home" || event.key === "End") {
|
|
6414
|
+
disclosureKeepsUnpinnedRef.current = false;
|
|
6415
|
+
}
|
|
6138
6416
|
if (event.key !== "ArrowUp" && event.key !== "PageUp" && event.key !== "Home") {
|
|
6139
6417
|
return;
|
|
6140
6418
|
}
|
|
6141
6419
|
const node = event.currentTarget instanceof HTMLElement ? event.currentTarget : scrollRef.current;
|
|
6142
6420
|
releasePinFromReader(node);
|
|
6143
6421
|
};
|
|
6144
|
-
const snapToBottom =
|
|
6422
|
+
const snapToBottom = useCallback3(
|
|
6145
6423
|
(node) => {
|
|
6146
6424
|
stopFollow();
|
|
6147
6425
|
cancelLeaveFallback();
|
|
@@ -6156,8 +6434,53 @@ function MessageTimeline({
|
|
|
6156
6434
|
},
|
|
6157
6435
|
[cancelLeaveFallback, stopFollow, syncScrollBaseline, writeScrollTop]
|
|
6158
6436
|
);
|
|
6159
|
-
const
|
|
6160
|
-
|
|
6437
|
+
const beginUserMessageDisclosureChange = useCallback3(
|
|
6438
|
+
(messageBody, disclosureControl) => {
|
|
6439
|
+
const node = scrollRef.current;
|
|
6440
|
+
if (!node || !node.contains(messageBody)) {
|
|
6441
|
+
return null;
|
|
6442
|
+
}
|
|
6443
|
+
const keepBottom = autoFollow && pinnedRef.current && !hasNewerRef.current;
|
|
6444
|
+
if (keepBottom) {
|
|
6445
|
+
return () => {
|
|
6446
|
+
const current = scrollRef.current;
|
|
6447
|
+
if (current) {
|
|
6448
|
+
snapToBottom(current);
|
|
6449
|
+
}
|
|
6450
|
+
};
|
|
6451
|
+
}
|
|
6452
|
+
disclosureKeepsUnpinnedRef.current = true;
|
|
6453
|
+
const scrollerRect = node.getBoundingClientRect();
|
|
6454
|
+
const group = messageBody.closest("[data-og-timeline-group-anchor]");
|
|
6455
|
+
const groupRect = group?.getBoundingClientRect();
|
|
6456
|
+
const anchor = group && groupRect && groupRect.top >= scrollerRect.top - 1 && groupRect.top < scrollerRect.bottom ? group : disclosureControl;
|
|
6457
|
+
const beforeTop = anchor.getBoundingClientRect().top - scrollerRect.top;
|
|
6458
|
+
return () => {
|
|
6459
|
+
const current = scrollRef.current;
|
|
6460
|
+
if (!current || !current.contains(anchor)) {
|
|
6461
|
+
return;
|
|
6462
|
+
}
|
|
6463
|
+
const currentScrollerTop = current.getBoundingClientRect().top;
|
|
6464
|
+
const afterTop = anchor.getBoundingClientRect().top - currentScrollerTop;
|
|
6465
|
+
const delta = afterTop - beforeTop;
|
|
6466
|
+
if (Math.abs(delta) > 0.5) {
|
|
6467
|
+
writeScrollTop(current, current.scrollTop + delta);
|
|
6468
|
+
}
|
|
6469
|
+
applyPinned(false);
|
|
6470
|
+
syncScrollBaseline(current);
|
|
6471
|
+
};
|
|
6472
|
+
},
|
|
6473
|
+
[applyPinned, autoFollow, snapToBottom, syncScrollBaseline, writeScrollTop]
|
|
6474
|
+
);
|
|
6475
|
+
const userMessageDisclosureContext = useMemo5(
|
|
6476
|
+
() => ({
|
|
6477
|
+
expandedByMessageId: userMessageDisclosureMemoryRef.current,
|
|
6478
|
+
beginChange: beginUserMessageDisclosureChange
|
|
6479
|
+
}),
|
|
6480
|
+
[beginUserMessageDisclosureChange]
|
|
6481
|
+
);
|
|
6482
|
+
const driveFollowRef = useRef10(() => void 0);
|
|
6483
|
+
const driveFollow = useCallback3(
|
|
6161
6484
|
(node, nowMs) => {
|
|
6162
6485
|
if (!pinnedRef.current || hasNewerRef.current) {
|
|
6163
6486
|
stopFollow();
|
|
@@ -6247,7 +6570,7 @@ function MessageTimeline({
|
|
|
6247
6570
|
driveFollowRef.current = driveFollow;
|
|
6248
6571
|
useEffect9(() => stopFollow, [stopFollow]);
|
|
6249
6572
|
useEffect9(() => () => cancelLeaveFallback(), [cancelLeaveFallback]);
|
|
6250
|
-
|
|
6573
|
+
useLayoutEffect4(() => {
|
|
6251
6574
|
const node = scrollRef.current;
|
|
6252
6575
|
if (!node) {
|
|
6253
6576
|
return;
|
|
@@ -6328,7 +6651,7 @@ function MessageTimeline({
|
|
|
6328
6651
|
groupOffsetByKeyRef.current = nextOffsetByKey;
|
|
6329
6652
|
}
|
|
6330
6653
|
});
|
|
6331
|
-
|
|
6654
|
+
useLayoutEffect4(() => {
|
|
6332
6655
|
if (revealed || allGroups.length === 0) {
|
|
6333
6656
|
return;
|
|
6334
6657
|
}
|
|
@@ -6362,7 +6685,7 @@ function MessageTimeline({
|
|
|
6362
6685
|
}
|
|
6363
6686
|
};
|
|
6364
6687
|
}, [revealed, allGroups.length, autoFollow, snapToBottom]);
|
|
6365
|
-
|
|
6688
|
+
useLayoutEffect4(() => {
|
|
6366
6689
|
if (allGroups.length > 0) {
|
|
6367
6690
|
return;
|
|
6368
6691
|
}
|
|
@@ -6385,10 +6708,12 @@ function MessageTimeline({
|
|
|
6385
6708
|
groupKeyByItemIdRef.current = /* @__PURE__ */ new Map();
|
|
6386
6709
|
groupOffsetByKeyRef.current = /* @__PURE__ */ new Map();
|
|
6387
6710
|
foldMemoryRef.current.clear();
|
|
6711
|
+
userMessageDisclosureMemoryRef.current.clear();
|
|
6712
|
+
disclosureKeepsUnpinnedRef.current = false;
|
|
6388
6713
|
seenActivityIdsRef.current.clear();
|
|
6389
6714
|
applyPinned(true);
|
|
6390
6715
|
}, [allGroups.length, revealed, applyPinned]);
|
|
6391
|
-
|
|
6716
|
+
useLayoutEffect4(() => {
|
|
6392
6717
|
previousBulkFirstKeyRef.current = firstGroupKey;
|
|
6393
6718
|
if (!bulkRender) {
|
|
6394
6719
|
return;
|
|
@@ -6514,6 +6839,12 @@ function MessageTimeline({
|
|
|
6514
6839
|
if (programmatic) {
|
|
6515
6840
|
programmaticScrollRef.current = 0;
|
|
6516
6841
|
}
|
|
6842
|
+
if (disclosureKeepsUnpinnedRef.current) {
|
|
6843
|
+
stopFollow();
|
|
6844
|
+
applyPinned(false);
|
|
6845
|
+
syncScrollBaseline(node);
|
|
6846
|
+
return;
|
|
6847
|
+
}
|
|
6517
6848
|
if (autoFollow && pinnedRef.current && !hasNewer) {
|
|
6518
6849
|
const previousClient = followRef.current.lastClientHeight;
|
|
6519
6850
|
const viewportShrunk = previousClient > 0 && node.clientHeight < previousClient - TIP_FOLLOW_SHRINK_EPS_PX;
|
|
@@ -6577,6 +6908,13 @@ function MessageTimeline({
|
|
|
6577
6908
|
return;
|
|
6578
6909
|
}
|
|
6579
6910
|
cancelLeaveFallback();
|
|
6911
|
+
if (disclosureKeepsUnpinnedRef.current) {
|
|
6912
|
+
programmaticScrollRef.current = 0;
|
|
6913
|
+
stopFollow();
|
|
6914
|
+
applyPinned(false);
|
|
6915
|
+
syncScrollBaseline(node);
|
|
6916
|
+
return;
|
|
6917
|
+
}
|
|
6580
6918
|
if (programmaticScrollRef.current > 0) {
|
|
6581
6919
|
programmaticScrollRef.current = 0;
|
|
6582
6920
|
syncScrollBaseline(node);
|
|
@@ -6584,11 +6922,13 @@ function MessageTimeline({
|
|
|
6584
6922
|
}
|
|
6585
6923
|
releasePinAfterScrollSettled(node);
|
|
6586
6924
|
};
|
|
6587
|
-
return /* @__PURE__ */
|
|
6588
|
-
/* @__PURE__ */
|
|
6925
|
+
return /* @__PURE__ */ jsx17(LightboxProvider, { children: /* @__PURE__ */ jsx17(FoldMemoryProvider, { value: foldMemoryRef.current, children: /* @__PURE__ */ jsx17(SeenActivityIdsProvider, { value: seenActivityIdsRef.current, children: /* @__PURE__ */ jsx17(TimelineComputeLabelProvider, { value: computeLabel ?? null, children: /* @__PURE__ */ jsx17(EntranceAnimationProvider, { value: !bulkRender, children: /* @__PURE__ */ jsx17(TooltipProvider, { delayDuration: 400, children: /* @__PURE__ */ jsxs14("div", { className: cn("og-root relative flex min-h-0 flex-col", className), children: [
|
|
6926
|
+
/* @__PURE__ */ jsx17(
|
|
6589
6927
|
"div",
|
|
6590
6928
|
{
|
|
6591
6929
|
ref: scrollRef,
|
|
6930
|
+
"data-og-timeline-scroller": "",
|
|
6931
|
+
"data-og-bottom-follow": autoFollow && pinned && !hasNewer ? "true" : "false",
|
|
6592
6932
|
tabIndex: -1,
|
|
6593
6933
|
onScroll,
|
|
6594
6934
|
onScrollEnd,
|
|
@@ -6602,12 +6942,12 @@ function MessageTimeline({
|
|
|
6602
6942
|
"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-6 sm:px-6 outline-none",
|
|
6603
6943
|
autoFollow && pinned && !hasNewer ? "[overflow-anchor:none]" : "[overflow-anchor:auto]"
|
|
6604
6944
|
),
|
|
6605
|
-
children: /* @__PURE__ */
|
|
6606
|
-
groups.length === 0 ? emptyState ?? /* @__PURE__ */
|
|
6945
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "relative mx-auto flex w-full max-w-3xl flex-col gap-5", children: [
|
|
6946
|
+
groups.length === 0 ? emptyState ?? /* @__PURE__ */ jsx17("p", { className: "py-10 text-center text-og-menu text-og-fg-subtle", children: "No activity yet." }) : null,
|
|
6607
6947
|
hasOlder && olderPrefetchArmed ? (
|
|
6608
6948
|
// Overlaid, not a layout row: mounting/unmounting the sentinel
|
|
6609
6949
|
// must never shift content (that shift was itself a wobble).
|
|
6610
|
-
/* @__PURE__ */
|
|
6950
|
+
/* @__PURE__ */ jsx17(
|
|
6611
6951
|
"div",
|
|
6612
6952
|
{
|
|
6613
6953
|
ref: topSentinelRef,
|
|
@@ -6621,7 +6961,7 @@ function MessageTimeline({
|
|
|
6621
6961
|
groups.map(({ group, key }, index) => {
|
|
6622
6962
|
const next = groups[index + 1]?.group;
|
|
6623
6963
|
const contextCompactionCount = group.kind === "turn" ? group.contextCompactionCount ?? 0 : group.kind === "activity" && next?.kind === "item" && next.item.kind === "context-compaction" && next.item.phase === "compacted" ? 1 : 0;
|
|
6624
|
-
return /* @__PURE__ */
|
|
6964
|
+
return /* @__PURE__ */ jsx17("div", { "data-og-timeline-group-anchor": "", "data-og-group-key": key, children: /* @__PURE__ */ jsx17(
|
|
6625
6965
|
TimelineGroupRenderBoundary,
|
|
6626
6966
|
{
|
|
6627
6967
|
resetKeys: [
|
|
@@ -6634,7 +6974,7 @@ function MessageTimeline({
|
|
|
6634
6974
|
toolRegistry,
|
|
6635
6975
|
turnSummary
|
|
6636
6976
|
],
|
|
6637
|
-
children: /* @__PURE__ */
|
|
6977
|
+
children: /* @__PURE__ */ jsx17(UserMessageDisclosureProvider, { value: userMessageDisclosureContext, children: /* @__PURE__ */ jsx17(
|
|
6638
6978
|
TimelineGroupView,
|
|
6639
6979
|
{
|
|
6640
6980
|
group,
|
|
@@ -6649,11 +6989,11 @@ function MessageTimeline({
|
|
|
6649
6989
|
trailingAgentText: trailingAgentTextAfterTurn(group, next),
|
|
6650
6990
|
contextCompactionCount: contextCompactionCount > 0 ? contextCompactionCount : void 0
|
|
6651
6991
|
}
|
|
6652
|
-
)
|
|
6992
|
+
) })
|
|
6653
6993
|
}
|
|
6654
6994
|
) }, key);
|
|
6655
6995
|
}),
|
|
6656
|
-
hasNewer ? /* @__PURE__ */
|
|
6996
|
+
hasNewer ? /* @__PURE__ */ jsx17(
|
|
6657
6997
|
"div",
|
|
6658
6998
|
{
|
|
6659
6999
|
ref: bottomSentinelRef,
|
|
@@ -6666,10 +7006,10 @@ function MessageTimeline({
|
|
|
6666
7006
|
] })
|
|
6667
7007
|
}
|
|
6668
7008
|
),
|
|
6669
|
-
/* @__PURE__ */
|
|
7009
|
+
/* @__PURE__ */ jsx17(AnimatePresence3, { children: loadingOlder || loadingOldest || hasOlder && onJumpToStart && olderPrefetchArmed ? (
|
|
6670
7010
|
// Floating over the scroller (not a timeline row) so showing and
|
|
6671
7011
|
// hiding it never reflows history under the reader.
|
|
6672
|
-
/* @__PURE__ */
|
|
7012
|
+
/* @__PURE__ */ jsxs14(
|
|
6673
7013
|
motion3.div,
|
|
6674
7014
|
{
|
|
6675
7015
|
initial: { opacity: 0, y: -6 },
|
|
@@ -6680,8 +7020,8 @@ function MessageTimeline({
|
|
|
6680
7020
|
"aria-live": "polite",
|
|
6681
7021
|
className: "absolute inset-x-0 top-3 z-10 flex justify-center gap-2",
|
|
6682
7022
|
children: [
|
|
6683
|
-
loadingOlder || loadingOldest ? /* @__PURE__ */
|
|
6684
|
-
hasOlder && onJumpToStart && !loadingOldest ? /* @__PURE__ */
|
|
7023
|
+
loadingOlder || loadingOldest ? /* @__PURE__ */ jsx17("span", { className: "pointer-events-none inline-flex items-center rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1 text-og-control font-medium shadow-og-md backdrop-blur", children: /* @__PURE__ */ jsx17("span", { className: "og-shimmer-text", children: loadingOldest ? "Jumping to start\u2026" : "Loading earlier activity\u2026" }) }) : null,
|
|
7024
|
+
hasOlder && onJumpToStart && !loadingOldest ? /* @__PURE__ */ jsxs14(
|
|
6685
7025
|
"button",
|
|
6686
7026
|
{
|
|
6687
7027
|
type: "button",
|
|
@@ -6717,7 +7057,7 @@ function MessageTimeline({
|
|
|
6717
7057
|
"hover:border-og-border-strong disabled:opacity-60"
|
|
6718
7058
|
),
|
|
6719
7059
|
children: [
|
|
6720
|
-
/* @__PURE__ */
|
|
7060
|
+
/* @__PURE__ */ jsx17(ArrowUpToLineIcon, { className: "size-3.5" }),
|
|
6721
7061
|
"Jump to start"
|
|
6722
7062
|
]
|
|
6723
7063
|
}
|
|
@@ -6726,7 +7066,7 @@ function MessageTimeline({
|
|
|
6726
7066
|
}
|
|
6727
7067
|
)
|
|
6728
7068
|
) : null }),
|
|
6729
|
-
/* @__PURE__ */
|
|
7069
|
+
/* @__PURE__ */ jsx17(AnimatePresence3, { children: loadingNewer ? /* @__PURE__ */ jsx17(
|
|
6730
7070
|
motion3.div,
|
|
6731
7071
|
{
|
|
6732
7072
|
initial: { opacity: 0, y: 6 },
|
|
@@ -6736,10 +7076,10 @@ function MessageTimeline({
|
|
|
6736
7076
|
"data-og-loading-newer": "",
|
|
6737
7077
|
"aria-live": "polite",
|
|
6738
7078
|
className: "pointer-events-none absolute inset-x-0 bottom-14 z-10 flex justify-center",
|
|
6739
|
-
children: /* @__PURE__ */
|
|
7079
|
+
children: /* @__PURE__ */ jsx17("span", { className: "inline-flex items-center rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1 text-og-control font-medium shadow-og-md backdrop-blur", children: /* @__PURE__ */ jsx17("span", { className: "og-shimmer-text", children: "Loading later activity\u2026" }) })
|
|
6740
7080
|
}
|
|
6741
7081
|
) : null }),
|
|
6742
|
-
/* @__PURE__ */
|
|
7082
|
+
/* @__PURE__ */ jsx17(AnimatePresence3, { children: (!pinned && autoFollow || hasNewer) && autoFollow ? /* @__PURE__ */ jsxs14(
|
|
6743
7083
|
motion3.button,
|
|
6744
7084
|
{
|
|
6745
7085
|
type: "button",
|
|
@@ -6748,6 +7088,7 @@ function MessageTimeline({
|
|
|
6748
7088
|
exit: { opacity: 0, y: 8 },
|
|
6749
7089
|
transition: { duration: 0.15, ease: "easeOut" },
|
|
6750
7090
|
onClick: () => {
|
|
7091
|
+
disclosureKeepsUnpinnedRef.current = false;
|
|
6751
7092
|
if (hasNewer) {
|
|
6752
7093
|
wantPinRef.current = true;
|
|
6753
7094
|
const node2 = scrollRef.current;
|
|
@@ -6783,7 +7124,7 @@ function MessageTimeline({
|
|
|
6783
7124
|
"hover:border-og-border-strong"
|
|
6784
7125
|
),
|
|
6785
7126
|
children: [
|
|
6786
|
-
/* @__PURE__ */
|
|
7127
|
+
/* @__PURE__ */ jsx17(ArrowDownIcon2, { className: "size-3.5" }),
|
|
6787
7128
|
"Jump to latest"
|
|
6788
7129
|
]
|
|
6789
7130
|
}
|
|
@@ -6791,7 +7132,7 @@ function MessageTimeline({
|
|
|
6791
7132
|
] }) }) }) }) }) }) });
|
|
6792
7133
|
}
|
|
6793
7134
|
function useStableTimelineGroupKeys(allGroups) {
|
|
6794
|
-
const previousRef =
|
|
7135
|
+
const previousRef = useRef10([]);
|
|
6795
7136
|
const keyedGroups = useMemo5(() => {
|
|
6796
7137
|
const previousByItemId = /* @__PURE__ */ new Map();
|
|
6797
7138
|
for (const previous of previousRef.current) {
|
|
@@ -6821,7 +7162,7 @@ function useStableTimelineGroupKeys(allGroups) {
|
|
|
6821
7162
|
return { group, key };
|
|
6822
7163
|
});
|
|
6823
7164
|
}, [allGroups]);
|
|
6824
|
-
|
|
7165
|
+
useLayoutEffect4(() => {
|
|
6825
7166
|
previousRef.current = keyedGroups;
|
|
6826
7167
|
}, [keyedGroups]);
|
|
6827
7168
|
return keyedGroups;
|
|
@@ -6858,17 +7199,17 @@ var TimelineGroupRenderBoundary = class extends Component2 {
|
|
|
6858
7199
|
}
|
|
6859
7200
|
render() {
|
|
6860
7201
|
if (this.state.failed) {
|
|
6861
|
-
return /* @__PURE__ */
|
|
7202
|
+
return /* @__PURE__ */ jsxs14(
|
|
6862
7203
|
"div",
|
|
6863
7204
|
{
|
|
6864
7205
|
"data-testid": "timeline-group-render-error",
|
|
6865
7206
|
role: "status",
|
|
6866
7207
|
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",
|
|
6867
7208
|
children: [
|
|
6868
|
-
/* @__PURE__ */
|
|
6869
|
-
/* @__PURE__ */
|
|
6870
|
-
/* @__PURE__ */
|
|
6871
|
-
/* @__PURE__ */
|
|
7209
|
+
/* @__PURE__ */ jsx17(TriangleAlertIcon3, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }),
|
|
7210
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
7211
|
+
/* @__PURE__ */ jsx17("p", { className: "font-medium text-og-fg", children: "Timeline item unavailable" }),
|
|
7212
|
+
/* @__PURE__ */ jsx17("p", { children: "This item could not be displayed. The rest of the conversation is still available." })
|
|
6872
7213
|
] })
|
|
6873
7214
|
]
|
|
6874
7215
|
}
|
|
@@ -6911,7 +7252,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6911
7252
|
if (insideTurn) {
|
|
6912
7253
|
const useNestedChip = nestClusterChips && activityShouldFold;
|
|
6913
7254
|
if (!useNestedChip) {
|
|
6914
|
-
return /* @__PURE__ */
|
|
7255
|
+
return /* @__PURE__ */ jsx17(
|
|
6915
7256
|
ActivityRail,
|
|
6916
7257
|
{
|
|
6917
7258
|
items: group.items,
|
|
@@ -6922,7 +7263,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6922
7263
|
}
|
|
6923
7264
|
);
|
|
6924
7265
|
}
|
|
6925
|
-
return /* @__PURE__ */
|
|
7266
|
+
return /* @__PURE__ */ jsx17(
|
|
6926
7267
|
TurnSummary,
|
|
6927
7268
|
{
|
|
6928
7269
|
items: group.items,
|
|
@@ -6933,7 +7274,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6933
7274
|
foldKey: group.id,
|
|
6934
7275
|
facets: turnSummary?.facets,
|
|
6935
7276
|
contextCompactionCount,
|
|
6936
|
-
children: /* @__PURE__ */
|
|
7277
|
+
children: /* @__PURE__ */ jsx17(
|
|
6937
7278
|
ActivityRail,
|
|
6938
7279
|
{
|
|
6939
7280
|
items: group.items,
|
|
@@ -6947,7 +7288,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6947
7288
|
settleChrome ? "settle" : "rest"
|
|
6948
7289
|
);
|
|
6949
7290
|
}
|
|
6950
|
-
return /* @__PURE__ */
|
|
7291
|
+
return /* @__PURE__ */ jsx17(
|
|
6951
7292
|
TurnSummary,
|
|
6952
7293
|
{
|
|
6953
7294
|
items: group.items,
|
|
@@ -6958,7 +7299,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6958
7299
|
facets: turnSummary?.facets,
|
|
6959
7300
|
settleFold,
|
|
6960
7301
|
contextCompactionCount,
|
|
6961
|
-
children: /* @__PURE__ */
|
|
7302
|
+
children: /* @__PURE__ */ jsx17(FoldBody, { children: /* @__PURE__ */ jsx17(TurnRailFrame, { children: /* @__PURE__ */ jsx17(
|
|
6962
7303
|
ActivityRail,
|
|
6963
7304
|
{
|
|
6964
7305
|
items: group.items,
|
|
@@ -6976,7 +7317,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6976
7317
|
const turnCopyText = collectTurnCopyText(group.groups, trailingAgentText);
|
|
6977
7318
|
const body = group.groups.map((child) => {
|
|
6978
7319
|
const key = timelineGroupKey(child);
|
|
6979
|
-
return /* @__PURE__ */
|
|
7320
|
+
return /* @__PURE__ */ jsx17(
|
|
6980
7321
|
TimelineGroupRenderBoundary,
|
|
6981
7322
|
{
|
|
6982
7323
|
resetKeys: [
|
|
@@ -6989,7 +7330,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
6989
7330
|
toolRegistry,
|
|
6990
7331
|
turnSummary
|
|
6991
7332
|
],
|
|
6992
|
-
children: /* @__PURE__ */
|
|
7333
|
+
children: /* @__PURE__ */ jsx17(
|
|
6993
7334
|
TimelineGroupView2,
|
|
6994
7335
|
{
|
|
6995
7336
|
group: child,
|
|
@@ -7008,7 +7349,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
7008
7349
|
key
|
|
7009
7350
|
);
|
|
7010
7351
|
});
|
|
7011
|
-
return /* @__PURE__ */
|
|
7352
|
+
return /* @__PURE__ */ jsx17(
|
|
7012
7353
|
TurnSummary,
|
|
7013
7354
|
{
|
|
7014
7355
|
items: activityItems,
|
|
@@ -7022,16 +7363,16 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
7022
7363
|
settleFold,
|
|
7023
7364
|
copyText: insideTurn ? void 0 : turnCopyText,
|
|
7024
7365
|
contextCompactionCount: contextCompactionCount ?? group.contextCompactionCount,
|
|
7025
|
-
children: /* @__PURE__ */
|
|
7366
|
+
children: /* @__PURE__ */ jsx17(FoldBody, { children: insideTurn ? (
|
|
7026
7367
|
// A nested turn is already on an ancestor rail — its body just stacks
|
|
7027
7368
|
// flush (the bare-node body already indents it), so no second rule.
|
|
7028
|
-
/* @__PURE__ */
|
|
7029
|
-
) : /* @__PURE__ */
|
|
7369
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-4", children: body })
|
|
7370
|
+
) : /* @__PURE__ */ jsx17(TurnRailFrame, { children: body }) })
|
|
7030
7371
|
}
|
|
7031
7372
|
);
|
|
7032
7373
|
}
|
|
7033
7374
|
case "item":
|
|
7034
|
-
return /* @__PURE__ */
|
|
7375
|
+
return /* @__PURE__ */ jsx17(
|
|
7035
7376
|
TimelineRow,
|
|
7036
7377
|
{
|
|
7037
7378
|
item: group.item,
|
|
@@ -7044,18 +7385,18 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
|
|
|
7044
7385
|
}
|
|
7045
7386
|
});
|
|
7046
7387
|
function FoldBody({ children }) {
|
|
7047
|
-
return /* @__PURE__ */
|
|
7388
|
+
return /* @__PURE__ */ jsx17(Fragment7, { children });
|
|
7048
7389
|
}
|
|
7049
7390
|
function TurnRailFrame({ children }) {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7391
|
+
return /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-4 border-l-2 border-og-border pl-3 sm:pl-4", children });
|
|
7051
7392
|
}
|
|
7052
7393
|
function useLiveSettleFold(folded) {
|
|
7053
|
-
const previousFoldedRef =
|
|
7054
|
-
const latchedRef =
|
|
7394
|
+
const previousFoldedRef = useRef10(folded);
|
|
7395
|
+
const latchedRef = useRef10(false);
|
|
7055
7396
|
if (!previousFoldedRef.current && folded) {
|
|
7056
7397
|
latchedRef.current = true;
|
|
7057
7398
|
}
|
|
7058
|
-
|
|
7399
|
+
useLayoutEffect4(() => {
|
|
7059
7400
|
previousFoldedRef.current = folded;
|
|
7060
7401
|
});
|
|
7061
7402
|
return latchedRef.current;
|
|
@@ -7209,23 +7550,23 @@ function TimelineRow({
|
|
|
7209
7550
|
}) {
|
|
7210
7551
|
switch (item.kind) {
|
|
7211
7552
|
case "user-message":
|
|
7212
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsx17(UserMessageRow, { item, renderMessageText });
|
|
7213
7554
|
case "agent-message":
|
|
7214
|
-
return /* @__PURE__ */
|
|
7555
|
+
return /* @__PURE__ */ jsx17(AgentMessageRow, { item, renderMessageText });
|
|
7215
7556
|
case "worker-completion":
|
|
7216
|
-
return /* @__PURE__ */
|
|
7557
|
+
return /* @__PURE__ */ jsx17(WorkerCompletionRow, { item, onOpenSession });
|
|
7217
7558
|
case "session-status":
|
|
7218
|
-
return /* @__PURE__ */
|
|
7559
|
+
return /* @__PURE__ */ jsx17(SessionStatusRow, { item });
|
|
7219
7560
|
case "goal":
|
|
7220
|
-
return /* @__PURE__ */
|
|
7561
|
+
return /* @__PURE__ */ jsx17(GoalRow, { item });
|
|
7221
7562
|
case "machine-input-batch":
|
|
7222
|
-
return /* @__PURE__ */
|
|
7563
|
+
return /* @__PURE__ */ jsx17(MachineInputBatchRow, { item });
|
|
7223
7564
|
case "notice":
|
|
7224
|
-
return /* @__PURE__ */
|
|
7565
|
+
return /* @__PURE__ */ jsx17(NoticeRow, { item });
|
|
7225
7566
|
case "context-compaction":
|
|
7226
|
-
return /* @__PURE__ */
|
|
7567
|
+
return /* @__PURE__ */ jsx17(CompactionRow, { item });
|
|
7227
7568
|
case "auth-needed":
|
|
7228
|
-
return /* @__PURE__ */
|
|
7569
|
+
return /* @__PURE__ */ jsx17(
|
|
7229
7570
|
AuthNeededRow,
|
|
7230
7571
|
{
|
|
7231
7572
|
item,
|
|
@@ -7248,10 +7589,10 @@ function CompactionRow({ item }) {
|
|
|
7248
7589
|
const trigger = item.trigger && item.phase !== "started" ? COMPACTION_TRIGGER_LABEL[item.trigger] : null;
|
|
7249
7590
|
const before = item.estimatedTokensBefore !== null ? Math.round(item.estimatedTokensBefore).toLocaleString("en-US") : null;
|
|
7250
7591
|
const after = item.estimatedTokensAfter !== null ? Math.round(item.estimatedTokensAfter).toLocaleString("en-US") : null;
|
|
7251
|
-
const title = item.phase === "started" ? "Compacting conversation
|
|
7592
|
+
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";
|
|
7252
7593
|
const subtitle = item.phase === "compacted" ? "Chat history above is unchanged" : item.phase === "skipped" ? compactionSkipSubtitle(item.skipReason) : null;
|
|
7253
7594
|
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";
|
|
7254
|
-
return /* @__PURE__ */
|
|
7595
|
+
return /* @__PURE__ */ jsx17("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs14(
|
|
7255
7596
|
"div",
|
|
7256
7597
|
{
|
|
7257
7598
|
className: cn(
|
|
@@ -7260,14 +7601,14 @@ function CompactionRow({ item }) {
|
|
|
7260
7601
|
),
|
|
7261
7602
|
role: "status",
|
|
7262
7603
|
children: [
|
|
7263
|
-
/* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7265
|
-
/* @__PURE__ */
|
|
7604
|
+
/* @__PURE__ */ jsxs14("span", { className: "inline-flex max-w-full items-center gap-1.5", children: [
|
|
7605
|
+
/* @__PURE__ */ jsx17(ShrinkIcon, { className: "size-3.5 shrink-0" }),
|
|
7606
|
+
/* @__PURE__ */ jsxs14("span", { className: "truncate", children: [
|
|
7266
7607
|
title,
|
|
7267
7608
|
trigger ? ` \xB7 ${trigger}` : ""
|
|
7268
7609
|
] })
|
|
7269
7610
|
] }),
|
|
7270
|
-
subtitle ? /* @__PURE__ */
|
|
7611
|
+
subtitle ? /* @__PURE__ */ jsx17("span", { className: "truncate text-og-xs opacity-80", children: subtitle }) : null
|
|
7271
7612
|
]
|
|
7272
7613
|
}
|
|
7273
7614
|
) });
|
|
@@ -7287,14 +7628,14 @@ function compactionSkipSubtitle(reason) {
|
|
|
7287
7628
|
}
|
|
7288
7629
|
}
|
|
7289
7630
|
function MessageFooterTime({ occurredAt }) {
|
|
7290
|
-
return /* @__PURE__ */
|
|
7631
|
+
return /* @__PURE__ */ jsx17(
|
|
7291
7632
|
"time",
|
|
7292
7633
|
{
|
|
7293
7634
|
dateTime: occurredAt,
|
|
7294
7635
|
className: cn(
|
|
7295
7636
|
"shrink-0 tabular-nums text-og-xs text-og-fg-subtle",
|
|
7296
7637
|
"opacity-0 transition-opacity duration-150",
|
|
7297
|
-
"group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-
|
|
7638
|
+
"group-hover/copy:opacity-100 group-focus-within/copy:opacity-100 pointer-coarse:opacity-100"
|
|
7298
7639
|
),
|
|
7299
7640
|
children: formatClockTime(occurredAt)
|
|
7300
7641
|
}
|
|
@@ -7305,14 +7646,14 @@ function UserMessageRow({
|
|
|
7305
7646
|
renderMessageText
|
|
7306
7647
|
}) {
|
|
7307
7648
|
const enter = useEntranceAnimation();
|
|
7308
|
-
return /* @__PURE__ */
|
|
7649
|
+
return /* @__PURE__ */ jsx17("div", { className: cn(enter && "animate-og-enter", "flex justify-end"), children: /* @__PURE__ */ jsx17("div", { className: "flex max-w-[85%] min-w-0 flex-col items-end gap-1", children: /* @__PURE__ */ jsx17(
|
|
7309
7650
|
CopyHoverFrame,
|
|
7310
7651
|
{
|
|
7311
7652
|
copyText: item.text,
|
|
7312
7653
|
label: "Copy message",
|
|
7313
7654
|
className: "w-fit max-w-full min-w-0",
|
|
7314
|
-
trailing: /* @__PURE__ */
|
|
7315
|
-
children: /* @__PURE__ */
|
|
7655
|
+
trailing: /* @__PURE__ */ jsx17(MessageFooterTime, { occurredAt: item.occurredAt }),
|
|
7656
|
+
children: /* @__PURE__ */ jsx17("div", { className: "w-fit max-w-full min-w-0 rounded-og-lg rounded-br-og-xs border border-og-border bg-og-surface-2 px-4 py-2.5 text-og-md leading-6 text-og-fg", children: renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx17(UserMessageBody, { messageId: item.id, text: item.text, children: /* @__PURE__ */ jsx17(Markdown, { children: item.text }) }) })
|
|
7316
7657
|
}
|
|
7317
7658
|
) }) });
|
|
7318
7659
|
}
|
|
@@ -7321,15 +7662,15 @@ function AgentMessageRow({
|
|
|
7321
7662
|
renderMessageText
|
|
7322
7663
|
}) {
|
|
7323
7664
|
const enter = useEntranceAnimation();
|
|
7324
|
-
const body = renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */
|
|
7325
|
-
return /* @__PURE__ */
|
|
7665
|
+
const body = renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx17(Markdown, { streaming: item.streaming, children: item.text });
|
|
7666
|
+
return /* @__PURE__ */ jsx17(
|
|
7326
7667
|
CopyHoverFrame,
|
|
7327
7668
|
{
|
|
7328
7669
|
copyText: item.text,
|
|
7329
7670
|
label: "Copy message",
|
|
7330
7671
|
align: "start",
|
|
7331
7672
|
className: cn(enter && "animate-og-enter", "min-w-0 text-og-md leading-7 text-og-fg"),
|
|
7332
|
-
trailing: item.streaming ? null : /* @__PURE__ */
|
|
7673
|
+
trailing: item.streaming ? null : /* @__PURE__ */ jsx17(MessageFooterTime, { occurredAt: item.occurredAt }),
|
|
7333
7674
|
children: body
|
|
7334
7675
|
}
|
|
7335
7676
|
);
|
|
@@ -7371,7 +7712,7 @@ function WorkerCompletionRow({
|
|
|
7371
7712
|
onOpenSession
|
|
7372
7713
|
}) {
|
|
7373
7714
|
const enter = useEntranceAnimation();
|
|
7374
|
-
const [open, setOpen] =
|
|
7715
|
+
const [open, setOpen] = useState12(false);
|
|
7375
7716
|
const meta = workerCompletionMeta(item);
|
|
7376
7717
|
const Icon = meta.icon;
|
|
7377
7718
|
const showPausedReason = item.childStatus !== "failed" && item.goalStatus === "paused" && Boolean(item.pausedReason?.trim());
|
|
@@ -7381,17 +7722,17 @@ function WorkerCompletionRow({
|
|
|
7381
7722
|
...showPausedReason ? [{ label: "Paused because", value: item.pausedReason.trim(), muted: true }] : []
|
|
7382
7723
|
];
|
|
7383
7724
|
const hasDetails = details.length > 0;
|
|
7384
|
-
return /* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__PURE__ */
|
|
7389
|
-
item.goalText ? /* @__PURE__ */
|
|
7725
|
+
return /* @__PURE__ */ jsx17("div", { className: cn(enter && "animate-og-enter", "min-w-0"), children: /* @__PURE__ */ jsxs14("div", { className: cn("flex flex-col gap-2 border-l-2 pl-3", meta.accentClass), children: [
|
|
7726
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2.5", children: [
|
|
7727
|
+
/* @__PURE__ */ jsx17("span", { className: cn("mt-0.5 shrink-0", meta.iconClass), children: /* @__PURE__ */ jsx17(Icon, { className: "size-4" }) }),
|
|
7728
|
+
/* @__PURE__ */ jsx17("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs14("p", { className: "text-og-base leading-5 text-og-fg", children: [
|
|
7729
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium", children: meta.label }),
|
|
7730
|
+
item.goalText ? /* @__PURE__ */ jsxs14("span", { className: "text-og-fg-muted", children: [
|
|
7390
7731
|
" \xB7 ",
|
|
7391
7732
|
truncate(item.goalText, 90)
|
|
7392
7733
|
] }) : null
|
|
7393
7734
|
] }) }),
|
|
7394
|
-
item.childSessionId && onOpenSession ? /* @__PURE__ */
|
|
7735
|
+
item.childSessionId && onOpenSession ? /* @__PURE__ */ jsxs14(
|
|
7395
7736
|
"button",
|
|
7396
7737
|
{
|
|
7397
7738
|
type: "button",
|
|
@@ -7403,13 +7744,13 @@ function WorkerCompletionRow({
|
|
|
7403
7744
|
),
|
|
7404
7745
|
children: [
|
|
7405
7746
|
"View session",
|
|
7406
|
-
/* @__PURE__ */
|
|
7747
|
+
/* @__PURE__ */ jsx17(ArrowRightIcon2, { className: "size-3.5" })
|
|
7407
7748
|
]
|
|
7408
7749
|
}
|
|
7409
7750
|
) : null
|
|
7410
7751
|
] }),
|
|
7411
|
-
hasDetails ? /* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7752
|
+
hasDetails ? /* @__PURE__ */ jsxs14(Collapsible2.Root, { open, onOpenChange: setOpen, children: [
|
|
7753
|
+
/* @__PURE__ */ jsx17(Collapsible2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs14(
|
|
7413
7754
|
"button",
|
|
7414
7755
|
{
|
|
7415
7756
|
type: "button",
|
|
@@ -7418,14 +7759,14 @@ function WorkerCompletionRow({
|
|
|
7418
7759
|
"outline-none transition-colors duration-150 hover:text-og-fg-muted focus-visible:ring-2 focus-visible:ring-og-accent"
|
|
7419
7760
|
),
|
|
7420
7761
|
children: [
|
|
7421
|
-
/* @__PURE__ */
|
|
7762
|
+
/* @__PURE__ */ jsx17(ChevronRightIcon3, { className: "size-3 transition-transform duration-150 ease-og-in-out group-data-[state=open]/wc:rotate-90" }),
|
|
7422
7763
|
open ? "Hide details" : "Show details"
|
|
7423
7764
|
]
|
|
7424
7765
|
}
|
|
7425
7766
|
) }),
|
|
7426
|
-
/* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7428
|
-
/* @__PURE__ */
|
|
7767
|
+
/* @__PURE__ */ jsx17(Collapsible2.Content, { className: "overflow-hidden data-[state=closed]:animate-og-collapse data-[state=open]:animate-og-expand", children: /* @__PURE__ */ jsx17("div", { className: "ml-1 mt-1.5 flex flex-col gap-2.5", children: details.map((detail) => /* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
|
|
7768
|
+
/* @__PURE__ */ jsx17("p", { className: "mb-1 text-og-xs font-medium uppercase tracking-[0.08em] text-og-fg-subtle", children: detail.label }),
|
|
7769
|
+
/* @__PURE__ */ jsx17(
|
|
7429
7770
|
"p",
|
|
7430
7771
|
{
|
|
7431
7772
|
className: cn(
|
|
@@ -7442,7 +7783,7 @@ function WorkerCompletionRow({
|
|
|
7442
7783
|
function SessionStatusRow({ item }) {
|
|
7443
7784
|
const enter = useEntranceAnimation();
|
|
7444
7785
|
const meta = SESSION_STATUS_META[item.status];
|
|
7445
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsxs14(
|
|
7446
7787
|
"div",
|
|
7447
7788
|
{
|
|
7448
7789
|
className: cn(
|
|
@@ -7451,14 +7792,14 @@ function SessionStatusRow({ item }) {
|
|
|
7451
7792
|
),
|
|
7452
7793
|
role: "status",
|
|
7453
7794
|
children: [
|
|
7454
|
-
/* @__PURE__ */
|
|
7455
|
-
/* @__PURE__ */
|
|
7456
|
-
/* @__PURE__ */
|
|
7795
|
+
/* @__PURE__ */ jsx17("span", { className: "h-px flex-1 bg-og-border" }),
|
|
7796
|
+
/* @__PURE__ */ jsxs14("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
7797
|
+
/* @__PURE__ */ jsx17(StatusDot, { status: item.status, className: "size-1" }),
|
|
7457
7798
|
meta.label.toLowerCase(),
|
|
7458
7799
|
" \xB7 ",
|
|
7459
7800
|
formatRelativeTime(item.occurredAt)
|
|
7460
7801
|
] }),
|
|
7461
|
-
/* @__PURE__ */
|
|
7802
|
+
/* @__PURE__ */ jsx17("span", { className: "h-px flex-1 bg-og-border" })
|
|
7462
7803
|
]
|
|
7463
7804
|
}
|
|
7464
7805
|
);
|
|
@@ -7488,7 +7829,7 @@ var GOAL_META = {
|
|
|
7488
7829
|
function GoalRow({ item }) {
|
|
7489
7830
|
const enter = useEntranceAnimation();
|
|
7490
7831
|
const { label, pill, icon: Icon } = GOAL_META[item.action];
|
|
7491
|
-
return /* @__PURE__ */
|
|
7832
|
+
return /* @__PURE__ */ jsx17("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs14(
|
|
7492
7833
|
"span",
|
|
7493
7834
|
{
|
|
7494
7835
|
className: cn(
|
|
@@ -7496,8 +7837,8 @@ function GoalRow({ item }) {
|
|
|
7496
7837
|
pill
|
|
7497
7838
|
),
|
|
7498
7839
|
children: [
|
|
7499
|
-
/* @__PURE__ */
|
|
7500
|
-
/* @__PURE__ */
|
|
7840
|
+
/* @__PURE__ */ jsx17(Icon, { className: "size-3.5 shrink-0" }),
|
|
7841
|
+
/* @__PURE__ */ jsxs14("span", { className: "truncate", children: [
|
|
7501
7842
|
label,
|
|
7502
7843
|
item.text ? `: ${truncate(item.text, 90)}` : ""
|
|
7503
7844
|
] })
|
|
@@ -7511,9 +7852,9 @@ function MachineInputBatchRow({ item }) {
|
|
|
7511
7852
|
const single = item.members.length === 1 ? item.members[0] : null;
|
|
7512
7853
|
const singleSummary = single ? cleanMachineInputSummary(single.summary) : "";
|
|
7513
7854
|
const showCollapsedSummary = single != null && machineInputSummaryIsUseful(single.kind, singleSummary);
|
|
7514
|
-
return /* @__PURE__ */
|
|
7515
|
-
/* @__PURE__ */
|
|
7516
|
-
/* @__PURE__ */
|
|
7855
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn(enter && "animate-og-enter", "flex flex-col items-center gap-1.5"), children: [
|
|
7856
|
+
/* @__PURE__ */ jsxs14("details", { className: "group w-full max-w-full", "data-og-machine-input-batch": "", children: [
|
|
7857
|
+
/* @__PURE__ */ jsx17("summary", { className: "flex cursor-pointer list-none justify-center [&::-webkit-details-marker]:hidden", children: /* @__PURE__ */ jsxs14(
|
|
7517
7858
|
"span",
|
|
7518
7859
|
{
|
|
7519
7860
|
className: cn(
|
|
@@ -7521,41 +7862,41 @@ function MachineInputBatchRow({ item }) {
|
|
|
7521
7862
|
NEUTRAL_PILL
|
|
7522
7863
|
),
|
|
7523
7864
|
children: [
|
|
7524
|
-
/* @__PURE__ */
|
|
7865
|
+
/* @__PURE__ */ jsx17(
|
|
7525
7866
|
ChevronRightIcon3,
|
|
7526
7867
|
{
|
|
7527
7868
|
"aria-hidden": true,
|
|
7528
7869
|
className: "size-3.5 shrink-0 transition-transform group-open:rotate-90"
|
|
7529
7870
|
}
|
|
7530
7871
|
),
|
|
7531
|
-
/* @__PURE__ */
|
|
7872
|
+
/* @__PURE__ */ jsx17("span", { className: "truncate", children: label })
|
|
7532
7873
|
]
|
|
7533
7874
|
}
|
|
7534
7875
|
) }),
|
|
7535
|
-
/* @__PURE__ */
|
|
7876
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(MachineInputRow, { member }, member.id)) })
|
|
7536
7877
|
] }),
|
|
7537
|
-
showCollapsedSummary ? /* @__PURE__ */
|
|
7878
|
+
showCollapsedSummary ? /* @__PURE__ */ jsx17("p", { className: "max-w-lg px-3 text-center text-og-xs leading-4 text-og-fg-subtle", children: truncate(singleSummary, 160) }) : null
|
|
7538
7879
|
] });
|
|
7539
7880
|
}
|
|
7540
7881
|
function MachineInputRow({ member }) {
|
|
7541
7882
|
const source = readableMachineInputSource(member.sourceId);
|
|
7542
7883
|
const summary = cleanMachineInputSummary(member.summary);
|
|
7543
|
-
return /* @__PURE__ */
|
|
7544
|
-
/* @__PURE__ */
|
|
7545
|
-
/* @__PURE__ */
|
|
7546
|
-
/* @__PURE__ */
|
|
7547
|
-
source && /* @__PURE__ */
|
|
7884
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
7885
|
+
/* @__PURE__ */ jsx17("span", { className: "mt-2 size-1.5 shrink-0 rounded-full bg-og-fg-subtle", "aria-hidden": true }),
|
|
7886
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
7887
|
+
/* @__PURE__ */ jsx17("span", { className: "text-og-control font-medium text-og-fg-muted", children: MACHINE_INPUT_META[member.kind] }),
|
|
7888
|
+
source && /* @__PURE__ */ jsxs14("span", { className: "ml-1.5 text-og-control text-og-fg-subtle", children: [
|
|
7548
7889
|
"from ",
|
|
7549
7890
|
source
|
|
7550
7891
|
] }),
|
|
7551
|
-
summary ? /* @__PURE__ */
|
|
7892
|
+
summary ? /* @__PURE__ */ jsx17("p", { className: "mt-0.5 whitespace-pre-wrap break-words text-og-menu leading-5 text-og-fg", children: truncate(summary, 320) }) : null
|
|
7552
7893
|
] })
|
|
7553
7894
|
] });
|
|
7554
7895
|
}
|
|
7555
7896
|
function NoticeRow({ item }) {
|
|
7556
7897
|
const enter = useEntranceAnimation();
|
|
7557
7898
|
const tone = item.tone === "failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.tone === "waiting" ? "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";
|
|
7558
|
-
return /* @__PURE__ */
|
|
7899
|
+
return /* @__PURE__ */ jsxs14(
|
|
7559
7900
|
"div",
|
|
7560
7901
|
{
|
|
7561
7902
|
className: cn(
|
|
@@ -7565,20 +7906,20 @@ function NoticeRow({ item }) {
|
|
|
7565
7906
|
),
|
|
7566
7907
|
role: "status",
|
|
7567
7908
|
children: [
|
|
7568
|
-
/* @__PURE__ */
|
|
7909
|
+
/* @__PURE__ */ jsx17(
|
|
7569
7910
|
TriangleAlertIcon3,
|
|
7570
7911
|
{
|
|
7571
7912
|
className: cn("mt-0.5 size-4 shrink-0", item.tone === "cancelled" && "opacity-60")
|
|
7572
7913
|
}
|
|
7573
7914
|
),
|
|
7574
|
-
/* @__PURE__ */
|
|
7575
|
-
/* @__PURE__ */
|
|
7576
|
-
item.details ? /* @__PURE__ */
|
|
7577
|
-
/* @__PURE__ */
|
|
7578
|
-
/* @__PURE__ */
|
|
7915
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
7916
|
+
/* @__PURE__ */ jsx17("span", { className: "whitespace-pre-wrap break-words", children: item.text }),
|
|
7917
|
+
item.details ? /* @__PURE__ */ jsxs14("details", { className: "mt-2 text-og-control", children: [
|
|
7918
|
+
/* @__PURE__ */ jsx17("summary", { className: "cursor-pointer font-medium", children: item.details.label }),
|
|
7919
|
+
/* @__PURE__ */ jsx17("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) })
|
|
7579
7920
|
] }) : null
|
|
7580
7921
|
] }),
|
|
7581
|
-
item.action ? /* @__PURE__ */
|
|
7922
|
+
item.action ? /* @__PURE__ */ jsx17(
|
|
7582
7923
|
"a",
|
|
7583
7924
|
{
|
|
7584
7925
|
className: "shrink-0 rounded-og-sm border border-current/25 px-2 py-1 text-og-control font-medium hover:bg-current/10",
|
|
@@ -7598,8 +7939,8 @@ function AuthNeededRow({
|
|
|
7598
7939
|
resolveProviderLogo
|
|
7599
7940
|
}) {
|
|
7600
7941
|
const enter = useEntranceAnimation();
|
|
7601
|
-
const [busy, setBusy] =
|
|
7602
|
-
const [failed, setFailed] =
|
|
7942
|
+
const [busy, setBusy] = useState12(false);
|
|
7943
|
+
const [failed, setFailed] = useState12(false);
|
|
7603
7944
|
const provider = providerLabel(item.providerDomain);
|
|
7604
7945
|
const unavailable = item.reason === "personal_authority_unavailable" || item.reason === "unsupported_auth" || item.reason === "resource_scope_unavailable";
|
|
7605
7946
|
const missing = item.reason === "missing_connection";
|
|
@@ -7618,22 +7959,22 @@ function AuthNeededRow({
|
|
|
7618
7959
|
setBusy(false);
|
|
7619
7960
|
}
|
|
7620
7961
|
};
|
|
7621
|
-
return /* @__PURE__ */
|
|
7622
|
-
/* @__PURE__ */
|
|
7623
|
-
/* @__PURE__ */
|
|
7624
|
-
/* @__PURE__ */
|
|
7962
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn(enter && "animate-og-enter", "flex flex-col gap-2"), role: "status", children: [
|
|
7963
|
+
/* @__PURE__ */ jsxs14("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: [
|
|
7964
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
7965
|
+
/* @__PURE__ */ jsx17(
|
|
7625
7966
|
AuthProviderLogo,
|
|
7626
7967
|
{
|
|
7627
7968
|
src: resolveProviderLogo?.(item.providerDomain) ?? null,
|
|
7628
7969
|
label: provider
|
|
7629
7970
|
}
|
|
7630
7971
|
),
|
|
7631
|
-
/* @__PURE__ */
|
|
7632
|
-
/* @__PURE__ */
|
|
7633
|
-
/* @__PURE__ */
|
|
7972
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
|
|
7973
|
+
/* @__PURE__ */ jsx17("p", { className: "truncate text-og-md font-medium text-og-fg", children: unavailable ? `${provider} tools unavailable` : `${actionLabel} ${provider}` }),
|
|
7974
|
+
/* @__PURE__ */ jsx17("p", { className: "truncate text-og-sm text-og-fg-subtle", children: authReasonLine(item.reason) })
|
|
7634
7975
|
] })
|
|
7635
7976
|
] }),
|
|
7636
|
-
!unavailable && onReconnect ? /* @__PURE__ */
|
|
7977
|
+
!unavailable && onReconnect ? /* @__PURE__ */ jsxs14(
|
|
7637
7978
|
"button",
|
|
7638
7979
|
{
|
|
7639
7980
|
type: "button",
|
|
@@ -7644,11 +7985,11 @@ function AuthNeededRow({
|
|
|
7644
7985
|
"transition-colors hover:bg-og-accent-strong disabled:opacity-70 pointer-coarse:min-h-9"
|
|
7645
7986
|
),
|
|
7646
7987
|
children: [
|
|
7647
|
-
/* @__PURE__ */
|
|
7988
|
+
/* @__PURE__ */ jsx17(RefreshCwIcon, { className: cn("size-3.5", busy && "animate-og-spin"), "aria-hidden": true }),
|
|
7648
7989
|
busy ? "Opening\u2026" : actionLabel
|
|
7649
7990
|
]
|
|
7650
7991
|
}
|
|
7651
|
-
) : !unavailable && item.authorizationUrl ? /* @__PURE__ */
|
|
7992
|
+
) : !unavailable && item.authorizationUrl ? /* @__PURE__ */ jsxs14(
|
|
7652
7993
|
"a",
|
|
7653
7994
|
{
|
|
7654
7995
|
href: item.authorizationUrl,
|
|
@@ -7659,18 +8000,18 @@ function AuthNeededRow({
|
|
|
7659
8000
|
"transition-colors hover:bg-og-accent-strong pointer-coarse:min-h-9"
|
|
7660
8001
|
),
|
|
7661
8002
|
children: [
|
|
7662
|
-
/* @__PURE__ */
|
|
8003
|
+
/* @__PURE__ */ jsx17(RefreshCwIcon, { className: "size-3.5", "aria-hidden": true }),
|
|
7663
8004
|
actionLabel
|
|
7664
8005
|
]
|
|
7665
8006
|
}
|
|
7666
8007
|
) : null
|
|
7667
8008
|
] }),
|
|
7668
|
-
!unavailable ? /* @__PURE__ */
|
|
8009
|
+
!unavailable ? /* @__PURE__ */ jsxs14("p", { className: "px-1 text-og-xs text-og-fg-subtle", children: [
|
|
7669
8010
|
"This tool call wasn't replayed. After ",
|
|
7670
8011
|
missing ? "connecting" : "reconnecting",
|
|
7671
8012
|
", send a new message to try again."
|
|
7672
8013
|
] }) : null,
|
|
7673
|
-
failed ? /* @__PURE__ */
|
|
8014
|
+
failed ? /* @__PURE__ */ jsxs14("p", { className: "px-1 text-og-xs text-og-status-failed", children: [
|
|
7674
8015
|
"Couldn't start ",
|
|
7675
8016
|
missing ? "connecting" : "reconnecting",
|
|
7676
8017
|
" ",
|
|
@@ -7680,15 +8021,15 @@ function AuthNeededRow({
|
|
|
7680
8021
|
] });
|
|
7681
8022
|
}
|
|
7682
8023
|
function AuthProviderLogo({ src, label }) {
|
|
7683
|
-
const [failed, setFailed] =
|
|
8024
|
+
const [failed, setFailed] = useState12(false);
|
|
7684
8025
|
useEffect9(() => setFailed(false), [src]);
|
|
7685
8026
|
const showImage = src && !failed;
|
|
7686
|
-
return /* @__PURE__ */
|
|
8027
|
+
return /* @__PURE__ */ jsx17(
|
|
7687
8028
|
"span",
|
|
7688
8029
|
{
|
|
7689
8030
|
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",
|
|
7690
8031
|
"aria-hidden": true,
|
|
7691
|
-
children: showImage ? /* @__PURE__ */
|
|
8032
|
+
children: showImage ? /* @__PURE__ */ jsx17(
|
|
7692
8033
|
"img",
|
|
7693
8034
|
{
|
|
7694
8035
|
src,
|
|
@@ -7698,7 +8039,7 @@ function AuthProviderLogo({ src, label }) {
|
|
|
7698
8039
|
className: "size-full object-contain p-1.5",
|
|
7699
8040
|
onError: () => setFailed(true)
|
|
7700
8041
|
}
|
|
7701
|
-
) : /* @__PURE__ */
|
|
8042
|
+
) : /* @__PURE__ */ jsx17("span", { children: monogram(label) })
|
|
7702
8043
|
}
|
|
7703
8044
|
);
|
|
7704
8045
|
}
|
|
@@ -7791,10 +8132,12 @@ export {
|
|
|
7791
8132
|
ActivityRail,
|
|
7792
8133
|
BUILT_IN_TURN_SUMMARY_FACET_IDS,
|
|
7793
8134
|
TurnSummary,
|
|
8135
|
+
userMessageLikelyNeedsDisclosure,
|
|
8136
|
+
UserMessageBody,
|
|
7794
8137
|
SESSION_STATUS_META,
|
|
7795
8138
|
SessionStatus,
|
|
7796
8139
|
StatusDot,
|
|
7797
8140
|
MessageTimeline,
|
|
7798
8141
|
TimelineRow
|
|
7799
8142
|
};
|
|
7800
|
-
//# sourceMappingURL=chunk-
|
|
8143
|
+
//# sourceMappingURL=chunk-LGVMUIRV.js.map
|