@flamingo-stack/openframe-frontend-core 0.0.607 → 0.0.608-snapshot.20260908153450
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/{chunk-7ZAPPBFT.cjs → chunk-3N4FXBVJ.cjs} +3 -3
- package/dist/{chunk-7ZAPPBFT.cjs.map → chunk-3N4FXBVJ.cjs.map} +1 -1
- package/dist/{chunk-PS4WZ7YL.cjs → chunk-3XNMDLGB.cjs} +9 -9
- package/dist/{chunk-PS4WZ7YL.cjs.map → chunk-3XNMDLGB.cjs.map} +1 -1
- package/dist/{chunk-UJ64PL7A.cjs → chunk-45XXK2VU.cjs} +10 -10
- package/dist/{chunk-UJ64PL7A.cjs.map → chunk-45XXK2VU.cjs.map} +1 -1
- package/dist/{chunk-ANHHTB32.js → chunk-6MLRFM3T.js} +5 -5
- package/dist/{chunk-ZYEAIBWA.js → chunk-B3UXNGVM.js} +3 -3
- package/dist/{chunk-2V3PJ5X5.js → chunk-B7LYKBCD.js} +5 -5
- package/dist/{chunk-JGSEBZYO.js → chunk-BSMPCPOZ.js} +155 -38
- package/dist/{chunk-JGSEBZYO.js.map → chunk-BSMPCPOZ.js.map} +1 -1
- package/dist/{chunk-3J73ZG3V.js → chunk-BUXGWBTF.js} +2 -2
- package/dist/{chunk-63AGD45L.js → chunk-C7CTEUU7.js} +2 -2
- package/dist/{chunk-XOQI3AH7.cjs → chunk-CZTOSG7Q.cjs} +22 -22
- package/dist/{chunk-XOQI3AH7.cjs.map → chunk-CZTOSG7Q.cjs.map} +1 -1
- package/dist/{chunk-Y6MYIJTK.cjs → chunk-D3DTC7SZ.cjs} +15 -15
- package/dist/{chunk-Y6MYIJTK.cjs.map → chunk-D3DTC7SZ.cjs.map} +1 -1
- package/dist/{chunk-YUDYFA6H.cjs → chunk-DKNXAJMP.cjs} +183 -163
- package/dist/chunk-DKNXAJMP.cjs.map +1 -0
- package/dist/{chunk-XRNILWKL.cjs → chunk-FYG7QNAO.cjs} +5 -5
- package/dist/{chunk-XRNILWKL.cjs.map → chunk-FYG7QNAO.cjs.map} +1 -1
- package/dist/{chunk-IXXMNATN.cjs → chunk-GMOBT5NP.cjs} +70 -70
- package/dist/{chunk-IXXMNATN.cjs.map → chunk-GMOBT5NP.cjs.map} +1 -1
- package/dist/{chunk-CCY47QKL.js → chunk-HGVW7OHI.js} +2 -2
- package/dist/{chunk-7CQA7DAB.js → chunk-JKM5FH63.js} +3 -3
- package/dist/{chunk-RVCLDXCR.js → chunk-JOCVQZGT.js} +5 -5
- package/dist/{chunk-GPIPJOOV.js → chunk-JR7I2AGL.js} +3 -3
- package/dist/{chunk-SWC5LOGS.cjs → chunk-L2JWC5VS.cjs} +43 -43
- package/dist/{chunk-SWC5LOGS.cjs.map → chunk-L2JWC5VS.cjs.map} +1 -1
- package/dist/{chunk-TF6FCNKU.js → chunk-LA2W5L6K.js} +2 -2
- package/dist/{chunk-XJKNJJYO.js → chunk-MVBRMQGU.js} +26 -6
- package/dist/{chunk-XJKNJJYO.js.map → chunk-MVBRMQGU.js.map} +1 -1
- package/dist/{chunk-G7ZK3Q5B.cjs → chunk-NJUSDREV.cjs} +22 -22
- package/dist/{chunk-G7ZK3Q5B.cjs.map → chunk-NJUSDREV.cjs.map} +1 -1
- package/dist/{chunk-Q6ZFTDRR.cjs → chunk-O2M4T34Q.cjs} +4 -4
- package/dist/{chunk-Q6ZFTDRR.cjs.map → chunk-O2M4T34Q.cjs.map} +1 -1
- package/dist/{chunk-PSGHIQXU.js → chunk-OTYV6SDN.js} +3 -3
- package/dist/{chunk-YCOXI5CH.js → chunk-QX4ANESW.js} +6 -6
- package/dist/{chunk-JLVIGGUF.cjs → chunk-RZM6FPOT.cjs} +25 -25
- package/dist/{chunk-JLVIGGUF.cjs.map → chunk-RZM6FPOT.cjs.map} +1 -1
- package/dist/{chunk-WR23DZLT.cjs → chunk-SEW25Y2W.cjs} +10 -10
- package/dist/{chunk-WR23DZLT.cjs.map → chunk-SEW25Y2W.cjs.map} +1 -1
- package/dist/{chunk-25XSOCZK.cjs → chunk-TCEALWE3.cjs} +33 -33
- package/dist/{chunk-25XSOCZK.cjs.map → chunk-TCEALWE3.cjs.map} +1 -1
- package/dist/{chunk-Z2NXXA27.js → chunk-TJ3GFULR.js} +3 -3
- package/dist/{chunk-3FC4DPRX.js → chunk-VCYRJY7J.js} +4 -4
- package/dist/{chunk-VK743MVL.cjs → chunk-XNDTYTVT.cjs} +188 -71
- package/dist/chunk-XNDTYTVT.cjs.map +1 -0
- package/dist/{chunk-BEDMOEAM.cjs → chunk-ZRLFBLME.cjs} +3 -3
- package/dist/{chunk-BEDMOEAM.cjs.map → chunk-ZRLFBLME.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/utils/history-merge.d.ts +4 -2
- package/dist/components/chat/utils/history-merge.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/board/index.d.ts +1 -1
- package/dist/components/features/board/index.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/board/types.d.ts +18 -0
- package/dist/components/features/board/types.d.ts.map +1 -1
- 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 +38 -38
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +24 -24
- 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/package.json +1 -1
- package/src/components/chat/utils/__tests__/history-merge.test.ts +292 -0
- package/src/components/chat/utils/history-merge.ts +276 -56
- package/src/components/features/board/index.ts +2 -0
- package/src/components/features/board/ticket-card.tsx +31 -2
- package/src/components/features/board/types.ts +20 -0
- package/src/stories/TicketCard.stories.tsx +40 -1
- package/dist/chunk-VK743MVL.cjs.map +0 -1
- package/dist/chunk-YUDYFA6H.cjs.map +0 -1
- /package/dist/{chunk-ANHHTB32.js.map → chunk-6MLRFM3T.js.map} +0 -0
- /package/dist/{chunk-ZYEAIBWA.js.map → chunk-B3UXNGVM.js.map} +0 -0
- /package/dist/{chunk-2V3PJ5X5.js.map → chunk-B7LYKBCD.js.map} +0 -0
- /package/dist/{chunk-3J73ZG3V.js.map → chunk-BUXGWBTF.js.map} +0 -0
- /package/dist/{chunk-63AGD45L.js.map → chunk-C7CTEUU7.js.map} +0 -0
- /package/dist/{chunk-CCY47QKL.js.map → chunk-HGVW7OHI.js.map} +0 -0
- /package/dist/{chunk-7CQA7DAB.js.map → chunk-JKM5FH63.js.map} +0 -0
- /package/dist/{chunk-RVCLDXCR.js.map → chunk-JOCVQZGT.js.map} +0 -0
- /package/dist/{chunk-GPIPJOOV.js.map → chunk-JR7I2AGL.js.map} +0 -0
- /package/dist/{chunk-TF6FCNKU.js.map → chunk-LA2W5L6K.js.map} +0 -0
- /package/dist/{chunk-PSGHIQXU.js.map → chunk-OTYV6SDN.js.map} +0 -0
- /package/dist/{chunk-YCOXI5CH.js.map → chunk-QX4ANESW.js.map} +0 -0
- /package/dist/{chunk-Z2NXXA27.js.map → chunk-TJ3GFULR.js.map} +0 -0
- /package/dist/{chunk-3FC4DPRX.js.map → chunk-VCYRJY7J.js.map} +0 -0
|
@@ -22729,6 +22729,18 @@ var SYNTHETIC_REALTIME_ID_PREFIXES = ["assistant-", "user-", "direct-", "system-
|
|
|
22729
22729
|
function isSyntheticRealtimeId(id) {
|
|
22730
22730
|
return SYNTHETIC_REALTIME_ID_PREFIXES.some((prefix) => id.startsWith(prefix));
|
|
22731
22731
|
}
|
|
22732
|
+
function isOptimisticId(id) {
|
|
22733
|
+
return id.startsWith("optimistic-");
|
|
22734
|
+
}
|
|
22735
|
+
function isUserRequestSyntheticId(id) {
|
|
22736
|
+
return id.startsWith("user-");
|
|
22737
|
+
}
|
|
22738
|
+
function isClientMintedId(id) {
|
|
22739
|
+
return isSyntheticRealtimeId(id) || isOptimisticId(id);
|
|
22740
|
+
}
|
|
22741
|
+
function isWelcomeId(id) {
|
|
22742
|
+
return id.startsWith("welcome-");
|
|
22743
|
+
}
|
|
22732
22744
|
function assistantAnswerText(content) {
|
|
22733
22745
|
if (typeof content === "string") return content.trim();
|
|
22734
22746
|
if (!Array.isArray(content)) return "";
|
|
@@ -22761,13 +22773,45 @@ function turnRequestKeys(content) {
|
|
|
22761
22773
|
}
|
|
22762
22774
|
return keys;
|
|
22763
22775
|
}
|
|
22764
|
-
function sharesRequestKey(
|
|
22765
|
-
if (keys.size === 0) return false;
|
|
22766
|
-
for (const key of
|
|
22767
|
-
if (
|
|
22776
|
+
function sharesRequestKey(keys, others) {
|
|
22777
|
+
if (keys.size === 0 || others.size === 0) return false;
|
|
22778
|
+
for (const key of keys) {
|
|
22779
|
+
if (others.has(key)) return true;
|
|
22768
22780
|
}
|
|
22769
22781
|
return false;
|
|
22770
22782
|
}
|
|
22783
|
+
function userText(m) {
|
|
22784
|
+
return m.role === "user" && typeof m.content === "string" ? m.content : "";
|
|
22785
|
+
}
|
|
22786
|
+
function collectTwinSignals(rows) {
|
|
22787
|
+
const signals = { requestKeys: /* @__PURE__ */ new Set(), assistantTexts: /* @__PURE__ */ new Map(), userContents: /* @__PURE__ */ new Map() };
|
|
22788
|
+
for (const row of rows) {
|
|
22789
|
+
for (const key of turnRequestKeys(row.content)) signals.requestKeys.add(key);
|
|
22790
|
+
if (row.role === "assistant") {
|
|
22791
|
+
const text2 = assistantAnswerText(row.content);
|
|
22792
|
+
if (text2 !== "") signals.assistantTexts.set(text2, (_nullishCoalesce(signals.assistantTexts.get(text2), () => ( 0))) + 1);
|
|
22793
|
+
continue;
|
|
22794
|
+
}
|
|
22795
|
+
const text = userText(row);
|
|
22796
|
+
if (text !== "") signals.userContents.set(text, (_nullishCoalesce(signals.userContents.get(text), () => ( 0))) + 1);
|
|
22797
|
+
}
|
|
22798
|
+
return signals;
|
|
22799
|
+
}
|
|
22800
|
+
function twinVerdict(signals, m) {
|
|
22801
|
+
if (m.role !== "assistant") {
|
|
22802
|
+
const text2 = userText(m);
|
|
22803
|
+
if (text2 === "") return "unknown";
|
|
22804
|
+
return signals.userContents.has(text2) ? "twin" : "distinct";
|
|
22805
|
+
}
|
|
22806
|
+
const keys = turnRequestKeys(m.content);
|
|
22807
|
+
if (keys.size > 0) return sharesRequestKey(keys, signals.requestKeys) ? "twin" : "distinct";
|
|
22808
|
+
const text = assistantAnswerText(m.content);
|
|
22809
|
+
if (text === "") return "unknown";
|
|
22810
|
+
for (const other of signals.assistantTexts.keys()) {
|
|
22811
|
+
if (other.startsWith(text) || text.startsWith(other)) return "twin";
|
|
22812
|
+
}
|
|
22813
|
+
return "distinct";
|
|
22814
|
+
}
|
|
22771
22815
|
function flattenMessagePagesChronological(pages) {
|
|
22772
22816
|
if (!pages) return [];
|
|
22773
22817
|
return [...pages].reverse().flatMap((page) => [...page.messages].reverse());
|
|
@@ -22832,7 +22876,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22832
22876
|
const persistedSize = historyTrailingAssistant.content.length;
|
|
22833
22877
|
const persistedSeq = _nullishCoalesce(historyTrailingAssistant.streamSeq, () => ( 0));
|
|
22834
22878
|
const trailingKeys = turnRequestKeys(historyTrailingAssistant.content);
|
|
22835
|
-
const isSameTurn = (m) => m.id === historyTrailingAssistant.id ||
|
|
22879
|
+
const isSameTurn = (m) => m.id === historyTrailingAssistant.id || sharesRequestKey(turnRequestKeys(m.content), trailingKeys);
|
|
22836
22880
|
const richerTwin = existingMessages.find(
|
|
22837
22881
|
(m) => m !== historyTrailingAssistant && m.role === "assistant" && Array.isArray(m.content) && isSameTurn(m) && // A STILL-STREAMING twin wins outright: it is the copy the chunks are
|
|
22838
22882
|
// landing in, so "richer" is a property it is about to have anyway,
|
|
@@ -22849,30 +22893,64 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22849
22893
|
}
|
|
22850
22894
|
const lastProcessed = processedToUse[processedToUse.length - 1];
|
|
22851
22895
|
const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
|
|
22852
|
-
const
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22896
|
+
const windowSignals = collectTwinSignals(processedToUse);
|
|
22897
|
+
const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
|
|
22898
|
+
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _753 => _753.has, 'call', _754 => _754(m.id)]), () => ( false)));
|
|
22899
|
+
const firstWindowIndex = existingMessages.findIndex(isInWindow);
|
|
22900
|
+
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _755 => _755.timestamp, 'optionalAccess', _756 => _756.getTime, 'call', _757 => _757()]), () => ( 0))) <= historyFetchedAt;
|
|
22901
|
+
let lastOlderPersistedIndex = -1;
|
|
22902
|
+
if (firstWindowIndex < 0) {
|
|
22903
|
+
for (const [index, m] of existingMessages.entries()) {
|
|
22904
|
+
if (isPersistedOlder(m) && !pinnedSyntheticIds.has(m.id) && !droppedSyntheticIds.has(m.id)) {
|
|
22905
|
+
lastOlderPersistedIndex = index;
|
|
22906
|
+
}
|
|
22856
22907
|
}
|
|
22857
22908
|
}
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
if (
|
|
22863
|
-
|
|
22864
|
-
if (
|
|
22865
|
-
|
|
22866
|
-
|
|
22909
|
+
let windowMinSeq = Number.POSITIVE_INFINITY;
|
|
22910
|
+
let windowMinTime = Number.POSITIVE_INFINITY;
|
|
22911
|
+
let windowHasUnstampedAssistant = false;
|
|
22912
|
+
for (const pm of processedToUse) {
|
|
22913
|
+
if (typeof pm.streamSeq === "number") {
|
|
22914
|
+
if (pm.streamSeq < windowMinSeq) windowMinSeq = pm.streamSeq;
|
|
22915
|
+
} else if (pm.role === "assistant") {
|
|
22916
|
+
windowHasUnstampedAssistant = true;
|
|
22917
|
+
}
|
|
22918
|
+
const time = _optionalChain([pm, 'access', _758 => _758.timestamp, 'optionalAccess', _759 => _759.getTime, 'call', _760 => _760()]);
|
|
22919
|
+
if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
|
|
22920
|
+
}
|
|
22921
|
+
const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
|
|
22922
|
+
const seqCanMislead = (m) => m.role === "assistant" ? windowHasUnstampedAssistant : isUserRequestSyntheticId(m.id) || isOptimisticId(m.id);
|
|
22923
|
+
const isOlderThanWindow = (m, index) => {
|
|
22924
|
+
if (m.id === streamingMessageId) return false;
|
|
22925
|
+
if (firstWindowIndex >= 0) {
|
|
22926
|
+
if (index >= firstWindowIndex) return false;
|
|
22927
|
+
return !(isClientMintedId(m.id) && sharesRequestKey(turnRequestKeys(m.content), windowSignals.requestKeys));
|
|
22928
|
+
}
|
|
22929
|
+
if (index < lastOlderPersistedIndex) return true;
|
|
22930
|
+
if (!isClientMintedId(m.id)) return isPersistedOlder(m);
|
|
22931
|
+
if (typeof m.streamSeq === "number") {
|
|
22932
|
+
if (!Number.isFinite(windowMinSeq) || m.streamSeq >= windowMinSeq) return false;
|
|
22933
|
+
const verdict = twinVerdict(windowSignals, m);
|
|
22934
|
+
return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
|
|
22935
|
+
}
|
|
22936
|
+
const time = _optionalChain([m, 'access', _761 => _761.timestamp, 'optionalAccess', _762 => _762.getTime, 'call', _763 => _763()]);
|
|
22937
|
+
if (typeof time !== "number" || time > historyFetchedAt) return false;
|
|
22938
|
+
if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
|
|
22939
|
+
return twinVerdict(windowSignals, m) === "distinct";
|
|
22940
|
+
};
|
|
22941
|
+
const keepRealtime = (m) => {
|
|
22942
|
+
if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
|
|
22943
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _764 => _764.timestamp, 'optionalAccess', _765 => _765.getTime, 'call', _766 => _766()]), () => ( 0))) <= historyFetchedAt;
|
|
22944
|
+
return !(canBeInSnapshot && windowSignals.userContents.has(m.content));
|
|
22867
22945
|
}
|
|
22868
22946
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
22869
22947
|
if (m.role === "assistant" && trailingAssistantText && assistantAnswerText(m.content) === trailingAssistantText) {
|
|
22870
22948
|
return false;
|
|
22871
22949
|
}
|
|
22872
|
-
if (m.role === "user" && m.id
|
|
22950
|
+
if (m.role === "user" && isUserRequestSyntheticId(m.id) && typeof m.content === "string") {
|
|
22873
22951
|
const seen = (_nullishCoalesce(seenUserSyntheticByContent.get(m.content), () => ( 0))) + 1;
|
|
22874
22952
|
seenUserSyntheticByContent.set(m.content, seen);
|
|
22875
|
-
if ((_nullishCoalesce(
|
|
22953
|
+
if ((_nullishCoalesce(windowSignals.userContents.get(m.content), () => ( 0))) < seen) return true;
|
|
22876
22954
|
if (typeof m.streamSeq !== "number" || historyMaxStreamSeq <= 0) return false;
|
|
22877
22955
|
if (historyMaxStreamSeq >= m.streamSeq) return false;
|
|
22878
22956
|
const lastPersisted = processedToUse[processedToUse.length - 1];
|
|
@@ -22886,37 +22964,76 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22886
22964
|
} else if (typeof m.streamSeq === "number") {
|
|
22887
22965
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
22888
22966
|
} else {
|
|
22889
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22967
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _767 => _767.timestamp, 'optionalAccess', _768 => _768.getTime, 'call', _769 => _769()]), () => ( 0))) <= historyFetchedAt;
|
|
22890
22968
|
}
|
|
22891
22969
|
if (covered) return false;
|
|
22892
22970
|
}
|
|
22893
22971
|
return true;
|
|
22894
|
-
}
|
|
22895
|
-
|
|
22972
|
+
};
|
|
22973
|
+
const olderThanWindowMessages = [];
|
|
22974
|
+
const realtimeMessages = [];
|
|
22975
|
+
for (const [index, m] of existingMessages.entries()) {
|
|
22976
|
+
if (pinnedSyntheticIds.has(m.id)) {
|
|
22977
|
+
realtimeMessages.push(m);
|
|
22978
|
+
continue;
|
|
22979
|
+
}
|
|
22980
|
+
if (droppedSyntheticIds.has(m.id) || isInWindow(m)) continue;
|
|
22981
|
+
if (firstWindowIndex < 0 && !threadHasClientMintedRow && isPersistedOlder(m) && !isWelcomeId(m.id)) continue;
|
|
22982
|
+
if (isOlderThanWindow(m, index)) {
|
|
22983
|
+
olderThanWindowMessages.push(m);
|
|
22984
|
+
continue;
|
|
22985
|
+
}
|
|
22986
|
+
if (keepRealtime(m)) realtimeMessages.push(m);
|
|
22987
|
+
}
|
|
22988
|
+
return [...olderThanWindowMessages, ...processedToUse, ...realtimeMessages];
|
|
22896
22989
|
}
|
|
22897
22990
|
function computeHistoryPrepend(processedHistory, existingMessages) {
|
|
22898
22991
|
const existingIds = new Set(existingMessages.map((m) => m.id));
|
|
22899
|
-
const
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
22992
|
+
const boundaryMessageIndex = processedHistory.findIndex((m) => existingIds.has(m.id));
|
|
22993
|
+
const newEnd = boundaryMessageIndex >= 0 ? boundaryMessageIndex : processedHistory.length;
|
|
22994
|
+
const boundaryIndexInExisting = boundaryMessageIndex >= 0 ? existingMessages.findIndex((m) => m.id === processedHistory[boundaryMessageIndex].id) : -1;
|
|
22995
|
+
const liveAboveBoundary = boundaryIndexInExisting > 0 ? existingMessages.slice(0, boundaryIndexInExisting).filter((m) => isClientMintedId(m.id)) : [];
|
|
22996
|
+
const twinIndices = /* @__PURE__ */ new Set();
|
|
22997
|
+
if (liveAboveBoundary.length > 0) {
|
|
22998
|
+
const liveSignals = collectTwinSignals(liveAboveBoundary);
|
|
22999
|
+
const userTwinsLeft = new Map(liveSignals.userContents);
|
|
23000
|
+
const assistantTwinsLeft = new Map(liveSignals.assistantTexts);
|
|
23001
|
+
for (let i = newEnd - 1; i >= 0; i--) {
|
|
23002
|
+
const pm = processedHistory[i];
|
|
23003
|
+
if (pm.role === "user") {
|
|
23004
|
+
const text = userText(pm);
|
|
23005
|
+
const left = text === "" ? 0 : _nullishCoalesce(userTwinsLeft.get(text), () => ( 0));
|
|
23006
|
+
if (left === 0) continue;
|
|
23007
|
+
userTwinsLeft.set(text, left - 1);
|
|
23008
|
+
twinIndices.add(i);
|
|
23009
|
+
} else if (pm.role === "assistant") {
|
|
23010
|
+
const keys = turnRequestKeys(pm.content);
|
|
23011
|
+
if (keys.size > 0) {
|
|
23012
|
+
if (sharesRequestKey(keys, liveSignals.requestKeys)) twinIndices.add(i);
|
|
23013
|
+
continue;
|
|
23014
|
+
}
|
|
23015
|
+
const text = assistantAnswerText(pm.content);
|
|
23016
|
+
if (text === "") continue;
|
|
23017
|
+
for (const [liveText, left] of assistantTwinsLeft) {
|
|
23018
|
+
if (left === 0 || !text.startsWith(liveText)) continue;
|
|
23019
|
+
assistantTwinsLeft.set(liveText, left - 1);
|
|
23020
|
+
twinIndices.add(i);
|
|
23021
|
+
break;
|
|
23022
|
+
}
|
|
23023
|
+
}
|
|
22905
23024
|
}
|
|
22906
|
-
newMessages.push(processedHistory[i]);
|
|
22907
23025
|
}
|
|
23026
|
+
const newMessages = processedHistory.slice(0, newEnd).filter((_, i) => !twinIndices.has(i));
|
|
22908
23027
|
let boundaryMessageId;
|
|
22909
23028
|
let boundaryUpdates;
|
|
22910
|
-
if (
|
|
23029
|
+
if (boundaryIndexInExisting >= 0) {
|
|
22911
23030
|
const boundaryMessage = processedHistory[boundaryMessageIndex];
|
|
22912
|
-
const existingBoundary = existingMessages
|
|
22913
|
-
|
|
22914
|
-
|
|
22915
|
-
|
|
22916
|
-
|
|
22917
|
-
|
|
22918
|
-
boundaryUpdates = { content: boundaryMessage.content };
|
|
22919
|
-
}
|
|
23031
|
+
const existingBoundary = existingMessages[boundaryIndexInExisting];
|
|
23032
|
+
const existingContent = JSON.stringify(existingBoundary.content);
|
|
23033
|
+
const newContent = JSON.stringify(boundaryMessage.content);
|
|
23034
|
+
if (existingContent !== newContent) {
|
|
23035
|
+
boundaryMessageId = boundaryMessage.id;
|
|
23036
|
+
boundaryUpdates = { content: boundaryMessage.content };
|
|
22920
23037
|
}
|
|
22921
23038
|
}
|
|
22922
23039
|
if (newMessages.length === 0 && !boundaryUpdates) return null;
|
|
@@ -22956,7 +23073,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
22956
23073
|
function isHistoricalUserTurn(m) {
|
|
22957
23074
|
return !!m.owner;
|
|
22958
23075
|
}
|
|
22959
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
23076
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _770 => _770.type]) === "TEXT" && typeof d.text === "string";
|
|
22960
23077
|
var THINK_MS = 550;
|
|
22961
23078
|
var TOKEN_MS = 55;
|
|
22962
23079
|
var USER_MS = 480;
|
|
@@ -23576,7 +23693,7 @@ function useChatDialogManager({
|
|
|
23576
23693
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
23577
23694
|
if (restoreTarget) {
|
|
23578
23695
|
try {
|
|
23579
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
23696
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _771 => _771(restoreTarget.id)]);
|
|
23580
23697
|
} catch (err) {
|
|
23581
23698
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
23582
23699
|
return;
|
|
@@ -24059,7 +24176,7 @@ function EmbeddableChatInner({
|
|
|
24059
24176
|
}),
|
|
24060
24177
|
[commandsUrl]
|
|
24061
24178
|
);
|
|
24062
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
24179
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _772 => _772.name, 'optionalAccess', _773 => _773.trim, 'call', _774 => _774()]) || [_optionalChain([identityUser, 'optionalAccess', _775 => _775.firstName]), _optionalChain([identityUser, 'optionalAccess', _776 => _776.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _777 => _777.trim, 'call', _778 => _778()]) || void 0;
|
|
24063
24180
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
24064
24181
|
if (modes) return modes;
|
|
24065
24182
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -24074,7 +24191,7 @@ function EmbeddableChatInner({
|
|
|
24074
24191
|
if (controlledActiveMode === void 0) {
|
|
24075
24192
|
setUncontrolledActiveMode(next);
|
|
24076
24193
|
}
|
|
24077
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
24194
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _779 => _779(next)]);
|
|
24078
24195
|
},
|
|
24079
24196
|
[controlledActiveMode, onActiveModeChange]
|
|
24080
24197
|
);
|
|
@@ -24101,7 +24218,7 @@ function EmbeddableChatInner({
|
|
|
24101
24218
|
);
|
|
24102
24219
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
24103
24220
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
24104
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
24221
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _780 => _780.title]) === "string" ? guideWelcome.title : null)));
|
|
24105
24222
|
const {
|
|
24106
24223
|
messages: rawMessages,
|
|
24107
24224
|
isLoading: chatLoading,
|
|
@@ -24144,8 +24261,8 @@ function EmbeddableChatInner({
|
|
|
24144
24261
|
const mingoCaps = _react.useMemo.call(void 0,
|
|
24145
24262
|
() => ({
|
|
24146
24263
|
...dialogCapabilities,
|
|
24147
|
-
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
24148
|
-
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
24264
|
+
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _781 => _781.canRename]), () => ( false)),
|
|
24265
|
+
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _782 => _782.canArchive]), () => ( false))
|
|
24149
24266
|
}),
|
|
24150
24267
|
[dialogCapabilities]
|
|
24151
24268
|
);
|
|
@@ -24160,7 +24277,7 @@ function EmbeddableChatInner({
|
|
|
24160
24277
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
24161
24278
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
24162
24279
|
});
|
|
24163
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
24280
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _783 => _783()]);
|
|
24164
24281
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
24165
24282
|
const {
|
|
24166
24283
|
attachments: stagedAttachments,
|
|
@@ -24171,7 +24288,7 @@ function EmbeddableChatInner({
|
|
|
24171
24288
|
clear: clearAttachments
|
|
24172
24289
|
} = useChatAttachments();
|
|
24173
24290
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
24174
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24291
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _784 => _784.maxItems]), () => ( 10));
|
|
24175
24292
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
24176
24293
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
24177
24294
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -24192,10 +24309,10 @@ function EmbeddableChatInner({
|
|
|
24192
24309
|
}, [activeDialogId, activeMode]);
|
|
24193
24310
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
24194
24311
|
const m = /* @__PURE__ */ new Map();
|
|
24195
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24312
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _785 => _785.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
24196
24313
|
return m;
|
|
24197
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
24198
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
24314
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _786 => _786.entityTypes])]);
|
|
24315
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _787 => _787.entityTypes]);
|
|
24199
24316
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
24200
24317
|
const byType = /* @__PURE__ */ new Map();
|
|
24201
24318
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -24207,7 +24324,7 @@ function EmbeddableChatInner({
|
|
|
24207
24324
|
if (mentionActiveRef.current) {
|
|
24208
24325
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
24209
24326
|
if (contextItems.length >= contextMaxItems) return;
|
|
24210
|
-
_optionalChain([chatInputRef, 'access',
|
|
24327
|
+
_optionalChain([chatInputRef, 'access', _788 => _788.current, 'optionalAccess', _789 => _789.commitMention, 'call', _790 => _790(mentionTokenOf(key, mentionMarkerByType), {
|
|
24211
24328
|
label: item.label,
|
|
24212
24329
|
icon: resolveContextIcon(item)
|
|
24213
24330
|
})]);
|
|
@@ -24230,9 +24347,9 @@ function EmbeddableChatInner({
|
|
|
24230
24347
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
24231
24348
|
if (mentionKeysRef.current.has(key)) {
|
|
24232
24349
|
mentionKeysRef.current.delete(key);
|
|
24233
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
24350
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _791 => _791.current, 'optionalAccess', _792 => _792.getValue, 'call', _793 => _793()]), () => ( ""));
|
|
24234
24351
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
24235
|
-
_optionalChain([chatInputRef, 'access',
|
|
24352
|
+
_optionalChain([chatInputRef, 'access', _794 => _794.current, 'optionalAccess', _795 => _795.setValue, 'call', _796 => _796(next)]);
|
|
24236
24353
|
}
|
|
24237
24354
|
},
|
|
24238
24355
|
[mentionMarkerByType]
|
|
@@ -24254,7 +24371,7 @@ function EmbeddableChatInner({
|
|
|
24254
24371
|
}, []);
|
|
24255
24372
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
24256
24373
|
if (mentionActiveRef.current) {
|
|
24257
|
-
_optionalChain([chatInputRef, 'access',
|
|
24374
|
+
_optionalChain([chatInputRef, 'access', _797 => _797.current, 'optionalAccess', _798 => _798.removeMentionTrigger, 'call', _799 => _799()]);
|
|
24258
24375
|
}
|
|
24259
24376
|
setContextPickerOpen(false);
|
|
24260
24377
|
setMentionQuery(null);
|
|
@@ -24288,8 +24405,8 @@ function EmbeddableChatInner({
|
|
|
24288
24405
|
[effectiveAssistantIcon]
|
|
24289
24406
|
);
|
|
24290
24407
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
24291
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
24292
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
24408
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _800 => _800.firstName]), _optionalChain([identityUser, 'optionalAccess', _801 => _801.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _802 => _802.name, 'optionalAccess', _803 => _803.trim, 'call', _804 => _804()]) || void 0 : void 0;
|
|
24409
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _805 => _805.avatarUrl, 'optionalAccess', _806 => _806.trim, 'call', _807 => _807()]) || void 0 : void 0;
|
|
24293
24410
|
const messages = _react.useMemo.call(void 0, () => {
|
|
24294
24411
|
const cache = timestampCache;
|
|
24295
24412
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -24479,9 +24596,9 @@ function EmbeddableChatInner({
|
|
|
24479
24596
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
24480
24597
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
24481
24598
|
if (chatLoading) return void 0;
|
|
24482
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24599
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _808 => _808.sources]);
|
|
24483
24600
|
if (!sources || sources.length === 0) return void 0;
|
|
24484
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24601
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _809 => _809.content]) || "";
|
|
24485
24602
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
|
|
24486
24603
|
const seenOrder = /* @__PURE__ */ new Map();
|
|
24487
24604
|
citationOrder.forEach((idx) => {
|
|
@@ -24497,7 +24614,7 @@ function EmbeddableChatInner({
|
|
|
24497
24614
|
_react.useEffect.call(void 0, () => {
|
|
24498
24615
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
24499
24616
|
const ro = new ResizeObserver((entries) => {
|
|
24500
|
-
const w = _optionalChain([entries, 'access',
|
|
24617
|
+
const w = _optionalChain([entries, 'access', _810 => _810[0], 'optionalAccess', _811 => _811.contentRect, 'optionalAccess', _812 => _812.width]);
|
|
24501
24618
|
if (typeof w === "number") setPanelWidth(w);
|
|
24502
24619
|
});
|
|
24503
24620
|
ro.observe(panelBoundary);
|
|
@@ -24541,17 +24658,17 @@ function EmbeddableChatInner({
|
|
|
24541
24658
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
|
|
24542
24659
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
24543
24660
|
const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
|
|
24544
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
24661
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _813 => _813.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
|
|
24545
24662
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
24546
24663
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
24547
24664
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
24548
24665
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
24549
24666
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
24550
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
24667
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _814 => _814.onCopyLink, 'optionalCall', _815 => _815(activeDialog)]) : void 0;
|
|
24551
24668
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
24552
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
24553
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
24554
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
24669
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _816 => _816.owner]) : void 0;
|
|
24670
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _817 => _817.name, 'optionalAccess', _818 => _818.trim, 'call', _819 => _819()]) || headerUserName;
|
|
24671
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _820 => _820.avatarUrl, 'optionalAccess', _821 => _821.trim, 'call', _822 => _822()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _823 => _823.avatarUrl, 'optionalAccess', _824 => _824.trim, 'call', _825 => _825()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _826 => _826.trim, 'call', _827 => _827()]) || void 0;
|
|
24555
24672
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
24556
24673
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
24557
24674
|
resetToNewChat();
|
|
@@ -24881,9 +24998,9 @@ function EmbeddableChatInner({
|
|
|
24881
24998
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
24882
24999
|
subtitleLoading: emptyStateLoading,
|
|
24883
25000
|
...guideWelcome,
|
|
24884
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24885
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24886
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
25001
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _828 => _828.title]))),
|
|
25002
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _829 => _829.icon]))),
|
|
25003
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _830 => _830.quickActions]), () => ( guideSuggestedActions)),
|
|
24887
25004
|
onQuickAction: (action) => {
|
|
24888
25005
|
setQuickActionPreview(null);
|
|
24889
25006
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -24957,8 +25074,8 @@ function EmbeddableChatInner({
|
|
|
24957
25074
|
selectedContextItems: contextItems,
|
|
24958
25075
|
onToggleContextItem: toggleContextItem,
|
|
24959
25076
|
onRemoveContextItem: removeContextItem,
|
|
24960
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
24961
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
25077
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _831 => _831.items]),
|
|
25078
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _832 => _832.onRemove]),
|
|
24962
25079
|
contextPickerOpen,
|
|
24963
25080
|
onOpenContextPicker: openContextPicker,
|
|
24964
25081
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -25424,4 +25541,4 @@ function EmbeddableChatInner({
|
|
|
25424
25541
|
|
|
25425
25542
|
|
|
25426
25543
|
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.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; 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.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; 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.createChatConversationsApi = createChatConversationsApi; 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.useManagedDialogList = useManagedDialogList; 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.useStableShallow = useStableShallow; 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;
|
|
25427
|
-
//# sourceMappingURL=chunk-
|
|
25544
|
+
//# sourceMappingURL=chunk-XNDTYTVT.cjs.map
|