@flamingo-stack/openframe-frontend-core 0.0.583 → 0.0.584-1973.5420.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/dist/chat-protocol/events.d.ts +8 -2
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +177 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +177 -0
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +3 -0
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -0
- package/dist/{chunk-EATPU5EF.cjs → chunk-3MAG3EG4.cjs} +9 -9
- package/dist/{chunk-EATPU5EF.cjs.map → chunk-3MAG3EG4.cjs.map} +1 -1
- package/dist/{chunk-IKUSKKFZ.cjs → chunk-4TZOFXPH.cjs} +712 -432
- package/dist/chunk-4TZOFXPH.cjs.map +1 -0
- package/dist/{chunk-WMRXB6RS.js → chunk-54WRMPCY.js} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs → chunk-7IVT56YY.cjs} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs.map → chunk-7IVT56YY.cjs.map} +1 -1
- package/dist/{chunk-PFKWJ6PJ.js → chunk-AQW2PDRS.js} +2 -2
- package/dist/{chunk-DROXHJVZ.js → chunk-AVVKXNGI.js} +2 -2
- package/dist/{chunk-YNLIXABT.cjs → chunk-CE6CA6EM.cjs} +43 -43
- package/dist/{chunk-YNLIXABT.cjs.map → chunk-CE6CA6EM.cjs.map} +1 -1
- package/dist/{chunk-TRD2YICZ.cjs → chunk-CGLQLBMQ.cjs} +21 -21
- package/dist/{chunk-TRD2YICZ.cjs.map → chunk-CGLQLBMQ.cjs.map} +1 -1
- package/dist/{chunk-XWBND4G5.js → chunk-CO4WRST6.js} +301 -21
- package/dist/chunk-CO4WRST6.js.map +1 -0
- package/dist/{chunk-IJVWKLJK.cjs → chunk-DHLD3JXN.cjs} +69 -69
- package/dist/{chunk-IJVWKLJK.cjs.map → chunk-DHLD3JXN.cjs.map} +1 -1
- package/dist/{chunk-M6ZUEBDK.cjs → chunk-F2EN6MXN.cjs} +159 -159
- package/dist/{chunk-M6ZUEBDK.cjs.map → chunk-F2EN6MXN.cjs.map} +1 -1
- package/dist/{chunk-J3EEL6YC.js → chunk-FH2FH337.js} +5 -5
- package/dist/{chunk-L26MD32B.js → chunk-GDHI3JN5.js} +3 -3
- package/dist/{chunk-VWHEXQ64.js → chunk-GFIH73Q3.js} +3 -3
- package/dist/{chunk-R5A3MGMY.js → chunk-H6GYY5CB.js} +3 -3
- package/dist/{chunk-FCLM2RXI.js → chunk-HGJAUYHW.js} +2 -2
- package/dist/{chunk-RBDVHLT5.cjs → chunk-HKKQCVVY.cjs} +22 -22
- package/dist/{chunk-RBDVHLT5.cjs.map → chunk-HKKQCVVY.cjs.map} +1 -1
- package/dist/{chunk-KDWNMFX4.cjs → chunk-JEMGFSC2.cjs} +24 -24
- package/dist/{chunk-KDWNMFX4.cjs.map → chunk-JEMGFSC2.cjs.map} +1 -1
- package/dist/{chunk-BTBW4L2W.cjs → chunk-JX6RSSZP.cjs} +33 -33
- package/dist/{chunk-BTBW4L2W.cjs.map → chunk-JX6RSSZP.cjs.map} +1 -1
- package/dist/{chunk-WHNC7C76.js → chunk-KN2ZCZQ7.js} +5 -5
- package/dist/{chunk-WBTKXNKZ.cjs → chunk-MYVHYVQM.cjs} +10 -10
- package/dist/{chunk-WBTKXNKZ.cjs.map → chunk-MYVHYVQM.cjs.map} +1 -1
- package/dist/{chunk-3TNM6SDP.cjs → chunk-PI3BNDCW.cjs} +15 -15
- package/dist/{chunk-3TNM6SDP.cjs.map → chunk-PI3BNDCW.cjs.map} +1 -1
- package/dist/{chunk-XZ3MKTJZ.js → chunk-PWI66GZF.js} +2 -2
- package/dist/{chunk-IFPGXSMZ.cjs → chunk-RTI3TYMX.cjs} +3 -3
- package/dist/{chunk-IFPGXSMZ.cjs.map → chunk-RTI3TYMX.cjs.map} +1 -1
- package/dist/{chunk-6BI3AYBY.cjs → chunk-SS2TCIKA.cjs} +4 -4
- package/dist/{chunk-6BI3AYBY.cjs.map → chunk-SS2TCIKA.cjs.map} +1 -1
- package/dist/{chunk-HIHPWVKP.js → chunk-T35JA5XV.js} +5 -5
- package/dist/{chunk-EZ5VU5WS.js → chunk-TLZ7HTXP.js} +2 -2
- package/dist/{chunk-OCXFFGFA.cjs → chunk-UZUG7QZ3.cjs} +10 -10
- package/dist/{chunk-OCXFFGFA.cjs.map → chunk-UZUG7QZ3.cjs.map} +1 -1
- package/dist/{chunk-3RR67XC2.cjs → chunk-W46U5J3H.cjs} +5 -5
- package/dist/{chunk-3RR67XC2.cjs.map → chunk-W46U5J3H.cjs.map} +1 -1
- package/dist/{chunk-IOP7BCRQ.js → chunk-WFF5JMQ2.js} +6 -6
- package/dist/{chunk-AJLF6MBD.js → chunk-X4HLHN36.js} +3 -3
- package/dist/{chunk-PMA7DVQR.js → chunk-ZWB64HOD.js} +4 -4
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +4 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +2 -28
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +2 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +35 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-source-metadata.d.ts +5 -0
- package/dist/components/chat/utils/chat-source-metadata.d.ts.map +1 -0
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +36 -36
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +130 -0
- package/src/chat-protocol/events.ts +9 -1
- package/src/chat-protocol/nats-decoder.ts +7 -0
- package/src/chat-protocol/source-metadata.ts +187 -0
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +86 -0
- package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +171 -0
- package/src/components/chat/__tests__/tool-execution-display.test.tsx +93 -0
- package/src/components/chat/chat-message-enhanced.tsx +28 -13
- package/src/components/chat/chat-message-list.tsx +1 -0
- package/src/components/chat/embeddable-chat.tsx +10 -1
- package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +74 -0
- package/src/components/chat/entity-cards/dispatch.tsx +48 -11
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +7 -0
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -29
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +56 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +31 -0
- package/src/components/chat/tool-execution-display.tsx +5 -2
- package/src/components/chat/types/component.types.ts +2 -0
- package/src/components/chat/types/message.types.ts +39 -0
- package/src/components/chat/types/unified-chat-state.types.ts +4 -3
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +57 -0
- package/src/components/chat/utils/chat-source-metadata.ts +19 -0
- package/src/components/chat/utils/process-historical-messages.ts +19 -1
- package/dist/chunk-IKUSKKFZ.cjs.map +0 -1
- package/dist/chunk-XWBND4G5.js.map +0 -1
- /package/dist/{chunk-WMRXB6RS.js.map → chunk-54WRMPCY.js.map} +0 -0
- /package/dist/{chunk-PFKWJ6PJ.js.map → chunk-AQW2PDRS.js.map} +0 -0
- /package/dist/{chunk-DROXHJVZ.js.map → chunk-AVVKXNGI.js.map} +0 -0
- /package/dist/{chunk-J3EEL6YC.js.map → chunk-FH2FH337.js.map} +0 -0
- /package/dist/{chunk-L26MD32B.js.map → chunk-GDHI3JN5.js.map} +0 -0
- /package/dist/{chunk-VWHEXQ64.js.map → chunk-GFIH73Q3.js.map} +0 -0
- /package/dist/{chunk-R5A3MGMY.js.map → chunk-H6GYY5CB.js.map} +0 -0
- /package/dist/{chunk-FCLM2RXI.js.map → chunk-HGJAUYHW.js.map} +0 -0
- /package/dist/{chunk-WHNC7C76.js.map → chunk-KN2ZCZQ7.js.map} +0 -0
- /package/dist/{chunk-XZ3MKTJZ.js.map → chunk-PWI66GZF.js.map} +0 -0
- /package/dist/{chunk-HIHPWVKP.js.map → chunk-T35JA5XV.js.map} +0 -0
- /package/dist/{chunk-EZ5VU5WS.js.map → chunk-TLZ7HTXP.js.map} +0 -0
- /package/dist/{chunk-IOP7BCRQ.js.map → chunk-WFF5JMQ2.js.map} +0 -0
- /package/dist/{chunk-AJLF6MBD.js.map → chunk-X4HLHN36.js.map} +0 -0
- /package/dist/{chunk-PMA7DVQR.js.map → chunk-ZWB64HOD.js.map} +0 -0
|
@@ -1156,6 +1156,8 @@ TicketEscalatedMessage.displayName = "TicketEscalatedMessage";
|
|
|
1156
1156
|
var MESSAGE_TYPE = {
|
|
1157
1157
|
TEXT: "TEXT",
|
|
1158
1158
|
THINKING: "THINKING",
|
|
1159
|
+
GUIDE: "GUIDE",
|
|
1160
|
+
SOURCES: "SOURCES",
|
|
1159
1161
|
ASK: "ASK",
|
|
1160
1162
|
EXECUTING_TOOL: "EXECUTING_TOOL",
|
|
1161
1163
|
EXECUTED_TOOL: "EXECUTED_TOOL",
|
|
@@ -6854,6 +6856,8 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
6854
6856
|
}, [message.parameters, variant]);
|
|
6855
6857
|
const hasResult = isExecuted && typeof message.result === "string" && message.result.length > 0;
|
|
6856
6858
|
const hasBody = argEntries.length > 0 || hasResult || isExecuting;
|
|
6859
|
+
const isConciseRemoteRead = !message.integratedToolType && !!_optionalChain([message, 'access', _111 => _111.toolTitle, 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()]) && argEntries.length === 0 && !hasResult;
|
|
6860
|
+
const isStaticRow = isClientView || isConciseRemoteRead;
|
|
6857
6861
|
const renderStatusIcon = () => {
|
|
6858
6862
|
if (isExecuting) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.DotsLoaderIcon, { size: 16, className: "text-ods-text-secondary" });
|
|
6859
6863
|
if (isExecuted && message.success === true) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CheckCircleIcon, { className: "h-4 w-4 text-ods-success" });
|
|
@@ -6873,7 +6877,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
6873
6877
|
}
|
|
6874
6878
|
),
|
|
6875
6879
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: renderStatusIcon() }),
|
|
6876
|
-
!
|
|
6880
|
+
!isStaticRow && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExpandChevron, { expanded }) })
|
|
6877
6881
|
] });
|
|
6878
6882
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6879
6883
|
"div",
|
|
@@ -6886,7 +6890,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
6886
6890
|
className
|
|
6887
6891
|
),
|
|
6888
6892
|
...props,
|
|
6889
|
-
children:
|
|
6893
|
+
children: isStaticRow ? (
|
|
6890
6894
|
// Client (Fae end-user): static, non-expandable row — no chevron, no
|
|
6891
6895
|
// body. Just the explanation + status; command/args/result are hidden.
|
|
6892
6896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full items-start gap-[var(--spacing-system-xs)] p-[var(--spacing-system-s)] text-left", children: headerContent })
|
|
@@ -6957,7 +6961,7 @@ function groupAskRuns(segments) {
|
|
|
6957
6961
|
runs.set(index, [segment]);
|
|
6958
6962
|
return;
|
|
6959
6963
|
}
|
|
6960
|
-
_optionalChain([runs, 'access',
|
|
6964
|
+
_optionalChain([runs, 'access', _114 => _114.get, 'call', _115 => _115(headIndex), 'optionalAccess', _116 => _116.push, 'call', _117 => _117(segment)]);
|
|
6961
6965
|
});
|
|
6962
6966
|
return runs;
|
|
6963
6967
|
}
|
|
@@ -6980,6 +6984,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
6980
6984
|
renderContextItem,
|
|
6981
6985
|
renderMention,
|
|
6982
6986
|
renderEntityCard,
|
|
6987
|
+
refs,
|
|
6983
6988
|
onAskSelect,
|
|
6984
6989
|
NavLinkAnchor,
|
|
6985
6990
|
...props
|
|
@@ -6988,6 +6993,10 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
6988
6993
|
const isError = role === "error";
|
|
6989
6994
|
const authorType = _nullishCoalesce(authorTypeProp, () => ( (isUser ? "user" : assistantType === "mingo" ? "mingo" : "fae")));
|
|
6990
6995
|
const hasMarkerSupport = !!renderEntityCard;
|
|
6996
|
+
const refsByKey = _react.useMemo.call(void 0,
|
|
6997
|
+
() => new Map((_nullishCoalesce(refs, () => ( []))).map((reference) => [`${reference.type}:${reference.id}`, reference])),
|
|
6998
|
+
[refs]
|
|
6999
|
+
);
|
|
6991
7000
|
const segments = _react.useMemo.call(void 0, () => normalizeContent(content), [content]);
|
|
6992
7001
|
const askRuns = _react.useMemo.call(void 0, () => groupAskRuns(segments), [segments]);
|
|
6993
7002
|
const hasMentionSupport = !!renderMention;
|
|
@@ -7036,14 +7045,15 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7036
7045
|
const key = `${cardType}:${cardId}`;
|
|
7037
7046
|
usedKeys.add(key);
|
|
7038
7047
|
let entry = cache.get(key);
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7048
|
+
const enrichedRef = refsByKey.get(key);
|
|
7049
|
+
const refForRender = _nullishCoalesce(enrichedRef, () => ( {
|
|
7050
|
+
type: cardType,
|
|
7051
|
+
id: cardId,
|
|
7052
|
+
title: cardId,
|
|
7053
|
+
url: null
|
|
7054
|
+
}));
|
|
7055
|
+
if (!entry || entry.render !== render || entry.reference !== refForRender) {
|
|
7056
|
+
entry = { render, reference: refForRender, node: render(refForRender) };
|
|
7047
7057
|
cache.set(key, entry);
|
|
7048
7058
|
}
|
|
7049
7059
|
const rendered = entry.node;
|
|
@@ -7077,10 +7087,10 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7077
7087
|
}
|
|
7078
7088
|
});
|
|
7079
7089
|
return { inlineByKey, partsBySegment, usedKeys };
|
|
7080
|
-
}, [hasMarkerSupport, renderEntityCard, segments]);
|
|
7090
|
+
}, [hasMarkerSupport, refsByKey, renderEntityCard, segments]);
|
|
7081
7091
|
_react.useEffect.call(void 0, () => {
|
|
7082
7092
|
const cache = renderedCardNodeCache.current;
|
|
7083
|
-
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7093
|
+
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess', _118 => _118.usedKeys]);
|
|
7084
7094
|
if (!usedKeys) return;
|
|
7085
7095
|
if (cache.size <= usedKeys.size) return;
|
|
7086
7096
|
for (const k of [...cache.keys()]) {
|
|
@@ -7103,7 +7113,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7103
7113
|
const sepIdx = stripped.indexOf(":");
|
|
7104
7114
|
const marker = sepIdx === -1 ? stripped : stripped.slice(0, sepIdx);
|
|
7105
7115
|
const id = sepIdx === -1 ? "" : stripped.slice(sepIdx + 1);
|
|
7106
|
-
const node = _optionalChain([renderMention, 'optionalCall',
|
|
7116
|
+
const node = _optionalChain([renderMention, 'optionalCall', _119 => _119({ marker, id })]);
|
|
7107
7117
|
if (node != null) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: node });
|
|
7108
7118
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children });
|
|
7109
7119
|
}
|
|
@@ -7114,7 +7124,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7114
7124
|
const cardType = stripped.slice(0, sepIdx);
|
|
7115
7125
|
const cardId = stripped.slice(sepIdx + 1);
|
|
7116
7126
|
const key = `${cardType}:${cardId}`;
|
|
7117
|
-
const inline = _optionalChain([renderingPlanRef, 'access',
|
|
7127
|
+
const inline = _optionalChain([renderingPlanRef, 'access', _120 => _120.current, 'optionalAccess', _121 => _121.inlineByKey, 'access', _122 => _122.get, 'call', _123 => _123(key)]);
|
|
7118
7128
|
if (inline != null) return inline;
|
|
7119
7129
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children: cardId });
|
|
7120
7130
|
}
|
|
@@ -7127,7 +7137,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7127
7137
|
};
|
|
7128
7138
|
}, [hasMarkerSupport, hasMentionSupport, renderMention, NavLinkAnchor]);
|
|
7129
7139
|
const renderSegmentBody = (segIndex, text, isStreaming) => {
|
|
7130
|
-
const parts = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7140
|
+
const parts = _optionalChain([renderingPlan, 'optionalAccess', _124 => _124.partsBySegment, 'access', _125 => _125.get, 'call', _126 => _126(segIndex)]);
|
|
7131
7141
|
if (!parts || parts.length === 0) {
|
|
7132
7142
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7133
7143
|
SimpleMarkdownRenderer,
|
|
@@ -7300,11 +7310,11 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7300
7310
|
);
|
|
7301
7311
|
ChatMessageEnhanced.displayName = "ChatMessageEnhanced";
|
|
7302
7312
|
var MemoizedChatMessageEnhanced = _react.memo.call(void 0, ChatMessageEnhanced, (prevProps, nextProps) => {
|
|
7303
|
-
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access',
|
|
7313
|
+
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access', _127 => _127.timestamp, 'optionalAccess', _128 => _128.getTime, 'call', _129 => _129()]) === _optionalChain([nextProps, 'access', _130 => _130.timestamp, 'optionalAccess', _131 => _131.getTime, 'call', _132 => _132()]) && prevProps.showAvatar === nextProps.showAvatar && prevProps.assistantType === nextProps.assistantType && prevProps.approvalVariant === nextProps.approvalVariant && prevProps.authorType === nextProps.authorType && prevProps.assistantIcon === nextProps.assistantIcon && prevProps.className === nextProps.className && // Reference equality — the host re-uses the same array instance per
|
|
7304
7314
|
// message (it's set once on the optimistic send and never mutated).
|
|
7305
7315
|
prevProps.contextItems === nextProps.contextItems && prevProps.resolveContextIcon === nextProps.resolveContextIcon && prevProps.renderContextItem === nextProps.renderContextItem && // Host keeps this stable (module const / useCallback), so reference
|
|
7306
7316
|
// equality holds across streaming chunks.
|
|
7307
|
-
prevProps.renderMention === nextProps.renderMention && prevProps.renderEntityCard === nextProps.renderEntityCard && // Same stability contract as the renderers above: hosts pass a `useCallback`
|
|
7317
|
+
prevProps.renderMention === nextProps.renderMention && prevProps.renderEntityCard === nextProps.renderEntityCard && prevProps.refs === nextProps.refs && // Same stability contract as the renderers above: hosts pass a `useCallback`
|
|
7308
7318
|
// (EmbeddableChat passes its memoized `handleSend`), so this holds across
|
|
7309
7319
|
// streaming chunks instead of re-rendering every ask card per chunk.
|
|
7310
7320
|
prevProps.onAskSelect === nextProps.onAskSelect && prevProps.NavLinkAnchor === nextProps.NavLinkAnchor;
|
|
@@ -7564,7 +7574,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7564
7574
|
const prevCount = prevRenderRef.current.messageCount;
|
|
7565
7575
|
const prevLastId = prevRenderRef.current.lastMessageId;
|
|
7566
7576
|
const newCount = messages.length;
|
|
7567
|
-
const currentLastId = _optionalChain([messages, 'access',
|
|
7577
|
+
const currentLastId = _optionalChain([messages, 'access', _133 => _133[messages.length - 1], 'optionalAccess', _134 => _134.id]);
|
|
7568
7578
|
prevRenderRef.current = { dialogId, messageCount: newCount, lastMessageId: currentLastId };
|
|
7569
7579
|
if (dialogChanged) {
|
|
7570
7580
|
followBottomRef.current = true;
|
|
@@ -7631,10 +7641,10 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7631
7641
|
};
|
|
7632
7642
|
let touchY = null;
|
|
7633
7643
|
const onTouchStart = (e) => {
|
|
7634
|
-
touchY = _nullishCoalesce(_optionalChain([e, 'access',
|
|
7644
|
+
touchY = _nullishCoalesce(_optionalChain([e, 'access', _135 => _135.touches, 'access', _136 => _136[0], 'optionalAccess', _137 => _137.clientY]), () => ( null));
|
|
7635
7645
|
};
|
|
7636
7646
|
const onTouchMove = (e) => {
|
|
7637
|
-
const y = _optionalChain([e, 'access',
|
|
7647
|
+
const y = _optionalChain([e, 'access', _138 => _138.touches, 'access', _139 => _139[0], 'optionalAccess', _140 => _140.clientY]);
|
|
7638
7648
|
if (y == null || touchY == null) return;
|
|
7639
7649
|
if (y > touchY) disarm();
|
|
7640
7650
|
touchY = y;
|
|
@@ -7764,7 +7774,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7764
7774
|
ro.observe(node);
|
|
7765
7775
|
const timer = setTimeout(() => {
|
|
7766
7776
|
ro.disconnect();
|
|
7767
|
-
if (_optionalChain([anchorWatcherRef, 'access',
|
|
7777
|
+
if (_optionalChain([anchorWatcherRef, 'access', _141 => _141.current, 'optionalAccess', _142 => _142.id]) === last.id) {
|
|
7768
7778
|
anchorWatcherRef.current = null;
|
|
7769
7779
|
}
|
|
7770
7780
|
}, 2e3);
|
|
@@ -7794,7 +7804,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7794
7804
|
scrollTop: el.scrollTop
|
|
7795
7805
|
};
|
|
7796
7806
|
}
|
|
7797
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
7807
|
+
_optionalChain([onLoadMoreRef, 'access', _143 => _143.current, 'optionalCall', _144 => _144()]);
|
|
7798
7808
|
}
|
|
7799
7809
|
},
|
|
7800
7810
|
{ root: scrollContainer, rootMargin: "200px", threshold: 0.1 }
|
|
@@ -7828,8 +7838,8 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7828
7838
|
);
|
|
7829
7839
|
}
|
|
7830
7840
|
const lastMessage = messages[messages.length - 1];
|
|
7831
|
-
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess',
|
|
7832
|
-
const lastSegment = _optionalChain([lastSegments, 'optionalAccess',
|
|
7841
|
+
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess', _145 => _145.content])) ? lastMessage.content : null;
|
|
7842
|
+
const lastSegment = _optionalChain([lastSegments, 'optionalAccess', _146 => _146[lastSegments.length - 1]]);
|
|
7833
7843
|
const isPausedOnApproval = !!lastSegment && (lastSegment.type === "approval_request" || lastSegment.type === "approval_batch" || lastSegment.type === "escalation_offer") && (lastSegment.status === void 0 || lastSegment.status === "pending");
|
|
7834
7844
|
const showStreamingLoader = isTyping && !isPausedOnApproval && !(pendingApprovals && pendingApprovals.length > 0);
|
|
7835
7845
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, OverlayOpenRegistryProvider, { onOpenChange: handleOverlayOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
@@ -7892,6 +7902,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7892
7902
|
renderContextItem,
|
|
7893
7903
|
renderMention,
|
|
7894
7904
|
renderEntityCard,
|
|
7905
|
+
refs: message.refs,
|
|
7895
7906
|
onAskSelect: index > lastUserMessageIndex ? onAskSelect : void 0,
|
|
7896
7907
|
NavLinkAnchor
|
|
7897
7908
|
},
|
|
@@ -8045,7 +8056,7 @@ function EntityIcon({
|
|
|
8045
8056
|
size: size2 = 20,
|
|
8046
8057
|
className
|
|
8047
8058
|
}) {
|
|
8048
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8059
|
+
if (_optionalChain([icon, 'optionalAccess', _147 => _147.url])) {
|
|
8049
8060
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8050
8061
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
8051
8062
|
{
|
|
@@ -8059,7 +8070,7 @@ function EntityIcon({
|
|
|
8059
8070
|
}
|
|
8060
8071
|
);
|
|
8061
8072
|
}
|
|
8062
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8073
|
+
if (_optionalChain([icon, 'optionalAccess', _148 => _148.name]) && BRAND_MARK_NAMES.has(icon.name)) {
|
|
8063
8074
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8064
8075
|
"span",
|
|
8065
8076
|
{
|
|
@@ -8069,8 +8080,8 @@ function EntityIcon({
|
|
|
8069
8080
|
}
|
|
8070
8081
|
);
|
|
8071
8082
|
}
|
|
8072
|
-
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8073
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8083
|
+
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess', _149 => _149.name]), () => ( void 0)));
|
|
8084
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess', _150 => _150.props]), () => ( {})) });
|
|
8074
8085
|
}
|
|
8075
8086
|
|
|
8076
8087
|
// src/components/chat/quick-action-chip.tsx
|
|
@@ -8080,7 +8091,7 @@ function getAgentAccent(slug) {
|
|
|
8080
8091
|
return slug === "fae" || slug === "mingo" ? AGENT_ACCENTS[slug] : void 0;
|
|
8081
8092
|
}
|
|
8082
8093
|
function accentFromIdentityIcon(icon) {
|
|
8083
|
-
const color = _optionalChain([icon, 'optionalAccess',
|
|
8094
|
+
const color = _optionalChain([icon, 'optionalAccess', _151 => _151.props, 'optionalAccess', _152 => _152.color]);
|
|
8084
8095
|
return typeof color === "string" && color.length > 0 ? color : void 0;
|
|
8085
8096
|
}
|
|
8086
8097
|
var ACCENT_CLASS = {
|
|
@@ -8162,7 +8173,7 @@ function QuickActionChipButton({
|
|
|
8162
8173
|
className
|
|
8163
8174
|
}) {
|
|
8164
8175
|
const themedIcon = theme && isQuickActionIconSpec(icon) && !icon.accent ? { ...icon, accent: theme.accent } : icon;
|
|
8165
|
-
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess',
|
|
8176
|
+
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess', _153 => _153.lozenge]) : lozenge === false ? void 0 : lozenge;
|
|
8166
8177
|
const resolvedIcon = renderQuickActionIcon(themedIcon);
|
|
8167
8178
|
const resolvedLabel = composeChipLabel(label, resolvedLozenge);
|
|
8168
8179
|
const tagVariant = selected ? selectedAccent === "cyan" ? "selectedCyan" : "selected" : variant;
|
|
@@ -8374,7 +8385,7 @@ function MarqueeWall({
|
|
|
8374
8385
|
if (!container || !copy) return;
|
|
8375
8386
|
const size2 = axis === "y" ? copy.offsetHeight : copy.offsetWidth;
|
|
8376
8387
|
copySizeRef.current = size2;
|
|
8377
|
-
const clone = _optionalChain([trackRef, 'access',
|
|
8388
|
+
const clone = _optionalChain([trackRef, 'access', _154 => _154.current, 'optionalAccess', _155 => _155.querySelector, 'call', _156 => _156('[data-marquee-copy="clone"]')]);
|
|
8378
8389
|
wrapSizeRef.current = clone ? axis === "y" ? clone.offsetTop - copy.offsetTop : clone.offsetLeft - copy.offsetLeft : size2 + (typeof copyGap === "number" ? copyGap : 0);
|
|
8379
8390
|
const avail = axis === "y" ? container.clientHeight : container.clientWidth;
|
|
8380
8391
|
setOverflows(size2 > avail + 1);
|
|
@@ -8395,7 +8406,7 @@ function MarqueeWall({
|
|
|
8395
8406
|
_react.useEffect.call(void 0, () => {
|
|
8396
8407
|
const el = containerRef.current;
|
|
8397
8408
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
8398
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
8409
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _157 => _157[0], 'optionalAccess', _158 => _158.isIntersecting]), () => ( true))), {
|
|
8399
8410
|
rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
8400
8411
|
});
|
|
8401
8412
|
io.observe(el);
|
|
@@ -8506,7 +8517,7 @@ function MarqueeWall({
|
|
|
8506
8517
|
if (Math.abs(delta) > 3 && !dragMovedRef.current) {
|
|
8507
8518
|
dragMovedRef.current = true;
|
|
8508
8519
|
try {
|
|
8509
|
-
_optionalChain([containerRef, 'access',
|
|
8520
|
+
_optionalChain([containerRef, 'access', _159 => _159.current, 'optionalAccess', _160 => _160.setPointerCapture, 'call', _161 => _161(e.pointerId)]);
|
|
8510
8521
|
} catch (e7) {
|
|
8511
8522
|
}
|
|
8512
8523
|
}
|
|
@@ -8523,7 +8534,7 @@ function MarqueeWall({
|
|
|
8523
8534
|
dragSuppressUntilRef.current = performance.now() + DRAG_RESUME_MS;
|
|
8524
8535
|
if (dragMovedRef.current) {
|
|
8525
8536
|
try {
|
|
8526
|
-
_optionalChain([containerRef, 'access',
|
|
8537
|
+
_optionalChain([containerRef, 'access', _162 => _162.current, 'optionalAccess', _163 => _163.releasePointerCapture, 'call', _164 => _164(e.pointerId)]);
|
|
8527
8538
|
} catch (e8) {
|
|
8528
8539
|
}
|
|
8529
8540
|
}
|
|
@@ -8957,7 +8968,7 @@ var ChatTicketItem = _react.forwardRef.call(void 0,
|
|
|
8957
8968
|
{
|
|
8958
8969
|
ref,
|
|
8959
8970
|
type: "button",
|
|
8960
|
-
onClick: () => _optionalChain([onClick, 'optionalCall',
|
|
8971
|
+
onClick: () => _optionalChain([onClick, 'optionalCall', _165 => _165(ticket.id)]),
|
|
8961
8972
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
8962
8973
|
"flex h-20 w-full items-center gap-4 px-4",
|
|
8963
8974
|
"border-b border-ods-border bg-ods-card",
|
|
@@ -9166,7 +9177,7 @@ function MingoChatHistoryRow({
|
|
|
9166
9177
|
const unread = _nullishCoalesce(dialog.unreadMessagesCount, () => ( 0));
|
|
9167
9178
|
const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink;
|
|
9168
9179
|
const owner = dialog.owner;
|
|
9169
|
-
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess',
|
|
9180
|
+
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess', _166 => _166.name]) || _optionalChain([owner, 'optionalAccess', _167 => _167.avatarUrl]));
|
|
9170
9181
|
const [menuOpen, setMenuOpen] = _react.useState.call(void 0, false);
|
|
9171
9182
|
const menuItems = [
|
|
9172
9183
|
onRequestCopyLink && {
|
|
@@ -9202,11 +9213,11 @@ function MingoChatHistoryRow({
|
|
|
9202
9213
|
{
|
|
9203
9214
|
role: "button",
|
|
9204
9215
|
tabIndex: 0,
|
|
9205
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9216
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _168 => _168(dialog.id)]),
|
|
9206
9217
|
onKeyDown: (e) => {
|
|
9207
9218
|
if (e.key === "Enter" || e.key === " ") {
|
|
9208
9219
|
e.preventDefault();
|
|
9209
|
-
_optionalChain([onSelect, 'optionalCall',
|
|
9220
|
+
_optionalChain([onSelect, 'optionalCall', _169 => _169(dialog.id)]);
|
|
9210
9221
|
}
|
|
9211
9222
|
},
|
|
9212
9223
|
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-s)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent",
|
|
@@ -9273,8 +9284,8 @@ function MingoChatHistoryRow({
|
|
|
9273
9284
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9274
9285
|
"span",
|
|
9275
9286
|
{
|
|
9276
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9277
|
-
title: _optionalChain([owner, 'optionalAccess',
|
|
9287
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _170 => _170(dialog.id)]),
|
|
9288
|
+
title: _optionalChain([owner, 'optionalAccess', _171 => _171.name]) || void 0,
|
|
9278
9289
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
9279
9290
|
"absolute inset-0 flex cursor-pointer items-center justify-center transition-opacity",
|
|
9280
9291
|
hasMenu && (menuOpen ? "pointer-events-none opacity-0" : "md:group-hover/row:pointer-events-none md:group-hover/row:opacity-0 md:peer-[:focus-within]/menu:pointer-events-none md:peer-[:focus-within]/menu:opacity-0")
|
|
@@ -9284,9 +9295,9 @@ function MingoChatHistoryRow({
|
|
|
9284
9295
|
{
|
|
9285
9296
|
variant: "round",
|
|
9286
9297
|
sizePx: 24,
|
|
9287
|
-
src: _optionalChain([owner, 'optionalAccess',
|
|
9288
|
-
alt: _optionalChain([owner, 'optionalAccess',
|
|
9289
|
-
fallback: _optionalChain([owner, 'optionalAccess',
|
|
9298
|
+
src: _optionalChain([owner, 'optionalAccess', _172 => _172.avatarUrl]) || void 0,
|
|
9299
|
+
alt: _optionalChain([owner, 'optionalAccess', _173 => _173.name]) || void 0,
|
|
9300
|
+
fallback: _optionalChain([owner, 'optionalAccess', _174 => _174.name]) || void 0,
|
|
9290
9301
|
initialsClassName: "text-[10px] text-ods-text-secondary"
|
|
9291
9302
|
}
|
|
9292
9303
|
)
|
|
@@ -9337,7 +9348,7 @@ function MingoChatHistory({
|
|
|
9337
9348
|
className
|
|
9338
9349
|
}) {
|
|
9339
9350
|
const groups = _react.useMemo.call(void 0, () => groupDialogs(dialogs), [dialogs]);
|
|
9340
|
-
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess',
|
|
9351
|
+
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()]);
|
|
9341
9352
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
9342
9353
|
const sentinelRef = _react.useRef.call(void 0, null);
|
|
9343
9354
|
const onLoadMoreRef = _react.useRef.call(void 0, onLoadMore);
|
|
@@ -9354,7 +9365,7 @@ function MingoChatHistory({
|
|
|
9354
9365
|
const io = new IntersectionObserver(
|
|
9355
9366
|
([entry]) => {
|
|
9356
9367
|
if (entry.isIntersecting && !isLoadingMoreRef.current) {
|
|
9357
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
9368
|
+
_optionalChain([onLoadMoreRef, 'access', _177 => _177.current, 'optionalCall', _178 => _178()]);
|
|
9358
9369
|
}
|
|
9359
9370
|
},
|
|
9360
9371
|
{ root, rootMargin: "120px", threshold: 0.1 }
|
|
@@ -9538,8 +9549,8 @@ function MingoWelcome({
|
|
|
9538
9549
|
icon: action.icon,
|
|
9539
9550
|
variant: action.variant,
|
|
9540
9551
|
onSelect: action.onClick,
|
|
9541
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9542
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9552
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _179 => _179(action)]),
|
|
9553
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _180 => _180()])
|
|
9543
9554
|
})),
|
|
9544
9555
|
agentSlug,
|
|
9545
9556
|
rows: 4,
|
|
@@ -9592,9 +9603,9 @@ function GuideWelcome({
|
|
|
9592
9603
|
props: action.iconProps,
|
|
9593
9604
|
accent: _nullishCoalesce(_nullishCoalesce(action.accent, () => ( accentFromIdentityIcon(icon))), () => ( "cyan"))
|
|
9594
9605
|
},
|
|
9595
|
-
onSelect: () => _optionalChain([onQuickAction, 'optionalCall',
|
|
9596
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9597
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9606
|
+
onSelect: () => _optionalChain([onQuickAction, 'optionalCall', _181 => _181(action)]),
|
|
9607
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _182 => _182(action)]),
|
|
9608
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _183 => _183()])
|
|
9598
9609
|
})),
|
|
9599
9610
|
[quickActions, icon, onQuickAction, onQuickActionHover, onQuickActionHoverEnd]
|
|
9600
9611
|
);
|
|
@@ -9770,7 +9781,7 @@ function MingoHistoryRail({
|
|
|
9770
9781
|
onRetry,
|
|
9771
9782
|
className
|
|
9772
9783
|
}) {
|
|
9773
|
-
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess',
|
|
9784
|
+
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess', _184 => _184.trim, 'call', _185 => _185()]);
|
|
9774
9785
|
const hasList = dialogs.length > 0 || hasSearch;
|
|
9775
9786
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9776
9787
|
"div",
|
|
@@ -9896,7 +9907,7 @@ var Modal = _react.forwardRef.call(void 0,
|
|
|
9896
9907
|
document.removeEventListener("focusin", containFocus);
|
|
9897
9908
|
const idx = modalStack.lastIndexOf(stackId);
|
|
9898
9909
|
if (idx !== -1) modalStack.splice(idx, 1);
|
|
9899
|
-
_optionalChain([restoreFocusRef, 'access',
|
|
9910
|
+
_optionalChain([restoreFocusRef, 'access', _186 => _186.current, 'optionalAccess', _187 => _187.focus, 'optionalCall', _188 => _188()]);
|
|
9900
9911
|
};
|
|
9901
9912
|
}, [isOpen]);
|
|
9902
9913
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10146,7 +10157,7 @@ function ChatDialogModals({
|
|
|
10146
10157
|
RenameChatModal,
|
|
10147
10158
|
{
|
|
10148
10159
|
isOpen: renameTarget != null,
|
|
10149
|
-
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess',
|
|
10160
|
+
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess', _189 => _189.title]), () => ( "")),
|
|
10150
10161
|
onClose: () => setRenameTarget(null),
|
|
10151
10162
|
onSave: onConfirmRename
|
|
10152
10163
|
}
|
|
@@ -10218,7 +10229,7 @@ function ChatHeaderSearchField({
|
|
|
10218
10229
|
const finishCollapse = _react.useCallback.call(void 0, () => {
|
|
10219
10230
|
if (collapsedRef.current) return;
|
|
10220
10231
|
collapsedRef.current = true;
|
|
10221
|
-
_optionalChain([onCollapse, 'optionalCall',
|
|
10232
|
+
_optionalChain([onCollapse, 'optionalCall', _190 => _190()]);
|
|
10222
10233
|
}, [onCollapse]);
|
|
10223
10234
|
const beginCollapse = _react.useCallback.call(void 0, () => {
|
|
10224
10235
|
setExiting(true);
|
|
@@ -10540,7 +10551,7 @@ function ChatAttachmentAddButton({
|
|
|
10540
10551
|
const canAddMore = slotsAvailable > 0 && !disabled;
|
|
10541
10552
|
const handlePick = () => {
|
|
10542
10553
|
if (!canAddMore) return;
|
|
10543
|
-
_optionalChain([fileInputRef, 'access',
|
|
10554
|
+
_optionalChain([fileInputRef, 'access', _191 => _191.current, 'optionalAccess', _192 => _192.click, 'call', _193 => _193()]);
|
|
10544
10555
|
};
|
|
10545
10556
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10546
10557
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -10703,7 +10714,7 @@ function ChatContextMemoryBar({
|
|
|
10703
10714
|
_react.useEffect.call(void 0, () => {
|
|
10704
10715
|
if (!open) return void 0;
|
|
10705
10716
|
const onOutside = (e) => {
|
|
10706
|
-
if (_optionalChain([rootRef, 'access',
|
|
10717
|
+
if (_optionalChain([rootRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.contains, 'call', _196 => _196(e.target)])) return;
|
|
10707
10718
|
setOpen(false);
|
|
10708
10719
|
};
|
|
10709
10720
|
document.addEventListener("mousedown", onOutside, true);
|
|
@@ -10975,7 +10986,7 @@ function ChatComposer({
|
|
|
10975
10986
|
const contextEnabled = !!contextPicker && !archived;
|
|
10976
10987
|
const selected = _nullishCoalesce(selectedContextItems, () => ( []));
|
|
10977
10988
|
const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
|
|
10978
|
-
const entityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
10989
|
+
const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _197 => _197.entityTypes]);
|
|
10979
10990
|
const iconByType = _react.useMemo.call(void 0, () => {
|
|
10980
10991
|
const map = /* @__PURE__ */ new Map();
|
|
10981
10992
|
for (const t of _nullishCoalesce(entityTypes, () => ( []))) map.set(t.type, t.icon);
|
|
@@ -11002,7 +11013,7 @@ function ChatComposer({
|
|
|
11002
11013
|
startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11003
11014
|
ChatComposerPlusMenu,
|
|
11004
11015
|
{
|
|
11005
|
-
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11016
|
+
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _198 => _198()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _199 => _199()]),
|
|
11006
11017
|
open: contextPickerOpen,
|
|
11007
11018
|
disabled: attachmentsDisabled,
|
|
11008
11019
|
dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11011,8 +11022,8 @@ function ChatComposer({
|
|
|
11011
11022
|
open: contextPickerOpen,
|
|
11012
11023
|
config: contextPicker,
|
|
11013
11024
|
selectedItems: selected,
|
|
11014
|
-
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall',
|
|
11015
|
-
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11025
|
+
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _200 => _200(item)]),
|
|
11026
|
+
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _201 => _201()]),
|
|
11016
11027
|
mentionQuery
|
|
11017
11028
|
}
|
|
11018
11029
|
) : void 0
|
|
@@ -11203,8 +11214,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
|
|
|
11203
11214
|
var DialogListItem = _react.forwardRef.call(void 0,
|
|
11204
11215
|
({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
|
|
11205
11216
|
const handleClick = (e) => {
|
|
11206
|
-
_optionalChain([onDialogSelect, 'optionalCall',
|
|
11207
|
-
_optionalChain([onClick, 'optionalCall',
|
|
11217
|
+
_optionalChain([onDialogSelect, 'optionalCall', _202 => _202(dialog.id)]);
|
|
11218
|
+
_optionalChain([onClick, 'optionalCall', _203 => _203(e)]);
|
|
11208
11219
|
};
|
|
11209
11220
|
const formatTimestamp = (timestamp) => {
|
|
11210
11221
|
if (!timestamp) return "";
|
|
@@ -11283,7 +11294,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
|
|
|
11283
11294
|
(entries) => {
|
|
11284
11295
|
const [entry] = entries;
|
|
11285
11296
|
if (entry.isIntersecting && !isFetchingRef.current) {
|
|
11286
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
11297
|
+
_optionalChain([onLoadMoreRef, 'access', _204 => _204.current, 'optionalCall', _205 => _205()]);
|
|
11287
11298
|
}
|
|
11288
11299
|
},
|
|
11289
11300
|
{ root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
|
|
@@ -11411,7 +11422,7 @@ function isForeignOriginHref(href) {
|
|
|
11411
11422
|
function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
11412
11423
|
const isNewTab = runtime ? _chunkNNFQLTJ3cjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
|
|
11413
11424
|
if (isNewTab) {
|
|
11414
|
-
if (_optionalChain([runtime, 'optionalAccess',
|
|
11425
|
+
if (_optionalChain([runtime, 'optionalAccess', _206 => _206.navigation, 'access', _207 => _207.openExternal])) runtime.navigation.openExternal(href);
|
|
11415
11426
|
else window.open(href, "_blank", NEW_TAB_FEATURES);
|
|
11416
11427
|
return;
|
|
11417
11428
|
}
|
|
@@ -11419,7 +11430,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
|
11419
11430
|
if (target.includes("#") && _chunkZI27ALYXcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkZI27ALYXcjs.STICKY_HEADER_OFFSET_PX })) {
|
|
11420
11431
|
return;
|
|
11421
11432
|
}
|
|
11422
|
-
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
|
11433
|
+
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _208 => _208.navigation, 'access', _209 => _209.navigate, 'optionalCall', _210 => _210({ href, path, targetPlatform })]), () => ( false));
|
|
11423
11434
|
if (!handled) {
|
|
11424
11435
|
if (fallbackNavigate) fallbackNavigate(target);
|
|
11425
11436
|
else window.location.assign(target);
|
|
@@ -11478,7 +11489,7 @@ function NavLinkAnchorViaRuntime({
|
|
|
11478
11489
|
targetPlatform,
|
|
11479
11490
|
fallbackNavigate: router.push
|
|
11480
11491
|
});
|
|
11481
|
-
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
11492
|
+
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _211 => _211.closeChat])) panel.closeChat();
|
|
11482
11493
|
};
|
|
11483
11494
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkNNFQLTJ3cjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
|
|
11484
11495
|
}
|
|
@@ -11544,11 +11555,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
|
|
|
11544
11555
|
function getCaptionsUrl(entityType, entityId, srtContent, options) {
|
|
11545
11556
|
if (!srtContent) return void 0;
|
|
11546
11557
|
const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
|
|
11547
|
-
const variant = _optionalChain([options, 'optionalAccess',
|
|
11558
|
+
const variant = _optionalChain([options, 'optionalAccess', _212 => _212.variant]) ? `&variant=${options.variant}` : "";
|
|
11548
11559
|
return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
|
|
11549
11560
|
}
|
|
11550
11561
|
function resolveCaptionsBase(endpoints) {
|
|
11551
|
-
return _optionalChain([endpoints, 'optionalAccess',
|
|
11562
|
+
return _optionalChain([endpoints, 'optionalAccess', _213 => _213.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
|
|
11552
11563
|
}
|
|
11553
11564
|
function rebaseCaptionsUrl(endpoints, url) {
|
|
11554
11565
|
if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
|
|
@@ -11658,7 +11669,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
11658
11669
|
// src/components/features/use-captions.ts
|
|
11659
11670
|
|
|
11660
11671
|
function useCaptions() {
|
|
11661
|
-
const endpoints = _nullishCoalesce(_optionalChain([_chunkRDTOMWDNcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
11672
|
+
const endpoints = _nullishCoalesce(_optionalChain([_chunkRDTOMWDNcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _214 => _214.endpoints]), () => ( null));
|
|
11662
11673
|
return _react.useMemo.call(void 0,
|
|
11663
11674
|
() => ({
|
|
11664
11675
|
forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
|
|
@@ -11687,11 +11698,11 @@ function fetchPriorityProp(priority) {
|
|
|
11687
11698
|
var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
|
|
11688
11699
|
function isIosAppShell() {
|
|
11689
11700
|
const capacitor = globalThis.Capacitor;
|
|
11690
|
-
return _optionalChain([capacitor, 'optionalAccess',
|
|
11701
|
+
return _optionalChain([capacitor, 'optionalAccess', _215 => _215.isNativePlatform, 'optionalCall', _216 => _216()]) === true && _optionalChain([capacitor, 'access', _217 => _217.getPlatform, 'optionalCall', _218 => _218()]) === "ios";
|
|
11691
11702
|
}
|
|
11692
11703
|
function nativeVideoElement(player) {
|
|
11693
11704
|
const media = player.media;
|
|
11694
|
-
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess',
|
|
11705
|
+
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _219 => _219.nativeEl]), () => ( media));
|
|
11695
11706
|
return element instanceof HTMLVideoElement ? element : null;
|
|
11696
11707
|
}
|
|
11697
11708
|
function useIosNativeVideoFullscreen(playerRef) {
|
|
@@ -11701,7 +11712,7 @@ function useIosNativeVideoFullscreen(playerRef) {
|
|
|
11701
11712
|
if (!(player instanceof EventTarget)) return void 0;
|
|
11702
11713
|
const takeOver = (event) => {
|
|
11703
11714
|
const video = nativeVideoElement(player);
|
|
11704
|
-
if (!_optionalChain([video, 'optionalAccess',
|
|
11715
|
+
if (!_optionalChain([video, 'optionalAccess', _220 => _220.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
|
|
11705
11716
|
event.stopImmediatePropagation();
|
|
11706
11717
|
video.webkitEnterFullscreen();
|
|
11707
11718
|
};
|
|
@@ -11735,11 +11746,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
|
|
|
11735
11746
|
function saveDataEnabled() {
|
|
11736
11747
|
if (typeof navigator === "undefined") return false;
|
|
11737
11748
|
const conn = navigator.connection;
|
|
11738
|
-
return _optionalChain([conn, 'optionalAccess',
|
|
11749
|
+
return _optionalChain([conn, 'optionalAccess', _221 => _221.saveData]) === true;
|
|
11739
11750
|
}
|
|
11740
11751
|
function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
|
|
11741
11752
|
const runtime = _chunkRDTOMWDNcjs.useChatRuntime.call(void 0, );
|
|
11742
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
11753
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _222 => _222.endpoints, 'access', _223 => _223.supabaseStorageOrigin])));
|
|
11743
11754
|
try {
|
|
11744
11755
|
_reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
11745
11756
|
_reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
@@ -11758,7 +11769,7 @@ function useVideoWarmup({
|
|
|
11758
11769
|
nearMargin = "1000px"
|
|
11759
11770
|
} = {}) {
|
|
11760
11771
|
const runtime = _chunkRDTOMWDNcjs.useChatRuntime.call(void 0, );
|
|
11761
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
11772
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _224 => _224.endpoints, 'access', _225 => _225.supabaseStorageOrigin])));
|
|
11762
11773
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
11763
11774
|
const { ref, isNear } = _chunkZI27ALYXcjs.useNearViewport.call(void 0, nearMargin);
|
|
11764
11775
|
_react.useEffect.call(void 0, () => {
|
|
@@ -11860,7 +11871,7 @@ if (typeof document !== "undefined") {
|
|
|
11860
11871
|
}
|
|
11861
11872
|
if (typeof window !== "undefined") {
|
|
11862
11873
|
const w = window;
|
|
11863
|
-
if (!_optionalChain([w, 'access',
|
|
11874
|
+
if (!_optionalChain([w, 'access', _226 => _226.chrome, 'optionalAccess', _227 => _227.cast])) {
|
|
11864
11875
|
w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
|
|
11865
11876
|
}
|
|
11866
11877
|
}
|
|
@@ -12101,7 +12112,7 @@ function FilePlayer({
|
|
|
12101
12112
|
const clearPerfListener = _react.useCallback.call(void 0, () => {
|
|
12102
12113
|
if (perfListenerRef.current) {
|
|
12103
12114
|
try {
|
|
12104
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12115
|
+
_optionalChain([hoverPlayerRef, 'access', _228 => _228.current, 'optionalAccess', _229 => _229.removeEventListener, 'optionalCall', _230 => _230("playing", perfListenerRef.current)]);
|
|
12105
12116
|
} catch (e21) {
|
|
12106
12117
|
}
|
|
12107
12118
|
perfListenerRef.current = null;
|
|
@@ -12136,7 +12147,7 @@ function FilePlayer({
|
|
|
12136
12147
|
};
|
|
12137
12148
|
perfListenerRef.current = onPlaying;
|
|
12138
12149
|
try {
|
|
12139
|
-
_optionalChain([el, 'access',
|
|
12150
|
+
_optionalChain([el, 'access', _231 => _231.addEventListener, 'optionalCall', _232 => _232("playing", onPlaying)]);
|
|
12140
12151
|
} catch (e22) {
|
|
12141
12152
|
}
|
|
12142
12153
|
}
|
|
@@ -12144,12 +12155,12 @@ function FilePlayer({
|
|
|
12144
12155
|
el.volume = 0.5;
|
|
12145
12156
|
if (userHasInteracted) {
|
|
12146
12157
|
el.muted = mutedIntentRef.current;
|
|
12147
|
-
_optionalChain([el, 'access',
|
|
12148
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12158
|
+
_optionalChain([el, 'access', _233 => _233.play, 'optionalCall', _234 => _234(), 'optionalAccess', _235 => _235.catch, 'optionalCall', _236 => _236((err) => {
|
|
12159
|
+
const name = _optionalChain([err, 'optionalAccess', _237 => _237.name]);
|
|
12149
12160
|
if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12150
12161
|
try {
|
|
12151
12162
|
el.muted = true;
|
|
12152
|
-
_optionalChain([el, 'access',
|
|
12163
|
+
_optionalChain([el, 'access', _238 => _238.play, 'optionalCall', _239 => _239(), 'optionalAccess', _240 => _240.catch, 'optionalCall', _241 => _241(() => {
|
|
12153
12164
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12154
12165
|
setMutedFallbackBlocked(true);
|
|
12155
12166
|
}
|
|
@@ -12161,7 +12172,7 @@ function FilePlayer({
|
|
|
12161
12172
|
})]);
|
|
12162
12173
|
} else {
|
|
12163
12174
|
el.muted = true;
|
|
12164
|
-
_optionalChain([el, 'access',
|
|
12175
|
+
_optionalChain([el, 'access', _242 => _242.play, 'optionalCall', _243 => _243(), 'optionalAccess', _244 => _244.catch, 'optionalCall', _245 => _245(() => {
|
|
12165
12176
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12166
12177
|
setMutedFallbackBlocked(true);
|
|
12167
12178
|
}
|
|
@@ -12191,7 +12202,7 @@ function FilePlayer({
|
|
|
12191
12202
|
clearActivationWaiter();
|
|
12192
12203
|
clearPerfListener();
|
|
12193
12204
|
try {
|
|
12194
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12205
|
+
_optionalChain([hoverPlayerRef, 'access', _246 => _246.current, 'optionalAccess', _247 => _247.pause, 'optionalCall', _248 => _248()]);
|
|
12195
12206
|
} catch (e26) {
|
|
12196
12207
|
}
|
|
12197
12208
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
@@ -12203,7 +12214,7 @@ function FilePlayer({
|
|
|
12203
12214
|
if (el) {
|
|
12204
12215
|
el.muted = false;
|
|
12205
12216
|
el.volume = 0.5;
|
|
12206
|
-
_optionalChain([el, 'access',
|
|
12217
|
+
_optionalChain([el, 'access', _249 => _249.play, 'optionalCall', _250 => _250(), 'optionalAccess', _251 => _251.catch, 'optionalCall', _252 => _252(() => {
|
|
12207
12218
|
})]);
|
|
12208
12219
|
}
|
|
12209
12220
|
} catch (e27) {
|
|
@@ -12223,7 +12234,7 @@ function FilePlayer({
|
|
|
12223
12234
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
12224
12235
|
});
|
|
12225
12236
|
_react.useEffect.call(void 0, () => {
|
|
12226
|
-
_optionalChain([onMutedFallbackChangeRef, 'access',
|
|
12237
|
+
_optionalChain([onMutedFallbackChangeRef, 'access', _253 => _253.current, 'optionalCall', _254 => _254({
|
|
12227
12238
|
muted: hoverMutedFallback,
|
|
12228
12239
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
12229
12240
|
})]);
|
|
@@ -12242,7 +12253,7 @@ function FilePlayer({
|
|
|
12242
12253
|
if (autoPlay) {
|
|
12243
12254
|
const reportBlocked = () => setMutedFallbackBlocked(true);
|
|
12244
12255
|
try {
|
|
12245
|
-
_optionalChain([mutedEl, 'access',
|
|
12256
|
+
_optionalChain([mutedEl, 'access', _255 => _255.play, 'optionalCall', _256 => _256(), 'optionalAccess', _257 => _257.catch, 'optionalCall', _258 => _258(reportBlocked)]);
|
|
12246
12257
|
} catch (e29) {
|
|
12247
12258
|
reportBlocked();
|
|
12248
12259
|
}
|
|
@@ -12256,12 +12267,12 @@ function FilePlayer({
|
|
|
12256
12267
|
try {
|
|
12257
12268
|
el.muted = false;
|
|
12258
12269
|
el.volume = typeof el.volume === "number" ? el.volume : 1;
|
|
12259
|
-
_optionalChain([el, 'access',
|
|
12260
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12270
|
+
_optionalChain([el, 'access', _259 => _259.play, 'optionalCall', _260 => _260(), 'optionalAccess', _261 => _261.catch, 'optionalCall', _262 => _262((err) => {
|
|
12271
|
+
const name = _optionalChain([err, 'optionalAccess', _263 => _263.name]);
|
|
12261
12272
|
if (name !== "NotAllowedError") return;
|
|
12262
12273
|
try {
|
|
12263
12274
|
el.muted = true;
|
|
12264
|
-
_optionalChain([el, 'access',
|
|
12275
|
+
_optionalChain([el, 'access', _264 => _264.play, 'optionalCall', _265 => _265(), 'optionalAccess', _266 => _266.catch, 'optionalCall', _267 => _267(() => {
|
|
12265
12276
|
setMutedFallbackBlocked(true);
|
|
12266
12277
|
setHoverMutedFallback(true);
|
|
12267
12278
|
})]);
|
|
@@ -12277,7 +12288,7 @@ function FilePlayer({
|
|
|
12277
12288
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
12278
12289
|
_react.useEffect.call(void 0, () => {
|
|
12279
12290
|
const el = hoverPlayerRef.current;
|
|
12280
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12291
|
+
if (!_optionalChain([el, 'optionalAccess', _268 => _268.addEventListener])) return void 0;
|
|
12281
12292
|
const onVolumeChange = () => {
|
|
12282
12293
|
if (el.muted === false) {
|
|
12283
12294
|
setMutedFallbackBlocked(false);
|
|
@@ -12290,14 +12301,14 @@ function FilePlayer({
|
|
|
12290
12301
|
}
|
|
12291
12302
|
return () => {
|
|
12292
12303
|
try {
|
|
12293
|
-
_optionalChain([el, 'access',
|
|
12304
|
+
_optionalChain([el, 'access', _269 => _269.removeEventListener, 'optionalCall', _270 => _270("volumechange", onVolumeChange)]);
|
|
12294
12305
|
} catch (e33) {
|
|
12295
12306
|
}
|
|
12296
12307
|
};
|
|
12297
12308
|
}, []);
|
|
12298
12309
|
_react.useEffect.call(void 0, () => {
|
|
12299
12310
|
const el = hoverPlayerRef.current;
|
|
12300
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12311
|
+
if (!_optionalChain([el, 'optionalAccess', _271 => _271.addEventListener])) return void 0;
|
|
12301
12312
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
12302
12313
|
try {
|
|
12303
12314
|
el.addEventListener("playing", onPlaying);
|
|
@@ -12305,7 +12316,7 @@ function FilePlayer({
|
|
|
12305
12316
|
}
|
|
12306
12317
|
return () => {
|
|
12307
12318
|
try {
|
|
12308
|
-
_optionalChain([el, 'access',
|
|
12319
|
+
_optionalChain([el, 'access', _272 => _272.removeEventListener, 'optionalCall', _273 => _273("playing", onPlaying)]);
|
|
12309
12320
|
} catch (e35) {
|
|
12310
12321
|
}
|
|
12311
12322
|
};
|
|
@@ -12316,15 +12327,15 @@ function FilePlayer({
|
|
|
12316
12327
|
});
|
|
12317
12328
|
_react.useEffect.call(void 0, () => {
|
|
12318
12329
|
const el = hoverPlayerRef.current;
|
|
12319
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12320
|
-
const handler = () => _optionalChain([onEndedRef, 'access',
|
|
12330
|
+
if (!_optionalChain([el, 'optionalAccess', _274 => _274.addEventListener])) return void 0;
|
|
12331
|
+
const handler = () => _optionalChain([onEndedRef, 'access', _275 => _275.current, 'optionalCall', _276 => _276()]);
|
|
12321
12332
|
try {
|
|
12322
12333
|
el.addEventListener("ended", handler);
|
|
12323
12334
|
} catch (e36) {
|
|
12324
12335
|
}
|
|
12325
12336
|
return () => {
|
|
12326
12337
|
try {
|
|
12327
|
-
_optionalChain([el, 'access',
|
|
12338
|
+
_optionalChain([el, 'access', _277 => _277.removeEventListener, 'optionalCall', _278 => _278("ended", handler)]);
|
|
12328
12339
|
} catch (e37) {
|
|
12329
12340
|
}
|
|
12330
12341
|
};
|
|
@@ -12333,19 +12344,19 @@ function FilePlayer({
|
|
|
12333
12344
|
_react.useImperativeHandle.call(void 0,
|
|
12334
12345
|
playerHandleRef,
|
|
12335
12346
|
() => ({
|
|
12336
|
-
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12347
|
+
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _279 => _279.current, 'optionalAccess', _280 => _280.currentTime]), () => ( 0)),
|
|
12337
12348
|
getDuration: () => {
|
|
12338
|
-
const d = _optionalChain([hoverPlayerRef, 'access',
|
|
12349
|
+
const d = _optionalChain([hoverPlayerRef, 'access', _281 => _281.current, 'optionalAccess', _282 => _282.duration]);
|
|
12339
12350
|
return typeof d === "number" && isFinite(d) ? d : 0;
|
|
12340
12351
|
},
|
|
12341
|
-
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12342
|
-
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12352
|
+
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _283 => _283.current, 'optionalAccess', _284 => _284.paused]), () => ( true)),
|
|
12353
|
+
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _285 => _285.current, 'optionalAccess', _286 => _286.muted]), () => ( false)),
|
|
12343
12354
|
play: async () => {
|
|
12344
|
-
await _optionalChain([hoverPlayerRef, 'access',
|
|
12355
|
+
await _optionalChain([hoverPlayerRef, 'access', _287 => _287.current, 'optionalAccess', _288 => _288.play, 'optionalCall', _289 => _289()]);
|
|
12345
12356
|
},
|
|
12346
12357
|
pause: () => {
|
|
12347
12358
|
try {
|
|
12348
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12359
|
+
_optionalChain([hoverPlayerRef, 'access', _290 => _290.current, 'optionalAccess', _291 => _291.pause, 'optionalCall', _292 => _292()]);
|
|
12349
12360
|
} catch (e38) {
|
|
12350
12361
|
}
|
|
12351
12362
|
},
|
|
@@ -12412,10 +12423,10 @@ function FilePlayer({
|
|
|
12412
12423
|
if (!el) return;
|
|
12413
12424
|
const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
|
|
12414
12425
|
try {
|
|
12415
|
-
_optionalChain([el, 'access',
|
|
12426
|
+
_optionalChain([el, 'access', _293 => _293.load, 'optionalCall', _294 => _294()]);
|
|
12416
12427
|
if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
|
|
12417
12428
|
const seekBack = () => {
|
|
12418
|
-
_optionalChain([el, 'access',
|
|
12429
|
+
_optionalChain([el, 'access', _295 => _295.removeEventListener, 'optionalCall', _296 => _296("loadedmetadata", seekBack)]);
|
|
12419
12430
|
try {
|
|
12420
12431
|
el.currentTime = resumeAt;
|
|
12421
12432
|
} catch (e40) {
|
|
@@ -12423,7 +12434,7 @@ function FilePlayer({
|
|
|
12423
12434
|
};
|
|
12424
12435
|
el.addEventListener("loadedmetadata", seekBack);
|
|
12425
12436
|
}
|
|
12426
|
-
_optionalChain([el, 'access',
|
|
12437
|
+
_optionalChain([el, 'access', _297 => _297.play, 'optionalCall', _298 => _298(), 'optionalAccess', _299 => _299.catch, 'optionalCall', _300 => _300(() => {
|
|
12427
12438
|
})]);
|
|
12428
12439
|
} catch (e41) {
|
|
12429
12440
|
}
|
|
@@ -12582,7 +12593,7 @@ function YouTubeFacadeInner({
|
|
|
12582
12593
|
const iframe = iframeRef.current;
|
|
12583
12594
|
if (!iframe) return void 0;
|
|
12584
12595
|
function subscribe2() {
|
|
12585
|
-
_optionalChain([iframe, 'optionalAccess',
|
|
12596
|
+
_optionalChain([iframe, 'optionalAccess', _301 => _301.contentWindow, 'optionalAccess', _302 => _302.postMessage, 'call', _303 => _303('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
|
|
12586
12597
|
}
|
|
12587
12598
|
iframe.addEventListener("load", subscribe2);
|
|
12588
12599
|
subscribe2();
|
|
@@ -12603,13 +12614,13 @@ function YouTubeFacadeInner({
|
|
|
12603
12614
|
return;
|
|
12604
12615
|
}
|
|
12605
12616
|
if (payload.event !== "infoDelivery") return;
|
|
12606
|
-
const state = _optionalChain([payload, 'access',
|
|
12617
|
+
const state = _optionalChain([payload, 'access', _304 => _304.info, 'optionalAccess', _305 => _305.playerState]);
|
|
12607
12618
|
if (typeof state !== "number") return;
|
|
12608
12619
|
if (state === YT_STATE_PLAYING) {
|
|
12609
12620
|
if (blurTimer !== null) return;
|
|
12610
12621
|
blurTimer = setTimeout(() => {
|
|
12611
12622
|
blurTimer = null;
|
|
12612
|
-
_optionalChain([iframeRef, 'access',
|
|
12623
|
+
_optionalChain([iframeRef, 'access', _306 => _306.current, 'optionalAccess', _307 => _307.blur, 'call', _308 => _308()]);
|
|
12613
12624
|
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
12614
12625
|
return;
|
|
12615
12626
|
}
|
|
@@ -12630,7 +12641,7 @@ function YouTubeFacadeInner({
|
|
|
12630
12641
|
prevSuspendedRef.current = Boolean(suspended);
|
|
12631
12642
|
if (!activated) return;
|
|
12632
12643
|
if (suspended && !wasSuspended) {
|
|
12633
|
-
_optionalChain([iframeRef, 'access',
|
|
12644
|
+
_optionalChain([iframeRef, 'access', _309 => _309.current, 'optionalAccess', _310 => _310.contentWindow, 'optionalAccess', _311 => _311.postMessage, 'call', _312 => _312(
|
|
12634
12645
|
'{"event":"command","func":"pauseVideo","args":[]}',
|
|
12635
12646
|
YT_NOCOOKIE_ORIGIN
|
|
12636
12647
|
)]);
|
|
@@ -12884,7 +12895,7 @@ function CardsStrip(props) {
|
|
|
12884
12895
|
_react.useEffect.call(void 0, () => {
|
|
12885
12896
|
const el = wrapperRef.current;
|
|
12886
12897
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
12887
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
12898
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _313 => _313[0], 'optionalAccess', _314 => _314.isIntersecting]), () => ( true))), {
|
|
12888
12899
|
rootMargin: "200px"
|
|
12889
12900
|
});
|
|
12890
12901
|
io.observe(el);
|
|
@@ -12906,9 +12917,9 @@ function CardsStrip(props) {
|
|
|
12906
12917
|
const p = hoverPointerRef.current;
|
|
12907
12918
|
if (!p.inside) return;
|
|
12908
12919
|
const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
|
|
12909
|
-
const cardEl = _optionalChain([el, 'optionalAccess',
|
|
12910
|
-
const scoped = cardEl && _optionalChain([scrollerRef, 'access',
|
|
12911
|
-
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess',
|
|
12920
|
+
const cardEl = _optionalChain([el, 'optionalAccess', _315 => _315.closest, 'optionalCall', _316 => _316("[data-strip-card-key]")]);
|
|
12921
|
+
const scoped = cardEl && _optionalChain([scrollerRef, 'access', _317 => _317.current, 'optionalAccess', _318 => _318.contains, 'call', _319 => _319(cardEl)]) ? cardEl : null;
|
|
12922
|
+
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _320 => _320.getAttribute, 'call', _321 => _321("data-strip-card-key")]), () => ( null));
|
|
12912
12923
|
const current = activeKeyRef.current;
|
|
12913
12924
|
if (key === current) return;
|
|
12914
12925
|
if (current !== null) deactivate(current);
|
|
@@ -12946,7 +12957,7 @@ function CardsStrip(props) {
|
|
|
12946
12957
|
}, [syncHoverToPointer]);
|
|
12947
12958
|
const seamBuffer = _react.useCallback.call(void 0, () => {
|
|
12948
12959
|
const half = singleCopyWidthRef.current;
|
|
12949
|
-
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
12960
|
+
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _322 => _322.current, 'optionalAccess', _323 => _323.clientWidth]), () => ( 0));
|
|
12950
12961
|
return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
|
|
12951
12962
|
}, []);
|
|
12952
12963
|
const { posRef: marqueePosRef, glideBy } = _chunkZI27ALYXcjs.useMarqueeEngine.call(void 0, {
|
|
@@ -12962,7 +12973,7 @@ function CardsStrip(props) {
|
|
|
12962
12973
|
const scroller = scrollerRef.current;
|
|
12963
12974
|
if (scroller) scroller.scrollLeft = pos;
|
|
12964
12975
|
},
|
|
12965
|
-
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
12976
|
+
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _324 => _324.current, 'optionalAccess', _325 => _325.scrollLeft]), () => ( 0)),
|
|
12966
12977
|
onAfterFrame: syncHoverIfScrolled
|
|
12967
12978
|
});
|
|
12968
12979
|
const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
@@ -13010,11 +13021,11 @@ function CardsStrip(props) {
|
|
|
13010
13021
|
fn = (el) => {
|
|
13011
13022
|
if (!el) return void 0;
|
|
13012
13023
|
cardElIdxRef.current.set(el, idx);
|
|
13013
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13024
|
+
_optionalChain([cardObserverRef, 'access', _326 => _326.current, 'optionalAccess', _327 => _327.observe, 'call', _328 => _328(el)]);
|
|
13014
13025
|
return () => {
|
|
13015
13026
|
cardElIdxRef.current.delete(el);
|
|
13016
13027
|
cardElNearRef.current.delete(el);
|
|
13017
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13028
|
+
_optionalChain([cardObserverRef, 'access', _329 => _329.current, 'optionalAccess', _330 => _330.unobserve, 'call', _331 => _331(el)]);
|
|
13018
13029
|
};
|
|
13019
13030
|
};
|
|
13020
13031
|
cardRefFns.set(idx, fn);
|
|
@@ -13033,7 +13044,7 @@ function CardsStrip(props) {
|
|
|
13033
13044
|
const track = trackRef.current;
|
|
13034
13045
|
if (!scroller || !track) return;
|
|
13035
13046
|
const firstCard = track.firstElementChild;
|
|
13036
|
-
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess',
|
|
13047
|
+
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _332 => _332.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
|
|
13037
13048
|
chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
|
|
13038
13049
|
if (marqueeActiveRef.current) {
|
|
13039
13050
|
glideBy(dir * step);
|
|
@@ -13090,7 +13101,7 @@ function CardsStrip(props) {
|
|
|
13090
13101
|
{
|
|
13091
13102
|
ref: (node) => {
|
|
13092
13103
|
wrapperRef.current = node;
|
|
13093
|
-
_optionalChain([rootRef, 'optionalCall',
|
|
13104
|
+
_optionalChain([rootRef, 'optionalCall', _333 => _333(node)]);
|
|
13094
13105
|
},
|
|
13095
13106
|
className: _chunkPRPZBXWZcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
|
|
13096
13107
|
children: [
|
|
@@ -13202,7 +13213,7 @@ function VideoHoverPreviewSurface({
|
|
|
13202
13213
|
if (gateControlled) return void 0;
|
|
13203
13214
|
const el = rootElRef.current;
|
|
13204
13215
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13205
|
-
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13216
|
+
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _334 => _334[0], 'optionalAccess', _335 => _335.isIntersecting]), () => ( false))), {
|
|
13206
13217
|
rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
13207
13218
|
});
|
|
13208
13219
|
io.observe(el);
|
|
@@ -13347,7 +13358,7 @@ function VideoBitesStrip({
|
|
|
13347
13358
|
const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
|
|
13348
13359
|
return filtered.sort(sortComparator);
|
|
13349
13360
|
}, [bites, filterPublished, sortComparator]);
|
|
13350
|
-
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access',
|
|
13361
|
+
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _336 => _336[0], 'optionalAccess', _337 => _337.url]) || null });
|
|
13351
13362
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13352
13363
|
CardsStrip,
|
|
13353
13364
|
{
|
|
@@ -13414,8 +13425,8 @@ function VideoBiteCard({
|
|
|
13414
13425
|
const controlled = active !== void 0;
|
|
13415
13426
|
const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
|
|
13416
13427
|
const isActive = controlled ? !!active : selfActive;
|
|
13417
|
-
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall',
|
|
13418
|
-
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall',
|
|
13428
|
+
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _338 => _338(key)]) : setSelfActive(true);
|
|
13429
|
+
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _339 => _339(key)]) : setSelfActive(false);
|
|
13419
13430
|
const titleInputRef = _react.useRef.call(void 0, null);
|
|
13420
13431
|
_chunkZI27ALYXcjs.useIsomorphicLayoutEffect.call(void 0, () => {
|
|
13421
13432
|
const el = titleInputRef.current;
|
|
@@ -13425,7 +13436,7 @@ function VideoBiteCard({
|
|
|
13425
13436
|
});
|
|
13426
13437
|
const navigate = () => {
|
|
13427
13438
|
if (bite.onNavigate) bite.onNavigate();
|
|
13428
|
-
else _optionalChain([onBiteNavigate, 'optionalCall',
|
|
13439
|
+
else _optionalChain([onBiteNavigate, 'optionalCall', _340 => _340(bite, index)]);
|
|
13429
13440
|
};
|
|
13430
13441
|
const handlePointerEnter = () => {
|
|
13431
13442
|
if (!isTouch) activate();
|
|
@@ -13450,9 +13461,9 @@ function VideoBiteCard({
|
|
|
13450
13461
|
placeholder: "Title (optional)",
|
|
13451
13462
|
"aria-label": "Bite title",
|
|
13452
13463
|
rows: 1,
|
|
13453
|
-
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall',
|
|
13464
|
+
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _341 => _341(e.target.value)]),
|
|
13454
13465
|
ref: titleInputRef,
|
|
13455
|
-
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall',
|
|
13466
|
+
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _342 => _342(e.target.value)]),
|
|
13456
13467
|
onClick: (e) => e.stopPropagation(),
|
|
13457
13468
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
13458
13469
|
titleClass,
|
|
@@ -13529,7 +13540,7 @@ function VideoBiteCard({
|
|
|
13529
13540
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13530
13541
|
"div",
|
|
13531
13542
|
{
|
|
13532
|
-
ref: (node) => _optionalChain([rootRef, 'optionalCall',
|
|
13543
|
+
ref: (node) => _optionalChain([rootRef, 'optionalCall', _343 => _343(node)]),
|
|
13533
13544
|
"aria-hidden": isClone || void 0,
|
|
13534
13545
|
"data-strip-card-key": key,
|
|
13535
13546
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
@@ -13584,8 +13595,8 @@ function EntityVideoSection({
|
|
|
13584
13595
|
const hasHighlight = !!highlightVideoUrl;
|
|
13585
13596
|
const hasVideo = hasFullVideo || hasHighlight;
|
|
13586
13597
|
const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
|
|
13587
|
-
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13588
|
-
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13598
|
+
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _344 => _344.captionsUrl])));
|
|
13599
|
+
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _345 => _345.highlightCaptionsUrl])));
|
|
13589
13600
|
if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
|
|
13590
13601
|
return null;
|
|
13591
13602
|
}
|
|
@@ -14104,7 +14115,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
14104
14115
|
] }) : null,
|
|
14105
14116
|
item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview }) }) : null
|
|
14106
14117
|
] }),
|
|
14107
|
-
_optionalChain([anchorProps, 'optionalAccess',
|
|
14118
|
+
_optionalChain([anchorProps, 'optionalAccess', _346 => _346.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14108
14119
|
] });
|
|
14109
14120
|
if (!anchorProps) {
|
|
14110
14121
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkNNFQLTJ3cjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
@@ -14132,7 +14143,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
14132
14143
|
|
|
14133
14144
|
|
|
14134
14145
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
14135
|
-
const goalsCount = _optionalChain([campaign, 'access',
|
|
14146
|
+
const goalsCount = _optionalChain([campaign, 'access', _347 => _347.goals, 'optionalAccess', _348 => _348.length]) || 0;
|
|
14136
14147
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14137
14148
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkNNFQLTJ3cjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
14138
14149
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkNNFQLTJ3cjs.COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -14426,7 +14437,7 @@ function pickFetchedCardHref({
|
|
|
14426
14437
|
itemHref,
|
|
14427
14438
|
allowComposed
|
|
14428
14439
|
}) {
|
|
14429
|
-
if (_optionalChain([composed, 'optionalAccess',
|
|
14440
|
+
if (_optionalChain([composed, 'optionalAccess', _349 => _349.hostOverride])) {
|
|
14430
14441
|
return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
|
|
14431
14442
|
}
|
|
14432
14443
|
if (itemHref) return { source: "item", href: itemHref };
|
|
@@ -14621,7 +14632,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
14621
14632
|
if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
|
|
14622
14633
|
const safePath = sanitizePath(row.path);
|
|
14623
14634
|
if (safePath) {
|
|
14624
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access',
|
|
14635
|
+
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _350 => _350.docPlatformTargets, 'optionalAccess', _351 => _351[row.documentType]]) : void 0;
|
|
14625
14636
|
if (docTarget) {
|
|
14626
14637
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
14627
14638
|
const base = `${_chunkPRPZBXWZcjs.getBaseUrl.call(void 0, docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
@@ -14764,8 +14775,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
14764
14775
|
if (href) {
|
|
14765
14776
|
items.push({
|
|
14766
14777
|
id: "open-details",
|
|
14767
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
14768
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
14778
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _352 => _352.label]), () => ( "Open Details")),
|
|
14779
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _353 => _353.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.EyeIcon, { size: 20 }))),
|
|
14769
14780
|
// Main row → open the entity (same tab, soft Link nav).
|
|
14770
14781
|
href,
|
|
14771
14782
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -14799,6 +14810,14 @@ function hubspotStatusToVariant(status) {
|
|
|
14799
14810
|
if (s === "OPEN") return "warning";
|
|
14800
14811
|
return "grey";
|
|
14801
14812
|
}
|
|
14813
|
+
function validatedHttpsUrl(value) {
|
|
14814
|
+
if (typeof value !== "string") return null;
|
|
14815
|
+
try {
|
|
14816
|
+
return new URL(value).protocol === "https:" ? value : null;
|
|
14817
|
+
} catch (e45) {
|
|
14818
|
+
return null;
|
|
14819
|
+
}
|
|
14820
|
+
}
|
|
14802
14821
|
function decodeVideoMarkerId(id) {
|
|
14803
14822
|
const mux = id.match(/^mux-([A-Za-z0-9_-]+)$/);
|
|
14804
14823
|
if (mux) {
|
|
@@ -14811,32 +14830,52 @@ function decodeVideoMarkerId(id) {
|
|
|
14811
14830
|
try {
|
|
14812
14831
|
const b64 = mp4[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
14813
14832
|
const url = atob(b64);
|
|
14814
|
-
|
|
14815
|
-
return { videoUrl:
|
|
14816
|
-
} catch (
|
|
14833
|
+
const safeUrl = validatedHttpsUrl(url);
|
|
14834
|
+
return safeUrl ? { videoUrl: safeUrl } : null;
|
|
14835
|
+
} catch (e46) {
|
|
14817
14836
|
return null;
|
|
14818
14837
|
}
|
|
14819
14838
|
}
|
|
14820
14839
|
if (/^[A-Za-z0-9_-]{11}$/.test(id)) return { youtubeUrl: id };
|
|
14821
14840
|
return null;
|
|
14822
14841
|
}
|
|
14842
|
+
function validatedVideoMetadata(chatRef) {
|
|
14843
|
+
const input = _nullishCoalesce(chatRef.metadata, () => ( {}));
|
|
14844
|
+
const metadata = {};
|
|
14845
|
+
for (const key of ["videoUrl", "highlightVideoUrl", "videoPoster", "highlightVideoPoster"]) {
|
|
14846
|
+
const url = validatedHttpsUrl(input[key]);
|
|
14847
|
+
if (url) metadata[key] = url;
|
|
14848
|
+
}
|
|
14849
|
+
const youtubeUrl = input.youtubeUrl;
|
|
14850
|
+
if (typeof youtubeUrl === "string" && /^[A-Za-z0-9_-]{11}$/.test(youtubeUrl)) {
|
|
14851
|
+
metadata.youtubeUrl = youtubeUrl;
|
|
14852
|
+
}
|
|
14853
|
+
const safeUrl = validatedHttpsUrl(chatRef.url);
|
|
14854
|
+
if (safeUrl) {
|
|
14855
|
+
const youtubeId2 = extractYouTubeId(safeUrl);
|
|
14856
|
+
delete metadata.videoUrl;
|
|
14857
|
+
delete metadata.youtubeUrl;
|
|
14858
|
+
metadata[youtubeId2 ? "youtubeUrl" : "videoUrl"] = _nullishCoalesce(youtubeId2, () => ( safeUrl));
|
|
14859
|
+
}
|
|
14860
|
+
return Object.keys(metadata).length > 0 ? metadata : null;
|
|
14861
|
+
}
|
|
14823
14862
|
function itemVideoMetadata(item) {
|
|
14824
14863
|
const pick = (...vals) => {
|
|
14825
14864
|
for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
|
|
14826
14865
|
return void 0;
|
|
14827
14866
|
};
|
|
14828
|
-
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
14867
|
+
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _354 => _354.metadata]), () => ( {}));
|
|
14829
14868
|
const out = {};
|
|
14830
|
-
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess',
|
|
14831
|
-
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess',
|
|
14832
|
-
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess',
|
|
14869
|
+
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _355 => _355.custom_video_url]), _optionalChain([item, 'optionalAccess', _356 => _356.main_video_url]));
|
|
14870
|
+
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _357 => _357.youtube_url]), _optionalChain([item, 'optionalAccess', _358 => _358.testimonial_video_url]));
|
|
14871
|
+
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _359 => _359.highlight_video_url]));
|
|
14833
14872
|
const videoPoster = pick(
|
|
14834
14873
|
m.videoPoster,
|
|
14835
|
-
_optionalChain([item, 'optionalAccess',
|
|
14836
|
-
_optionalChain([item, 'optionalAccess',
|
|
14837
|
-
_optionalChain([item, 'optionalAccess',
|
|
14874
|
+
_optionalChain([item, 'optionalAccess', _360 => _360.main_video_thumbnail]),
|
|
14875
|
+
_optionalChain([item, 'optionalAccess', _361 => _361.highlight_video_thumbnail]),
|
|
14876
|
+
_optionalChain([item, 'optionalAccess', _362 => _362.featured_image])
|
|
14838
14877
|
);
|
|
14839
|
-
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess',
|
|
14878
|
+
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _363 => _363.highlight_video_thumbnail]));
|
|
14840
14879
|
if (videoUrl) out.videoUrl = videoUrl;
|
|
14841
14880
|
if (youtubeUrl) out.youtubeUrl = youtubeUrl;
|
|
14842
14881
|
if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
|
|
@@ -14866,15 +14905,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
14866
14905
|
}
|
|
14867
14906
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
14868
14907
|
const it = item;
|
|
14869
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
14908
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _364 => _364.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
14870
14909
|
return {
|
|
14871
14910
|
type: "faq",
|
|
14872
14911
|
id: chatRef.id,
|
|
14873
14912
|
sourceRepo: chatRef.sourceRepo,
|
|
14874
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
14913
|
+
title: typeof _optionalChain([it, 'optionalAccess', _365 => _365.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
14875
14914
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
14876
14915
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
14877
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
14916
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _366 => _366.section]) === "string" && it.section ? { section: it.section } : {}
|
|
14878
14917
|
};
|
|
14879
14918
|
}
|
|
14880
14919
|
function HubspotTicketChatCard({
|
|
@@ -14882,8 +14921,8 @@ function HubspotTicketChatCard({
|
|
|
14882
14921
|
isNewTab,
|
|
14883
14922
|
discuss
|
|
14884
14923
|
}) {
|
|
14885
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
14886
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
14924
|
+
const status = typeof _optionalChain([chatRef, 'access', _367 => _367.metadata, 'optionalAccess', _368 => _368.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
14925
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _369 => _369.metadata, 'optionalAccess', _370 => _370.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
14887
14926
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
14888
14927
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14889
14928
|
MingoInfoCard,
|
|
@@ -14906,7 +14945,7 @@ function FaqChatCard({
|
|
|
14906
14945
|
isNewTab,
|
|
14907
14946
|
discuss
|
|
14908
14947
|
}) {
|
|
14909
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
14948
|
+
const section = typeof _optionalChain([chatRef, 'access', _371 => _371.metadata, 'optionalAccess', _372 => _372.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
14910
14949
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
14911
14950
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14912
14951
|
MingoInfoCard,
|
|
@@ -14926,7 +14965,7 @@ function SlackChatCard({
|
|
|
14926
14965
|
isNewTab,
|
|
14927
14966
|
discuss
|
|
14928
14967
|
}) {
|
|
14929
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
14968
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _373 => _373.metadata, 'optionalAccess', _374 => _374.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
14930
14969
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
14931
14970
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
14932
14971
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -14966,7 +15005,7 @@ function GenericFinancialChatCard({
|
|
|
14966
15005
|
isNewTab,
|
|
14967
15006
|
discuss
|
|
14968
15007
|
}) {
|
|
14969
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
15008
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _375 => _375.metadata, 'optionalAccess', _376 => _376.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
14970
15009
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14971
15010
|
MingoInfoCard,
|
|
14972
15011
|
{
|
|
@@ -15035,12 +15074,12 @@ function ProductReleaseChatCard({
|
|
|
15035
15074
|
discuss
|
|
15036
15075
|
}) {
|
|
15037
15076
|
const releaseProps = buildProps(item);
|
|
15038
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
15077
|
+
const status = _optionalChain([item, 'optionalAccess', _377 => _377.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
15039
15078
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15040
15079
|
EntityMingoCard,
|
|
15041
15080
|
{
|
|
15042
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15043
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15081
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _378 => _378.title]), () => ( "")),
|
|
15082
|
+
description: _optionalChain([item, 'optionalAccess', _379 => _379.summary]) || releaseProps.formattedDate || void 0,
|
|
15044
15083
|
cover: releaseProps.coverImage || void 0,
|
|
15045
15084
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.Rocket02Icon, { size: 24 }),
|
|
15046
15085
|
status,
|
|
@@ -15057,17 +15096,17 @@ function CampaignChatCard({
|
|
|
15057
15096
|
isNewTab,
|
|
15058
15097
|
discuss
|
|
15059
15098
|
}) {
|
|
15060
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15099
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _380 => _380.goals])) ? item.goals.length : 0;
|
|
15061
15100
|
const meta = [
|
|
15062
|
-
_optionalChain([item, 'optionalAccess',
|
|
15101
|
+
_optionalChain([item, 'optionalAccess', _381 => _381.start_date]) ? _chunkNNFQLTJ3cjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
15063
15102
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
15064
15103
|
"Marketing campaign"
|
|
15065
15104
|
].filter(Boolean).join(" \xB7 ");
|
|
15066
15105
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15067
15106
|
EntityMingoCard,
|
|
15068
15107
|
{
|
|
15069
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15070
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15108
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _382 => _382.name]), () => ( "")),
|
|
15109
|
+
description: meta || _optionalChain([item, 'optionalAccess', _383 => _383.description]) || void 0,
|
|
15071
15110
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.Megaphone01Icon, { size: 24 }),
|
|
15072
15111
|
chatRef,
|
|
15073
15112
|
isNewTab,
|
|
@@ -15122,14 +15161,14 @@ function BlogChatCard({
|
|
|
15122
15161
|
hasEmbeddedVideo,
|
|
15123
15162
|
discuss
|
|
15124
15163
|
}) {
|
|
15125
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15164
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _384 => _384.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _385 => _385.categories, 'access', _386 => _386.find, 'call', _387 => _387((c) => _optionalChain([c, 'optionalAccess', _388 => _388.name])), 'optionalAccess', _389 => _389.name]), () => ( void 0)) : void 0;
|
|
15126
15165
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
15127
15166
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15128
15167
|
EntityMingoCard,
|
|
15129
15168
|
{
|
|
15130
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15131
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15132
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15169
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _390 => _390.title]), () => ( "")),
|
|
15170
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _391 => _391.summary]), () => ( void 0)),
|
|
15171
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _392 => _392.featured_image]), ogPlaceholder),
|
|
15133
15172
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.NewspaperIcon, { size: 24 }),
|
|
15134
15173
|
status,
|
|
15135
15174
|
chatRef,
|
|
@@ -15146,13 +15185,13 @@ function CaseStudyChatCard({
|
|
|
15146
15185
|
ogPlaceholder,
|
|
15147
15186
|
discuss
|
|
15148
15187
|
}) {
|
|
15149
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15188
|
+
const meta = [_optionalChain([item, 'optionalAccess', _393 => _393.msp, 'optionalAccess', _394 => _394.name]), _optionalChain([item, 'optionalAccess', _395 => _395.user, 'optionalAccess', _396 => _396.full_name])].filter(Boolean).join(" \xB7 ");
|
|
15150
15189
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15151
15190
|
EntityMingoCard,
|
|
15152
15191
|
{
|
|
15153
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15154
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15155
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15192
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _397 => _397.title]), () => ( "")),
|
|
15193
|
+
description: _optionalChain([item, 'optionalAccess', _398 => _398.summary]) || meta || void 0,
|
|
15194
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _399 => _399.featured_image]), ogPlaceholder),
|
|
15156
15195
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TrophyIcon, { size: 24 }),
|
|
15157
15196
|
status: { label: "Case study", variant: "grey" },
|
|
15158
15197
|
chatRef,
|
|
@@ -15169,13 +15208,13 @@ function CustomerInterviewChatCard({
|
|
|
15169
15208
|
ogPlaceholder,
|
|
15170
15209
|
discuss
|
|
15171
15210
|
}) {
|
|
15172
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15211
|
+
const meta = [_optionalChain([item, 'optionalAccess', _400 => _400.user, 'optionalAccess', _401 => _401.full_name]), _optionalChain([item, 'optionalAccess', _402 => _402.msp, 'optionalAccess', _403 => _403.name])].filter(Boolean).join(" \xB7 ");
|
|
15173
15212
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15174
15213
|
EntityMingoCard,
|
|
15175
15214
|
{
|
|
15176
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15177
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15178
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15215
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _404 => _404.title]), () => ( "")),
|
|
15216
|
+
description: _optionalChain([item, 'optionalAccess', _405 => _405.video_summary]) || meta || void 0,
|
|
15217
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _406 => _406.featured_image]), ogPlaceholder),
|
|
15179
15218
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MicrophoneIcon, { size: 24 }),
|
|
15180
15219
|
status: { label: "Interview", variant: "grey" },
|
|
15181
15220
|
chatRef,
|
|
@@ -15192,13 +15231,13 @@ function InvestorUpdateChatCard({
|
|
|
15192
15231
|
ogPlaceholder,
|
|
15193
15232
|
discuss
|
|
15194
15233
|
}) {
|
|
15195
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
15234
|
+
const title = _optionalChain([item, 'optionalAccess', _407 => _407.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _408 => _408.update_number]), () => ( "?"))}`;
|
|
15196
15235
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15197
15236
|
EntityMingoCard,
|
|
15198
15237
|
{
|
|
15199
15238
|
title,
|
|
15200
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15201
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15239
|
+
description: _optionalChain([item, 'optionalAccess', _409 => _409.strategic_update]) || _optionalChain([item, 'optionalAccess', _410 => _410.content]) || _chunkNNFQLTJ3cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _411 => _411.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _412 => _412.period_end]), () => ( null))) || void 0,
|
|
15240
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _413 => _413.featured_image]), ogPlaceholder),
|
|
15202
15241
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.PresentationLineIcon, { size: 24 }),
|
|
15203
15242
|
status: { label: "Investor update", variant: "grey" },
|
|
15204
15243
|
chatRef,
|
|
@@ -15215,12 +15254,12 @@ function OnboardingGuideChatCard({
|
|
|
15215
15254
|
ogPlaceholder,
|
|
15216
15255
|
discuss
|
|
15217
15256
|
}) {
|
|
15218
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
15257
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _414 => _414.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _415 => _415.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _416 => _416.og_image_url]), ogPlaceholder)));
|
|
15219
15258
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15220
15259
|
EntityMingoCard,
|
|
15221
15260
|
{
|
|
15222
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15223
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15261
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _417 => _417.title]), () => ( "")),
|
|
15262
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _418 => _418.summary]), () => ( _optionalChain([item, 'optionalAccess', _419 => _419.description]))), () => ( void 0)),
|
|
15224
15263
|
cover,
|
|
15225
15264
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CompassIcon, { size: 24 }),
|
|
15226
15265
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -15241,25 +15280,25 @@ function ProgramChatCard({
|
|
|
15241
15280
|
discuss
|
|
15242
15281
|
}) {
|
|
15243
15282
|
const icon = configKey === "webinar" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.PresentationBarIcon, { size: 24 }) : configKey === "event" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CalendarIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MicrophoneIcon, { size: 24 });
|
|
15244
|
-
const isScheduled = _optionalChain([item, 'optionalAccess',
|
|
15283
|
+
const isScheduled = _optionalChain([item, 'optionalAccess', _420 => _420.status]) === "scheduled";
|
|
15245
15284
|
let typeMeta;
|
|
15246
|
-
if (configKey === "podcast" && typeof _optionalChain([item, 'optionalAccess',
|
|
15285
|
+
if (configKey === "podcast" && typeof _optionalChain([item, 'optionalAccess', _421 => _421.duration_seconds]) === "number" && item.duration_seconds > 0 && !isScheduled) {
|
|
15247
15286
|
typeMeta = _chunkNNFQLTJ3cjs.formatDurationCompact.call(void 0, item.duration_seconds);
|
|
15248
|
-
} else if (configKey === "event" && typeof _optionalChain([item, 'optionalAccess',
|
|
15287
|
+
} else if (configKey === "event" && typeof _optionalChain([item, 'optionalAccess', _422 => _422.location_name]) === "string" && item.location_name.trim().length > 0) {
|
|
15249
15288
|
typeMeta = item.location_name;
|
|
15250
|
-
} else if (configKey === "webinar" && _optionalChain([item, 'optionalAccess',
|
|
15289
|
+
} else if (configKey === "webinar" && _optionalChain([item, 'optionalAccess', _423 => _423.start_at])) {
|
|
15251
15290
|
const time = _chunkNNFQLTJ3cjs.formatTimeWithTimezone.call(void 0, item.start_at, _nullishCoalesce(item.timezone, () => ( null)));
|
|
15252
15291
|
const dur = _chunkNNFQLTJ3cjs.formatDurationFromRange.call(void 0, item.start_at, item.end_at);
|
|
15253
15292
|
typeMeta = dur ? `${time} \xB7 ${dur}` : time;
|
|
15254
15293
|
}
|
|
15255
|
-
const itemDate = _chunkNNFQLTJ3cjs.formatDateUTC.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15294
|
+
const itemDate = _chunkNNFQLTJ3cjs.formatDateUTC.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _424 => _424.date]), () => ( null)), { fallback: "", timezone: "local" });
|
|
15256
15295
|
const meta = [itemDate, typeMeta].filter(Boolean).join(" \xB7 ");
|
|
15257
15296
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15258
15297
|
EntityMingoCard,
|
|
15259
15298
|
{
|
|
15260
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15261
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15262
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15299
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _425 => _425.title]), () => ( "")),
|
|
15300
|
+
description: meta || _optionalChain([item, 'optionalAccess', _426 => _426.description]) || void 0,
|
|
15301
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _427 => _427.cover_url]), ogPlaceholder),
|
|
15263
15302
|
fallbackIcon: icon,
|
|
15264
15303
|
status: { label, variant: "grey" },
|
|
15265
15304
|
chatRef,
|
|
@@ -15276,10 +15315,10 @@ function RoadmapChatCard({
|
|
|
15276
15315
|
cardType,
|
|
15277
15316
|
discuss
|
|
15278
15317
|
}) {
|
|
15279
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
15280
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
15318
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _428 => _428.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
15319
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _429 => _429.customItemId]) != null;
|
|
15281
15320
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MapIcon, { size: 24 });
|
|
15282
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
15321
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _430 => _430.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
15283
15322
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
15284
15323
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
15285
15324
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -15290,10 +15329,10 @@ function RoadmapChatCard({
|
|
|
15290
15329
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15291
15330
|
EntityMingoCard,
|
|
15292
15331
|
{
|
|
15293
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15294
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15332
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _431 => _431.title]), () => ( "")),
|
|
15333
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _432 => _432.description]), () => ( void 0)),
|
|
15295
15334
|
fallbackIcon: icon,
|
|
15296
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
15335
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _433 => _433.status])),
|
|
15297
15336
|
chatRef,
|
|
15298
15337
|
isNewTab,
|
|
15299
15338
|
discuss,
|
|
@@ -15309,7 +15348,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
15309
15348
|
bareInline: true,
|
|
15310
15349
|
contentRefType: docType,
|
|
15311
15350
|
noComposedHref: true,
|
|
15312
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15351
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _434 => _434.url]), () => ( null)),
|
|
15313
15352
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15314
15353
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
15315
15354
|
};
|
|
@@ -15374,7 +15413,7 @@ function programRegistryEntries() {
|
|
|
15374
15413
|
discuss: opts.discuss,
|
|
15375
15414
|
configKey: cfg.configKey,
|
|
15376
15415
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
15377
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15416
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _435 => _435.extras, 'optionalAccess', _436 => _436.buildOgPlaceholderUrl, 'optionalCall', _437 => _437(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _438 => _438.title]), () => ( "")))]), () => ( null))
|
|
15378
15417
|
}
|
|
15379
15418
|
)
|
|
15380
15419
|
}));
|
|
@@ -15395,7 +15434,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
15395
15434
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
15396
15435
|
// task id post-fetch (the refs frame used to carry it).
|
|
15397
15436
|
noComposedHref: true,
|
|
15398
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15437
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _439 => _439.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
15399
15438
|
}
|
|
15400
15439
|
};
|
|
15401
15440
|
function roadmapRegistryEntries() {
|
|
@@ -15437,8 +15476,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15437
15476
|
DeletedDataCard,
|
|
15438
15477
|
{
|
|
15439
15478
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
15440
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15441
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15479
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _440 => _440.metadata, 'optionalAccess', _441 => _441.entity_label]), () => ( null)),
|
|
15480
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _442 => _442.metadata, 'optionalAccess', _443 => _443.recovery_note]), () => ( null))
|
|
15442
15481
|
}
|
|
15443
15482
|
)
|
|
15444
15483
|
},
|
|
@@ -15452,7 +15491,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15452
15491
|
bareInline: true,
|
|
15453
15492
|
contentRefType: "faq",
|
|
15454
15493
|
noComposedHref: true,
|
|
15455
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15494
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _444 => _444.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
15456
15495
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15457
15496
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15458
15497
|
},
|
|
@@ -15486,8 +15525,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15486
15525
|
chatRef,
|
|
15487
15526
|
isNewTab: opts.isNewTab,
|
|
15488
15527
|
discuss: opts.discuss,
|
|
15489
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15490
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
15528
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _445 => _445.extras, 'optionalAccess', _446 => _446.buildOgPlaceholderUrl, 'optionalCall', _447 => _447(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _448 => _448.title]), () => ( "")))]), () => ( null)),
|
|
15529
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _449 => _449.metadata, 'optionalAccess', _450 => _450.hasEmbeddedVideo]) === true
|
|
15491
15530
|
}
|
|
15492
15531
|
)
|
|
15493
15532
|
},
|
|
@@ -15503,7 +15542,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15503
15542
|
chatRef,
|
|
15504
15543
|
isNewTab: opts.isNewTab,
|
|
15505
15544
|
discuss: opts.discuss,
|
|
15506
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15545
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _451 => _451.extras, 'optionalAccess', _452 => _452.buildOgPlaceholderUrl, 'optionalCall', _453 => _453(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _454 => _454.title]), () => ( "")))]), () => ( null))
|
|
15507
15546
|
}
|
|
15508
15547
|
)
|
|
15509
15548
|
},
|
|
@@ -15519,7 +15558,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15519
15558
|
chatRef,
|
|
15520
15559
|
isNewTab: opts.isNewTab,
|
|
15521
15560
|
discuss: opts.discuss,
|
|
15522
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15561
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _455 => _455.extras, 'optionalAccess', _456 => _456.buildOgPlaceholderUrl, 'optionalCall', _457 => _457(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.title]), () => ( "")))]), () => ( null))
|
|
15523
15562
|
}
|
|
15524
15563
|
)
|
|
15525
15564
|
},
|
|
@@ -15529,7 +15568,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15529
15568
|
bareInline: true,
|
|
15530
15569
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
15531
15570
|
render: (item, chatRef, opts) => {
|
|
15532
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15571
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _459 => _459.extras, 'optionalAccess', _460 => _460.buildProductReleaseCardProps]), () => ( _chunkNNFQLTJ3cjs.defaultBuildProductReleaseCardProps));
|
|
15533
15572
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15534
15573
|
ProductReleaseChatCard,
|
|
15535
15574
|
{
|
|
@@ -15555,7 +15594,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15555
15594
|
chatRef,
|
|
15556
15595
|
isNewTab: opts.isNewTab,
|
|
15557
15596
|
discuss: opts.discuss,
|
|
15558
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15597
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _461 => _461.extras, 'optionalAccess', _462 => _462.buildOgPlaceholderUrl, 'optionalCall', _463 => _463(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _464 => _464.title]), () => ( "")))]), () => ( null))
|
|
15559
15598
|
}
|
|
15560
15599
|
)
|
|
15561
15600
|
},
|
|
@@ -15573,7 +15612,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15573
15612
|
chatRef,
|
|
15574
15613
|
isNewTab: opts.isNewTab,
|
|
15575
15614
|
discuss: opts.discuss,
|
|
15576
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15615
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _465 => _465.extras, 'optionalAccess', _466 => _466.buildOgPlaceholderUrl, 'optionalCall', _467 => _467(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _468 => _468.title]), () => ( "")))]), () => ( null))
|
|
15577
15616
|
}
|
|
15578
15617
|
)
|
|
15579
15618
|
},
|
|
@@ -15584,7 +15623,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15584
15623
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
|
|
15585
15624
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
15586
15625
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
15587
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15626
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _469 => _469.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
15588
15627
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15589
15628
|
},
|
|
15590
15629
|
...roadmapRegistryEntries()
|
|
@@ -15603,13 +15642,13 @@ function ChatCardNavWrap({
|
|
|
15603
15642
|
if (!href) return;
|
|
15604
15643
|
const targetEl = e.target;
|
|
15605
15644
|
const host = e.currentTarget;
|
|
15606
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
15607
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
15608
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
15645
|
+
if (!_optionalChain([host, 'optionalAccess', _470 => _470.contains, 'call', _471 => _471(targetEl)])) return;
|
|
15646
|
+
if (_optionalChain([targetEl, 'optionalAccess', _472 => _472.closest, 'optionalCall', _473 => _473("button")])) return;
|
|
15647
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _474 => _474.closest, 'optionalCall', _475 => _475("a")])) return;
|
|
15609
15648
|
const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
|
|
15610
15649
|
if (!handled) return;
|
|
15611
15650
|
e.stopPropagation();
|
|
15612
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
15651
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _476 => _476.closeChat])) panel.closeChat();
|
|
15613
15652
|
};
|
|
15614
15653
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
15615
15654
|
}
|
|
@@ -15631,7 +15670,7 @@ function ChatCardLoader({
|
|
|
15631
15670
|
title: chatRef.title,
|
|
15632
15671
|
externalUrl: chatRef.url,
|
|
15633
15672
|
targetPlatform: chatRef.targetPlatform,
|
|
15634
|
-
path: typeof _optionalChain([chatRef, 'access',
|
|
15673
|
+
path: typeof _optionalChain([chatRef, 'access', _477 => _477.metadata, 'optionalAccess', _478 => _478.path]) === "string" ? chatRef.metadata.path : null
|
|
15635
15674
|
},
|
|
15636
15675
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
15637
15676
|
);
|
|
@@ -15645,11 +15684,11 @@ function ChatCardLoader({
|
|
|
15645
15684
|
const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
|
|
15646
15685
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
15647
15686
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
15648
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
15687
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _479 => _479.contentRefType]), () => ( "")),
|
|
15649
15688
|
fetchEntry ? resolvedChatRef.id : ""
|
|
15650
15689
|
);
|
|
15651
15690
|
if (!entry) return null;
|
|
15652
|
-
const composedHref = _optionalChain([fetchEntry, 'optionalAccess',
|
|
15691
|
+
const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _480 => _480.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
|
|
15653
15692
|
contentRefType: fetchEntry.contentRefType,
|
|
15654
15693
|
id: resolvedChatRef.id,
|
|
15655
15694
|
item,
|
|
@@ -15657,7 +15696,7 @@ function ChatCardLoader({
|
|
|
15657
15696
|
}) : null;
|
|
15658
15697
|
const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
|
|
15659
15698
|
composed: composedHref,
|
|
15660
|
-
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
15699
|
+
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _481 => _481.fallbackHref, 'optionalCall', _482 => _482(item)]), () => ( null)),
|
|
15661
15700
|
allowComposed: !fetchEntry.noComposedHref
|
|
15662
15701
|
}) : null;
|
|
15663
15702
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
@@ -15691,7 +15730,7 @@ function ChatCardLoader({
|
|
|
15691
15730
|
isNewTab,
|
|
15692
15731
|
discuss
|
|
15693
15732
|
};
|
|
15694
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
15733
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _483 => _483.metadata, 'optionalAccess', _484 => _484.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
15695
15734
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15696
15735
|
ChatCardNavWrap,
|
|
15697
15736
|
{
|
|
@@ -15715,7 +15754,7 @@ function ChatCardLoader({
|
|
|
15715
15754
|
if (!fetchEntry) {
|
|
15716
15755
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
15717
15756
|
}
|
|
15718
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
15757
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _485 => _485.skeleton, 'optionalCall', _486 => _486()]), () => ( null)) });
|
|
15719
15758
|
if (!item) {
|
|
15720
15759
|
if (isError) {
|
|
15721
15760
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
@@ -15757,13 +15796,15 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
|
15757
15796
|
}
|
|
15758
15797
|
);
|
|
15759
15798
|
if (chatRef.type === "video") {
|
|
15799
|
+
const enrichedMetadata = validatedVideoMetadata(chatRef);
|
|
15760
15800
|
const decoded = decodeVideoMarkerId(chatRef.id);
|
|
15761
|
-
|
|
15801
|
+
const playableMetadata = _nullishCoalesce(enrichedMetadata, () => ( decoded));
|
|
15802
|
+
if (playableMetadata) {
|
|
15762
15803
|
const displayRef = {
|
|
15763
15804
|
...chatRef,
|
|
15764
15805
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : "Video",
|
|
15765
|
-
url: _nullishCoalesce(_nullishCoalesce(chatRef.url, () => (
|
|
15766
|
-
metadata:
|
|
15806
|
+
url: _nullishCoalesce(_nullishCoalesce(chatRef.url, () => ( (typeof playableMetadata.videoUrl === "string" ? playableMetadata.videoUrl : null))), () => ( (typeof playableMetadata.youtubeUrl === "string" ? `https://www.youtube.com/watch?v=${playableMetadata.youtubeUrl}` : null))),
|
|
15807
|
+
metadata: playableMetadata
|
|
15767
15808
|
};
|
|
15768
15809
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockCard, { inline: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatInlineVideoPill, { chatRef: displayRef }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatVideoEntityCard, { chatRef: displayRef }) });
|
|
15769
15810
|
}
|
|
@@ -16075,7 +16116,7 @@ function useChunkCatchup({
|
|
|
16075
16116
|
if (catchupRun.current === run) {
|
|
16076
16117
|
if (currentDialogId !== dialogIdRef.current) {
|
|
16077
16118
|
catchupRun.current = null;
|
|
16078
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
16119
|
+
if (_optionalChain([pendingCatchupRef, 'access', _487 => _487.current, 'optionalAccess', _488 => _488.dialogId]) === currentDialogId) {
|
|
16079
16120
|
pendingCatchupRef.current = null;
|
|
16080
16121
|
}
|
|
16081
16122
|
} else {
|
|
@@ -16086,7 +16127,7 @@ function useChunkCatchup({
|
|
|
16086
16127
|
if (pending.dialogId === currentDialogId) {
|
|
16087
16128
|
rearmForQueuedCatchup();
|
|
16088
16129
|
try {
|
|
16089
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
16130
|
+
await _optionalChain([catchUpChunksRef, 'access', _489 => _489.current, 'optionalCall', _490 => _490(pending.fromSequenceId)]);
|
|
16090
16131
|
} catch (rerunError) {
|
|
16091
16132
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
16092
16133
|
}
|
|
@@ -16153,7 +16194,7 @@ function useChunkCatchup({
|
|
|
16153
16194
|
|
|
16154
16195
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
16155
16196
|
function prefersReducedMotion() {
|
|
16156
|
-
return typeof window !== "undefined" && _optionalChain([window, 'access',
|
|
16197
|
+
return typeof window !== "undefined" && _optionalChain([window, 'access', _491 => _491.matchMedia, 'optionalCall', _492 => _492("(prefers-reduced-motion: reduce)"), 'access', _493 => _493.matches]) === true;
|
|
16157
16198
|
}
|
|
16158
16199
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
16159
16200
|
const [index, setIndex] = _react.useState.call(void 0, 0);
|
|
@@ -16164,7 +16205,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
16164
16205
|
setIndex(0);
|
|
16165
16206
|
}
|
|
16166
16207
|
_react.useEffect.call(void 0, () => {
|
|
16167
|
-
const mq = _optionalChain([window, 'access',
|
|
16208
|
+
const mq = _optionalChain([window, 'access', _494 => _494.matchMedia, 'optionalCall', _495 => _495("(prefers-reduced-motion: reduce)")]);
|
|
16168
16209
|
const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
|
|
16169
16210
|
sync();
|
|
16170
16211
|
if (!mq) return void 0;
|
|
@@ -16299,7 +16340,7 @@ function useJetStreamDialogSubscription({
|
|
|
16299
16340
|
if (subscriptionRef.current) {
|
|
16300
16341
|
try {
|
|
16301
16342
|
subscriptionRef.current.unsubscribe();
|
|
16302
|
-
} catch (
|
|
16343
|
+
} catch (e47) {
|
|
16303
16344
|
}
|
|
16304
16345
|
subscriptionRef.current = null;
|
|
16305
16346
|
}
|
|
@@ -16307,7 +16348,7 @@ function useJetStreamDialogSubscription({
|
|
|
16307
16348
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16308
16349
|
conn: sharedConn,
|
|
16309
16350
|
wsUrl,
|
|
16310
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
16351
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _496 => _496.current, 'optionalCall', _497 => _497()]),
|
|
16311
16352
|
backoff: reconnectionBackoffRef.current,
|
|
16312
16353
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16313
16354
|
// JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
|
|
@@ -16322,7 +16363,7 @@ function useJetStreamDialogSubscription({
|
|
|
16322
16363
|
setReconnectionCount((c) => c + 1);
|
|
16323
16364
|
}
|
|
16324
16365
|
hadConnectionBeforeRef.current = true;
|
|
16325
|
-
_optionalChain([onConnectRef, 'access',
|
|
16366
|
+
_optionalChain([onConnectRef, 'access', _498 => _498.current, 'optionalCall', _499 => _499()]);
|
|
16326
16367
|
}
|
|
16327
16368
|
if (status === "error") {
|
|
16328
16369
|
console.warn("[JetStream] NATS protocol error:", evt.data);
|
|
@@ -16332,7 +16373,7 @@ function useJetStreamDialogSubscription({
|
|
|
16332
16373
|
setIsConnected(false);
|
|
16333
16374
|
setIsSubscribed(false);
|
|
16334
16375
|
tearDownSubscription();
|
|
16335
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
16376
|
+
_optionalChain([onDisconnectRef, 'access', _500 => _500.current, 'optionalCall', _501 => _501()]);
|
|
16336
16377
|
}
|
|
16337
16378
|
}
|
|
16338
16379
|
});
|
|
@@ -16393,7 +16434,7 @@ function useJetStreamDialogSubscription({
|
|
|
16393
16434
|
if (subscriptionRef.current) {
|
|
16394
16435
|
try {
|
|
16395
16436
|
subscriptionRef.current.unsubscribe();
|
|
16396
|
-
} catch (
|
|
16437
|
+
} catch (e48) {
|
|
16397
16438
|
}
|
|
16398
16439
|
subscriptionRef.current = null;
|
|
16399
16440
|
}
|
|
@@ -16428,7 +16469,7 @@ function useJetStreamDialogSubscription({
|
|
|
16428
16469
|
parsed.streamSeq = streamSeq;
|
|
16429
16470
|
}
|
|
16430
16471
|
cb(parsed, topic);
|
|
16431
|
-
} catch (
|
|
16472
|
+
} catch (e49) {
|
|
16432
16473
|
}
|
|
16433
16474
|
},
|
|
16434
16475
|
{
|
|
@@ -16452,14 +16493,14 @@ function useJetStreamDialogSubscription({
|
|
|
16452
16493
|
if (cancelled) {
|
|
16453
16494
|
try {
|
|
16454
16495
|
handle.unsubscribe();
|
|
16455
|
-
} catch (
|
|
16496
|
+
} catch (e50) {
|
|
16456
16497
|
}
|
|
16457
16498
|
return;
|
|
16458
16499
|
}
|
|
16459
16500
|
subscriptionRef.current = handle;
|
|
16460
16501
|
setIsSubscribed(true);
|
|
16461
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16462
|
-
} catch (
|
|
16502
|
+
_optionalChain([onSubscribedRef, 'access', _502 => _502.current, 'optionalCall', _503 => _503()]);
|
|
16503
|
+
} catch (e51) {
|
|
16463
16504
|
if (!cancelled) {
|
|
16464
16505
|
setIsSubscribed(false);
|
|
16465
16506
|
}
|
|
@@ -16471,7 +16512,7 @@ function useJetStreamDialogSubscription({
|
|
|
16471
16512
|
if (subscriptionRef.current) {
|
|
16472
16513
|
try {
|
|
16473
16514
|
subscriptionRef.current.unsubscribe();
|
|
16474
|
-
} catch (
|
|
16515
|
+
} catch (e52) {
|
|
16475
16516
|
}
|
|
16476
16517
|
subscriptionRef.current = null;
|
|
16477
16518
|
}
|
|
@@ -16574,20 +16615,20 @@ function useNatsDialogSubscription({
|
|
|
16574
16615
|
const tearDownSubscriptions = () => {
|
|
16575
16616
|
subscriptionRefs.current.forEach((sub) => {
|
|
16576
16617
|
try {
|
|
16577
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16578
|
-
} catch (
|
|
16618
|
+
_optionalChain([sub, 'optionalAccess', _504 => _504.unsubscribe, 'call', _505 => _505()]);
|
|
16619
|
+
} catch (e53) {
|
|
16579
16620
|
}
|
|
16580
16621
|
});
|
|
16581
16622
|
subscriptionRefs.current.clear();
|
|
16582
16623
|
lastSubscribedDialogIdRef.current = null;
|
|
16583
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16624
|
+
_optionalChain([abortControllerRef, 'access', _506 => _506.current, 'optionalAccess', _507 => _507.abort, 'call', _508 => _508()]);
|
|
16584
16625
|
abortControllerRef.current = null;
|
|
16585
16626
|
};
|
|
16586
16627
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
16587
16628
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16588
16629
|
conn: sharedConn,
|
|
16589
16630
|
wsUrl,
|
|
16590
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
16631
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _509 => _509.current, 'optionalCall', _510 => _510()]),
|
|
16591
16632
|
backoff: reconnectionBackoffRef.current,
|
|
16592
16633
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16593
16634
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -16598,7 +16639,7 @@ function useNatsDialogSubscription({
|
|
|
16598
16639
|
setReconnectionCount((c) => c + 1);
|
|
16599
16640
|
}
|
|
16600
16641
|
hadConnectionBeforeRef.current = true;
|
|
16601
|
-
_optionalChain([onConnectRef, 'access',
|
|
16642
|
+
_optionalChain([onConnectRef, 'access', _511 => _511.current, 'optionalCall', _512 => _512()]);
|
|
16602
16643
|
}
|
|
16603
16644
|
if (status === "error") {
|
|
16604
16645
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -16608,7 +16649,7 @@ function useNatsDialogSubscription({
|
|
|
16608
16649
|
setIsConnected(false);
|
|
16609
16650
|
setIsSubscribed(false);
|
|
16610
16651
|
tearDownSubscriptions();
|
|
16611
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
16652
|
+
_optionalChain([onDisconnectRef, 'access', _513 => _513.current, 'optionalCall', _514 => _514()]);
|
|
16612
16653
|
}
|
|
16613
16654
|
}
|
|
16614
16655
|
});
|
|
@@ -16639,13 +16680,13 @@ function useNatsDialogSubscription({
|
|
|
16639
16680
|
setIsSubscribed(false);
|
|
16640
16681
|
subscriptionRefs.current.forEach((sub) => {
|
|
16641
16682
|
try {
|
|
16642
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16643
|
-
} catch (
|
|
16683
|
+
_optionalChain([sub, 'optionalAccess', _515 => _515.unsubscribe, 'call', _516 => _516()]);
|
|
16684
|
+
} catch (e54) {
|
|
16644
16685
|
}
|
|
16645
16686
|
});
|
|
16646
16687
|
subscriptionRefs.current.clear();
|
|
16647
16688
|
lastSubscribedDialogIdRef.current = null;
|
|
16648
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16689
|
+
_optionalChain([abortControllerRef, 'access', _517 => _517.current, 'optionalAccess', _518 => _518.abort, 'call', _519 => _519()]);
|
|
16649
16690
|
abortControllerRef.current = null;
|
|
16650
16691
|
}
|
|
16651
16692
|
return void 0;
|
|
@@ -16657,12 +16698,12 @@ function useNatsDialogSubscription({
|
|
|
16657
16698
|
if (subscriptionRefs.current.size > 0) {
|
|
16658
16699
|
subscriptionRefs.current.forEach((sub) => {
|
|
16659
16700
|
try {
|
|
16660
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16661
|
-
} catch (
|
|
16701
|
+
_optionalChain([sub, 'optionalAccess', _520 => _520.unsubscribe, 'call', _521 => _521()]);
|
|
16702
|
+
} catch (e55) {
|
|
16662
16703
|
}
|
|
16663
16704
|
});
|
|
16664
16705
|
subscriptionRefs.current.clear();
|
|
16665
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16706
|
+
_optionalChain([abortControllerRef, 'access', _522 => _522.current, 'optionalAccess', _523 => _523.abort, 'call', _524 => _524()]);
|
|
16666
16707
|
}
|
|
16667
16708
|
abortControllerRef.current = new AbortController();
|
|
16668
16709
|
const abort = abortControllerRef.current;
|
|
@@ -16681,7 +16722,7 @@ function useNatsDialogSubscription({
|
|
|
16681
16722
|
const dataStr = decoder.decode(msg.data);
|
|
16682
16723
|
const parsed = JSON.parse(dataStr);
|
|
16683
16724
|
onEventRef.current(parsed, messageType);
|
|
16684
|
-
} catch (
|
|
16725
|
+
} catch (e56) {
|
|
16685
16726
|
}
|
|
16686
16727
|
};
|
|
16687
16728
|
topicsRef.current.forEach((topic) => {
|
|
@@ -16692,7 +16733,7 @@ function useNatsDialogSubscription({
|
|
|
16692
16733
|
});
|
|
16693
16734
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
16694
16735
|
setIsSubscribed(true);
|
|
16695
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16736
|
+
_optionalChain([onSubscribedRef, 'access', _525 => _525.current, 'optionalCall', _526 => _526()]);
|
|
16696
16737
|
};
|
|
16697
16738
|
if (isConnectedRef.current) {
|
|
16698
16739
|
createSubscriptions();
|
|
@@ -16703,8 +16744,8 @@ function useNatsDialogSubscription({
|
|
|
16703
16744
|
abort.abort();
|
|
16704
16745
|
subscriptions.forEach((sub) => {
|
|
16705
16746
|
try {
|
|
16706
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16707
|
-
} catch (
|
|
16747
|
+
_optionalChain([sub, 'optionalAccess', _527 => _527.unsubscribe, 'call', _528 => _528()]);
|
|
16748
|
+
} catch (e57) {
|
|
16708
16749
|
}
|
|
16709
16750
|
});
|
|
16710
16751
|
subscriptions.clear();
|
|
@@ -16731,7 +16772,7 @@ function useNatsDialogSubscription({
|
|
|
16731
16772
|
const dataStr = decoder.decode(msg.data);
|
|
16732
16773
|
const parsed = JSON.parse(dataStr);
|
|
16733
16774
|
onEventRef.current(parsed, messageType);
|
|
16734
|
-
} catch (
|
|
16775
|
+
} catch (e58) {
|
|
16735
16776
|
}
|
|
16736
16777
|
};
|
|
16737
16778
|
topicsRef.current.forEach((topic) => {
|
|
@@ -16742,7 +16783,7 @@ function useNatsDialogSubscription({
|
|
|
16742
16783
|
});
|
|
16743
16784
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
16744
16785
|
setIsSubscribed(true);
|
|
16745
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16786
|
+
_optionalChain([onSubscribedRef, 'access', _529 => _529.current, 'optionalCall', _530 => _530()]);
|
|
16746
16787
|
} else if (subscriptionRefs.current.size > 0) {
|
|
16747
16788
|
setIsSubscribed(true);
|
|
16748
16789
|
}
|
|
@@ -16750,10 +16791,10 @@ function useNatsDialogSubscription({
|
|
|
16750
16791
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
16751
16792
|
}
|
|
16752
16793
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
16753
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
16794
|
+
const path = _optionalChain([options, 'optionalAccess', _531 => _531.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
16754
16795
|
const u = new URL(path, apiBaseUrl);
|
|
16755
16796
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
16756
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
16797
|
+
if (_optionalChain([options, 'optionalAccess', _532 => _532.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _533 => _533.token])) {
|
|
16757
16798
|
u.searchParams.set("authorization", options.token);
|
|
16758
16799
|
}
|
|
16759
16800
|
return u.toString();
|
|
@@ -16771,7 +16812,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16771
16812
|
const data = await res.json();
|
|
16772
16813
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
16773
16814
|
} catch (err) {
|
|
16774
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
16815
|
+
if (_optionalChain([err, 'optionalAccess', _534 => _534.name]) === "AbortError") throw err;
|
|
16775
16816
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
16776
16817
|
return [];
|
|
16777
16818
|
}
|
|
@@ -16779,8 +16820,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16779
16820
|
var NO_COMMANDS = [];
|
|
16780
16821
|
function useSlashCommands(prefix, commandsUrl) {
|
|
16781
16822
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
16782
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
16783
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
16823
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _535 => _535.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
16824
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _536 => _536.prefix]) !== prefix;
|
|
16784
16825
|
_react.useEffect.call(void 0, () => {
|
|
16785
16826
|
if (prefix == null) return void 0;
|
|
16786
16827
|
let cancelled = false;
|
|
@@ -16790,7 +16831,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
16790
16831
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
16791
16832
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
16792
16833
|
} catch (err) {
|
|
16793
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
16834
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _537 => _537.name]) !== "AbortError") {
|
|
16794
16835
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
16795
16836
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
16796
16837
|
}
|
|
@@ -16813,7 +16854,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
16813
16854
|
const query = _reactquery.useQuery.call(void 0, {
|
|
16814
16855
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
16815
16856
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
16816
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16857
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _538 => _538.enabled]), () => ( true)),
|
|
16817
16858
|
staleTime: Infinity,
|
|
16818
16859
|
gcTime: Infinity,
|
|
16819
16860
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -16852,21 +16893,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
16852
16893
|
}
|
|
16853
16894
|
const data = await res.json();
|
|
16854
16895
|
return {
|
|
16855
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16856
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16857
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16858
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16859
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16860
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16896
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _539 => _539.name]), () => ( null)),
|
|
16897
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _540 => _540.icon]), () => ( null)),
|
|
16898
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _541 => _541.greeting]), () => ( null)),
|
|
16899
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _542 => _542.enabledRagTableIds]), () => ( [])),
|
|
16900
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _543 => _543.quickActions]), () => ( [])),
|
|
16901
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _544 => _544.suggestedQueries]), () => ( []))
|
|
16861
16902
|
};
|
|
16862
16903
|
} catch (err) {
|
|
16863
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
16904
|
+
if (_optionalChain([err, 'optionalAccess', _545 => _545.name]) === "AbortError") throw err;
|
|
16864
16905
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
16865
16906
|
return EMPTY_STATE_FALLBACK;
|
|
16866
16907
|
}
|
|
16867
16908
|
}
|
|
16868
16909
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
16869
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16910
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _546 => _546.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
16870
16911
|
const query = _reactquery.useQuery.call(void 0, {
|
|
16871
16912
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
16872
16913
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -16895,7 +16936,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
16895
16936
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
16896
16937
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
16897
16938
|
return new Promise((resolve, reject) => {
|
|
16898
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
16939
|
+
if (_optionalChain([signal, 'optionalAccess', _547 => _547.aborted])) {
|
|
16899
16940
|
reject(new Error("Upload cancelled"));
|
|
16900
16941
|
return;
|
|
16901
16942
|
}
|
|
@@ -16937,7 +16978,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
16937
16978
|
const handleSignalAbort = () => {
|
|
16938
16979
|
xhr.abort();
|
|
16939
16980
|
};
|
|
16940
|
-
_optionalChain([signal, 'optionalAccess',
|
|
16981
|
+
_optionalChain([signal, 'optionalAccess', _548 => _548.addEventListener, 'call', _549 => _549("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
16941
16982
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
16942
16983
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
16943
16984
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -16981,10 +17022,10 @@ function useChatAttachments() {
|
|
|
16981
17022
|
try {
|
|
16982
17023
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
16983
17024
|
} catch (err) {
|
|
16984
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17025
|
+
if (_optionalChain([ctrl, 'optionalAccess', _550 => _550.signal, 'access', _551 => _551.aborted])) return;
|
|
16985
17026
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
16986
17027
|
}
|
|
16987
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17028
|
+
if (_optionalChain([ctrl, 'optionalAccess', _552 => _552.signal, 'access', _553 => _553.aborted])) return;
|
|
16988
17029
|
if (!sniffed) {
|
|
16989
17030
|
throw new Error("Unrecognized file format");
|
|
16990
17031
|
}
|
|
@@ -16998,7 +17039,7 @@ function useChatAttachments() {
|
|
|
16998
17039
|
const urlResp = await _chunkCP6TIRONcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
16999
17040
|
method: "POST",
|
|
17000
17041
|
headers: { "Content-Type": "application/json" },
|
|
17001
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
17042
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _554 => _554.signal]),
|
|
17002
17043
|
body: JSON.stringify({
|
|
17003
17044
|
fileName: att.file.name,
|
|
17004
17045
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -17027,9 +17068,9 @@ function useChatAttachments() {
|
|
|
17027
17068
|
(pct) => {
|
|
17028
17069
|
updateOne(att.id, { progress: pct });
|
|
17029
17070
|
},
|
|
17030
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
17071
|
+
_optionalChain([ctrl, 'optionalAccess', _555 => _555.signal])
|
|
17031
17072
|
);
|
|
17032
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17073
|
+
if (_optionalChain([ctrl, 'optionalAccess', _556 => _556.signal, 'access', _557 => _557.aborted])) return;
|
|
17033
17074
|
updateOne(att.id, {
|
|
17034
17075
|
status: "ready",
|
|
17035
17076
|
progress: 100,
|
|
@@ -17037,7 +17078,7 @@ function useChatAttachments() {
|
|
|
17037
17078
|
viewToken: mintData.viewToken
|
|
17038
17079
|
});
|
|
17039
17080
|
} catch (err) {
|
|
17040
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17081
|
+
if (_optionalChain([ctrl, 'optionalAccess', _558 => _558.signal, 'access', _559 => _559.aborted])) return;
|
|
17041
17082
|
const message = err instanceof Error ? err.message : String(err);
|
|
17042
17083
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
17043
17084
|
} finally {
|
|
@@ -17186,11 +17227,11 @@ var ANON_DEFAULTS = {
|
|
|
17186
17227
|
function useResolveChatIdentity(enabled) {
|
|
17187
17228
|
const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
|
|
17188
17229
|
const url = runtime.endpoints.identityUrl;
|
|
17189
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
17230
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _560 => _560.email]), () => ( null));
|
|
17190
17231
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17191
17232
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17192
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
17193
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
17233
|
+
const data = _optionalChain([resolved, 'optionalAccess', _561 => _561.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
17234
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _562 => _562.key]) !== requestKey;
|
|
17194
17235
|
_react.useEffect.call(void 0, () => {
|
|
17195
17236
|
if (requestKey === null) return void 0;
|
|
17196
17237
|
let cancelled = false;
|
|
@@ -17337,7 +17378,7 @@ function useChat({
|
|
|
17337
17378
|
onMessagesChangeRef.current = onMessagesChange;
|
|
17338
17379
|
});
|
|
17339
17380
|
_react.useEffect.call(void 0, () => {
|
|
17340
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
17381
|
+
_optionalChain([onMessagesChangeRef, 'access', _563 => _563.current, 'optionalCall', _564 => _564(messages)]);
|
|
17341
17382
|
}, [messages]);
|
|
17342
17383
|
const {
|
|
17343
17384
|
streamMessage,
|
|
@@ -17374,7 +17415,7 @@ function useChat({
|
|
|
17374
17415
|
name: "You",
|
|
17375
17416
|
content: text,
|
|
17376
17417
|
timestamp: /* @__PURE__ */ new Date(),
|
|
17377
|
-
..._optionalChain([options, 'optionalAccess',
|
|
17418
|
+
..._optionalChain([options, 'optionalAccess', _565 => _565.hidden]) ? { hidden: true } : {}
|
|
17378
17419
|
};
|
|
17379
17420
|
addMessage(userMessage);
|
|
17380
17421
|
setIsTyping(true);
|
|
@@ -17588,8 +17629,8 @@ function buildConfirmToolBody(request) {
|
|
|
17588
17629
|
async function readServerErrorMessage(response) {
|
|
17589
17630
|
try {
|
|
17590
17631
|
const body = await response.json();
|
|
17591
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
17592
|
-
} catch (
|
|
17632
|
+
if (typeof _optionalChain([body, 'optionalAccess', _566 => _566.error]) === "string" && body.error.length > 0) return body.error;
|
|
17633
|
+
} catch (e59) {
|
|
17593
17634
|
}
|
|
17594
17635
|
return null;
|
|
17595
17636
|
}
|
|
@@ -17760,7 +17801,7 @@ function createSseFrameDecoder() {
|
|
|
17760
17801
|
let meta;
|
|
17761
17802
|
try {
|
|
17762
17803
|
meta = JSON.parse(metaStr);
|
|
17763
|
-
} catch (
|
|
17804
|
+
} catch (e60) {
|
|
17764
17805
|
inText = true;
|
|
17765
17806
|
out.push({ type: "turn-start", implicit: true });
|
|
17766
17807
|
if (buffer.length > 0) {
|
|
@@ -17814,7 +17855,7 @@ function createSseFrameDecoder() {
|
|
|
17814
17855
|
debug: meta.debug
|
|
17815
17856
|
});
|
|
17816
17857
|
}
|
|
17817
|
-
} catch (
|
|
17858
|
+
} catch (e61) {
|
|
17818
17859
|
}
|
|
17819
17860
|
}
|
|
17820
17861
|
return out;
|
|
@@ -17846,7 +17887,7 @@ function errorDetailsMessage(details) {
|
|
|
17846
17887
|
let parsed;
|
|
17847
17888
|
try {
|
|
17848
17889
|
parsed = JSON.parse(details);
|
|
17849
|
-
} catch (
|
|
17890
|
+
} catch (e62) {
|
|
17850
17891
|
return details;
|
|
17851
17892
|
}
|
|
17852
17893
|
if (typeof parsed !== "object" || parsed === null) return void 0;
|
|
@@ -17862,6 +17903,23 @@ function approvalDisplaysInline(approvalType, displayApprovalTypes) {
|
|
|
17862
17903
|
return !displayApprovalTypes || displayApprovalTypes.includes(approvalType);
|
|
17863
17904
|
}
|
|
17864
17905
|
|
|
17906
|
+
// src/components/chat/utils/chat-source-metadata.ts
|
|
17907
|
+
function mergeChatSources(current, incoming) {
|
|
17908
|
+
const sourcesByIndex = new Map((_nullishCoalesce(current, () => ( []))).map((source) => [source.index, source]));
|
|
17909
|
+
incoming.forEach((source) => {
|
|
17910
|
+
if (!sourcesByIndex.has(source.index)) sourcesByIndex.set(source.index, source);
|
|
17911
|
+
});
|
|
17912
|
+
return Array.from(sourcesByIndex.values());
|
|
17913
|
+
}
|
|
17914
|
+
function mergeChatRefs(current, incoming) {
|
|
17915
|
+
const refsByIdentity = new Map((_nullishCoalesce(current, () => ( []))).map((ref) => [`${ref.type}:${ref.id}`, ref]));
|
|
17916
|
+
incoming.forEach((ref) => {
|
|
17917
|
+
const identity = `${ref.type}:${ref.id}`;
|
|
17918
|
+
if (!refsByIdentity.has(identity)) refsByIdentity.set(identity, ref);
|
|
17919
|
+
});
|
|
17920
|
+
return Array.from(refsByIdentity.values());
|
|
17921
|
+
}
|
|
17922
|
+
|
|
17865
17923
|
// src/components/chat/stream/message-mutations.ts
|
|
17866
17924
|
function nextId(role) {
|
|
17867
17925
|
return `${role}-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
|
|
@@ -17916,9 +17974,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
17916
17974
|
for (const seg of segments) {
|
|
17917
17975
|
const tail = merged[merged.length - 1];
|
|
17918
17976
|
const key = upsertKey(seg);
|
|
17919
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
17977
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _567 => _567.type]) === "text") {
|
|
17920
17978
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
17921
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
17979
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _568 => _568.type]) === "thinking") {
|
|
17922
17980
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
17923
17981
|
} else if (key) {
|
|
17924
17982
|
const idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -17958,7 +18016,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
17958
18016
|
}
|
|
17959
18017
|
if (s.type !== "approval_batch") return s;
|
|
17960
18018
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
17961
|
-
const hasRow = _optionalChain([s, 'access',
|
|
18019
|
+
const hasRow = _optionalChain([s, 'access', _569 => _569.data, 'access', _570 => _570.toolCalls, 'optionalAccess', _571 => _571.some, 'call', _572 => _572((c) => c.toolExecutionRequestId === requestId)]);
|
|
17962
18020
|
if (!isAnchor && !hasRow) return s;
|
|
17963
18021
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
17964
18022
|
const nextExecutions = hasRow ? {
|
|
@@ -17980,8 +18038,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
17980
18038
|
};
|
|
17981
18039
|
}
|
|
17982
18040
|
function nextBatchExecution(prevExec, toolData) {
|
|
17983
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
17984
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
18041
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _573 => _573.status]) === "done") return null;
|
|
18042
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _574 => _574.result]), success: _optionalChain([prevExec, 'optionalAccess', _575 => _575.success]) };
|
|
17985
18043
|
}
|
|
17986
18044
|
function withBatchExecution(seg, execId, state) {
|
|
17987
18045
|
return {
|
|
@@ -17998,11 +18056,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
17998
18056
|
}
|
|
17999
18057
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
18000
18058
|
return mapSegments(prev, (s) => {
|
|
18001
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
18059
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _576 => _576.data, 'access', _577 => _577.toolCalls, 'optionalAccess', _578 => _578.some, 'call', _579 => _579((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
18002
18060
|
return s;
|
|
18003
18061
|
}
|
|
18004
|
-
const existing = _optionalChain([s, 'access',
|
|
18005
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
18062
|
+
const existing = _optionalChain([s, 'access', _580 => _580.data, 'access', _581 => _581.executions, 'optionalAccess', _582 => _582[rowRequestId]]);
|
|
18063
|
+
if (_optionalChain([existing, 'optionalAccess', _583 => _583.status]) === "done") return s;
|
|
18006
18064
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
18007
18065
|
});
|
|
18008
18066
|
}
|
|
@@ -18038,7 +18096,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
18038
18096
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
18039
18097
|
const seg = message.segments[j];
|
|
18040
18098
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
18041
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
18099
|
+
const prevExec = _optionalChain([seg, 'access', _584 => _584.data, 'access', _585 => _585.executions, 'optionalAccess', _586 => _586[execId]]);
|
|
18042
18100
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
18043
18101
|
if (nextExec === null) return prev;
|
|
18044
18102
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -18211,9 +18269,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18211
18269
|
type: "tool_execution",
|
|
18212
18270
|
data: {
|
|
18213
18271
|
...toolData,
|
|
18214
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18215
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18216
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
18272
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _587 => _587.data, 'access', _588 => _588.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _589 => _589.toolTitle]))),
|
|
18273
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _590 => _590.data, 'access', _591 => _591.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _592 => _592.toolExplanation]))),
|
|
18274
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _593 => _593.parameters])
|
|
18217
18275
|
}
|
|
18218
18276
|
};
|
|
18219
18277
|
if (existingIndex !== -1) {
|
|
@@ -18237,7 +18295,7 @@ var MessageSegmentAccumulator = class {
|
|
|
18237
18295
|
if (seg.type !== "approval_batch") return seg;
|
|
18238
18296
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
18239
18297
|
if (!hasCall) return seg;
|
|
18240
|
-
const prev = _optionalChain([seg, 'access',
|
|
18298
|
+
const prev = _optionalChain([seg, 'access', _594 => _594.data, 'access', _595 => _595.executions, 'optionalAccess', _596 => _596[execId]]);
|
|
18241
18299
|
const next = nextBatchExecution(prev, toolData);
|
|
18242
18300
|
matched = true;
|
|
18243
18301
|
if (next === null) return seg;
|
|
@@ -18371,8 +18429,8 @@ var MessageSegmentAccumulator = class {
|
|
|
18371
18429
|
requestId,
|
|
18372
18430
|
{
|
|
18373
18431
|
...pendingApproval,
|
|
18374
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
18375
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
18432
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _597 => _597.command]) || "",
|
|
18433
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _598 => _598.approvalType]) || approvalType
|
|
18376
18434
|
},
|
|
18377
18435
|
status
|
|
18378
18436
|
);
|
|
@@ -18397,9 +18455,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18397
18455
|
type: "escalation_offer",
|
|
18398
18456
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
18399
18457
|
// not blank the card the PENDING chunk already painted.
|
|
18400
|
-
data: { offerId, text: text || _optionalChain([existing, 'optionalAccess',
|
|
18458
|
+
data: { offerId, text: text || _optionalChain([existing, 'optionalAccess', _599 => _599.data, 'access', _600 => _600.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _601 => _601.data, 'access', _602 => _602.origin]))) },
|
|
18401
18459
|
status,
|
|
18402
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
18460
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _603 => _603.resolvedByName]))),
|
|
18403
18461
|
onApprove: this.callbacks.onEscalationApprove,
|
|
18404
18462
|
onReject: this.callbacks.onEscalationReject
|
|
18405
18463
|
};
|
|
@@ -18721,10 +18779,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
18721
18779
|
const sourcesMap = /* @__PURE__ */ new Map();
|
|
18722
18780
|
let sendCount = 0;
|
|
18723
18781
|
let sseCurrentText = "";
|
|
18782
|
+
let pendingSources;
|
|
18783
|
+
let pendingRefs;
|
|
18724
18784
|
let stateCache = null;
|
|
18725
18785
|
function invalidate() {
|
|
18726
18786
|
stateCache = null;
|
|
18727
|
-
_optionalChain([onChange, 'optionalCall',
|
|
18787
|
+
_optionalChain([onChange, 'optionalCall', _604 => _604()]);
|
|
18728
18788
|
}
|
|
18729
18789
|
function getState() {
|
|
18730
18790
|
if (!stateCache) {
|
|
@@ -18740,7 +18800,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
18740
18800
|
return stateCache;
|
|
18741
18801
|
}
|
|
18742
18802
|
function emit(name, ...args) {
|
|
18743
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
18803
|
+
_optionalChain([onEffect, 'optionalCall', _605 => _605({ name, args })]);
|
|
18744
18804
|
}
|
|
18745
18805
|
function setMessagesInternal(next) {
|
|
18746
18806
|
if (next !== messages) {
|
|
@@ -18771,24 +18831,35 @@ function createChatStreamReducer(options = {}) {
|
|
|
18771
18831
|
return [...next.slice(0, -1), { ...last, streamSeq: seq }];
|
|
18772
18832
|
}
|
|
18773
18833
|
function applySegmentsToState(segments, meta) {
|
|
18774
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
18775
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
18834
|
+
const seq = _optionalChain([meta, 'optionalAccess', _606 => _606.streamSeq]);
|
|
18835
|
+
if (_optionalChain([meta, 'optionalAccess', _607 => _607.append]) && meta.isCompacting) {
|
|
18776
18836
|
setMessagesInternal(stampTrailingAssistantSeq(upsertTrailingCompaction(messages, segments), seq));
|
|
18777
18837
|
return;
|
|
18778
18838
|
}
|
|
18779
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
18839
|
+
if (_optionalChain([meta, 'optionalAccess', _608 => _608.append])) {
|
|
18780
18840
|
setMessagesInternal(stampTrailingAssistantSeq(appendToTrailingAssistant(messages, segments), seq));
|
|
18781
18841
|
return;
|
|
18782
18842
|
}
|
|
18783
18843
|
setMessagesInternal(stampTrailingAssistantSeq(updateTrailingAssistant(messages, segments), seq));
|
|
18784
18844
|
}
|
|
18845
|
+
function attachPendingSourceMetadata() {
|
|
18846
|
+
if (!pendingSources && !pendingRefs) return;
|
|
18847
|
+
const last = messages[messages.length - 1];
|
|
18848
|
+
if (!last || last.role !== "assistant") return;
|
|
18849
|
+
const next = {
|
|
18850
|
+
...last,
|
|
18851
|
+
...pendingSources ? { sources: pendingSources } : {},
|
|
18852
|
+
...pendingRefs ? { refs: pendingRefs } : {}
|
|
18853
|
+
};
|
|
18854
|
+
setMessagesInternal([...messages.slice(0, -1), next]);
|
|
18855
|
+
}
|
|
18785
18856
|
function applyStreamStartToState() {
|
|
18786
18857
|
setPhaseInternal("streaming");
|
|
18787
18858
|
const adoptTail = adoptTrailingAssistant;
|
|
18788
18859
|
adoptTrailingAssistant = false;
|
|
18789
18860
|
const last = messages[messages.length - 1];
|
|
18790
18861
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
18791
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
18862
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _609 => _609.segments, 'optionalAccess', _610 => _610.length]), () => ( 0))) > 0 || last.content !== "";
|
|
18792
18863
|
if (!hasContent) return;
|
|
18793
18864
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
18794
18865
|
}
|
|
@@ -18900,6 +18971,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
18900
18971
|
}
|
|
18901
18972
|
switch (event.type) {
|
|
18902
18973
|
case "turn-start": {
|
|
18974
|
+
pendingSources = void 0;
|
|
18975
|
+
pendingRefs = void 0;
|
|
18903
18976
|
isInStream = true;
|
|
18904
18977
|
hasEverStreamed = true;
|
|
18905
18978
|
turnStartedAt = Date.now();
|
|
@@ -18914,6 +18987,14 @@ function createChatStreamReducer(options = {}) {
|
|
|
18914
18987
|
emit("onStreamEnd");
|
|
18915
18988
|
setPhaseInternal("idle");
|
|
18916
18989
|
accumulator.resetSegments();
|
|
18990
|
+
pendingSources = void 0;
|
|
18991
|
+
pendingRefs = void 0;
|
|
18992
|
+
break;
|
|
18993
|
+
}
|
|
18994
|
+
case "sources": {
|
|
18995
|
+
pendingSources = mergeChatSources(pendingSources, event.sources);
|
|
18996
|
+
if (event.refs) pendingRefs = mergeChatRefs(pendingRefs, event.refs);
|
|
18997
|
+
attachPendingSourceMetadata();
|
|
18917
18998
|
break;
|
|
18918
18999
|
}
|
|
18919
19000
|
case "metadata": {
|
|
@@ -18942,10 +19023,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
18942
19023
|
if (isInStream || !hasEverStreamed) {
|
|
18943
19024
|
emitSegments(segments);
|
|
18944
19025
|
applySegmentsToState(segments, withSeqMeta(void 0));
|
|
19026
|
+
attachPendingSourceMetadata();
|
|
18945
19027
|
} else {
|
|
18946
19028
|
const delta = [{ type: kind, text: event.text }];
|
|
18947
19029
|
emitSegments(delta, { append: true });
|
|
18948
19030
|
applySegmentsToState(delta, withSeqMeta({ append: true }));
|
|
19031
|
+
attachPendingSourceMetadata();
|
|
18949
19032
|
}
|
|
18950
19033
|
break;
|
|
18951
19034
|
}
|
|
@@ -18998,13 +19081,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
18998
19081
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
18999
19082
|
pendingEscalated.set(requestId, {
|
|
19000
19083
|
command: summary,
|
|
19001
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19084
|
+
explanation: _optionalChain([required, 'optionalAccess', _611 => _611.toolExplanation]),
|
|
19002
19085
|
approvalType,
|
|
19003
19086
|
toolCalls
|
|
19004
19087
|
});
|
|
19005
19088
|
emit("onEscalatedApproval", requestId, {
|
|
19006
19089
|
command: summary,
|
|
19007
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19090
|
+
explanation: _optionalChain([required, 'optionalAccess', _612 => _612.toolExplanation]),
|
|
19008
19091
|
approvalType
|
|
19009
19092
|
});
|
|
19010
19093
|
break;
|
|
@@ -19388,7 +19471,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19388
19471
|
const resolveBatch = (status, confirm) => async () => {
|
|
19389
19472
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
19390
19473
|
for (const id of ids) {
|
|
19391
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
19474
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _613 => _613(id)]);
|
|
19392
19475
|
if (ok === false) {
|
|
19393
19476
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
19394
19477
|
}
|
|
@@ -19524,8 +19607,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
19524
19607
|
}
|
|
19525
19608
|
}
|
|
19526
19609
|
}
|
|
19527
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
19528
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
19610
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _614 => _614.resumed]), () => ( messages.length > 0)));
|
|
19611
|
+
if (_optionalChain([extras, 'optionalAccess', _615 => _615.agentBusy])) agentBusyState();
|
|
19529
19612
|
invalidate();
|
|
19530
19613
|
}
|
|
19531
19614
|
return {
|
|
@@ -19610,7 +19693,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19610
19693
|
},
|
|
19611
19694
|
endSseTurn() {
|
|
19612
19695
|
const last = messages[messages.length - 1];
|
|
19613
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
19696
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _616 => _616.segments, 'optionalAccess', _617 => _617.length]), () => ( 0))) === 0 && last.content === "") {
|
|
19614
19697
|
messages = messages.slice(0, -1);
|
|
19615
19698
|
}
|
|
19616
19699
|
sseCurrentText = "";
|
|
@@ -19763,10 +19846,10 @@ function createChatDialogStore(options = {}) {
|
|
|
19763
19846
|
if (onEvict) {
|
|
19764
19847
|
const sep = key.indexOf(KEY_SEP);
|
|
19765
19848
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
19766
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19767
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19768
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19769
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19849
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _618 => _618.state, 'access', _619 => _619.messages]), () => ( EMPTY_STATE.messages)),
|
|
19850
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _620 => _620.state, 'access', _621 => _621.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
19851
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _622 => _622.getLastAppliedSeq, 'call', _623 => _623()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
19852
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _624 => _624.getPendingEchoes, 'call', _625 => _625()]), () => ( EMPTY_PENDING_ECHOES))
|
|
19770
19853
|
});
|
|
19771
19854
|
}
|
|
19772
19855
|
}
|
|
@@ -19776,12 +19859,12 @@ function createChatDialogStore(options = {}) {
|
|
|
19776
19859
|
const key = keyOf(dialogId, side);
|
|
19777
19860
|
let reducer = reducers.get(key);
|
|
19778
19861
|
if (!reducer) {
|
|
19779
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
19862
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _626 => _626(dialogId, side)]), () => ( {}));
|
|
19780
19863
|
const userOnChange = base.onChange;
|
|
19781
19864
|
reducer = createChatStreamReducer({
|
|
19782
19865
|
...base,
|
|
19783
19866
|
onChange: () => {
|
|
19784
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
19867
|
+
_optionalChain([userOnChange, 'optionalCall', _627 => _627()]);
|
|
19785
19868
|
notify();
|
|
19786
19869
|
}
|
|
19787
19870
|
});
|
|
@@ -19826,7 +19909,7 @@ function createChatDialogStore(options = {}) {
|
|
|
19826
19909
|
};
|
|
19827
19910
|
}
|
|
19828
19911
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
19829
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
19912
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _628 => _628.get, 'call', _629 => _629(keyOf(dialogId, side)), 'optionalAccess', _630 => _630.state]), () => ( EMPTY_STATE));
|
|
19830
19913
|
}
|
|
19831
19914
|
function getServerSnapshot2() {
|
|
19832
19915
|
return EMPTY_STATE;
|
|
@@ -19918,7 +20001,7 @@ function createDeltaBatcher({
|
|
|
19918
20001
|
pending = [];
|
|
19919
20002
|
const key = pendingKey;
|
|
19920
20003
|
for (const delta of batch) applyOne(delta, key);
|
|
19921
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
20004
|
+
_optionalChain([onFlushed, 'optionalCall', _631 => _631(batch.length)]);
|
|
19922
20005
|
}
|
|
19923
20006
|
function schedule() {
|
|
19924
20007
|
if (raf !== null || timer !== null) return;
|
|
@@ -19942,7 +20025,7 @@ function createDeltaBatcher({
|
|
|
19942
20025
|
}
|
|
19943
20026
|
if (!isDeltaEvent(event)) return false;
|
|
19944
20027
|
const tail = pending[pending.length - 1];
|
|
19945
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
20028
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _632 => _632.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
19946
20029
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
19947
20030
|
pending[pending.length - 1] = {
|
|
19948
20031
|
...tail,
|
|
@@ -19973,7 +20056,7 @@ function useChatStreamReducer({
|
|
|
19973
20056
|
side = DEFAULT_DIALOG_SIDE,
|
|
19974
20057
|
createReducerOptions
|
|
19975
20058
|
}) {
|
|
19976
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
20059
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _633 => _633()]), () => ( {})));
|
|
19977
20060
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
19978
20061
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
19979
20062
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -20012,7 +20095,7 @@ var STORAGE_KEY = "conversation";
|
|
|
20012
20095
|
var namespaceFor = (source) => {
|
|
20013
20096
|
const base = `mingo-chat-${source}`;
|
|
20014
20097
|
const auth = _chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, );
|
|
20015
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
20098
|
+
return _optionalChain([auth, 'optionalAccess', _634 => _634.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
20016
20099
|
};
|
|
20017
20100
|
function createChatConversationStorage(source) {
|
|
20018
20101
|
return _chunkCP6TIRONcjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -20040,7 +20123,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
20040
20123
|
for (const k of toRemove) {
|
|
20041
20124
|
window.localStorage.removeItem(k);
|
|
20042
20125
|
}
|
|
20043
|
-
} catch (
|
|
20126
|
+
} catch (e63) {
|
|
20044
20127
|
}
|
|
20045
20128
|
}
|
|
20046
20129
|
|
|
@@ -20076,7 +20159,7 @@ function formatSingularLookupInvocation(cmdId, value) {
|
|
|
20076
20159
|
return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
|
|
20077
20160
|
}
|
|
20078
20161
|
function extractEntityIdFilter(override, expectedTableId) {
|
|
20079
|
-
const f = _optionalChain([override, 'optionalAccess',
|
|
20162
|
+
const f = _optionalChain([override, 'optionalAccess', _635 => _635.entityIdFilter]);
|
|
20080
20163
|
if (!f) return null;
|
|
20081
20164
|
const tableId = typeof f.tableId === "string" ? f.tableId : "";
|
|
20082
20165
|
const id = typeof f.id === "string" ? f.id : "";
|
|
@@ -20115,7 +20198,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
|
|
|
20115
20198
|
function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
20116
20199
|
const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
|
|
20117
20200
|
const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
|
|
20118
|
-
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access',
|
|
20201
|
+
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _636 => _636.status, 'optionalAccess', _637 => _637.toUpperCase, 'call', _638 => _638()]) === "CLOSED";
|
|
20119
20202
|
if (toolName === "create_ticket") {
|
|
20120
20203
|
return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
|
|
20121
20204
|
}
|
|
@@ -20187,7 +20270,7 @@ function useChatHistoryHydration({
|
|
|
20187
20270
|
sendCountRef.current = userTurns;
|
|
20188
20271
|
hydrateMessages(hydrated, Array.from(sourcesSeed.entries()));
|
|
20189
20272
|
bumpMetaTick();
|
|
20190
|
-
} catch (
|
|
20273
|
+
} catch (e64) {
|
|
20191
20274
|
} finally {
|
|
20192
20275
|
if (!cancelled) setIsHydratingHistory(false);
|
|
20193
20276
|
}
|
|
@@ -20238,7 +20321,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20238
20321
|
const { active = true } = runtimeOptions;
|
|
20239
20322
|
const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
|
|
20240
20323
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
20241
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
20324
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _639 => _639.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
20242
20325
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
20243
20326
|
() => Promise.resolve(true)
|
|
20244
20327
|
);
|
|
@@ -20275,7 +20358,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20275
20358
|
if (!restoredConversationRef.current) {
|
|
20276
20359
|
restoredConversationRef.current = true;
|
|
20277
20360
|
pruneStaleChatConversationStorage(source);
|
|
20278
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
20361
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _640 => _640.load, 'call', _641 => _641(), 'optionalAccess', _642 => _642.conversationId]), () => ( null));
|
|
20279
20362
|
}
|
|
20280
20363
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
20281
20364
|
const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
|
|
@@ -20380,7 +20463,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20380
20463
|
const serverMessage = await readServerErrorMessage(response);
|
|
20381
20464
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
20382
20465
|
}
|
|
20383
|
-
const reader = _optionalChain([response, 'access',
|
|
20466
|
+
const reader = _optionalChain([response, 'access', _643 => _643.body, 'optionalAccess', _644 => _644.getReader, 'call', _645 => _645()]);
|
|
20384
20467
|
if (!reader) throw new Error("No response body");
|
|
20385
20468
|
const frameDecoder = createSseFrameDecoder();
|
|
20386
20469
|
let finished = false;
|
|
@@ -20403,7 +20486,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20403
20486
|
}
|
|
20404
20487
|
return true;
|
|
20405
20488
|
} catch (err) {
|
|
20406
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
20489
|
+
if (_optionalChain([err, 'optionalAccess', _646 => _646.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
20407
20490
|
return true;
|
|
20408
20491
|
}
|
|
20409
20492
|
flushDeltas();
|
|
@@ -20423,7 +20506,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20423
20506
|
);
|
|
20424
20507
|
sendMessageRef.current = sendMessage;
|
|
20425
20508
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
20426
|
-
_optionalChain([abortControllerRef, 'access',
|
|
20509
|
+
_optionalChain([abortControllerRef, 'access', _647 => _647.current, 'optionalAccess', _648 => _648.abort, 'call', _649 => _649()]);
|
|
20427
20510
|
flushDeltas();
|
|
20428
20511
|
mutate((r) => r.setPhase("idle"));
|
|
20429
20512
|
}, [mutate, flushDeltas]);
|
|
@@ -20439,7 +20522,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20439
20522
|
let sendIdx = -1;
|
|
20440
20523
|
return state.messages.map((m) => {
|
|
20441
20524
|
const segments = m.segments;
|
|
20442
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
20525
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _650 => _650.filter, 'call', _651 => _651((s) => s.type === "text"), 'access', _652 => _652.map, 'call', _653 => _653((s) => s.text), 'access', _654 => _654.join, 'call', _655 => _655("")]), () => ( ""));
|
|
20443
20526
|
let sources;
|
|
20444
20527
|
let scrollAnchor;
|
|
20445
20528
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -20448,7 +20531,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20448
20531
|
if (m.role === "assistant") {
|
|
20449
20532
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
20450
20533
|
sources = sourcesMap.get(lookupIdx);
|
|
20451
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
20534
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _656 => _656.get, 'call', _657 => _657(lookupIdx), 'optionalAccess', _658 => _658.scrollAnchor]), () => ( void 0));
|
|
20452
20535
|
}
|
|
20453
20536
|
return {
|
|
20454
20537
|
id: m.id,
|
|
@@ -20475,7 +20558,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20475
20558
|
);
|
|
20476
20559
|
return;
|
|
20477
20560
|
}
|
|
20478
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
20561
|
+
const refSlug = typeof _optionalChain([reference, 'access', _659 => _659.metadata, 'optionalAccess', _660 => _660.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
20479
20562
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
20480
20563
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
20481
20564
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -20521,18 +20604,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20521
20604
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
20522
20605
|
isHydratingHistory,
|
|
20523
20606
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
20524
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20525
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20526
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20607
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _661 => _661.provider]), () => ( null)),
|
|
20608
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _662 => _662.modelLabel]), () => ( null)),
|
|
20609
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _663 => _663.contextWindowMaxTokens]), () => ( null)),
|
|
20527
20610
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
20528
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20611
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _664 => _664.inputTokens]), () => ( null)),
|
|
20529
20612
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
20530
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20613
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _665 => _665.outputTokens]), () => ( null)),
|
|
20531
20614
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
20532
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20615
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _666 => _666.cacheHitRatePct]), () => ( null)),
|
|
20533
20616
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
20534
20617
|
* token counts). null until the trailing usage frame lands. */
|
|
20535
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20618
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _667 => _667.breakdown]), () => ( null)),
|
|
20536
20619
|
// ─── Dialog management — stubs for v1 ────────────────────────────────
|
|
20537
20620
|
// Guide mode keeps ONE server-side conversation per stored id
|
|
20538
20621
|
// (`chat_conversations`, hydrated on mount). Surfacing multiple threads
|
|
@@ -20565,6 +20648,176 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20565
20648
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
20566
20649
|
|
|
20567
20650
|
|
|
20651
|
+
// src/chat-protocol/source-metadata.ts
|
|
20652
|
+
var CARD_REFERENCE = /^\[card:\/\/([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)\]$/;
|
|
20653
|
+
function requiredString(value) {
|
|
20654
|
+
if (typeof value !== "string") return null;
|
|
20655
|
+
const normalized = value.trim();
|
|
20656
|
+
return normalized ? normalized : null;
|
|
20657
|
+
}
|
|
20658
|
+
function optionalString(value) {
|
|
20659
|
+
return _nullishCoalesce(requiredString(value), () => ( void 0));
|
|
20660
|
+
}
|
|
20661
|
+
function httpsUrl(value) {
|
|
20662
|
+
const candidate = optionalString(value);
|
|
20663
|
+
if (!candidate) return void 0;
|
|
20664
|
+
try {
|
|
20665
|
+
return new URL(candidate).protocol === "https:" ? candidate : void 0;
|
|
20666
|
+
} catch (e65) {
|
|
20667
|
+
return void 0;
|
|
20668
|
+
}
|
|
20669
|
+
}
|
|
20670
|
+
function youtubeId(value) {
|
|
20671
|
+
const candidate = optionalString(value);
|
|
20672
|
+
if (!candidate) return void 0;
|
|
20673
|
+
if (/^[A-Za-z0-9_-]{11}$/.test(candidate)) return candidate;
|
|
20674
|
+
const url = httpsUrl(candidate);
|
|
20675
|
+
if (!url) return void 0;
|
|
20676
|
+
const parsed = new URL(url);
|
|
20677
|
+
const hostname = parsed.hostname.toLowerCase();
|
|
20678
|
+
const youtubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
20679
|
+
if (!youtubeHost) return void 0;
|
|
20680
|
+
const pathId = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([parsed, 'access', _668 => _668.pathname, 'access', _669 => _669.match, 'call', _670 => _670(/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/), 'optionalAccess', _671 => _671[1]]);
|
|
20681
|
+
const id = _nullishCoalesce(_nullishCoalesce(pathId, () => ( parsed.searchParams.get("v"))), () => ( void 0));
|
|
20682
|
+
return id && /^[A-Za-z0-9_-]{11}$/.test(id) ? id : void 0;
|
|
20683
|
+
}
|
|
20684
|
+
function nullableString(value) {
|
|
20685
|
+
return value === null ? null : optionalString(value);
|
|
20686
|
+
}
|
|
20687
|
+
function normalizeSourceItems(value) {
|
|
20688
|
+
if (!Array.isArray(value)) return void 0;
|
|
20689
|
+
const items = value.flatMap((candidate) => {
|
|
20690
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
20691
|
+
const item = candidate;
|
|
20692
|
+
const id = requiredString(item.id);
|
|
20693
|
+
const documentType = requiredString(item.documentType);
|
|
20694
|
+
const name = requiredString(item.name);
|
|
20695
|
+
if (!id || !documentType || !name) return [];
|
|
20696
|
+
const externalUrl = httpsUrl(item.externalUrl);
|
|
20697
|
+
const targetPlatform = nullableString(item.targetPlatform);
|
|
20698
|
+
const path = nullableString(item.path);
|
|
20699
|
+
return [
|
|
20700
|
+
{
|
|
20701
|
+
id,
|
|
20702
|
+
documentType,
|
|
20703
|
+
name,
|
|
20704
|
+
...externalUrl ? { externalUrl } : {},
|
|
20705
|
+
...targetPlatform !== void 0 ? { targetPlatform } : {},
|
|
20706
|
+
...path !== void 0 ? { path } : {}
|
|
20707
|
+
}
|
|
20708
|
+
];
|
|
20709
|
+
});
|
|
20710
|
+
return items.length > 0 ? items : void 0;
|
|
20711
|
+
}
|
|
20712
|
+
function normalizeSources(value) {
|
|
20713
|
+
if (!Array.isArray(value)) return [];
|
|
20714
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20715
|
+
const sources = [];
|
|
20716
|
+
for (const candidate of value) {
|
|
20717
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
|
|
20718
|
+
const source = candidate;
|
|
20719
|
+
const index = source.index;
|
|
20720
|
+
const name = requiredString(source.name);
|
|
20721
|
+
const path = requiredString(source.path);
|
|
20722
|
+
const documentType = requiredString(source.documentType);
|
|
20723
|
+
const validIndex = typeof index === "number" && Number.isFinite(index) && Number.isInteger(index) && index > 0 && !seen.has(index);
|
|
20724
|
+
if (!validIndex || !name || !path || !documentType) continue;
|
|
20725
|
+
seen.add(index);
|
|
20726
|
+
const externalUrl = httpsUrl(source.externalUrl);
|
|
20727
|
+
const targetPlatform = nullableString(source.targetPlatform);
|
|
20728
|
+
const id = optionalString(source.id);
|
|
20729
|
+
const sourceRepo = optionalString(source.sourceRepo);
|
|
20730
|
+
const label = optionalString(source.label);
|
|
20731
|
+
const items = normalizeSourceItems(source.items);
|
|
20732
|
+
sources.push({
|
|
20733
|
+
index,
|
|
20734
|
+
name,
|
|
20735
|
+
path,
|
|
20736
|
+
documentType,
|
|
20737
|
+
...externalUrl ? { externalUrl } : {},
|
|
20738
|
+
...targetPlatform !== void 0 ? { targetPlatform } : {},
|
|
20739
|
+
...id ? { id } : {},
|
|
20740
|
+
...sourceRepo ? { sourceRepo } : {},
|
|
20741
|
+
...label ? { label } : {},
|
|
20742
|
+
...items ? { items } : {}
|
|
20743
|
+
});
|
|
20744
|
+
}
|
|
20745
|
+
return sources;
|
|
20746
|
+
}
|
|
20747
|
+
function normalizeVideoMetadata(value) {
|
|
20748
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
20749
|
+
const input = value;
|
|
20750
|
+
const metadata = {};
|
|
20751
|
+
for (const key of ["videoUrl", "highlightVideoUrl", "videoPoster", "highlightVideoPoster"]) {
|
|
20752
|
+
const url = httpsUrl(input[key]);
|
|
20753
|
+
if (url) metadata[key] = url;
|
|
20754
|
+
}
|
|
20755
|
+
const id = youtubeId(input.youtubeUrl);
|
|
20756
|
+
if (id) metadata.youtubeUrl = id;
|
|
20757
|
+
return metadata;
|
|
20758
|
+
}
|
|
20759
|
+
function normalizeVideos(value) {
|
|
20760
|
+
if (!Array.isArray(value)) return [];
|
|
20761
|
+
return value.flatMap((candidate) => {
|
|
20762
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
20763
|
+
const video = candidate;
|
|
20764
|
+
const match = typeof video.ref === "string" ? CARD_REFERENCE.exec(video.ref) : null;
|
|
20765
|
+
if (!match || match[1] !== "video") return [];
|
|
20766
|
+
const id = match[2];
|
|
20767
|
+
const title = _nullishCoalesce(optionalString(video.title), () => ( id));
|
|
20768
|
+
const url = _nullishCoalesce(httpsUrl(video.url), () => ( null));
|
|
20769
|
+
const sourceRepo = optionalString(video.sourceRepo);
|
|
20770
|
+
const metadata = normalizeVideoMetadata(video.metadata);
|
|
20771
|
+
if (url) {
|
|
20772
|
+
const idFromUrl = youtubeId(url);
|
|
20773
|
+
if (idFromUrl) {
|
|
20774
|
+
metadata.youtubeUrl = idFromUrl;
|
|
20775
|
+
delete metadata.videoUrl;
|
|
20776
|
+
} else {
|
|
20777
|
+
metadata.videoUrl = url;
|
|
20778
|
+
delete metadata.youtubeUrl;
|
|
20779
|
+
}
|
|
20780
|
+
}
|
|
20781
|
+
return [
|
|
20782
|
+
{
|
|
20783
|
+
type: "video",
|
|
20784
|
+
id,
|
|
20785
|
+
title,
|
|
20786
|
+
url,
|
|
20787
|
+
...sourceRepo ? { sourceRepo } : {},
|
|
20788
|
+
...Object.keys(metadata).length > 0 ? { metadata } : {}
|
|
20789
|
+
}
|
|
20790
|
+
];
|
|
20791
|
+
});
|
|
20792
|
+
}
|
|
20793
|
+
function normalizeCards(value) {
|
|
20794
|
+
if (!Array.isArray(value)) return [];
|
|
20795
|
+
return value.flatMap((candidate) => {
|
|
20796
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
20797
|
+
const card = candidate;
|
|
20798
|
+
const match = typeof card.ref === "string" ? CARD_REFERENCE.exec(card.ref) : null;
|
|
20799
|
+
if (!match || match[1] === "video") return [];
|
|
20800
|
+
const type = requiredString(card.entityType);
|
|
20801
|
+
const id = requiredString(card.entityId);
|
|
20802
|
+
if (!type || !id || type !== match[1] || id !== match[2]) return [];
|
|
20803
|
+
return [{ type, id, title: id, url: null }];
|
|
20804
|
+
});
|
|
20805
|
+
}
|
|
20806
|
+
function sourceMetadataEvent(payload) {
|
|
20807
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
|
|
20808
|
+
const metadata = payload;
|
|
20809
|
+
const sources = normalizeSources(metadata.sources);
|
|
20810
|
+
const refs = [...normalizeVideos(metadata.videos), ...normalizeCards(metadata.cards)];
|
|
20811
|
+
const refsByIdentity = /* @__PURE__ */ new Map();
|
|
20812
|
+
refs.forEach((ref) => {
|
|
20813
|
+
const identity = `${ref.type}:${ref.id}`;
|
|
20814
|
+
if (!refsByIdentity.has(identity)) refsByIdentity.set(identity, ref);
|
|
20815
|
+
});
|
|
20816
|
+
const uniqueRefs = Array.from(refsByIdentity.values());
|
|
20817
|
+
if (sources.length === 0 && uniqueRefs.length === 0) return null;
|
|
20818
|
+
return { type: "sources", sources, ...uniqueRefs.length > 0 ? { refs: uniqueRefs } : {} };
|
|
20819
|
+
}
|
|
20820
|
+
|
|
20568
20821
|
// src/chat-protocol/nats-decoder.ts
|
|
20569
20822
|
function isRecord2(value) {
|
|
20570
20823
|
return typeof value === "object" && value !== null;
|
|
@@ -20633,6 +20886,11 @@ function decodeNatsChunk(chunk) {
|
|
|
20633
20886
|
return { type: "thinking-delta", text: data.text, ...seq };
|
|
20634
20887
|
}
|
|
20635
20888
|
return null;
|
|
20889
|
+
case MESSAGE_TYPE.GUIDE:
|
|
20890
|
+
case MESSAGE_TYPE.SOURCES: {
|
|
20891
|
+
const event = sourceMetadataEvent(data.payload);
|
|
20892
|
+
return event ? { ...event, ...seq } : null;
|
|
20893
|
+
}
|
|
20636
20894
|
// An ask card is only an ask card with something to pick: a question and at
|
|
20637
20895
|
// least one option. Anything less is dropped rather than rendered as an
|
|
20638
20896
|
// empty card the user can't answer — the backend already falls back to a
|
|
@@ -20777,7 +21035,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20777
21035
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
20778
21036
|
// Wire shape carries no label; fall back to the id (parity with
|
|
20779
21037
|
// the history path in `process-historical-messages.ts`).
|
|
20780
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
21038
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _672 => _672.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _673 => _673.id]) === "string").map((it) => ({
|
|
20781
21039
|
type: it.type,
|
|
20782
21040
|
id: it.id,
|
|
20783
21041
|
label: it.id
|
|
@@ -20868,7 +21126,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
20868
21126
|
}
|
|
20869
21127
|
break;
|
|
20870
21128
|
case "approval_batch": {
|
|
20871
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
21129
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _674 => _674.data, 'access', _675 => _675.executions, 'optionalAccess', _676 => _676[c.toolExecutionRequestId], 'optionalAccess', _677 => _677.status]) === "done");
|
|
20872
21130
|
if (segment.status !== "rejected" && !allDone) {
|
|
20873
21131
|
hasIncompleteState = true;
|
|
20874
21132
|
}
|
|
@@ -20930,11 +21188,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
20930
21188
|
function extractIncompleteTailState(messages) {
|
|
20931
21189
|
if (!messages || messages.length === 0) return void 0;
|
|
20932
21190
|
let start = messages.length;
|
|
20933
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
21191
|
+
while (start > 0 && _optionalChain([messages, 'access', _678 => _678[start - 1], 'optionalAccess', _679 => _679.role]) === "assistant") start -= 1;
|
|
20934
21192
|
if (start === messages.length) return void 0;
|
|
20935
21193
|
const segments = [];
|
|
20936
21194
|
for (let i = start; i < messages.length; i += 1) {
|
|
20937
|
-
const content = _optionalChain([messages, 'access',
|
|
21195
|
+
const content = _optionalChain([messages, 'access', _680 => _680[i], 'optionalAccess', _681 => _681.content]);
|
|
20938
21196
|
if (Array.isArray(content)) segments.push(...content);
|
|
20939
21197
|
}
|
|
20940
21198
|
if (segments.length === 0) return void 0;
|
|
@@ -20947,15 +21205,15 @@ function extractIncompleteTailState(messages) {
|
|
|
20947
21205
|
|
|
20948
21206
|
// src/components/chat/utils/process-historical-messages.ts
|
|
20949
21207
|
function getOwnerDisplayName(owner) {
|
|
20950
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
21208
|
+
if (_optionalChain([owner, 'optionalAccess', _682 => _682.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
20951
21209
|
const { firstName, lastName } = owner.user;
|
|
20952
21210
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
20953
21211
|
if (name) return name;
|
|
20954
21212
|
}
|
|
20955
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
21213
|
+
return _optionalChain([owner, 'optionalAccess', _683 => _683.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
20956
21214
|
}
|
|
20957
21215
|
function getOwnerAvatar(owner) {
|
|
20958
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
21216
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _684 => _684.user, 'optionalAccess', _685 => _685.image, 'optionalAccess', _686 => _686.imageUrl]), () => ( void 0));
|
|
20959
21217
|
}
|
|
20960
21218
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
20961
21219
|
messageDataArray.forEach((data) => {
|
|
@@ -20984,6 +21242,9 @@ function decodeHistoricalMessageData(data) {
|
|
|
20984
21242
|
return { type: "thinking-delta", text: data.text };
|
|
20985
21243
|
}
|
|
20986
21244
|
return null;
|
|
21245
|
+
case MESSAGE_TYPE.GUIDE:
|
|
21246
|
+
case MESSAGE_TYPE.SOURCES:
|
|
21247
|
+
return decodeNatsChunk({ type: data.type, payload: data.payload });
|
|
20987
21248
|
// Same completeness gate as the live decoder (`decodeNatsChunk`): a
|
|
20988
21249
|
// persisted row without a question or without options is not a card the
|
|
20989
21250
|
// user can answer, so it replays as nothing rather than as empty chrome.
|
|
@@ -21139,7 +21400,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21139
21400
|
event.offerId,
|
|
21140
21401
|
event.text,
|
|
21141
21402
|
event.origin,
|
|
21142
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
21403
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _687 => _687[event.offerId]]), () => ( "pending"))
|
|
21143
21404
|
);
|
|
21144
21405
|
break;
|
|
21145
21406
|
case "ticket-escalated":
|
|
@@ -21169,7 +21430,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21169
21430
|
);
|
|
21170
21431
|
break;
|
|
21171
21432
|
case "escalation-offer-resolved":
|
|
21172
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
21433
|
+
_optionalChain([offerResolutions, 'optionalAccess', _688 => _688.set, 'call', _689 => _689(event.offerId, {
|
|
21173
21434
|
status: event.status,
|
|
21174
21435
|
resolvedByName: event.resolvedByName
|
|
21175
21436
|
})]);
|
|
@@ -21233,7 +21494,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21233
21494
|
}
|
|
21234
21495
|
}
|
|
21235
21496
|
} else {
|
|
21236
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21497
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _690 => _690.set, 'call', _691 => _691(event.requestId, {
|
|
21237
21498
|
command: event.command || "",
|
|
21238
21499
|
explanation: event.explanation,
|
|
21239
21500
|
approvalType,
|
|
@@ -21248,8 +21509,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21248
21509
|
const existingStatus = approvalStatuses[requestId];
|
|
21249
21510
|
const status = existingStatus || event.status;
|
|
21250
21511
|
const resolvedByName = event.resolvedByName;
|
|
21251
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21252
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
21512
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _692 => _692.get, 'call', _693 => _693(requestId)]);
|
|
21513
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _694 => _694.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
21253
21514
|
if (batchApprovalsEnabled) {
|
|
21254
21515
|
accumulator.addApprovalBatch(
|
|
21255
21516
|
requestId,
|
|
@@ -21271,7 +21532,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21271
21532
|
);
|
|
21272
21533
|
}
|
|
21273
21534
|
}
|
|
21274
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21535
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _695 => _695.delete, 'call', _696 => _696(requestId)]);
|
|
21275
21536
|
break;
|
|
21276
21537
|
}
|
|
21277
21538
|
if (escalatedData) {
|
|
@@ -21280,7 +21541,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21280
21541
|
explanation: escalatedData.explanation,
|
|
21281
21542
|
approvalType: escalatedData.approvalType
|
|
21282
21543
|
});
|
|
21283
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21544
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _697 => _697.delete, 'call', _698 => _698(requestId)]);
|
|
21284
21545
|
}
|
|
21285
21546
|
const before = accumulator.getSegments();
|
|
21286
21547
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -21339,6 +21600,8 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21339
21600
|
let currentAssistantTimestamp = null;
|
|
21340
21601
|
let lastAssistantId = null;
|
|
21341
21602
|
let currentAssistantStreamSeq;
|
|
21603
|
+
let currentAssistantSources;
|
|
21604
|
+
let currentAssistantRefs;
|
|
21342
21605
|
const flushAssistantMessage = () => {
|
|
21343
21606
|
const idToUse = lastAssistantId || currentAssistantId;
|
|
21344
21607
|
if (idToUse && accumulator.hasContent()) {
|
|
@@ -21351,6 +21614,8 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21351
21614
|
authorType: assistantType,
|
|
21352
21615
|
timestamp: currentAssistantTimestamp || /* @__PURE__ */ new Date(),
|
|
21353
21616
|
avatar: assistantAvatar,
|
|
21617
|
+
...currentAssistantSources ? { sources: currentAssistantSources } : {},
|
|
21618
|
+
...currentAssistantRefs ? { refs: currentAssistantRefs } : {},
|
|
21354
21619
|
...currentAssistantStreamSeq !== void 0 ? { streamSeq: currentAssistantStreamSeq } : {}
|
|
21355
21620
|
});
|
|
21356
21621
|
accumulator.resetSegments();
|
|
@@ -21359,6 +21624,8 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21359
21624
|
currentAssistantTimestamp = null;
|
|
21360
21625
|
lastAssistantId = null;
|
|
21361
21626
|
currentAssistantStreamSeq = void 0;
|
|
21627
|
+
currentAssistantSources = void 0;
|
|
21628
|
+
currentAssistantRefs = void 0;
|
|
21362
21629
|
};
|
|
21363
21630
|
messages.forEach((msg, index) => {
|
|
21364
21631
|
if (chatTypeFilter && msg.chatType !== chatTypeFilter) return;
|
|
@@ -21369,14 +21636,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21369
21636
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
21370
21637
|
return;
|
|
21371
21638
|
}
|
|
21372
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
21639
|
+
const isUserMessage = _optionalChain([msg, 'access', _699 => _699.owner, 'optionalAccess', _700 => _700.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _701 => _701.owner, 'optionalAccess', _702 => _702.type]) === OWNER_TYPE.ADMIN;
|
|
21373
21640
|
if (isUserMessage) {
|
|
21374
21641
|
flushAssistantMessage();
|
|
21375
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
21642
|
+
const userAuthorType = _optionalChain([msg, 'access', _703 => _703.owner, 'optionalAccess', _704 => _704.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
21376
21643
|
messageDataArray.forEach((data) => {
|
|
21377
21644
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
21378
21645
|
const rawContext = data.contextItems;
|
|
21379
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
21646
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _705 => _705.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _706 => _706.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
21380
21647
|
processedMessages.push({
|
|
21381
21648
|
id: msg.id,
|
|
21382
21649
|
role: "user",
|
|
@@ -21402,6 +21669,11 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21402
21669
|
messageDataArray.forEach((data) => {
|
|
21403
21670
|
const event = decodeHistoricalMessageData(data);
|
|
21404
21671
|
if (!event) return;
|
|
21672
|
+
if (event.type === "sources") {
|
|
21673
|
+
currentAssistantSources = mergeChatSources(currentAssistantSources, event.sources);
|
|
21674
|
+
if (event.refs) currentAssistantRefs = mergeChatRefs(currentAssistantRefs, event.refs);
|
|
21675
|
+
return;
|
|
21676
|
+
}
|
|
21405
21677
|
applyHistoryEvent(
|
|
21406
21678
|
event,
|
|
21407
21679
|
accumulator,
|
|
@@ -21414,7 +21686,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21414
21686
|
});
|
|
21415
21687
|
const nextMsg = messages[index + 1];
|
|
21416
21688
|
const isLastMessage = index === messages.length - 1;
|
|
21417
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
21689
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _707 => _707.owner, 'optionalAccess', _708 => _708.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _709 => _709.owner, 'optionalAccess', _710 => _710.type]) === OWNER_TYPE.ADMIN);
|
|
21418
21690
|
if (isLastMessage || nextIsFromUser) {
|
|
21419
21691
|
flushAssistantMessage();
|
|
21420
21692
|
}
|
|
@@ -21494,13 +21766,17 @@ function mapProcessedToUnified(processed) {
|
|
|
21494
21766
|
id: m.id,
|
|
21495
21767
|
role: m.role,
|
|
21496
21768
|
content: "",
|
|
21497
|
-
segments: m.content
|
|
21769
|
+
segments: m.content,
|
|
21770
|
+
...m.sources ? { sources: m.sources } : {},
|
|
21771
|
+
...m.refs ? { refs: m.refs } : {}
|
|
21498
21772
|
});
|
|
21499
21773
|
} else {
|
|
21500
21774
|
out.push({
|
|
21501
21775
|
id: m.id,
|
|
21502
21776
|
role: m.role,
|
|
21503
|
-
content: m.content
|
|
21777
|
+
content: m.content,
|
|
21778
|
+
...m.sources ? { sources: m.sources } : {},
|
|
21779
|
+
...m.refs ? { refs: m.refs } : {}
|
|
21504
21780
|
});
|
|
21505
21781
|
}
|
|
21506
21782
|
}
|
|
@@ -21812,7 +22088,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21812
22088
|
}, [active, fetchDialogs, loadDialogsPage]);
|
|
21813
22089
|
const sendMessage = _react.useCallback.call(void 0,
|
|
21814
22090
|
async (text, sendOptions) => {
|
|
21815
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
22091
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _711 => _711.hidden]), () => ( false));
|
|
21816
22092
|
mutate((r) => r.pushOptimisticSend(text, hidden));
|
|
21817
22093
|
await publishUserMessage(text, { hidden, dialogId });
|
|
21818
22094
|
},
|
|
@@ -21958,11 +22234,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21958
22234
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
21959
22235
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
21960
22236
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
21961
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
21962
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
21963
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
21964
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
21965
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
22237
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _712 => _712.provider]), () => ( modelProvider)), () => ( null)),
|
|
22238
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _713 => _713.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
22239
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _714 => _714.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _715 => _715.contextWindowMaxTokens]))), () => ( null)),
|
|
22240
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _716 => _716.inputTokensSize]), () => ( null)),
|
|
22241
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _717 => _717.outputTokensSize]), () => ( null)),
|
|
21966
22242
|
currentCacheHitRatePct: null,
|
|
21967
22243
|
currentUsageBreakdown: null,
|
|
21968
22244
|
// Dialog management
|
|
@@ -22063,7 +22339,7 @@ function useUnifiedChat(options) {
|
|
|
22063
22339
|
[]
|
|
22064
22340
|
);
|
|
22065
22341
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
22066
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
22342
|
+
(ref) => _optionalChain([activeStateRef, 'access', _718 => _718.current, 'access', _719 => _719.displayRef, 'optionalCall', _720 => _720(ref)]),
|
|
22067
22343
|
[]
|
|
22068
22344
|
);
|
|
22069
22345
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -22073,7 +22349,7 @@ function useUnifiedChat(options) {
|
|
|
22073
22349
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
22074
22350
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
22075
22351
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
22076
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
22352
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _721 => _721.current, 'access', _722 => _722.setDialogScope, 'optionalCall', _723 => _723(scope)]), []);
|
|
22077
22353
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
22078
22354
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
22079
22355
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -22166,19 +22442,19 @@ function turnRequestKeys(content) {
|
|
|
22166
22442
|
if (!Array.isArray(content)) return keys;
|
|
22167
22443
|
for (const seg of content) {
|
|
22168
22444
|
if (seg.type === "tool_execution") {
|
|
22169
|
-
const id = _optionalChain([seg, 'access',
|
|
22445
|
+
const id = _optionalChain([seg, 'access', _724 => _724.data, 'optionalAccess', _725 => _725.toolExecutionRequestId]);
|
|
22170
22446
|
if (id) keys.add(id);
|
|
22171
22447
|
} else if (seg.type === "approval_request") {
|
|
22172
|
-
const id = _optionalChain([seg, 'access',
|
|
22448
|
+
const id = _optionalChain([seg, 'access', _726 => _726.data, 'optionalAccess', _727 => _727.requestId]);
|
|
22173
22449
|
if (id) keys.add(id);
|
|
22174
22450
|
} else if (seg.type === "escalation_offer") {
|
|
22175
|
-
const id = _optionalChain([seg, 'access',
|
|
22451
|
+
const id = _optionalChain([seg, 'access', _728 => _728.data, 'optionalAccess', _729 => _729.offerId]);
|
|
22176
22452
|
if (id) keys.add(id);
|
|
22177
22453
|
} else if (seg.type === "approval_batch") {
|
|
22178
22454
|
const data = seg.data;
|
|
22179
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
22180
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
22181
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
22455
|
+
if (_optionalChain([data, 'optionalAccess', _730 => _730.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
22456
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _731 => _731.toolCalls]), () => ( []))) {
|
|
22457
|
+
if (_optionalChain([call, 'optionalAccess', _732 => _732.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
22182
22458
|
}
|
|
22183
22459
|
}
|
|
22184
22460
|
}
|
|
@@ -22230,18 +22506,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22230
22506
|
}
|
|
22231
22507
|
}
|
|
22232
22508
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
22233
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
22234
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
22509
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _733 => _733.role]) === "assistant" ? trailing : null;
|
|
22510
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _734 => _734.content, 'access', _735 => _735.find, 'call', _736 => _736((s) => s.type === "approval_batch"), 'optionalAccess', _737 => _737.data, 'optionalAccess', _738 => _738.approvalRequestId]), () => ( null)) : null;
|
|
22235
22511
|
let processedToUse = processedHistory;
|
|
22236
22512
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22237
22513
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22238
22514
|
if (historyBatchId) {
|
|
22239
22515
|
const batchTwins = existingMessages.filter(
|
|
22240
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
22516
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _739 => _739.data, 'optionalAccess', _740 => _740.approvalRequestId]) === historyBatchId)
|
|
22241
22517
|
);
|
|
22242
22518
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
22243
22519
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
22244
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
22520
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _741 => _741.content])) ? historyTrailingAssistant.content.length : 0;
|
|
22245
22521
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
22246
22522
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
22247
22523
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -22283,9 +22559,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22283
22559
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
22284
22560
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
22285
22561
|
if (processedIds.has(m.id)) return false;
|
|
22286
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
22562
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _742 => _742.has, 'call', _743 => _743(m.id)])) return false;
|
|
22287
22563
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
22288
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22564
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _744 => _744.timestamp, 'optionalAccess', _745 => _745.getTime, 'call', _746 => _746()]), () => ( 0))) <= historyFetchedAt;
|
|
22289
22565
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
22290
22566
|
}
|
|
22291
22567
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -22309,7 +22585,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22309
22585
|
} else if (typeof m.streamSeq === "number") {
|
|
22310
22586
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
22311
22587
|
} else {
|
|
22312
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22588
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _747 => _747.timestamp, 'optionalAccess', _748 => _748.getTime, 'call', _749 => _749()]), () => ( 0))) <= historyFetchedAt;
|
|
22313
22589
|
}
|
|
22314
22590
|
if (covered) return false;
|
|
22315
22591
|
}
|
|
@@ -22379,7 +22655,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
22379
22655
|
function isHistoricalUserTurn(m) {
|
|
22380
22656
|
return !!m.owner;
|
|
22381
22657
|
}
|
|
22382
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
22658
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _750 => _750.type]) === "TEXT" && typeof d.text === "string";
|
|
22383
22659
|
var THINK_MS = 550;
|
|
22384
22660
|
var TOKEN_MS = 55;
|
|
22385
22661
|
var USER_MS = 480;
|
|
@@ -22564,7 +22840,7 @@ function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize
|
|
|
22564
22840
|
const parsed = parseFloat(raw);
|
|
22565
22841
|
if (!Number.isFinite(parsed)) return clampToViewport(defaultSize);
|
|
22566
22842
|
return clampToViewport(parsed);
|
|
22567
|
-
} catch (
|
|
22843
|
+
} catch (e66) {
|
|
22568
22844
|
return clampToViewport(defaultSize);
|
|
22569
22845
|
}
|
|
22570
22846
|
}, [enabled, storageKey, defaultSize, clampToViewport]);
|
|
@@ -22574,7 +22850,7 @@ function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize
|
|
|
22574
22850
|
if (!enabled || !storageKey || typeof window === "undefined") return;
|
|
22575
22851
|
try {
|
|
22576
22852
|
window.localStorage.setItem(storageKey, String(Math.round(size2)));
|
|
22577
|
-
} catch (
|
|
22853
|
+
} catch (e67) {
|
|
22578
22854
|
}
|
|
22579
22855
|
}, [enabled, size2, storageKey]);
|
|
22580
22856
|
_react.useEffect.call(void 0, () => {
|
|
@@ -22608,7 +22884,7 @@ function DrawerResizeHandle({ side, size: size2, minSize, maxSize, onSize, ariaL
|
|
|
22608
22884
|
startRef.current = null;
|
|
22609
22885
|
try {
|
|
22610
22886
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
22611
|
-
} catch (
|
|
22887
|
+
} catch (e68) {
|
|
22612
22888
|
}
|
|
22613
22889
|
document.body.style.cursor = "";
|
|
22614
22890
|
document.body.style.userSelect = "";
|
|
@@ -23003,7 +23279,7 @@ function useChatDialogManager({
|
|
|
23003
23279
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
23004
23280
|
if (restoreTarget) {
|
|
23005
23281
|
try {
|
|
23006
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
23282
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _751 => _751(restoreTarget.id)]);
|
|
23007
23283
|
} catch (err) {
|
|
23008
23284
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
23009
23285
|
return;
|
|
@@ -23483,7 +23759,7 @@ function EmbeddableChatInner({
|
|
|
23483
23759
|
}),
|
|
23484
23760
|
[commandsUrl]
|
|
23485
23761
|
);
|
|
23486
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
23762
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _752 => _752.name, 'optionalAccess', _753 => _753.trim, 'call', _754 => _754()]) || [_optionalChain([identityUser, 'optionalAccess', _755 => _755.firstName]), _optionalChain([identityUser, 'optionalAccess', _756 => _756.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _757 => _757.trim, 'call', _758 => _758()]) || void 0;
|
|
23487
23763
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
23488
23764
|
if (modes) return modes;
|
|
23489
23765
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -23492,20 +23768,20 @@ function EmbeddableChatInner({
|
|
|
23492
23768
|
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
23493
23769
|
if (mingoState) {
|
|
23494
23770
|
return {
|
|
23495
|
-
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23496
|
-
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23497
|
-
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23498
|
-
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23499
|
-
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23500
|
-
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23501
|
-
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23771
|
+
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _759 => _759.canRename]), () => ( false)),
|
|
23772
|
+
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _760 => _760.canArchive]), () => ( false)),
|
|
23773
|
+
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _761 => _761.fetchArchivedDialogs]),
|
|
23774
|
+
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _762 => _762.unarchiveDialog]),
|
|
23775
|
+
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _763 => _763.searchQuery]),
|
|
23776
|
+
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _764 => _764.onSearchChange]),
|
|
23777
|
+
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _765 => _765.onCopyLink])
|
|
23502
23778
|
};
|
|
23503
23779
|
}
|
|
23504
23780
|
return {
|
|
23505
|
-
canRename: !!_optionalChain([effectiveModes, 'access',
|
|
23506
|
-
canArchive: !!_optionalChain([effectiveModes, 'access',
|
|
23507
|
-
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access',
|
|
23508
|
-
unarchiveDialog: _optionalChain([effectiveModes, 'access',
|
|
23781
|
+
canRename: !!_optionalChain([effectiveModes, 'access', _766 => _766.mingo, 'optionalAccess', _767 => _767.renameDialog]),
|
|
23782
|
+
canArchive: !!_optionalChain([effectiveModes, 'access', _768 => _768.mingo, 'optionalAccess', _769 => _769.archiveDialog]),
|
|
23783
|
+
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _770 => _770.mingo, 'optionalAccess', _771 => _771.fetchArchivedDialogs]),
|
|
23784
|
+
unarchiveDialog: _optionalChain([effectiveModes, 'access', _772 => _772.mingo, 'optionalAccess', _773 => _773.unarchiveDialog]),
|
|
23509
23785
|
searchQuery: void 0,
|
|
23510
23786
|
onSearchChange: void 0,
|
|
23511
23787
|
onCopyLink: void 0
|
|
@@ -23520,7 +23796,7 @@ function EmbeddableChatInner({
|
|
|
23520
23796
|
if (controlledActiveMode === void 0) {
|
|
23521
23797
|
setUncontrolledActiveMode(next);
|
|
23522
23798
|
}
|
|
23523
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
23799
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _774 => _774(next)]);
|
|
23524
23800
|
},
|
|
23525
23801
|
[controlledActiveMode, onActiveModeChange]
|
|
23526
23802
|
);
|
|
@@ -23547,7 +23823,7 @@ function EmbeddableChatInner({
|
|
|
23547
23823
|
);
|
|
23548
23824
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
23549
23825
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
23550
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
23826
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _775 => _775.title]) === "string" ? guideWelcome.title : null)));
|
|
23551
23827
|
const {
|
|
23552
23828
|
messages: rawMessages,
|
|
23553
23829
|
isLoading: chatLoading,
|
|
@@ -23591,7 +23867,7 @@ function EmbeddableChatInner({
|
|
|
23591
23867
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
23592
23868
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
23593
23869
|
});
|
|
23594
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
23870
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _776 => _776()]);
|
|
23595
23871
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
23596
23872
|
const {
|
|
23597
23873
|
attachments: stagedAttachments,
|
|
@@ -23602,7 +23878,7 @@ function EmbeddableChatInner({
|
|
|
23602
23878
|
clear: clearAttachments
|
|
23603
23879
|
} = useChatAttachments();
|
|
23604
23880
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
23605
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
23881
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _777 => _777.maxItems]), () => ( 10));
|
|
23606
23882
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
23607
23883
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
23608
23884
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -23623,10 +23899,10 @@ function EmbeddableChatInner({
|
|
|
23623
23899
|
}, [activeDialogId, activeMode]);
|
|
23624
23900
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
23625
23901
|
const m = /* @__PURE__ */ new Map();
|
|
23626
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
23902
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _778 => _778.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
23627
23903
|
return m;
|
|
23628
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
23629
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
23904
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _779 => _779.entityTypes])]);
|
|
23905
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _780 => _780.entityTypes]);
|
|
23630
23906
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
23631
23907
|
const byType = /* @__PURE__ */ new Map();
|
|
23632
23908
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -23638,7 +23914,7 @@ function EmbeddableChatInner({
|
|
|
23638
23914
|
if (mentionActiveRef.current) {
|
|
23639
23915
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
23640
23916
|
if (contextItems.length >= contextMaxItems) return;
|
|
23641
|
-
_optionalChain([chatInputRef, 'access',
|
|
23917
|
+
_optionalChain([chatInputRef, 'access', _781 => _781.current, 'optionalAccess', _782 => _782.commitMention, 'call', _783 => _783(mentionTokenOf(key, mentionMarkerByType), {
|
|
23642
23918
|
label: item.label,
|
|
23643
23919
|
icon: resolveContextIcon(item)
|
|
23644
23920
|
})]);
|
|
@@ -23661,9 +23937,9 @@ function EmbeddableChatInner({
|
|
|
23661
23937
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
23662
23938
|
if (mentionKeysRef.current.has(key)) {
|
|
23663
23939
|
mentionKeysRef.current.delete(key);
|
|
23664
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
23940
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _784 => _784.current, 'optionalAccess', _785 => _785.getValue, 'call', _786 => _786()]), () => ( ""));
|
|
23665
23941
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
23666
|
-
_optionalChain([chatInputRef, 'access',
|
|
23942
|
+
_optionalChain([chatInputRef, 'access', _787 => _787.current, 'optionalAccess', _788 => _788.setValue, 'call', _789 => _789(next)]);
|
|
23667
23943
|
}
|
|
23668
23944
|
},
|
|
23669
23945
|
[mentionMarkerByType]
|
|
@@ -23685,7 +23961,7 @@ function EmbeddableChatInner({
|
|
|
23685
23961
|
}, []);
|
|
23686
23962
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
23687
23963
|
if (mentionActiveRef.current) {
|
|
23688
|
-
_optionalChain([chatInputRef, 'access',
|
|
23964
|
+
_optionalChain([chatInputRef, 'access', _790 => _790.current, 'optionalAccess', _791 => _791.removeMentionTrigger, 'call', _792 => _792()]);
|
|
23689
23965
|
}
|
|
23690
23966
|
setContextPickerOpen(false);
|
|
23691
23967
|
setMentionQuery(null);
|
|
@@ -23719,8 +23995,8 @@ function EmbeddableChatInner({
|
|
|
23719
23995
|
[effectiveAssistantIcon]
|
|
23720
23996
|
);
|
|
23721
23997
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
23722
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
23723
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
23998
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _793 => _793.firstName]), _optionalChain([identityUser, 'optionalAccess', _794 => _794.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _795 => _795.name, 'optionalAccess', _796 => _796.trim, 'call', _797 => _797()]) || void 0 : void 0;
|
|
23999
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _798 => _798.avatarUrl, 'optionalAccess', _799 => _799.trim, 'call', _800 => _800()]) || void 0 : void 0;
|
|
23724
24000
|
const messages = _react.useMemo.call(void 0, () => {
|
|
23725
24001
|
const cache = timestampCache;
|
|
23726
24002
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -23755,6 +24031,10 @@ function EmbeddableChatInner({
|
|
|
23755
24031
|
// explicitly — see `Message.hidden` and `chat-message-list`'s skip.
|
|
23756
24032
|
...m.hidden ? { hidden: true } : {},
|
|
23757
24033
|
...m.scrollAnchor ? { scrollAnchor: m.scrollAnchor } : {},
|
|
24034
|
+
// Preserve same-turn rich metadata. Source chips and entity-card
|
|
24035
|
+
// renderers consume it after this raw-to-Message projection.
|
|
24036
|
+
...m.sources && m.sources.length > 0 ? { sources: m.sources } : {},
|
|
24037
|
+
...m.refs && m.refs.length > 0 ? { refs: m.refs } : {},
|
|
23758
24038
|
// Forward attached context items so the user bubble renders its chips.
|
|
23759
24039
|
...m.contextItems && m.contextItems.length > 0 ? { contextItems: m.contextItems } : {}
|
|
23760
24040
|
};
|
|
@@ -23909,9 +24189,9 @@ function EmbeddableChatInner({
|
|
|
23909
24189
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
23910
24190
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
23911
24191
|
if (chatLoading) return void 0;
|
|
23912
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24192
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _801 => _801.sources]);
|
|
23913
24193
|
if (!sources || sources.length === 0) return void 0;
|
|
23914
|
-
const content =
|
|
24194
|
+
const content = lastAssistantMsg.content || (_nullishCoalesce(lastAssistantMsg.segments, () => ( []))).filter((segment) => segment.type === "text").map((segment) => segment.text).join("\n");
|
|
23915
24195
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
|
|
23916
24196
|
const seenOrder = /* @__PURE__ */ new Map();
|
|
23917
24197
|
citationOrder.forEach((idx) => {
|
|
@@ -23929,7 +24209,7 @@ function EmbeddableChatInner({
|
|
|
23929
24209
|
const el = panelMeasureRef.current;
|
|
23930
24210
|
if (!el || typeof ResizeObserver === "undefined") return void 0;
|
|
23931
24211
|
const ro = new ResizeObserver((entries) => {
|
|
23932
|
-
const w = _optionalChain([entries, 'access',
|
|
24212
|
+
const w = _optionalChain([entries, 'access', _802 => _802[0], 'optionalAccess', _803 => _803.contentRect, 'optionalAccess', _804 => _804.width]);
|
|
23933
24213
|
if (typeof w === "number") setPanelWidth(w);
|
|
23934
24214
|
});
|
|
23935
24215
|
ro.observe(el);
|
|
@@ -23947,7 +24227,7 @@ function EmbeddableChatInner({
|
|
|
23947
24227
|
setRailStorageRead(true);
|
|
23948
24228
|
try {
|
|
23949
24229
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1") setRailCollapsed(true);
|
|
23950
|
-
} catch (
|
|
24230
|
+
} catch (e69) {
|
|
23951
24231
|
}
|
|
23952
24232
|
}
|
|
23953
24233
|
const toggleRailCollapsed = _react.useCallback.call(void 0, () => {
|
|
@@ -23955,7 +24235,7 @@ function EmbeddableChatInner({
|
|
|
23955
24235
|
const next = !prev;
|
|
23956
24236
|
try {
|
|
23957
24237
|
window.localStorage.setItem(RAIL_COLLAPSED_STORAGE_KEY, next ? "1" : "0");
|
|
23958
|
-
} catch (
|
|
24238
|
+
} catch (e70) {
|
|
23959
24239
|
}
|
|
23960
24240
|
return next;
|
|
23961
24241
|
});
|
|
@@ -23972,17 +24252,17 @@ function EmbeddableChatInner({
|
|
|
23972
24252
|
const isMingoMode = activeMode === "mingo";
|
|
23973
24253
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen;
|
|
23974
24254
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
23975
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
24255
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _805 => _805.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
|
|
23976
24256
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
23977
24257
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
23978
24258
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
23979
24259
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
23980
24260
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
23981
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
24261
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _806 => _806.onCopyLink, 'optionalCall', _807 => _807(activeDialog)]) : void 0;
|
|
23982
24262
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
23983
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
23984
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
23985
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
24263
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _808 => _808.owner]) : void 0;
|
|
24264
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _809 => _809.name, 'optionalAccess', _810 => _810.trim, 'call', _811 => _811()]) || headerUserName;
|
|
24265
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _812 => _812.avatarUrl, 'optionalAccess', _813 => _813.trim, 'call', _814 => _814()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _815 => _815.avatarUrl, 'optionalAccess', _816 => _816.trim, 'call', _817 => _817()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _818 => _818.trim, 'call', _819 => _819()]) || void 0;
|
|
23986
24266
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
23987
24267
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
23988
24268
|
resetToNewChat();
|
|
@@ -24312,9 +24592,9 @@ function EmbeddableChatInner({
|
|
|
24312
24592
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
24313
24593
|
subtitleLoading: emptyStateLoading,
|
|
24314
24594
|
...guideWelcome,
|
|
24315
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24316
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24317
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
24595
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _820 => _820.title]))),
|
|
24596
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _821 => _821.icon]))),
|
|
24597
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _822 => _822.quickActions]), () => ( guideSuggestedActions)),
|
|
24318
24598
|
onQuickAction: (action) => {
|
|
24319
24599
|
setQuickActionPreview(null);
|
|
24320
24600
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -24388,8 +24668,8 @@ function EmbeddableChatInner({
|
|
|
24388
24668
|
selectedContextItems: contextItems,
|
|
24389
24669
|
onToggleContextItem: toggleContextItem,
|
|
24390
24670
|
onRemoveContextItem: removeContextItem,
|
|
24391
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
24392
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
24671
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _823 => _823.items]),
|
|
24672
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _824 => _824.onRemove]),
|
|
24393
24673
|
contextPickerOpen,
|
|
24394
24674
|
onOpenContextPicker: openContextPicker,
|
|
24395
24675
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -24848,4 +25128,4 @@ function EmbeddableChatInner({
|
|
|
24848
25128
|
|
|
24849
25129
|
|
|
24850
25130
|
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
24851
|
-
//# sourceMappingURL=chunk-
|
|
25131
|
+
//# sourceMappingURL=chunk-4TZOFXPH.cjs.map
|