@flamingo-stack/openframe-frontend-core 0.0.817 → 0.0.819
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-5TSYOIIZ.cjs → chunk-2JFR6XVT.cjs} +32 -32
- package/dist/{chunk-MAHJY2PO.cjs → chunk-2S6BUXYD.cjs} +3 -3
- package/dist/{chunk-ZP4JMX7G.cjs → chunk-2T3HXLZD.cjs} +53 -53
- package/dist/{chunk-P7JQGOX4.cjs → chunk-2W3W3ZV6.cjs} +11 -11
- package/dist/{chunk-7KBHLP4E.cjs → chunk-7IQU54VE.cjs} +16 -16
- package/dist/{chunk-TKEYWSDZ.cjs → chunk-A36XVWIQ.cjs} +39 -39
- package/dist/{chunk-F2LVBRHC.cjs → chunk-CEXPWDT4.cjs} +4 -4
- package/dist/{chunk-IOFIHVVW.cjs → chunk-I453QCEF.cjs} +107 -107
- package/dist/{chunk-6F4YGHGM.cjs → chunk-IVQT5R6M.cjs} +19 -19
- package/dist/{chunk-RDHF3F5R.cjs → chunk-JOXJDNHN.cjs} +3 -3
- package/dist/{chunk-C2OUXL3Q.cjs → chunk-MYIOOA4E.cjs} +2 -2
- package/dist/{chunk-24M2JYM5.cjs → chunk-OTGYA5F7.cjs} +259 -285
- package/dist/{chunk-UFBVOBYR.cjs → chunk-Q6QQSCUC.cjs} +10 -10
- package/dist/{chunk-4ROR52OW.cjs → chunk-S2ZA4TMJ.cjs} +9 -9
- package/dist/{chunk-JMOCM2SW.cjs → chunk-TDQRDQVU.cjs} +4 -4
- package/dist/{chunk-EX7M3VQC.cjs → chunk-U3OICGCV.cjs} +47 -47
- package/dist/{chunk-BL2J5RJK.cjs → chunk-VSKR26MV.cjs} +6 -6
- package/dist/{chunk-DSBRWP5M.cjs → chunk-WPHCVXES.cjs} +7 -7
- package/dist/{cloud-tenants-NMAXIJLL.cjs → cloud-tenants-P5XJ5DPJ.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/chat/embeddable-chat.d.ts +0 -8
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +10 -67
- package/dist/components/chat/entity-cards/dispatch.d.ts +3 -10
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +4 -23
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/remark-strip-citations.d.ts +1 -1
- package/dist/components/chat/remark-strip-citations.d.ts.map +1 -1
- package/dist/components/chat/remark-strip-citations.js +8 -2
- package/dist/components/chat/types/entities/data-room-doc.d.ts +0 -12
- package/dist/components/chat/types/entities/data-room-doc.d.ts.map +1 -1
- package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
- package/dist/components/chat/utils/cited-sources.js +36 -0
- package/dist/components/chat/utils/source-row-cta.d.ts +9 -48
- package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -1
- package/dist/components/chat/utils/source-row-cta.js +7 -32
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/index.cjs +61 -61
- package/dist/components/index.cjs +37 -37
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +13 -13
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/ui/index.cjs +4 -4
- package/dist/contexts/chat-runtime-context.d.ts +3 -14
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/{devices-QBKWVHE6.cjs → devices-BSIWSRZG.cjs} +5 -5
- package/dist/{embeddable-chat-WNPCPMDL.cjs → embeddable-chat-5L2PKTW3.cjs} +107 -127
- package/dist/index.cjs +8 -8
- package/dist/{knowledge-FSAYWM25.cjs → knowledge-2F3IPK73.cjs} +5 -5
- package/dist/{logs-OZX4SYHG.cjs → logs-U3OCJ2OC.cjs} +12 -12
- package/dist/{policies-LPCUCTLX.cjs → policies-L3KHKE2G.cjs} +8 -8
- package/dist/{scripts-ZNFZSONW.cjs → scripts-U4SLB5YC.cjs} +9 -9
- package/dist/{software-update-BRYOVQVY.cjs → software-update-QALYFCIO.cjs} +7 -7
- package/dist/utils/source-grouping.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +10 -74
- package/src/components/chat/entity-cards/data-room-doc-card.tsx +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +6 -31
- package/src/components/chat/remark-strip-citations.ts +14 -3
- package/src/components/chat/types/entities/data-room-doc.ts +0 -12
- package/src/components/chat/utils/cited-sources.ts +51 -0
- package/src/components/chat/utils/source-row-cta.ts +21 -102
- package/src/contexts/chat-runtime-context.tsx +3 -11
- package/src/utils/source-grouping.ts +2 -2
|
@@ -346,7 +346,6 @@ var _chunkRUHKTWGBcjs = require('./chunk-RUHKTWGB.cjs');
|
|
|
346
346
|
|
|
347
347
|
|
|
348
348
|
|
|
349
|
-
|
|
350
349
|
var _chunkDVHSYPDBcjs = require('./chunk-DVHSYPDB.cjs');
|
|
351
350
|
|
|
352
351
|
|
|
@@ -5107,6 +5106,17 @@ var CARD_REFERENCE = new RegExp(`^\\[card://(${CARD_TYPE}):(${CARD_ID})\\]$`);
|
|
|
5107
5106
|
function createCardMarkerScanner() {
|
|
5108
5107
|
return new RegExp(`\\[card://(${CARD_TYPE}):(${CARD_ID})[\\])]`, "g");
|
|
5109
5108
|
}
|
|
5109
|
+
function extractCardReferences(text2) {
|
|
5110
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5111
|
+
const out = [];
|
|
5112
|
+
for (const match of text2.matchAll(createCardMarkerScanner())) {
|
|
5113
|
+
const key = `${match[1]}:${match[2]}`;
|
|
5114
|
+
if (seen.has(key)) continue;
|
|
5115
|
+
seen.add(key);
|
|
5116
|
+
out.push({ type: match[1], id: match[2] });
|
|
5117
|
+
}
|
|
5118
|
+
return out;
|
|
5119
|
+
}
|
|
5110
5120
|
|
|
5111
5121
|
// src/components/chat/remark-card-links.ts
|
|
5112
5122
|
var CARD_REGEX = createCardMarkerScanner();
|
|
@@ -5333,13 +5343,19 @@ var CHAT_MESSAGE_LIST_CONTENT_PADDING_CLASS = "px-[var(--spacing-system-m)]";
|
|
|
5333
5343
|
|
|
5334
5344
|
// src/components/chat/remark-strip-citations.ts
|
|
5335
5345
|
|
|
5336
|
-
var CITATION_REGEX = /(^|\s)
|
|
5346
|
+
var CITATION_REGEX = /(^|\s)(?:\[\d{1,2}(?:\s*,\s*\d{1,2})*\])+(?=[\s.,;:!?)\]]|$)/g;
|
|
5347
|
+
function withoutRun(text2) {
|
|
5348
|
+
return text2.replace(CITATION_REGEX, (run, lead, offset) => {
|
|
5349
|
+
const next = text2.charAt(offset + run.length);
|
|
5350
|
+
return next === "" || /[.,;:!?)\]]/.test(next) ? "" : lead;
|
|
5351
|
+
});
|
|
5352
|
+
}
|
|
5337
5353
|
var remarkStripCitations = () => {
|
|
5338
5354
|
return (tree) => {
|
|
5339
5355
|
_unistutilvisit.visit.call(void 0, tree, "text", (node, index, parent) => {
|
|
5340
5356
|
if (!parent || typeof index !== "number") return;
|
|
5341
5357
|
if (!node.value || !node.value.includes("[")) return;
|
|
5342
|
-
const withoutCitations = node.value
|
|
5358
|
+
const withoutCitations = withoutRun(node.value);
|
|
5343
5359
|
if (withoutCitations === node.value) return;
|
|
5344
5360
|
parent.children.splice(index, 1, {
|
|
5345
5361
|
...node,
|
|
@@ -11742,14 +11758,8 @@ function resolveFetchedCardHref({
|
|
|
11742
11758
|
function sanitizePath(path) {
|
|
11743
11759
|
return (path || "").replace(/[^a-zA-Z0-9/_\-.]/g, "");
|
|
11744
11760
|
}
|
|
11745
|
-
function sourceRowCtxFromRuntime(runtime
|
|
11746
|
-
return {
|
|
11747
|
-
currentPlatform: _nullishCoalesce(runtime.source, () => ( null)),
|
|
11748
|
-
composeContentUrl: runtime.composeContentUrl,
|
|
11749
|
-
docPlatformTargets: runtime.docPlatformTargets,
|
|
11750
|
-
baseRoute: surface.baseRoute,
|
|
11751
|
-
chipBasePlatform: surface.chipBasePlatform
|
|
11752
|
-
};
|
|
11761
|
+
function sourceRowCtxFromRuntime(runtime) {
|
|
11762
|
+
return { composeContentUrl: runtime.composeContentUrl };
|
|
11753
11763
|
}
|
|
11754
11764
|
function pickSourceIcon(sourceRepo, documentType) {
|
|
11755
11765
|
const iconName = sourceRepo ? getSourceIconName(sourceRepo) : void 0;
|
|
@@ -11757,7 +11767,7 @@ function pickSourceIcon(sourceRepo, documentType) {
|
|
|
11757
11767
|
const iconLabel = _nullishCoalesce(documentType, () => ( "Source"));
|
|
11758
11768
|
return { icon, iconLabel };
|
|
11759
11769
|
}
|
|
11760
|
-
function
|
|
11770
|
+
function isDocRow(row) {
|
|
11761
11771
|
return !!row.documentType && DOC_TABLE_TYPES.includes(row.documentType);
|
|
11762
11772
|
}
|
|
11763
11773
|
function resolveSourceRowCTA(row, ctx = {}) {
|
|
@@ -11766,34 +11776,16 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
11766
11776
|
let href = null;
|
|
11767
11777
|
let targetPlatform = null;
|
|
11768
11778
|
const idValue = (_nullishCoalesce(row.id, () => ( ""))).trim();
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
if (safePath) {
|
|
11772
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _245 => _245.docPlatformTargets, 'optionalAccess', _246 => _246[row.documentType]]) : void 0;
|
|
11773
|
-
if (docTarget) {
|
|
11774
|
-
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
11775
|
-
const base = `${_chunkDVHSYPDBcjs.getPlatformUrl.call(void 0, docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
11776
|
-
href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
|
|
11777
|
-
targetPlatform = docTarget.platform;
|
|
11778
|
-
} else if (ctx.chipBasePlatform) {
|
|
11779
|
-
const base = `${_chunkDVHSYPDBcjs.getPlatformUrl.call(void 0, ctx.chipBasePlatform)}/knowledge-base/`;
|
|
11780
|
-
href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
|
|
11781
|
-
targetPlatform = ctx.chipBasePlatform;
|
|
11782
|
-
} else if (ctx.baseRoute) {
|
|
11783
|
-
const synthetic = `https://_internal_.local${ctx.baseRoute.startsWith("/") ? ctx.baseRoute : "/" + ctx.baseRoute}/`;
|
|
11784
|
-
const absolute = new URL(safePath, synthetic).toString();
|
|
11785
|
-
href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, absolute.replace("https://_internal_.local", "")), () => ( null));
|
|
11786
|
-
targetPlatform = _nullishCoalesce(ctx.currentPlatform, () => ( null));
|
|
11787
|
-
}
|
|
11788
|
-
}
|
|
11789
|
-
} else if (ctx.composeContentUrl && row.documentType && row.externalUrl) {
|
|
11779
|
+
const docPath = !row.externalUrl && row.path && isDocRow(row) ? sanitizePath(row.path) : "";
|
|
11780
|
+
if (ctx.composeContentUrl && row.documentType && (row.externalUrl || docPath)) {
|
|
11790
11781
|
const composed = ctx.composeContentUrl({
|
|
11791
11782
|
// Canonical vocabulary only — a rail-vocab alias would miss the host's
|
|
11792
11783
|
// `hostedTypes` / `overrides` and fall through to the seam's default
|
|
11793
11784
|
// `<origin>/<type>/<id>` branch. Same canonicalizer `buildListUrl` uses.
|
|
11794
11785
|
type: _chunkIM366HS6cjs.canonicalContentRefType.call(void 0, row.documentType),
|
|
11795
11786
|
identifier: idValue,
|
|
11796
|
-
|
|
11787
|
+
...docPath ? { slug: docPath } : {},
|
|
11788
|
+
externalUrl: _nullishCoalesce(row.externalUrl, () => ( null)),
|
|
11797
11789
|
targetPlatform: _nullishCoalesce(row.targetPlatform, () => ( null))
|
|
11798
11790
|
});
|
|
11799
11791
|
href = composed.href ? _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, composed.href), () => ( null)) : null;
|
|
@@ -11838,7 +11830,7 @@ function resolveCardDestination({
|
|
|
11838
11830
|
composeContentUrl,
|
|
11839
11831
|
resolveHref = (href) => href
|
|
11840
11832
|
}) {
|
|
11841
|
-
const refPath = typeof _optionalChain([chatRef, 'access',
|
|
11833
|
+
const refPath = typeof _optionalChain([chatRef, 'access', _245 => _245.metadata, 'optionalAccess', _246 => _246.path]) === "string" && chatRef.metadata.path ? chatRef.metadata.path : null;
|
|
11842
11834
|
const path = _nullishCoalesce(refPath, () => ( (item ? readFetchedCardPath(item) : null)));
|
|
11843
11835
|
const cta = resolveSourceRowCTA(
|
|
11844
11836
|
{
|
|
@@ -11855,7 +11847,7 @@ function resolveCardDestination({
|
|
|
11855
11847
|
const rowUrl = cta.href ? resolveHref(cta.href) : _nullishCoalesce(chatRef.url, () => ( null));
|
|
11856
11848
|
const rowPlatform = _nullishCoalesce(_nullishCoalesce(cta.targetPlatform, () => ( chatRef.targetPlatform)), () => ( null));
|
|
11857
11849
|
if (rowUrl) return { url: rowUrl, targetPlatform: rowPlatform, path, source: "row" };
|
|
11858
|
-
if (_optionalChain([entry, 'optionalAccess',
|
|
11850
|
+
if (_optionalChain([entry, 'optionalAccess', _247 => _247.contentRefType]) && item) {
|
|
11859
11851
|
const choice = pickFetchedCardHref({
|
|
11860
11852
|
composed: resolveFetchedCardHref({
|
|
11861
11853
|
contentRefType: entry.contentRefType,
|
|
@@ -11863,7 +11855,7 @@ function resolveCardDestination({
|
|
|
11863
11855
|
item,
|
|
11864
11856
|
composeContentUrl
|
|
11865
11857
|
}),
|
|
11866
|
-
itemHref: _nullishCoalesce(_optionalChain([entry, 'access',
|
|
11858
|
+
itemHref: _nullishCoalesce(_optionalChain([entry, 'access', _248 => _248.fallbackHref, 'optionalCall', _249 => _249(item)]), () => ( null)),
|
|
11867
11859
|
allowComposed: !entry.noComposedHref
|
|
11868
11860
|
});
|
|
11869
11861
|
const url = choice ? _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, choice.href), () => ( null)) : null;
|
|
@@ -11957,8 +11949,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
11957
11949
|
if (href) {
|
|
11958
11950
|
items.push({
|
|
11959
11951
|
id: "open-details",
|
|
11960
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
11961
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
11952
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _250 => _250.label]), () => ( "Open Details")),
|
|
11953
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _251 => _251.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMLT7ASAcjs.EyeIcon, { size: 20 }))),
|
|
11962
11954
|
// Main row → open the entity (same tab, soft Link nav).
|
|
11963
11955
|
href,
|
|
11964
11956
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -12035,15 +12027,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
12035
12027
|
}
|
|
12036
12028
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
12037
12029
|
const it = item;
|
|
12038
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
12030
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _252 => _252.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
12039
12031
|
return {
|
|
12040
12032
|
type: "faq",
|
|
12041
12033
|
id: chatRef.id,
|
|
12042
12034
|
sourceRepo: chatRef.sourceRepo,
|
|
12043
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
12035
|
+
title: typeof _optionalChain([it, 'optionalAccess', _253 => _253.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
12044
12036
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
12045
12037
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
12046
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
12038
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _254 => _254.section]) === "string" && it.section ? { section: it.section } : {}
|
|
12047
12039
|
};
|
|
12048
12040
|
}
|
|
12049
12041
|
function HubspotTicketChatCard({
|
|
@@ -12051,8 +12043,8 @@ function HubspotTicketChatCard({
|
|
|
12051
12043
|
isNewTab,
|
|
12052
12044
|
discuss
|
|
12053
12045
|
}) {
|
|
12054
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
12055
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
12046
|
+
const status = typeof _optionalChain([chatRef, 'access', _255 => _255.metadata, 'optionalAccess', _256 => _256.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
12047
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _257 => _257.metadata, 'optionalAccess', _258 => _258.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
12056
12048
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
12057
12049
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12058
12050
|
MingoInfoCard,
|
|
@@ -12075,7 +12067,7 @@ function FaqChatCard({
|
|
|
12075
12067
|
isNewTab,
|
|
12076
12068
|
discuss
|
|
12077
12069
|
}) {
|
|
12078
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
12070
|
+
const section = typeof _optionalChain([chatRef, 'access', _259 => _259.metadata, 'optionalAccess', _260 => _260.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
12079
12071
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
12080
12072
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12081
12073
|
MingoInfoCard,
|
|
@@ -12095,7 +12087,7 @@ function SlackChatCard({
|
|
|
12095
12087
|
isNewTab,
|
|
12096
12088
|
discuss
|
|
12097
12089
|
}) {
|
|
12098
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
12090
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _261 => _261.metadata, 'optionalAccess', _262 => _262.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
12099
12091
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
12100
12092
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
12101
12093
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12138,7 +12130,7 @@ function TrustCenterChatCard({
|
|
|
12138
12130
|
isNewTab,
|
|
12139
12131
|
discuss
|
|
12140
12132
|
}) {
|
|
12141
|
-
const raw2 = _optionalChain([item, 'optionalAccess',
|
|
12133
|
+
const raw2 = _optionalChain([item, 'optionalAccess', _263 => _263.frameworks]);
|
|
12142
12134
|
const frameworks = Array.isArray(raw2) ? raw2 : [];
|
|
12143
12135
|
const summary = _chunkIM366HS6cjs.trustFrameworksSummary.call(void 0, frameworks);
|
|
12144
12136
|
const leadFramework = frameworks[0];
|
|
@@ -12187,7 +12179,7 @@ function GenericFinancialChatCard({
|
|
|
12187
12179
|
isNewTab,
|
|
12188
12180
|
discuss
|
|
12189
12181
|
}) {
|
|
12190
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
12182
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _264 => _264.metadata, 'optionalAccess', _265 => _265.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
12191
12183
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12192
12184
|
MingoInfoCard,
|
|
12193
12185
|
{
|
|
@@ -12261,12 +12253,12 @@ function ProductReleaseChatCard({
|
|
|
12261
12253
|
discuss
|
|
12262
12254
|
}) {
|
|
12263
12255
|
const releaseProps = buildProps(item);
|
|
12264
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
12256
|
+
const status = _optionalChain([item, 'optionalAccess', _266 => _266.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
12265
12257
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12266
12258
|
EntityMingoCard,
|
|
12267
12259
|
{
|
|
12268
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12269
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
12260
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _267 => _267.title]), () => ( "")),
|
|
12261
|
+
description: _optionalChain([item, 'optionalAccess', _268 => _268.summary]) || releaseProps.formattedDate || void 0,
|
|
12270
12262
|
cover: releaseProps.coverImage || void 0,
|
|
12271
12263
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX5LU4XQNcjs.Rocket02Icon, { size: 24 }),
|
|
12272
12264
|
status,
|
|
@@ -12283,17 +12275,17 @@ function CampaignChatCard({
|
|
|
12283
12275
|
isNewTab,
|
|
12284
12276
|
discuss
|
|
12285
12277
|
}) {
|
|
12286
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
12278
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _269 => _269.goals])) ? item.goals.length : 0;
|
|
12287
12279
|
const meta = [
|
|
12288
|
-
_optionalChain([item, 'optionalAccess',
|
|
12280
|
+
_optionalChain([item, 'optionalAccess', _270 => _270.start_date]) ? _chunkIM366HS6cjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
12289
12281
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
12290
12282
|
"Marketing campaign"
|
|
12291
12283
|
].filter(Boolean).join(" \xB7 ");
|
|
12292
12284
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12293
12285
|
EntityMingoCard,
|
|
12294
12286
|
{
|
|
12295
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12296
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
12287
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _271 => _271.name]), () => ( "")),
|
|
12288
|
+
description: meta || _optionalChain([item, 'optionalAccess', _272 => _272.description]) || void 0,
|
|
12297
12289
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OCFDC2Qcjs.Megaphone01Icon, { size: 24 }),
|
|
12298
12290
|
chatRef,
|
|
12299
12291
|
isNewTab,
|
|
@@ -12348,14 +12340,14 @@ function BlogChatCard({
|
|
|
12348
12340
|
hasEmbeddedVideo,
|
|
12349
12341
|
discuss
|
|
12350
12342
|
}) {
|
|
12351
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
12343
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _273 => _273.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _274 => _274.categories, 'access', _275 => _275.find, 'call', _276 => _276((c) => _optionalChain([c, 'optionalAccess', _277 => _277.name])), 'optionalAccess', _278 => _278.name]), () => ( void 0)) : void 0;
|
|
12352
12344
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
12353
12345
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12354
12346
|
EntityMingoCard,
|
|
12355
12347
|
{
|
|
12356
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12357
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12358
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
12348
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _279 => _279.title]), () => ( "")),
|
|
12349
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _280 => _280.summary]), () => ( void 0)),
|
|
12350
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _281 => _281.featured_image]), ogPlaceholder),
|
|
12359
12351
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEAPORE6cjs.NewspaperIcon, { size: 24 }),
|
|
12360
12352
|
status,
|
|
12361
12353
|
chatRef,
|
|
@@ -12372,13 +12364,13 @@ function CaseStudyChatCard({
|
|
|
12372
12364
|
ogPlaceholder,
|
|
12373
12365
|
discuss
|
|
12374
12366
|
}) {
|
|
12375
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
12367
|
+
const meta = [_optionalChain([item, 'optionalAccess', _282 => _282.msp, 'optionalAccess', _283 => _283.name]), _optionalChain([item, 'optionalAccess', _284 => _284.user, 'optionalAccess', _285 => _285.full_name])].filter(Boolean).join(" \xB7 ");
|
|
12376
12368
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12377
12369
|
EntityMingoCard,
|
|
12378
12370
|
{
|
|
12379
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12380
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
12381
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
12371
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _286 => _286.title]), () => ( "")),
|
|
12372
|
+
description: _optionalChain([item, 'optionalAccess', _287 => _287.summary]) || meta || void 0,
|
|
12373
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _288 => _288.featured_image]), ogPlaceholder),
|
|
12382
12374
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk44URXY24cjs.TrophyIcon, { size: 24 }),
|
|
12383
12375
|
status: { label: "Case study", variant: "grey" },
|
|
12384
12376
|
chatRef,
|
|
@@ -12395,13 +12387,13 @@ function CustomerInterviewChatCard({
|
|
|
12395
12387
|
ogPlaceholder,
|
|
12396
12388
|
discuss
|
|
12397
12389
|
}) {
|
|
12398
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
12390
|
+
const meta = [_optionalChain([item, 'optionalAccess', _289 => _289.user, 'optionalAccess', _290 => _290.full_name]), _optionalChain([item, 'optionalAccess', _291 => _291.msp, 'optionalAccess', _292 => _292.name])].filter(Boolean).join(" \xB7 ");
|
|
12399
12391
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12400
12392
|
EntityMingoCard,
|
|
12401
12393
|
{
|
|
12402
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12403
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
12404
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
12394
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _293 => _293.title]), () => ( "")),
|
|
12395
|
+
description: _optionalChain([item, 'optionalAccess', _294 => _294.video_summary]) || meta || void 0,
|
|
12396
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _295 => _295.featured_image]), ogPlaceholder),
|
|
12405
12397
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZL4LQNYXcjs.MicrophoneIcon, { size: 24 }),
|
|
12406
12398
|
status: { label: "Interview", variant: "grey" },
|
|
12407
12399
|
chatRef,
|
|
@@ -12418,12 +12410,12 @@ function DesignDocChatCard({
|
|
|
12418
12410
|
discuss
|
|
12419
12411
|
}) {
|
|
12420
12412
|
const displayRef = fetchedItemDisplayRef(item, chatRef);
|
|
12421
|
-
const doc = _optionalChain([item, 'optionalAccess',
|
|
12413
|
+
const doc = _optionalChain([item, 'optionalAccess', _296 => _296.doc]);
|
|
12422
12414
|
const readiness = doc ? DESIGN_DOC_READINESS_DISPLAY[designDocReadiness(doc.completion)] : null;
|
|
12423
12415
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12424
12416
|
MingoInfoCard,
|
|
12425
12417
|
{
|
|
12426
|
-
title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
12418
|
+
title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _297 => _297.title]), () => ( displayRef.title)),
|
|
12427
12419
|
description: doc ? [designDocMetaLine(doc), formatCompletionLabel(doc.completion)].join(" \xB7 ") : _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
12428
12420
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4USZF42cjs.FileContentIcon, { size: 24 }),
|
|
12429
12421
|
status: readiness ? { label: readiness.label, variant: readiness.scheme === "success" ? "success" : "grey" } : { label: "Design doc", variant: "grey" },
|
|
@@ -12440,13 +12432,13 @@ function InvestorUpdateChatCard({
|
|
|
12440
12432
|
ogPlaceholder,
|
|
12441
12433
|
discuss
|
|
12442
12434
|
}) {
|
|
12443
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
12435
|
+
const title = _optionalChain([item, 'optionalAccess', _298 => _298.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _299 => _299.update_number]), () => ( "?"))}`;
|
|
12444
12436
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12445
12437
|
EntityMingoCard,
|
|
12446
12438
|
{
|
|
12447
12439
|
title,
|
|
12448
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
12449
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
12440
|
+
description: _optionalChain([item, 'optionalAccess', _300 => _300.strategic_update]) || _optionalChain([item, 'optionalAccess', _301 => _301.content]) || _chunkIM366HS6cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _302 => _302.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _303 => _303.period_end]), () => ( null))) || void 0,
|
|
12441
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _304 => _304.featured_image]), ogPlaceholder),
|
|
12450
12442
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk37SGOMF5cjs.PresentationLineIcon, { size: 24 }),
|
|
12451
12443
|
status: { label: "Investor update", variant: "grey" },
|
|
12452
12444
|
chatRef,
|
|
@@ -12463,12 +12455,12 @@ function OnboardingGuideChatCard({
|
|
|
12463
12455
|
ogPlaceholder,
|
|
12464
12456
|
discuss
|
|
12465
12457
|
}) {
|
|
12466
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
12458
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _305 => _305.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _306 => _306.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _307 => _307.og_image_url]), ogPlaceholder)));
|
|
12467
12459
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12468
12460
|
EntityMingoCard,
|
|
12469
12461
|
{
|
|
12470
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12471
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12462
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _308 => _308.title]), () => ( "")),
|
|
12463
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _309 => _309.summary]), () => ( _optionalChain([item, 'optionalAccess', _310 => _310.description]))), () => ( void 0)),
|
|
12472
12464
|
cover,
|
|
12473
12465
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFJDLJSIcjs.CompassIcon, { size: 24 }),
|
|
12474
12466
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -12493,9 +12485,9 @@ function ProgramChatCard({
|
|
|
12493
12485
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12494
12486
|
EntityMingoCard,
|
|
12495
12487
|
{
|
|
12496
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12497
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
12498
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
12488
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _311 => _311.title]), () => ( "")),
|
|
12489
|
+
description: meta || _optionalChain([item, 'optionalAccess', _312 => _312.description]) || void 0,
|
|
12490
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _313 => _313.cover_url]), ogPlaceholder),
|
|
12499
12491
|
fallbackIcon: icon,
|
|
12500
12492
|
status: { label, variant: "grey" },
|
|
12501
12493
|
chatRef,
|
|
@@ -12512,10 +12504,10 @@ function RoadmapChatCard({
|
|
|
12512
12504
|
cardType,
|
|
12513
12505
|
discuss
|
|
12514
12506
|
}) {
|
|
12515
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
12516
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
12507
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _314 => _314.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
12508
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _315 => _315.customItemId]) != null;
|
|
12517
12509
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3UIJR4PYcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6DN5HKRWcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMQDSQKK2cjs.MapIcon, { size: 24 });
|
|
12518
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIM366HS6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
12510
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIM366HS6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _316 => _316.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
12519
12511
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
12520
12512
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
12521
12513
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12536,10 +12528,10 @@ function RoadmapChatCard({
|
|
|
12536
12528
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12537
12529
|
EntityMingoCard,
|
|
12538
12530
|
{
|
|
12539
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12540
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12531
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _317 => _317.title]), () => ( "")),
|
|
12532
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _318 => _318.description]), () => ( void 0)),
|
|
12541
12533
|
fallbackIcon: icon,
|
|
12542
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
12534
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _319 => _319.status])),
|
|
12543
12535
|
chatRef,
|
|
12544
12536
|
isNewTab,
|
|
12545
12537
|
discuss,
|
|
@@ -12555,7 +12547,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
12555
12547
|
bareInline: true,
|
|
12556
12548
|
contentRefType: docType,
|
|
12557
12549
|
noComposedHref: true,
|
|
12558
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12550
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _320 => _320.url]), () => ( null)),
|
|
12559
12551
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
|
|
12560
12552
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
12561
12553
|
};
|
|
@@ -12587,7 +12579,7 @@ function financialRegistryEntries() {
|
|
|
12587
12579
|
);
|
|
12588
12580
|
}
|
|
12589
12581
|
function refText(ref, key) {
|
|
12590
|
-
const value = _optionalChain([ref, 'optionalAccess',
|
|
12582
|
+
const value = _optionalChain([ref, 'optionalAccess', _321 => _321[key]]);
|
|
12591
12583
|
return typeof value === "string" && value.length > 0 ? value : null;
|
|
12592
12584
|
}
|
|
12593
12585
|
function VendorGlyph({ title, logoUrl }) {
|
|
@@ -12633,7 +12625,7 @@ var REF_GLYPH_CARD_CONFIGS = {
|
|
|
12633
12625
|
// rate. A glyph card; it opens the pricing page.
|
|
12634
12626
|
openframe_price: { label: "OpenFrame price" },
|
|
12635
12627
|
// A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
|
|
12636
|
-
vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VendorGlyph, { title: _nullishCoalesce(_optionalChain([ref, 'optionalAccess',
|
|
12628
|
+
vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VendorGlyph, { title: _nullishCoalesce(_optionalChain([ref, 'optionalAccess', _322 => _322.title]), () => ( "")), logoUrl: refText(ref, "logo_url") }) }
|
|
12637
12629
|
};
|
|
12638
12630
|
function sourceGlyph(docType) {
|
|
12639
12631
|
const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
|
|
@@ -12652,8 +12644,8 @@ function refGlyphRegistryEntries() {
|
|
|
12652
12644
|
title: displayRef.title,
|
|
12653
12645
|
description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
12654
12646
|
cover: entityCover(
|
|
12655
|
-
_optionalChain([displayRef, 'access',
|
|
12656
|
-
_nullishCoalesce(_optionalChain([opts, 'access',
|
|
12647
|
+
_optionalChain([displayRef, 'access', _323 => _323.metadata, 'optionalAccess', _324 => _324.videoPoster]),
|
|
12648
|
+
_nullishCoalesce(_optionalChain([opts, 'access', _325 => _325.extras, 'optionalAccess', _326 => _326.buildOgPlaceholderUrl, 'optionalCall', _327 => _327(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
|
|
12657
12649
|
),
|
|
12658
12650
|
fallbackIcon: glyph(displayRef),
|
|
12659
12651
|
status: { label: cfg.label, variant: "grey" },
|
|
@@ -12668,9 +12660,9 @@ function refGlyphRegistryEntries() {
|
|
|
12668
12660
|
}
|
|
12669
12661
|
function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
12670
12662
|
const it = item;
|
|
12671
|
-
const title = typeof _optionalChain([it, 'optionalAccess',
|
|
12672
|
-
const author = typeof _optionalChain([it, 'optionalAccess',
|
|
12673
|
-
const summary = typeof _optionalChain([it, 'optionalAccess',
|
|
12663
|
+
const title = typeof _optionalChain([it, 'optionalAccess', _328 => _328.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
|
|
12664
|
+
const author = typeof _optionalChain([it, 'optionalAccess', _329 => _329.author, 'optionalAccess', _330 => _330.full_name]) === "string" ? it.author.full_name.trim() : "";
|
|
12665
|
+
const summary = typeof _optionalChain([it, 'optionalAccess', _331 => _331.summary]) === "string" ? it.summary.trim() : "";
|
|
12674
12666
|
const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
|
|
12675
12667
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
12676
12668
|
}
|
|
@@ -12733,7 +12725,7 @@ function programRegistryEntries() {
|
|
|
12733
12725
|
discuss: opts.discuss,
|
|
12734
12726
|
configKey: cfg.configKey,
|
|
12735
12727
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
12736
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12728
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _332 => _332.extras, 'optionalAccess', _333 => _333.buildOgPlaceholderUrl, 'optionalCall', _334 => _334(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _335 => _335.title]), () => ( "")))]), () => ( null))
|
|
12737
12729
|
}
|
|
12738
12730
|
)
|
|
12739
12731
|
}));
|
|
@@ -12754,7 +12746,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
12754
12746
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
12755
12747
|
// task id post-fetch (the refs frame used to carry it).
|
|
12756
12748
|
noComposedHref: true,
|
|
12757
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
12749
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _336 => _336.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
12758
12750
|
}
|
|
12759
12751
|
};
|
|
12760
12752
|
function roadmapRegistryEntries() {
|
|
@@ -12796,8 +12788,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12796
12788
|
DeletedDataCard,
|
|
12797
12789
|
{
|
|
12798
12790
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
12799
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
12800
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
12791
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _337 => _337.metadata, 'optionalAccess', _338 => _338.entity_label]), () => ( null)),
|
|
12792
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _339 => _339.metadata, 'optionalAccess', _340 => _340.recovery_note]), () => ( null))
|
|
12801
12793
|
}
|
|
12802
12794
|
)
|
|
12803
12795
|
},
|
|
@@ -12814,7 +12806,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12814
12806
|
bareInline: true,
|
|
12815
12807
|
contentRefType: "faq",
|
|
12816
12808
|
noComposedHref: true,
|
|
12817
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
12809
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _341 => _341.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
12818
12810
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
|
|
12819
12811
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
12820
12812
|
},
|
|
@@ -12861,8 +12853,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12861
12853
|
chatRef,
|
|
12862
12854
|
isNewTab: opts.isNewTab,
|
|
12863
12855
|
discuss: opts.discuss,
|
|
12864
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12865
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
12856
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _342 => _342.extras, 'optionalAccess', _343 => _343.buildOgPlaceholderUrl, 'optionalCall', _344 => _344(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _345 => _345.title]), () => ( "")))]), () => ( null)),
|
|
12857
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _346 => _346.metadata, 'optionalAccess', _347 => _347.hasEmbeddedVideo]) === true
|
|
12866
12858
|
}
|
|
12867
12859
|
)
|
|
12868
12860
|
},
|
|
@@ -12879,7 +12871,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12879
12871
|
chatRef,
|
|
12880
12872
|
isNewTab: opts.isNewTab,
|
|
12881
12873
|
discuss: opts.discuss,
|
|
12882
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12874
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _348 => _348.extras, 'optionalAccess', _349 => _349.buildOgPlaceholderUrl, 'optionalCall', _350 => _350(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _351 => _351.title]), () => ( "")))]), () => ( null))
|
|
12883
12875
|
}
|
|
12884
12876
|
)
|
|
12885
12877
|
},
|
|
@@ -12888,7 +12880,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12888
12880
|
contentRefType: "design_doc",
|
|
12889
12881
|
bareInline: true,
|
|
12890
12882
|
noComposedHref: true,
|
|
12891
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
12883
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _352 => _352.url]), () => ( null)),
|
|
12892
12884
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
|
|
12893
12885
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DesignDocChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
12894
12886
|
},
|
|
@@ -12905,7 +12897,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12905
12897
|
chatRef,
|
|
12906
12898
|
isNewTab: opts.isNewTab,
|
|
12907
12899
|
discuss: opts.discuss,
|
|
12908
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12900
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _353 => _353.extras, 'optionalAccess', _354 => _354.buildOgPlaceholderUrl, 'optionalCall', _355 => _355(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _356 => _356.title]), () => ( "")))]), () => ( null))
|
|
12909
12901
|
}
|
|
12910
12902
|
)
|
|
12911
12903
|
},
|
|
@@ -12916,7 +12908,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12916
12908
|
bareInline: true,
|
|
12917
12909
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIM366HS6cjs.ProductReleaseCard, { loading: true, size: "sm" }),
|
|
12918
12910
|
render: (item, chatRef, opts) => {
|
|
12919
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12911
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _357 => _357.extras, 'optionalAccess', _358 => _358.buildProductReleaseCardProps]), () => ( _chunkIM366HS6cjs.defaultBuildProductReleaseCardProps));
|
|
12920
12912
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12921
12913
|
ProductReleaseChatCard,
|
|
12922
12914
|
{
|
|
@@ -12943,7 +12935,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12943
12935
|
chatRef,
|
|
12944
12936
|
isNewTab: opts.isNewTab,
|
|
12945
12937
|
discuss: opts.discuss,
|
|
12946
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12938
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _359 => _359.extras, 'optionalAccess', _360 => _360.buildOgPlaceholderUrl, 'optionalCall', _361 => _361(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _362 => _362.title]), () => ( "")))]), () => ( null))
|
|
12947
12939
|
}
|
|
12948
12940
|
)
|
|
12949
12941
|
},
|
|
@@ -12962,7 +12954,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12962
12954
|
chatRef,
|
|
12963
12955
|
isNewTab: opts.isNewTab,
|
|
12964
12956
|
discuss: opts.discuss,
|
|
12965
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
12957
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _363 => _363.extras, 'optionalAccess', _364 => _364.buildOgPlaceholderUrl, 'optionalCall', _365 => _365(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _366 => _366.title]), () => ( "")))]), () => ( null))
|
|
12966
12958
|
}
|
|
12967
12959
|
)
|
|
12968
12960
|
},
|
|
@@ -12973,13 +12965,13 @@ var CHAT_CARD_REGISTRY = {
|
|
|
12973
12965
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
|
|
12974
12966
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
12975
12967
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
12976
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
12968
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _367 => _367.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
12977
12969
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
12978
12970
|
},
|
|
12979
12971
|
...roadmapRegistryEntries()
|
|
12980
12972
|
};
|
|
12981
12973
|
function chatCardLabel(docType) {
|
|
12982
|
-
return _optionalChain([CHAT_CARD_REGISTRY, 'access',
|
|
12974
|
+
return _optionalChain([CHAT_CARD_REGISTRY, 'access', _368 => _368[docType], 'optionalAccess', _369 => _369.label]);
|
|
12983
12975
|
}
|
|
12984
12976
|
function ChatCardNavWrap({
|
|
12985
12977
|
href,
|
|
@@ -12995,13 +12987,13 @@ function ChatCardNavWrap({
|
|
|
12995
12987
|
if (!href) return;
|
|
12996
12988
|
const targetEl = e.target;
|
|
12997
12989
|
const host = e.currentTarget;
|
|
12998
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
12999
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
13000
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
12990
|
+
if (!_optionalChain([host, 'optionalAccess', _370 => _370.contains, 'call', _371 => _371(targetEl)])) return;
|
|
12991
|
+
if (_optionalChain([targetEl, 'optionalAccess', _372 => _372.closest, 'optionalCall', _373 => _373("button")])) return;
|
|
12992
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _374 => _374.closest, 'optionalCall', _375 => _375("a")])) return;
|
|
13001
12993
|
const handled = _chunkA34UNP5Vcjs.executeNavigation.call(void 0, { event: e, runtime, href, path, targetPlatform, hostRoute });
|
|
13002
12994
|
if (!handled) return;
|
|
13003
12995
|
e.stopPropagation();
|
|
13004
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
12996
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _376 => _376.closeChat])) panel.closeChat();
|
|
13005
12997
|
};
|
|
13006
12998
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
13007
12999
|
}
|
|
@@ -13021,19 +13013,12 @@ function CardWithDisclosure({
|
|
|
13021
13013
|
] })
|
|
13022
13014
|
);
|
|
13023
13015
|
}
|
|
13024
|
-
function ChatCardLoader({
|
|
13025
|
-
chatRef,
|
|
13026
|
-
onDiscuss,
|
|
13027
|
-
onDisplay,
|
|
13028
|
-
baseRoute,
|
|
13029
|
-
chipBasePlatform,
|
|
13030
|
-
extras
|
|
13031
|
-
}) {
|
|
13016
|
+
function ChatCardLoader({ chatRef, onDiscuss, onDisplay, extras }) {
|
|
13032
13017
|
const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
|
|
13033
13018
|
const entry = CHAT_CARD_REGISTRY[chatRef.type];
|
|
13034
13019
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
13035
13020
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
13036
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
13021
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _377 => _377.contentRefType]), () => ( "")),
|
|
13037
13022
|
fetchEntry ? chatRef.id : ""
|
|
13038
13023
|
);
|
|
13039
13024
|
if (!entry) return null;
|
|
@@ -13041,7 +13026,7 @@ function ChatCardLoader({
|
|
|
13041
13026
|
chatRef,
|
|
13042
13027
|
item: fetchEntry ? item : void 0,
|
|
13043
13028
|
entry: fetchEntry,
|
|
13044
|
-
ctx: sourceRowCtxFromRuntime(runtime
|
|
13029
|
+
ctx: sourceRowCtxFromRuntime(runtime),
|
|
13045
13030
|
composeContentUrl: runtime.composeContentUrl,
|
|
13046
13031
|
resolveHref: (href) => _chunkDVHSYPDBcjs.navLinkTarget.call(void 0, runtime, href).href
|
|
13047
13032
|
});
|
|
@@ -13064,13 +13049,11 @@ function ChatCardLoader({
|
|
|
13064
13049
|
run: () => discussFn(finalChatRef)
|
|
13065
13050
|
} : void 0;
|
|
13066
13051
|
const renderOpts = {
|
|
13067
|
-
baseRoute,
|
|
13068
|
-
chipBasePlatform,
|
|
13069
13052
|
extras,
|
|
13070
13053
|
isNewTab,
|
|
13071
13054
|
discuss
|
|
13072
13055
|
};
|
|
13073
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
13056
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _378 => _378.metadata, 'optionalAccess', _379 => _379.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
13074
13057
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13075
13058
|
ChatCardNavWrap,
|
|
13076
13059
|
{
|
|
@@ -13102,7 +13085,7 @@ function ChatCardLoader({
|
|
|
13102
13085
|
}
|
|
13103
13086
|
if (isLoading) {
|
|
13104
13087
|
return finish(
|
|
13105
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
13088
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'access', _380 => _380.skeleton, 'optionalCall', _381 => _381()]), () => ( null)),
|
|
13106
13089
|
entry.disclosure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureButton, { kind: entry.disclosure, loading: true }) : void 0,
|
|
13107
13090
|
true
|
|
13108
13091
|
);
|
|
@@ -13116,7 +13099,7 @@ function ChatCardLoader({
|
|
|
13116
13099
|
}
|
|
13117
13100
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Not found" });
|
|
13118
13101
|
}
|
|
13119
|
-
const kind = _nullishCoalesce(entry.disclosure, () => ( _optionalChain([chatCardDisclosureOf, 'call',
|
|
13102
|
+
const kind = _nullishCoalesce(entry.disclosure, () => ( _optionalChain([chatCardDisclosureOf, 'call', _382 => _382(item, finalChatRef), 'optionalAccess', _383 => _383.kind])));
|
|
13120
13103
|
if (kind) {
|
|
13121
13104
|
const content = CHAT_CARD_DISCLOSURES[kind].fromItem(item, finalChatRef);
|
|
13122
13105
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -13131,18 +13114,8 @@ function ChatCardLoader({
|
|
|
13131
13114
|
return finish(entry.render(item, finalChatRef, renderOpts));
|
|
13132
13115
|
}
|
|
13133
13116
|
function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
13134
|
-
const { onDiscuss, onDisplay,
|
|
13135
|
-
const loader = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13136
|
-
ChatCardLoader,
|
|
13137
|
-
{
|
|
13138
|
-
chatRef,
|
|
13139
|
-
onDiscuss,
|
|
13140
|
-
onDisplay,
|
|
13141
|
-
baseRoute,
|
|
13142
|
-
chipBasePlatform,
|
|
13143
|
-
extras
|
|
13144
|
-
}
|
|
13145
|
-
);
|
|
13117
|
+
const { onDiscuss, onDisplay, extras } = options;
|
|
13118
|
+
const loader = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardLoader, { chatRef, onDiscuss, onDisplay, extras });
|
|
13146
13119
|
if (chatRef.type === "video") {
|
|
13147
13120
|
const decoded = decodeVideoMarkerId(chatRef.id);
|
|
13148
13121
|
if (decoded) {
|
|
@@ -13397,7 +13370,7 @@ function useChunkCatchup({
|
|
|
13397
13370
|
if (catchupRun.current === run) {
|
|
13398
13371
|
if (currentDialogId !== dialogIdRef.current) {
|
|
13399
13372
|
catchupRun.current = null;
|
|
13400
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
13373
|
+
if (_optionalChain([pendingCatchupRef, 'access', _384 => _384.current, 'optionalAccess', _385 => _385.dialogId]) === currentDialogId) {
|
|
13401
13374
|
pendingCatchupRef.current = null;
|
|
13402
13375
|
}
|
|
13403
13376
|
} else {
|
|
@@ -13408,7 +13381,7 @@ function useChunkCatchup({
|
|
|
13408
13381
|
if (pending.dialogId === currentDialogId) {
|
|
13409
13382
|
rearmForQueuedCatchup();
|
|
13410
13383
|
try {
|
|
13411
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
13384
|
+
await _optionalChain([catchUpChunksRef, 'access', _386 => _386.current, 'optionalCall', _387 => _387(pending.fromSequenceId)]);
|
|
13412
13385
|
} catch (rerunError) {
|
|
13413
13386
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
13414
13387
|
}
|
|
@@ -13559,20 +13532,20 @@ function useNatsDialogSubscription({
|
|
|
13559
13532
|
const tearDownSubscriptions = () => {
|
|
13560
13533
|
subscriptionRefs.current.forEach((sub) => {
|
|
13561
13534
|
try {
|
|
13562
|
-
_optionalChain([sub, 'optionalAccess',
|
|
13535
|
+
_optionalChain([sub, 'optionalAccess', _388 => _388.unsubscribe, 'call', _389 => _389()]);
|
|
13563
13536
|
} catch (e9) {
|
|
13564
13537
|
}
|
|
13565
13538
|
});
|
|
13566
13539
|
subscriptionRefs.current.clear();
|
|
13567
13540
|
lastSubscribedDialogIdRef.current = null;
|
|
13568
|
-
_optionalChain([abortControllerRef, 'access',
|
|
13541
|
+
_optionalChain([abortControllerRef, 'access', _390 => _390.current, 'optionalAccess', _391 => _391.abort, 'call', _392 => _392()]);
|
|
13569
13542
|
abortControllerRef.current = null;
|
|
13570
13543
|
};
|
|
13571
13544
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
13572
13545
|
const lifecycle = _chunkQDB2JO55cjs.startConnectionLifecycle.call(void 0, {
|
|
13573
13546
|
conn: sharedConn,
|
|
13574
13547
|
wsUrl,
|
|
13575
|
-
onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access',
|
|
13548
|
+
onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access', _393 => _393.current, 'optionalCall', _394 => _394(ctx)]),
|
|
13576
13549
|
backoff: reconnectionBackoffRef.current,
|
|
13577
13550
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
13578
13551
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -13583,7 +13556,7 @@ function useNatsDialogSubscription({
|
|
|
13583
13556
|
setReconnectionCount((c) => c + 1);
|
|
13584
13557
|
}
|
|
13585
13558
|
hadConnectionBeforeRef.current = true;
|
|
13586
|
-
_optionalChain([onConnectRef, 'access',
|
|
13559
|
+
_optionalChain([onConnectRef, 'access', _395 => _395.current, 'optionalCall', _396 => _396()]);
|
|
13587
13560
|
}
|
|
13588
13561
|
if (status === "error") {
|
|
13589
13562
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -13593,7 +13566,7 @@ function useNatsDialogSubscription({
|
|
|
13593
13566
|
setIsConnected(false);
|
|
13594
13567
|
setIsSubscribed(false);
|
|
13595
13568
|
tearDownSubscriptions();
|
|
13596
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
13569
|
+
_optionalChain([onDisconnectRef, 'access', _397 => _397.current, 'optionalCall', _398 => _398()]);
|
|
13597
13570
|
}
|
|
13598
13571
|
}
|
|
13599
13572
|
});
|
|
@@ -13624,13 +13597,13 @@ function useNatsDialogSubscription({
|
|
|
13624
13597
|
setIsSubscribed(false);
|
|
13625
13598
|
subscriptionRefs.current.forEach((sub) => {
|
|
13626
13599
|
try {
|
|
13627
|
-
_optionalChain([sub, 'optionalAccess',
|
|
13600
|
+
_optionalChain([sub, 'optionalAccess', _399 => _399.unsubscribe, 'call', _400 => _400()]);
|
|
13628
13601
|
} catch (e10) {
|
|
13629
13602
|
}
|
|
13630
13603
|
});
|
|
13631
13604
|
subscriptionRefs.current.clear();
|
|
13632
13605
|
lastSubscribedDialogIdRef.current = null;
|
|
13633
|
-
_optionalChain([abortControllerRef, 'access',
|
|
13606
|
+
_optionalChain([abortControllerRef, 'access', _401 => _401.current, 'optionalAccess', _402 => _402.abort, 'call', _403 => _403()]);
|
|
13634
13607
|
abortControllerRef.current = null;
|
|
13635
13608
|
}
|
|
13636
13609
|
return void 0;
|
|
@@ -13642,12 +13615,12 @@ function useNatsDialogSubscription({
|
|
|
13642
13615
|
if (subscriptionRefs.current.size > 0) {
|
|
13643
13616
|
subscriptionRefs.current.forEach((sub) => {
|
|
13644
13617
|
try {
|
|
13645
|
-
_optionalChain([sub, 'optionalAccess',
|
|
13618
|
+
_optionalChain([sub, 'optionalAccess', _404 => _404.unsubscribe, 'call', _405 => _405()]);
|
|
13646
13619
|
} catch (e11) {
|
|
13647
13620
|
}
|
|
13648
13621
|
});
|
|
13649
13622
|
subscriptionRefs.current.clear();
|
|
13650
|
-
_optionalChain([abortControllerRef, 'access',
|
|
13623
|
+
_optionalChain([abortControllerRef, 'access', _406 => _406.current, 'optionalAccess', _407 => _407.abort, 'call', _408 => _408()]);
|
|
13651
13624
|
}
|
|
13652
13625
|
abortControllerRef.current = new AbortController();
|
|
13653
13626
|
const abort = abortControllerRef.current;
|
|
@@ -13677,7 +13650,7 @@ function useNatsDialogSubscription({
|
|
|
13677
13650
|
});
|
|
13678
13651
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
13679
13652
|
setIsSubscribed(true);
|
|
13680
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
13653
|
+
_optionalChain([onSubscribedRef, 'access', _409 => _409.current, 'optionalCall', _410 => _410()]);
|
|
13681
13654
|
};
|
|
13682
13655
|
if (isConnectedRef.current) {
|
|
13683
13656
|
createSubscriptions();
|
|
@@ -13688,7 +13661,7 @@ function useNatsDialogSubscription({
|
|
|
13688
13661
|
abort.abort();
|
|
13689
13662
|
subscriptions.forEach((sub) => {
|
|
13690
13663
|
try {
|
|
13691
|
-
_optionalChain([sub, 'optionalAccess',
|
|
13664
|
+
_optionalChain([sub, 'optionalAccess', _411 => _411.unsubscribe, 'call', _412 => _412()]);
|
|
13692
13665
|
} catch (e13) {
|
|
13693
13666
|
}
|
|
13694
13667
|
});
|
|
@@ -13727,7 +13700,7 @@ function useNatsDialogSubscription({
|
|
|
13727
13700
|
});
|
|
13728
13701
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
13729
13702
|
setIsSubscribed(true);
|
|
13730
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
13703
|
+
_optionalChain([onSubscribedRef, 'access', _413 => _413.current, 'optionalCall', _414 => _414()]);
|
|
13731
13704
|
} else if (subscriptionRefs.current.size > 0) {
|
|
13732
13705
|
setIsSubscribed(true);
|
|
13733
13706
|
}
|
|
@@ -13735,10 +13708,10 @@ function useNatsDialogSubscription({
|
|
|
13735
13708
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
13736
13709
|
}
|
|
13737
13710
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
13738
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
13711
|
+
const path = _optionalChain([options, 'optionalAccess', _415 => _415.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
13739
13712
|
const u = new URL(path, apiBaseUrl);
|
|
13740
13713
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
13741
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
13714
|
+
if (_optionalChain([options, 'optionalAccess', _416 => _416.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _417 => _417.token])) {
|
|
13742
13715
|
u.searchParams.set("authorization", options.token);
|
|
13743
13716
|
}
|
|
13744
13717
|
return u.toString();
|
|
@@ -13756,7 +13729,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
13756
13729
|
const data = await res.json();
|
|
13757
13730
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
13758
13731
|
} catch (err) {
|
|
13759
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
13732
|
+
if (_optionalChain([err, 'optionalAccess', _418 => _418.name]) === "AbortError") throw err;
|
|
13760
13733
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
13761
13734
|
return [];
|
|
13762
13735
|
}
|
|
@@ -13764,8 +13737,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
13764
13737
|
var NO_COMMANDS = [];
|
|
13765
13738
|
function useSlashCommands(prefix, commandsUrl) {
|
|
13766
13739
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
13767
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
13768
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
13740
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _419 => _419.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
13741
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _420 => _420.prefix]) !== prefix;
|
|
13769
13742
|
_react.useEffect.call(void 0, () => {
|
|
13770
13743
|
if (prefix == null) return void 0;
|
|
13771
13744
|
let cancelled = false;
|
|
@@ -13775,7 +13748,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
13775
13748
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
13776
13749
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
13777
13750
|
} catch (err) {
|
|
13778
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
13751
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _421 => _421.name]) !== "AbortError") {
|
|
13779
13752
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
13780
13753
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
13781
13754
|
}
|
|
@@ -13798,7 +13771,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
13798
13771
|
const query = _reactquery.useQuery.call(void 0, {
|
|
13799
13772
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
13800
13773
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
13801
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
13774
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _422 => _422.enabled]), () => ( true)),
|
|
13802
13775
|
staleTime: Infinity,
|
|
13803
13776
|
gcTime: Infinity,
|
|
13804
13777
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -13837,21 +13810,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
13837
13810
|
}
|
|
13838
13811
|
const data = await res.json();
|
|
13839
13812
|
return {
|
|
13840
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13841
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13842
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13843
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13844
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13845
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
13813
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _423 => _423.name]), () => ( null)),
|
|
13814
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _424 => _424.icon]), () => ( null)),
|
|
13815
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _425 => _425.greeting]), () => ( null)),
|
|
13816
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _426 => _426.enabledRagTableIds]), () => ( [])),
|
|
13817
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _427 => _427.quickActions]), () => ( [])),
|
|
13818
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _428 => _428.suggestedQueries]), () => ( []))
|
|
13846
13819
|
};
|
|
13847
13820
|
} catch (err) {
|
|
13848
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
13821
|
+
if (_optionalChain([err, 'optionalAccess', _429 => _429.name]) === "AbortError") throw err;
|
|
13849
13822
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
13850
13823
|
return EMPTY_STATE_FALLBACK;
|
|
13851
13824
|
}
|
|
13852
13825
|
}
|
|
13853
13826
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
13854
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
13827
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _430 => _430.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
13855
13828
|
const query = _reactquery.useQuery.call(void 0, {
|
|
13856
13829
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
13857
13830
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -13880,7 +13853,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
13880
13853
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
13881
13854
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
13882
13855
|
return new Promise((resolve, reject) => {
|
|
13883
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
13856
|
+
if (_optionalChain([signal, 'optionalAccess', _431 => _431.aborted])) {
|
|
13884
13857
|
reject(new Error("Upload cancelled"));
|
|
13885
13858
|
return;
|
|
13886
13859
|
}
|
|
@@ -13922,7 +13895,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
13922
13895
|
const handleSignalAbort = () => {
|
|
13923
13896
|
xhr.abort();
|
|
13924
13897
|
};
|
|
13925
|
-
_optionalChain([signal, 'optionalAccess',
|
|
13898
|
+
_optionalChain([signal, 'optionalAccess', _432 => _432.addEventListener, 'call', _433 => _433("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
13926
13899
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
13927
13900
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
13928
13901
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -13966,10 +13939,10 @@ function useChatAttachments() {
|
|
|
13966
13939
|
try {
|
|
13967
13940
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
13968
13941
|
} catch (err) {
|
|
13969
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
13942
|
+
if (_optionalChain([ctrl, 'optionalAccess', _434 => _434.signal, 'access', _435 => _435.aborted])) return;
|
|
13970
13943
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
13971
13944
|
}
|
|
13972
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
13945
|
+
if (_optionalChain([ctrl, 'optionalAccess', _436 => _436.signal, 'access', _437 => _437.aborted])) return;
|
|
13973
13946
|
if (!sniffed) {
|
|
13974
13947
|
throw new Error("Unrecognized file format");
|
|
13975
13948
|
}
|
|
@@ -13983,7 +13956,7 @@ function useChatAttachments() {
|
|
|
13983
13956
|
const urlResp = await _chunkGI3MMBP3cjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
13984
13957
|
method: "POST",
|
|
13985
13958
|
headers: { "Content-Type": "application/json" },
|
|
13986
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
13959
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _438 => _438.signal]),
|
|
13987
13960
|
body: JSON.stringify({
|
|
13988
13961
|
fileName: att.file.name,
|
|
13989
13962
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -14012,9 +13985,9 @@ function useChatAttachments() {
|
|
|
14012
13985
|
(pct) => {
|
|
14013
13986
|
updateOne(att.id, { progress: pct });
|
|
14014
13987
|
},
|
|
14015
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
13988
|
+
_optionalChain([ctrl, 'optionalAccess', _439 => _439.signal])
|
|
14016
13989
|
);
|
|
14017
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
13990
|
+
if (_optionalChain([ctrl, 'optionalAccess', _440 => _440.signal, 'access', _441 => _441.aborted])) return;
|
|
14018
13991
|
updateOne(att.id, {
|
|
14019
13992
|
status: "ready",
|
|
14020
13993
|
progress: 100,
|
|
@@ -14022,7 +13995,7 @@ function useChatAttachments() {
|
|
|
14022
13995
|
viewToken: mintData.viewToken
|
|
14023
13996
|
});
|
|
14024
13997
|
} catch (err) {
|
|
14025
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
13998
|
+
if (_optionalChain([ctrl, 'optionalAccess', _442 => _442.signal, 'access', _443 => _443.aborted])) return;
|
|
14026
13999
|
const message = err instanceof Error ? err.message : String(err);
|
|
14027
14000
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
14028
14001
|
} finally {
|
|
@@ -14171,11 +14144,11 @@ var ANON_DEFAULTS = {
|
|
|
14171
14144
|
function useResolveChatIdentity(enabled) {
|
|
14172
14145
|
const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
|
|
14173
14146
|
const url = runtime.endpoints.identityUrl;
|
|
14174
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
14147
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _444 => _444.email]), () => ( null));
|
|
14175
14148
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
14176
14149
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
14177
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
14178
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
14150
|
+
const data = _optionalChain([resolved, 'optionalAccess', _445 => _445.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
14151
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _446 => _446.key]) !== requestKey;
|
|
14179
14152
|
_react.useEffect.call(void 0, () => {
|
|
14180
14153
|
if (requestKey === null) return void 0;
|
|
14181
14154
|
let cancelled = false;
|
|
@@ -14297,9 +14270,9 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
|
|
|
14297
14270
|
role: "user",
|
|
14298
14271
|
content: content.question,
|
|
14299
14272
|
timestamp: new Date(at),
|
|
14300
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
14301
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
14302
|
-
authorType: _optionalChain([user, 'optionalAccess',
|
|
14273
|
+
name: _optionalChain([user, 'optionalAccess', _447 => _447.name]),
|
|
14274
|
+
avatar: _optionalChain([user, 'optionalAccess', _448 => _448.avatar]),
|
|
14275
|
+
authorType: _optionalChain([user, 'optionalAccess', _449 => _449.authorType])
|
|
14303
14276
|
},
|
|
14304
14277
|
{
|
|
14305
14278
|
id: `${id}-answer`,
|
|
@@ -14310,10 +14283,10 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
|
|
|
14310
14283
|
],
|
|
14311
14284
|
// A millisecond after the question, so the pair keeps its order.
|
|
14312
14285
|
timestamp: new Date(at + 1),
|
|
14313
|
-
name: _optionalChain([assistant, 'optionalAccess',
|
|
14314
|
-
avatar: _optionalChain([assistant, 'optionalAccess',
|
|
14315
|
-
authorType: _optionalChain([assistant, 'optionalAccess',
|
|
14316
|
-
assistantType: _optionalChain([assistant, 'optionalAccess',
|
|
14286
|
+
name: _optionalChain([assistant, 'optionalAccess', _450 => _450.name]),
|
|
14287
|
+
avatar: _optionalChain([assistant, 'optionalAccess', _451 => _451.avatar]),
|
|
14288
|
+
authorType: _optionalChain([assistant, 'optionalAccess', _452 => _452.authorType]),
|
|
14289
|
+
assistantType: _optionalChain([assistant, 'optionalAccess', _453 => _453.assistantType])
|
|
14317
14290
|
}
|
|
14318
14291
|
];
|
|
14319
14292
|
}
|
|
@@ -14329,8 +14302,8 @@ function mergeByTime(thread, local) {
|
|
|
14329
14302
|
const out = [];
|
|
14330
14303
|
let next = 0;
|
|
14331
14304
|
for (const message of thread) {
|
|
14332
|
-
const at = _optionalChain([message, 'access',
|
|
14333
|
-
while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access',
|
|
14305
|
+
const at = _optionalChain([message, 'access', _454 => _454.timestamp, 'optionalAccess', _455 => _455.getTime, 'call', _456 => _456()]);
|
|
14306
|
+
while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access', _457 => _457[next], 'access', _458 => _458.timestamp, 'optionalAccess', _459 => _459.getTime, 'call', _460 => _460()]), () => ( 0))) < at) {
|
|
14334
14307
|
out.push(local[next]);
|
|
14335
14308
|
next += 1;
|
|
14336
14309
|
}
|
|
@@ -14435,9 +14408,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
14435
14408
|
for (const seg of segments) {
|
|
14436
14409
|
const tail = merged[merged.length - 1];
|
|
14437
14410
|
const key = upsertKey(seg);
|
|
14438
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
14411
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _461 => _461.type]) === "text") {
|
|
14439
14412
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
14440
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
14413
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _462 => _462.type]) === "thinking") {
|
|
14441
14414
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
14442
14415
|
} else if (key) {
|
|
14443
14416
|
let idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -14478,7 +14451,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
14478
14451
|
}
|
|
14479
14452
|
if (s.type !== "approval_batch") return s;
|
|
14480
14453
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
14481
|
-
const hasRow = _optionalChain([s, 'access',
|
|
14454
|
+
const hasRow = _optionalChain([s, 'access', _463 => _463.data, 'access', _464 => _464.toolCalls, 'optionalAccess', _465 => _465.some, 'call', _466 => _466((c) => c.toolExecutionRequestId === requestId)]);
|
|
14482
14455
|
if (!isAnchor && !hasRow) return s;
|
|
14483
14456
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
14484
14457
|
const nextExecutions = hasRow ? {
|
|
@@ -14500,8 +14473,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
14500
14473
|
};
|
|
14501
14474
|
}
|
|
14502
14475
|
function nextBatchExecution(prevExec, toolData) {
|
|
14503
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
14504
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
14476
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _467 => _467.status]) === "done") return null;
|
|
14477
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _468 => _468.result]), success: _optionalChain([prevExec, 'optionalAccess', _469 => _469.success]) };
|
|
14505
14478
|
}
|
|
14506
14479
|
function withBatchExecution(seg, execId, state) {
|
|
14507
14480
|
return {
|
|
@@ -14518,11 +14491,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
14518
14491
|
}
|
|
14519
14492
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
14520
14493
|
return mapSegments(prev, (s) => {
|
|
14521
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
14494
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _470 => _470.data, 'access', _471 => _471.toolCalls, 'optionalAccess', _472 => _472.some, 'call', _473 => _473((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
14522
14495
|
return s;
|
|
14523
14496
|
}
|
|
14524
|
-
const existing = _optionalChain([s, 'access',
|
|
14525
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
14497
|
+
const existing = _optionalChain([s, 'access', _474 => _474.data, 'access', _475 => _475.executions, 'optionalAccess', _476 => _476[rowRequestId]]);
|
|
14498
|
+
if (_optionalChain([existing, 'optionalAccess', _477 => _477.status]) === "done") return s;
|
|
14526
14499
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
14527
14500
|
});
|
|
14528
14501
|
}
|
|
@@ -14558,7 +14531,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
14558
14531
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
14559
14532
|
const seg = message.segments[j];
|
|
14560
14533
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
14561
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
14534
|
+
const prevExec = _optionalChain([seg, 'access', _478 => _478.data, 'access', _479 => _479.executions, 'optionalAccess', _480 => _480[execId]]);
|
|
14562
14535
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
14563
14536
|
if (nextExec === null) return prev;
|
|
14564
14537
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -14731,9 +14704,9 @@ var MessageSegmentAccumulator = class {
|
|
|
14731
14704
|
type: "tool_execution",
|
|
14732
14705
|
data: {
|
|
14733
14706
|
...toolData,
|
|
14734
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
14735
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
14736
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
14707
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _481 => _481.data, 'access', _482 => _482.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _483 => _483.toolTitle]))),
|
|
14708
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _484 => _484.data, 'access', _485 => _485.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _486 => _486.toolExplanation]))),
|
|
14709
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _487 => _487.parameters])
|
|
14737
14710
|
}
|
|
14738
14711
|
};
|
|
14739
14712
|
if (existingIndex !== -1) {
|
|
@@ -14757,7 +14730,7 @@ var MessageSegmentAccumulator = class {
|
|
|
14757
14730
|
if (seg.type !== "approval_batch") return seg;
|
|
14758
14731
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
14759
14732
|
if (!hasCall) return seg;
|
|
14760
|
-
const prev = _optionalChain([seg, 'access',
|
|
14733
|
+
const prev = _optionalChain([seg, 'access', _488 => _488.data, 'access', _489 => _489.executions, 'optionalAccess', _490 => _490[execId]]);
|
|
14761
14734
|
const next = nextBatchExecution(prev, toolData);
|
|
14762
14735
|
matched = true;
|
|
14763
14736
|
if (next === null) return seg;
|
|
@@ -14891,8 +14864,8 @@ var MessageSegmentAccumulator = class {
|
|
|
14891
14864
|
requestId,
|
|
14892
14865
|
{
|
|
14893
14866
|
...pendingApproval,
|
|
14894
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
14895
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
14867
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _491 => _491.command]) || "",
|
|
14868
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _492 => _492.approvalType]) || approvalType
|
|
14896
14869
|
},
|
|
14897
14870
|
status
|
|
14898
14871
|
);
|
|
@@ -14917,9 +14890,9 @@ var MessageSegmentAccumulator = class {
|
|
|
14917
14890
|
type: "escalation_offer",
|
|
14918
14891
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
14919
14892
|
// not blank the card the PENDING chunk already painted.
|
|
14920
|
-
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess',
|
|
14893
|
+
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _493 => _493.data, 'access', _494 => _494.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _495 => _495.data, 'access', _496 => _496.origin]))) },
|
|
14921
14894
|
status,
|
|
14922
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
14895
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _497 => _497.resolvedByName]))),
|
|
14923
14896
|
onApprove: this.callbacks.onEscalationApprove,
|
|
14924
14897
|
onReject: this.callbacks.onEscalationReject
|
|
14925
14898
|
};
|
|
@@ -15323,7 +15296,7 @@ function youtubeVideoId(value) {
|
|
|
15323
15296
|
const hostname = parsed.hostname.toLowerCase();
|
|
15324
15297
|
const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
15325
15298
|
if (!isYoutubeHost) return void 0;
|
|
15326
|
-
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access',
|
|
15299
|
+
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _498 => _498.exec, 'call', _499 => _499(parsed.pathname), 'optionalAccess', _500 => _500[1]]);
|
|
15327
15300
|
const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
|
|
15328
15301
|
return id && YOUTUBE_ID.test(id) ? id : void 0;
|
|
15329
15302
|
}
|
|
@@ -15442,11 +15415,11 @@ function cards(value, decodedSources) {
|
|
|
15442
15415
|
{
|
|
15443
15416
|
type,
|
|
15444
15417
|
id,
|
|
15445
|
-
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
15446
|
-
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
15447
|
-
..._optionalChain([source, 'optionalAccess',
|
|
15448
|
-
..._optionalChain([source, 'optionalAccess',
|
|
15449
|
-
..._optionalChain([source, 'optionalAccess',
|
|
15418
|
+
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _501 => _501.name]), () => ( id)),
|
|
15419
|
+
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _502 => _502.externalUrl]), () => ( null)),
|
|
15420
|
+
..._optionalChain([source, 'optionalAccess', _503 => _503.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
|
|
15421
|
+
..._optionalChain([source, 'optionalAccess', _504 => _504.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
|
|
15422
|
+
..._optionalChain([source, 'optionalAccess', _505 => _505.path]) ? { metadata: { path: source.path } } : {}
|
|
15450
15423
|
}
|
|
15451
15424
|
];
|
|
15452
15425
|
});
|
|
@@ -15482,11 +15455,11 @@ function attachmentsEvent(record) {
|
|
|
15482
15455
|
}
|
|
15483
15456
|
function mergeSourceMetadata(previous, event) {
|
|
15484
15457
|
const byIndex = /* @__PURE__ */ new Map();
|
|
15485
|
-
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
15458
|
+
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _506 => _506.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
|
|
15486
15459
|
if (!byIndex.has(source.index)) byIndex.set(source.index, source);
|
|
15487
15460
|
}
|
|
15488
15461
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
15489
|
-
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
15462
|
+
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _507 => _507.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
|
|
15490
15463
|
const identity = `${ref.type}:${ref.id}`;
|
|
15491
15464
|
if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
|
|
15492
15465
|
}
|
|
@@ -15596,7 +15569,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
15596
15569
|
let stateCache = null;
|
|
15597
15570
|
function invalidate() {
|
|
15598
15571
|
stateCache = null;
|
|
15599
|
-
_optionalChain([onChange, 'optionalCall',
|
|
15572
|
+
_optionalChain([onChange, 'optionalCall', _508 => _508()]);
|
|
15600
15573
|
}
|
|
15601
15574
|
function getState() {
|
|
15602
15575
|
if (!stateCache) {
|
|
@@ -15614,7 +15587,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
15614
15587
|
return stateCache;
|
|
15615
15588
|
}
|
|
15616
15589
|
function emit(name, ...args) {
|
|
15617
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
15590
|
+
_optionalChain([onEffect, 'optionalCall', _509 => _509({ name, args })]);
|
|
15618
15591
|
}
|
|
15619
15592
|
function setMessagesInternal(next) {
|
|
15620
15593
|
if (next !== messages) {
|
|
@@ -15657,12 +15630,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
15657
15630
|
return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
|
|
15658
15631
|
}
|
|
15659
15632
|
function applySegmentsToState(segments, meta) {
|
|
15660
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
15661
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
15633
|
+
const seq = _optionalChain([meta, 'optionalAccess', _510 => _510.streamSeq]);
|
|
15634
|
+
if (_optionalChain([meta, 'optionalAccess', _511 => _511.append]) && meta.isCompacting) {
|
|
15662
15635
|
setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
|
|
15663
15636
|
return;
|
|
15664
15637
|
}
|
|
15665
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
15638
|
+
if (_optionalChain([meta, 'optionalAccess', _512 => _512.append])) {
|
|
15666
15639
|
setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
|
|
15667
15640
|
return;
|
|
15668
15641
|
}
|
|
@@ -15674,7 +15647,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
15674
15647
|
adoptTrailingAssistant = false;
|
|
15675
15648
|
const last = messages[messages.length - 1];
|
|
15676
15649
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
15677
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
15650
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _513 => _513.segments, 'optionalAccess', _514 => _514.length]), () => ( 0))) > 0 || last.content !== "";
|
|
15678
15651
|
if (!hasContent) return;
|
|
15679
15652
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
15680
15653
|
}
|
|
@@ -15893,13 +15866,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
15893
15866
|
const summary = required ? _chunkOBQ5WUNGcjs.getCommandText.call(void 0, required) : `Batch of ${toolCalls.length} tool calls`;
|
|
15894
15867
|
pendingEscalated.set(requestId, {
|
|
15895
15868
|
command: summary,
|
|
15896
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
15869
|
+
explanation: _optionalChain([required, 'optionalAccess', _515 => _515.toolExplanation]),
|
|
15897
15870
|
approvalType,
|
|
15898
15871
|
toolCalls
|
|
15899
15872
|
});
|
|
15900
15873
|
emit("onEscalatedApproval", requestId, {
|
|
15901
15874
|
command: summary,
|
|
15902
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
15875
|
+
explanation: _optionalChain([required, 'optionalAccess', _516 => _516.toolExplanation]),
|
|
15903
15876
|
approvalType
|
|
15904
15877
|
});
|
|
15905
15878
|
break;
|
|
@@ -16287,7 +16260,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
16287
16260
|
const resolveBatch = (status, confirm) => async () => {
|
|
16288
16261
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
16289
16262
|
for (const id of ids) {
|
|
16290
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
16263
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _517 => _517(id)]);
|
|
16291
16264
|
if (ok === false) {
|
|
16292
16265
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
16293
16266
|
}
|
|
@@ -16423,8 +16396,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
16423
16396
|
}
|
|
16424
16397
|
}
|
|
16425
16398
|
}
|
|
16426
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
16427
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
16399
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _518 => _518.resumed]), () => ( messages.length > 0)));
|
|
16400
|
+
if (_optionalChain([extras, 'optionalAccess', _519 => _519.agentBusy])) agentBusyState();
|
|
16428
16401
|
invalidate();
|
|
16429
16402
|
}
|
|
16430
16403
|
return {
|
|
@@ -16511,7 +16484,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
16511
16484
|
},
|
|
16512
16485
|
endSseTurn() {
|
|
16513
16486
|
const last = messages[messages.length - 1];
|
|
16514
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
16487
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _520 => _520.segments, 'optionalAccess', _521 => _521.length]), () => ( 0))) === 0 && last.content === "") {
|
|
16515
16488
|
messages = messages.slice(0, -1);
|
|
16516
16489
|
}
|
|
16517
16490
|
sseCurrentText = "";
|
|
@@ -16665,10 +16638,10 @@ function createChatDialogStore(options = {}) {
|
|
|
16665
16638
|
if (onEvict) {
|
|
16666
16639
|
const sep = key.indexOf(KEY_SEP);
|
|
16667
16640
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
16668
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
16669
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
16670
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
16671
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
16641
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _522 => _522.state, 'access', _523 => _523.messages]), () => ( EMPTY_STATE.messages)),
|
|
16642
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _524 => _524.state, 'access', _525 => _525.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
16643
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _526 => _526.getLastAppliedSeq, 'call', _527 => _527()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
16644
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _528 => _528.getPendingEchoes, 'call', _529 => _529()]), () => ( EMPTY_PENDING_ECHOES))
|
|
16672
16645
|
});
|
|
16673
16646
|
}
|
|
16674
16647
|
}
|
|
@@ -16678,12 +16651,12 @@ function createChatDialogStore(options = {}) {
|
|
|
16678
16651
|
const key = keyOf(dialogId, side);
|
|
16679
16652
|
let reducer = reducers.get(key);
|
|
16680
16653
|
if (!reducer) {
|
|
16681
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
16654
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _530 => _530(dialogId, side)]), () => ( {}));
|
|
16682
16655
|
const userOnChange = base.onChange;
|
|
16683
16656
|
reducer = createChatStreamReducer({
|
|
16684
16657
|
...base,
|
|
16685
16658
|
onChange: () => {
|
|
16686
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
16659
|
+
_optionalChain([userOnChange, 'optionalCall', _531 => _531()]);
|
|
16687
16660
|
notify();
|
|
16688
16661
|
}
|
|
16689
16662
|
});
|
|
@@ -16728,7 +16701,7 @@ function createChatDialogStore(options = {}) {
|
|
|
16728
16701
|
};
|
|
16729
16702
|
}
|
|
16730
16703
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
16731
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
16704
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _532 => _532.get, 'call', _533 => _533(keyOf(dialogId, side)), 'optionalAccess', _534 => _534.state]), () => ( EMPTY_STATE));
|
|
16732
16705
|
}
|
|
16733
16706
|
function getServerSnapshot2() {
|
|
16734
16707
|
return EMPTY_STATE;
|
|
@@ -16817,7 +16790,7 @@ function createDeltaBatcher({
|
|
|
16817
16790
|
pending = [];
|
|
16818
16791
|
const key = pendingKey;
|
|
16819
16792
|
for (const delta of batch) applyOne(delta, key);
|
|
16820
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
16793
|
+
_optionalChain([onFlushed, 'optionalCall', _535 => _535(batch.length)]);
|
|
16821
16794
|
}
|
|
16822
16795
|
function schedule() {
|
|
16823
16796
|
if (raf !== null || timer !== null) return;
|
|
@@ -16841,7 +16814,7 @@ function createDeltaBatcher({
|
|
|
16841
16814
|
}
|
|
16842
16815
|
if (!isDeltaEvent(event)) return false;
|
|
16843
16816
|
const tail = pending[pending.length - 1];
|
|
16844
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
16817
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _536 => _536.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
16845
16818
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
16846
16819
|
pending[pending.length - 1] = {
|
|
16847
16820
|
...tail,
|
|
@@ -16873,7 +16846,7 @@ function useChatStreamReducer({
|
|
|
16873
16846
|
side = DEFAULT_DIALOG_SIDE,
|
|
16874
16847
|
createReducerOptions
|
|
16875
16848
|
}) {
|
|
16876
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
16849
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _537 => _537()]), () => ( {})));
|
|
16877
16850
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
16878
16851
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
16879
16852
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -16918,7 +16891,7 @@ function buildConfirmToolBody(request) {
|
|
|
16918
16891
|
async function readServerErrorMessage(response) {
|
|
16919
16892
|
try {
|
|
16920
16893
|
const body = await response.json();
|
|
16921
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
16894
|
+
if (typeof _optionalChain([body, 'optionalAccess', _538 => _538.error]) === "string" && body.error.length > 0) return body.error;
|
|
16922
16895
|
} catch (e17) {
|
|
16923
16896
|
}
|
|
16924
16897
|
return null;
|
|
@@ -17081,7 +17054,7 @@ function useManagedDialogList({
|
|
|
17081
17054
|
try {
|
|
17082
17055
|
await deleteDialogCallback(id);
|
|
17083
17056
|
removeLocal(id);
|
|
17084
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
17057
|
+
_optionalChain([onDialogRemovedRef, 'access', _539 => _539.current, 'optionalCall', _540 => _540(id, "deleted")]);
|
|
17085
17058
|
} catch (err) {
|
|
17086
17059
|
console.error(`${logTag} deleteDialog failed:`, err);
|
|
17087
17060
|
throw err;
|
|
@@ -17092,7 +17065,7 @@ function useManagedDialogList({
|
|
|
17092
17065
|
const renameDialog = _react.useCallback.call(void 0,
|
|
17093
17066
|
async (id, title) => {
|
|
17094
17067
|
if (!renameDialogCallback) return;
|
|
17095
|
-
const previous = _optionalChain([dialogsRef, 'access',
|
|
17068
|
+
const previous = _optionalChain([dialogsRef, 'access', _541 => _541.current, 'access', _542 => _542.find, 'call', _543 => _543((d) => d.id === id), 'optionalAccess', _544 => _544.title]);
|
|
17096
17069
|
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
17097
17070
|
try {
|
|
17098
17071
|
await renameDialogCallback(id, title);
|
|
@@ -17111,7 +17084,7 @@ function useManagedDialogList({
|
|
|
17111
17084
|
try {
|
|
17112
17085
|
await archiveDialogCallback(id);
|
|
17113
17086
|
removeLocal(id);
|
|
17114
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
17087
|
+
_optionalChain([onDialogRemovedRef, 'access', _545 => _545.current, 'optionalCall', _546 => _546(id, "archived")]);
|
|
17115
17088
|
} catch (err) {
|
|
17116
17089
|
console.error(`${logTag} archiveDialog failed:`, err);
|
|
17117
17090
|
throw err;
|
|
@@ -17300,7 +17273,7 @@ var STORAGE_KEY = "conversation";
|
|
|
17300
17273
|
var namespaceFor = (source) => {
|
|
17301
17274
|
const base = `mingo-chat-${source}`;
|
|
17302
17275
|
const auth = _chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, );
|
|
17303
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
17276
|
+
return _optionalChain([auth, 'optionalAccess', _547 => _547.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
17304
17277
|
};
|
|
17305
17278
|
function createChatConversationStorage(source) {
|
|
17306
17279
|
return _chunkGI3MMBP3cjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -17373,7 +17346,7 @@ function useChatHistoryHydration({
|
|
|
17373
17346
|
if (cancelled) return;
|
|
17374
17347
|
if (rows.length === 0) {
|
|
17375
17348
|
const found = isRecord(body) ? body.found : void 0;
|
|
17376
|
-
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall',
|
|
17349
|
+
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _548 => _548(conversationId)]);
|
|
17377
17350
|
return;
|
|
17378
17351
|
}
|
|
17379
17352
|
const hydrated = [];
|
|
@@ -17450,7 +17423,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17450
17423
|
const { active = true } = runtimeOptions;
|
|
17451
17424
|
const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
|
|
17452
17425
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
17453
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17426
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _549 => _549.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
17454
17427
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
17455
17428
|
() => Promise.resolve(true)
|
|
17456
17429
|
);
|
|
@@ -17486,7 +17459,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17486
17459
|
if (!restoredConversationRef.current) {
|
|
17487
17460
|
restoredConversationRef.current = true;
|
|
17488
17461
|
pruneStaleChatConversationStorage(source);
|
|
17489
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
17462
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _550 => _550.load, 'call', _551 => _551(), 'optionalAccess', _552 => _552.conversationId]), () => ( null));
|
|
17490
17463
|
}
|
|
17491
17464
|
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
17492
17465
|
const commitConversationId = _react.useCallback.call(void 0,
|
|
@@ -17577,7 +17550,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17577
17550
|
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
17578
17551
|
const switchConversation = _react.useCallback.call(void 0,
|
|
17579
17552
|
(id) => {
|
|
17580
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17553
|
+
_optionalChain([abortControllerRef, 'access', _553 => _553.current, 'optionalAccess', _554 => _554.abort, 'call', _555 => _555()]);
|
|
17581
17554
|
flushDeltas();
|
|
17582
17555
|
mutate((r) => r.reset());
|
|
17583
17556
|
hydrationSendCountRef.current = 0;
|
|
@@ -17614,8 +17587,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17614
17587
|
} = useManagedDialogList({
|
|
17615
17588
|
autoLoad: active,
|
|
17616
17589
|
fetchDialogs: fetchActiveDialogs,
|
|
17617
|
-
renameDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
17618
|
-
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
17590
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _556 => _556.renameDialog]),
|
|
17591
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _557 => _557.archiveDialog]),
|
|
17619
17592
|
pageSize: CHAT_HISTORY_PAGE_SIZE,
|
|
17620
17593
|
search: conversationsApi ? dialogSearch : void 0,
|
|
17621
17594
|
logTag: "[useSseChatAdapter]",
|
|
@@ -17679,7 +17652,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17679
17652
|
const serverMessage = await readServerErrorMessage(response);
|
|
17680
17653
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
17681
17654
|
}
|
|
17682
|
-
const reader = _optionalChain([response, 'access',
|
|
17655
|
+
const reader = _optionalChain([response, 'access', _558 => _558.body, 'optionalAccess', _559 => _559.getReader, 'call', _560 => _560()]);
|
|
17683
17656
|
if (!reader) throw new Error("No response body");
|
|
17684
17657
|
const frameDecoder = createSseFrameDecoder();
|
|
17685
17658
|
let finished = false;
|
|
@@ -17708,7 +17681,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17708
17681
|
}
|
|
17709
17682
|
return true;
|
|
17710
17683
|
} catch (err) {
|
|
17711
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
17684
|
+
if (_optionalChain([err, 'optionalAccess', _561 => _561.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
17712
17685
|
return true;
|
|
17713
17686
|
}
|
|
17714
17687
|
flushDeltas();
|
|
@@ -17744,7 +17717,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17744
17717
|
);
|
|
17745
17718
|
sendMessageRef.current = sendMessage;
|
|
17746
17719
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
17747
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17720
|
+
_optionalChain([abortControllerRef, 'access', _562 => _562.current, 'optionalAccess', _563 => _563.abort, 'call', _564 => _564()]);
|
|
17748
17721
|
flushDeltas();
|
|
17749
17722
|
mutate((r) => r.setPhase("idle"));
|
|
17750
17723
|
}, [mutate, flushDeltas]);
|
|
@@ -17780,7 +17753,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17780
17753
|
let sendIdx = -1;
|
|
17781
17754
|
return state.messages.map((m) => {
|
|
17782
17755
|
const segments = m.segments;
|
|
17783
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
17756
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _565 => _565.filter, 'call', _566 => _566((s) => s.type === "text"), 'access', _567 => _567.map, 'call', _568 => _568((s) => s.text), 'access', _569 => _569.join, 'call', _570 => _570("")]), () => ( ""));
|
|
17784
17757
|
let sources2;
|
|
17785
17758
|
let scrollAnchor;
|
|
17786
17759
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -17789,7 +17762,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17789
17762
|
if (m.role === "assistant") {
|
|
17790
17763
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
17791
17764
|
sources2 = sourcesMap.get(lookupIdx);
|
|
17792
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
17765
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _571 => _571.get, 'call', _572 => _572(lookupIdx), 'optionalAccess', _573 => _573.scrollAnchor]), () => ( void 0));
|
|
17793
17766
|
}
|
|
17794
17767
|
return {
|
|
17795
17768
|
id: m.id,
|
|
@@ -17816,7 +17789,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17816
17789
|
);
|
|
17817
17790
|
return;
|
|
17818
17791
|
}
|
|
17819
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
17792
|
+
const refSlug = typeof _optionalChain([reference, 'access', _574 => _574.metadata, 'optionalAccess', _575 => _575.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
17820
17793
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
17821
17794
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
17822
17795
|
const text2 = `/${cmdId} display "${escaped}"`;
|
|
@@ -17864,18 +17837,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
17864
17837
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
17865
17838
|
isHydratingHistory,
|
|
17866
17839
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
17867
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17868
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17869
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17840
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _576 => _576.provider]), () => ( null)),
|
|
17841
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _577 => _577.modelLabel]), () => ( null)),
|
|
17842
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _578 => _578.contextWindowMaxTokens]), () => ( null)),
|
|
17870
17843
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
17871
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17844
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _579 => _579.inputTokens]), () => ( null)),
|
|
17872
17845
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
17873
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17846
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _580 => _580.outputTokens]), () => ( null)),
|
|
17874
17847
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
17875
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17848
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _581 => _581.cacheHitRatePct]), () => ( null)),
|
|
17876
17849
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
17877
17850
|
* token counts). null until the trailing usage frame lands. */
|
|
17878
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
17851
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _582 => _582.breakdown]), () => ( null)),
|
|
17879
17852
|
// ─── Dialog management ───────────────────────────────────────────────
|
|
17880
17853
|
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
17881
17854
|
// list (shared `useManagedDialogList`); selecting a row re-hydrates through
|
|
@@ -17949,7 +17922,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
17949
17922
|
}
|
|
17950
17923
|
break;
|
|
17951
17924
|
case "approval_batch": {
|
|
17952
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
17925
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _583 => _583.data, 'access', _584 => _584.executions, 'optionalAccess', _585 => _585[c.toolExecutionRequestId], 'optionalAccess', _586 => _586.status]) === "done");
|
|
17953
17926
|
if (segment.status !== "rejected" && !allDone) {
|
|
17954
17927
|
hasIncompleteState = true;
|
|
17955
17928
|
}
|
|
@@ -18013,11 +17986,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
18013
17986
|
function extractIncompleteTailState(messages) {
|
|
18014
17987
|
if (!messages || messages.length === 0) return void 0;
|
|
18015
17988
|
let start = messages.length;
|
|
18016
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
17989
|
+
while (start > 0 && _optionalChain([messages, 'access', _587 => _587[start - 1], 'optionalAccess', _588 => _588.role]) === "assistant") start -= 1;
|
|
18017
17990
|
if (start === messages.length) return void 0;
|
|
18018
17991
|
const segments = [];
|
|
18019
17992
|
for (let i = start; i < messages.length; i += 1) {
|
|
18020
|
-
const content = _optionalChain([messages, 'access',
|
|
17993
|
+
const content = _optionalChain([messages, 'access', _589 => _589[i], 'optionalAccess', _590 => _590.content]);
|
|
18021
17994
|
if (Array.isArray(content)) segments.push(...content);
|
|
18022
17995
|
}
|
|
18023
17996
|
if (segments.length === 0) return void 0;
|
|
@@ -18248,7 +18221,7 @@ function decodeNatsChunk(chunk) {
|
|
|
18248
18221
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
18249
18222
|
// Wire shape carries no label; fall back to the id (parity with
|
|
18250
18223
|
// the history path in `process-historical-messages.ts`).
|
|
18251
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
18224
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _591 => _591.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _592 => _592.id]) === "string").map((it) => ({
|
|
18252
18225
|
type: it.type,
|
|
18253
18226
|
id: it.id,
|
|
18254
18227
|
label: it.id
|
|
@@ -18300,15 +18273,15 @@ function decodeNatsChunk(chunk) {
|
|
|
18300
18273
|
|
|
18301
18274
|
// src/components/chat/utils/process-historical-messages.ts
|
|
18302
18275
|
function getOwnerDisplayName(owner) {
|
|
18303
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
18276
|
+
if (_optionalChain([owner, 'optionalAccess', _593 => _593.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN && owner.user) {
|
|
18304
18277
|
const { firstName, lastName } = owner.user;
|
|
18305
18278
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
18306
18279
|
if (name) return name;
|
|
18307
18280
|
}
|
|
18308
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
18281
|
+
return _optionalChain([owner, 'optionalAccess', _594 => _594.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
18309
18282
|
}
|
|
18310
18283
|
function getOwnerAvatar(owner) {
|
|
18311
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
18284
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _595 => _595.user, 'optionalAccess', _596 => _596.image, 'optionalAccess', _597 => _597.imageUrl]), () => ( void 0));
|
|
18312
18285
|
}
|
|
18313
18286
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
18314
18287
|
messageDataArray.forEach((data) => {
|
|
@@ -18500,7 +18473,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18500
18473
|
event.offerId,
|
|
18501
18474
|
event.text,
|
|
18502
18475
|
event.origin,
|
|
18503
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
18476
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _598 => _598[event.offerId]]), () => ( "pending"))
|
|
18504
18477
|
);
|
|
18505
18478
|
break;
|
|
18506
18479
|
case "ticket-escalated":
|
|
@@ -18534,7 +18507,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18534
18507
|
);
|
|
18535
18508
|
break;
|
|
18536
18509
|
case "escalation-offer-resolved":
|
|
18537
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
18510
|
+
_optionalChain([offerResolutions, 'optionalAccess', _599 => _599.set, 'call', _600 => _600(event.offerId, {
|
|
18538
18511
|
status: event.status,
|
|
18539
18512
|
resolvedByName: event.resolvedByName
|
|
18540
18513
|
})]);
|
|
@@ -18598,7 +18571,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18598
18571
|
}
|
|
18599
18572
|
}
|
|
18600
18573
|
} else {
|
|
18601
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
18574
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _601 => _601.set, 'call', _602 => _602(event.requestId, {
|
|
18602
18575
|
command: event.command || "",
|
|
18603
18576
|
explanation: event.explanation,
|
|
18604
18577
|
approvalType,
|
|
@@ -18613,8 +18586,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18613
18586
|
const existingStatus = approvalStatuses[requestId];
|
|
18614
18587
|
const status = existingStatus || event.status;
|
|
18615
18588
|
const resolvedByName = event.resolvedByName;
|
|
18616
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
18617
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
18589
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _603 => _603.get, 'call', _604 => _604(requestId)]);
|
|
18590
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _605 => _605.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
18618
18591
|
if (batchApprovalsEnabled) {
|
|
18619
18592
|
accumulator.addApprovalBatch(
|
|
18620
18593
|
requestId,
|
|
@@ -18636,7 +18609,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18636
18609
|
);
|
|
18637
18610
|
}
|
|
18638
18611
|
}
|
|
18639
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
18612
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _606 => _606.delete, 'call', _607 => _607(requestId)]);
|
|
18640
18613
|
break;
|
|
18641
18614
|
}
|
|
18642
18615
|
if (escalatedData) {
|
|
@@ -18645,7 +18618,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
18645
18618
|
explanation: escalatedData.explanation,
|
|
18646
18619
|
approvalType: escalatedData.approvalType
|
|
18647
18620
|
});
|
|
18648
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
18621
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _608 => _608.delete, 'call', _609 => _609(requestId)]);
|
|
18649
18622
|
}
|
|
18650
18623
|
const before = accumulator.getSegments();
|
|
18651
18624
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -18737,14 +18710,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
18737
18710
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
18738
18711
|
return;
|
|
18739
18712
|
}
|
|
18740
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
18713
|
+
const isUserMessage = _optionalChain([msg, 'access', _610 => _610.owner, 'optionalAccess', _611 => _611.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _612 => _612.owner, 'optionalAccess', _613 => _613.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN;
|
|
18741
18714
|
if (isUserMessage) {
|
|
18742
18715
|
flushAssistantMessage();
|
|
18743
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
18716
|
+
const userAuthorType = _optionalChain([msg, 'access', _614 => _614.owner, 'optionalAccess', _615 => _615.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
18744
18717
|
messageDataArray.forEach((data) => {
|
|
18745
18718
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
18746
18719
|
const rawContext = data.contextItems;
|
|
18747
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
18720
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _616 => _616.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _617 => _617.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
18748
18721
|
processedMessages.push({
|
|
18749
18722
|
id: msg.id,
|
|
18750
18723
|
role: "user",
|
|
@@ -18791,7 +18764,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
18791
18764
|
});
|
|
18792
18765
|
const nextMsg = messages[index + 1];
|
|
18793
18766
|
const isLastMessage = index === messages.length - 1;
|
|
18794
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
18767
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _618 => _618.owner, 'optionalAccess', _619 => _619.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _620 => _620.owner, 'optionalAccess', _621 => _621.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN);
|
|
18795
18768
|
if (isLastMessage || nextIsFromUser) {
|
|
18796
18769
|
flushAssistantMessage();
|
|
18797
18770
|
}
|
|
@@ -19175,7 +19148,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
19175
19148
|
const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
|
|
19176
19149
|
const sendMessage = _react.useCallback.call(void 0,
|
|
19177
19150
|
async (text2, sendOptions) => {
|
|
19178
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
19151
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _622 => _622.hidden]), () => ( false));
|
|
19179
19152
|
mutate((r) => r.pushOptimisticSend(text2, hidden));
|
|
19180
19153
|
await publishUserMessage(text2, { hidden, dialogId });
|
|
19181
19154
|
},
|
|
@@ -19268,11 +19241,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
19268
19241
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
19269
19242
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
19270
19243
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
19271
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
19272
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
19273
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
19274
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
19275
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
19244
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _623 => _623.provider]), () => ( modelProvider)), () => ( null)),
|
|
19245
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _624 => _624.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
19246
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _625 => _625.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _626 => _626.contextWindowMaxTokens]))), () => ( null)),
|
|
19247
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _627 => _627.inputTokensSize]), () => ( null)),
|
|
19248
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _628 => _628.outputTokensSize]), () => ( null)),
|
|
19276
19249
|
currentCacheHitRatePct: null,
|
|
19277
19250
|
currentUsageBreakdown: null,
|
|
19278
19251
|
// Dialog management
|
|
@@ -19394,7 +19367,7 @@ function useUnifiedChat(options) {
|
|
|
19394
19367
|
[]
|
|
19395
19368
|
);
|
|
19396
19369
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
19397
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
19370
|
+
(ref) => _optionalChain([activeStateRef, 'access', _629 => _629.current, 'access', _630 => _630.displayRef, 'optionalCall', _631 => _631(ref)]),
|
|
19398
19371
|
[]
|
|
19399
19372
|
);
|
|
19400
19373
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -19404,7 +19377,7 @@ function useUnifiedChat(options) {
|
|
|
19404
19377
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
19405
19378
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
19406
19379
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
19407
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
19380
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _632 => _632.current, 'access', _633 => _633.setDialogScope, 'optionalCall', _634 => _634(scope)]), []);
|
|
19408
19381
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
19409
19382
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
19410
19383
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -19779,4 +19752,5 @@ var MINGO_V2_SPLIT_WIDTH = MINGO_V2_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
|
19779
19752
|
|
|
19780
19753
|
|
|
19781
19754
|
|
|
19782
|
-
exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.TextHold = TextHold; exports.LayoutHold = LayoutHold; exports.AUTHORED_LINK_REL_TOKENS = AUTHORED_LINK_REL_TOKENS; exports.authoredRelTokens = authoredRelTokens; exports.isNofollowRel = isNofollowRel; exports.renderedLinkRel = renderedLinkRel; exports.findMarkdownLinkAt = findMarkdownLinkAt; exports.formatMarkdownLink = formatMarkdownLink; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.MARKDOWN_H1_CLASS = MARKDOWN_H1_CLASS; exports.MARKDOWN_H2_CLASS = MARKDOWN_H2_CLASS; exports.MARKDOWN_PARAGRAPH_CLASS = MARKDOWN_PARAGRAPH_CLASS; 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.MARKDOWN_SKELETON_LINES = MARKDOWN_SKELETON_LINES; exports.MARKDOWN_RENDERER_CLASS = MARKDOWN_RENDERER_CLASS; exports.MarkdownEngine = MarkdownEngine; exports.MarkdownEngineSkeleton = MarkdownEngineSkeleton; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.ASK_AI_OPEN_EVENT = ASK_AI_OPEN_EVENT; exports.ASK_AI_OPEN_WITH_REF_EVENT = ASK_AI_OPEN_WITH_REF_EVENT; exports.ASK_AI_OPEN_EVENTS = ASK_AI_OPEN_EVENTS; exports.holdAskAiOpens = holdAskAiOpens; exports.askAiOpenIsHeld = askAiOpenIsHeld; exports.chatListensForAskAiOpens = chatListensForAskAiOpens; exports.ASK_AI_TRIGGER_ATTRIBUTE = ASK_AI_TRIGGER_ATTRIBUTE; exports.onAskAiIntent = onAskAiIntent; exports.ChatAppearanceContext = ChatAppearanceContext; exports.useChatAppearance = useChatAppearance; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; 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.SystemEventMessage = SystemEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ChatPanelContext = ChatPanelContext; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.SuggestionsDisplay = SuggestionsDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.LoadingFallback = LoadingFallback; exports.LoadingSuspense = LoadingSuspense; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_BAR_CLASS = CONTEXT_BACK_BAR_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; 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.InlineChip = InlineChip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.CHAT_MESSAGE_LIST_SKELETON_MESSAGES = CHAT_MESSAGE_LIST_SKELETON_MESSAGES; exports.ChatMessageList = ChatMessageList; exports.DESIGN_DOC_READINESS = DESIGN_DOC_READINESS; exports.DESIGN_DOC_READINESS_DISPLAY = DESIGN_DOC_READINESS_DISPLAY; exports.designDocReadiness = designDocReadiness; exports.formatCompletionLabel = formatCompletionLabel; exports.formatCompletionLabelWithBlockers = formatCompletionLabelWithBlockers; 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.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; 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.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.flattenAssistantContent = flattenAssistantContent; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.clickupTaskUrl = clickupTaskUrl; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; 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.chatDialogMenuItems = chatDialogMenuItems; exports.ChatListEmptyState = ChatListEmptyState; exports.CHAT_HISTORY_PAGE_SIZE = CHAT_HISTORY_PAGE_SIZE; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.MingoArchiveList = MingoArchiveList; exports.MingoChatHeader = MingoChatHeader; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.MingoChatRail = MingoChatRail; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatPanelHeader = ChatPanelHeader; 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.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.useNavLinkViaRuntime = useNavLinkViaRuntime; exports.useNavigateViaRuntime = useNavigateViaRuntime; 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.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; 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.VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX = VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX; exports.VIDEO_BITES_CARD_HEIGHT_MOBILE_PX = VIDEO_BITES_CARD_HEIGHT_MOBILE_PX; exports.STRIP_LINE_MAX_PX = STRIP_LINE_MAX_PX; exports.VIDEO_BITES_SKELETON_COUNT = VIDEO_BITES_SKELETON_COUNT; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.CHAT_CARD_DISCLOSURE = CHAT_CARD_DISCLOSURE; exports.CHAT_CARD_DISCLOSURES = CHAT_CARD_DISCLOSURES; exports.chatCardDisclosureOf = chatCardDisclosureOf; exports.ChatCardDisclosureButton = ChatCardDisclosureButton; exports.useChatCardDisclosure = useChatCardDisclosure; exports.ChatCardDisclosureRow = ChatCardDisclosureRow; exports.designDocPeople = designDocPeople; exports.designDocMetaLine = designDocMetaLine; exports.DesignDocCard = DesignDocCard; exports.GitHubActivityCard = GitHubActivityCard; exports.getVendorLogo = getVendorLogo; exports.VendorIcon = VendorIcon; exports.useChatCardItem = useChatCardItem; exports.MingoInfoCardActionProvider = MingoInfoCardActionProvider; exports.readFetchedCardTitle = readFetchedCardTitle; exports.readFetchedCardPath = readFetchedCardPath; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.sourceRowCtxFromRuntime = sourceRowCtxFromRuntime; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.resolveCardDestination = resolveCardDestination; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; 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.useWhatToAsk = useWhatToAsk; exports.awaitsDecision = awaitsDecision; exports.mergeByTime = mergeByTime; exports.chatProgressLabel = chatProgressLabel; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; 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.buildDiscussPrompt = buildDiscussPrompt; 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.chatChipClass = chatChipClass; exports.MINGO_V2_RAIL_WIDTH = MINGO_V2_RAIL_WIDTH; exports.CHAT_BLOCK_MIN_WIDTH = CHAT_BLOCK_MIN_WIDTH; exports.MINGO_V2_SPLIT_WIDTH = MINGO_V2_SPLIT_WIDTH;
|
|
19755
|
+
|
|
19756
|
+
exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.TextHold = TextHold; exports.LayoutHold = LayoutHold; exports.AUTHORED_LINK_REL_TOKENS = AUTHORED_LINK_REL_TOKENS; exports.authoredRelTokens = authoredRelTokens; exports.isNofollowRel = isNofollowRel; exports.renderedLinkRel = renderedLinkRel; exports.findMarkdownLinkAt = findMarkdownLinkAt; exports.formatMarkdownLink = formatMarkdownLink; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.MARKDOWN_H1_CLASS = MARKDOWN_H1_CLASS; exports.MARKDOWN_H2_CLASS = MARKDOWN_H2_CLASS; exports.MARKDOWN_PARAGRAPH_CLASS = MARKDOWN_PARAGRAPH_CLASS; 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.MARKDOWN_SKELETON_LINES = MARKDOWN_SKELETON_LINES; exports.MARKDOWN_RENDERER_CLASS = MARKDOWN_RENDERER_CLASS; exports.MarkdownEngine = MarkdownEngine; exports.MarkdownEngineSkeleton = MarkdownEngineSkeleton; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.ASK_AI_OPEN_EVENT = ASK_AI_OPEN_EVENT; exports.ASK_AI_OPEN_WITH_REF_EVENT = ASK_AI_OPEN_WITH_REF_EVENT; exports.ASK_AI_OPEN_EVENTS = ASK_AI_OPEN_EVENTS; exports.holdAskAiOpens = holdAskAiOpens; exports.askAiOpenIsHeld = askAiOpenIsHeld; exports.chatListensForAskAiOpens = chatListensForAskAiOpens; exports.ASK_AI_TRIGGER_ATTRIBUTE = ASK_AI_TRIGGER_ATTRIBUTE; exports.onAskAiIntent = onAskAiIntent; exports.ChatAppearanceContext = ChatAppearanceContext; exports.useChatAppearance = useChatAppearance; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; 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.SystemEventMessage = SystemEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ChatPanelContext = ChatPanelContext; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.SuggestionsDisplay = SuggestionsDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.extractCardReferences = extractCardReferences; exports.LoadingFallback = LoadingFallback; exports.LoadingSuspense = LoadingSuspense; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_BAR_CLASS = CONTEXT_BACK_BAR_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; 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.InlineChip = InlineChip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.CHAT_MESSAGE_LIST_SKELETON_MESSAGES = CHAT_MESSAGE_LIST_SKELETON_MESSAGES; exports.ChatMessageList = ChatMessageList; exports.DESIGN_DOC_READINESS = DESIGN_DOC_READINESS; exports.DESIGN_DOC_READINESS_DISPLAY = DESIGN_DOC_READINESS_DISPLAY; exports.designDocReadiness = designDocReadiness; exports.formatCompletionLabel = formatCompletionLabel; exports.formatCompletionLabelWithBlockers = formatCompletionLabelWithBlockers; 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.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; 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.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.flattenAssistantContent = flattenAssistantContent; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.clickupTaskUrl = clickupTaskUrl; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; 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.chatDialogMenuItems = chatDialogMenuItems; exports.ChatListEmptyState = ChatListEmptyState; exports.CHAT_HISTORY_PAGE_SIZE = CHAT_HISTORY_PAGE_SIZE; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.MingoArchiveList = MingoArchiveList; exports.MingoChatHeader = MingoChatHeader; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.MingoChatRail = MingoChatRail; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatPanelHeader = ChatPanelHeader; 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.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.useNavLinkViaRuntime = useNavLinkViaRuntime; exports.useNavigateViaRuntime = useNavigateViaRuntime; 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.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; 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.VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX = VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX; exports.VIDEO_BITES_CARD_HEIGHT_MOBILE_PX = VIDEO_BITES_CARD_HEIGHT_MOBILE_PX; exports.STRIP_LINE_MAX_PX = STRIP_LINE_MAX_PX; exports.VIDEO_BITES_SKELETON_COUNT = VIDEO_BITES_SKELETON_COUNT; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.CHAT_CARD_DISCLOSURE = CHAT_CARD_DISCLOSURE; exports.CHAT_CARD_DISCLOSURES = CHAT_CARD_DISCLOSURES; exports.chatCardDisclosureOf = chatCardDisclosureOf; exports.ChatCardDisclosureButton = ChatCardDisclosureButton; exports.useChatCardDisclosure = useChatCardDisclosure; exports.ChatCardDisclosureRow = ChatCardDisclosureRow; exports.designDocPeople = designDocPeople; exports.designDocMetaLine = designDocMetaLine; exports.DesignDocCard = DesignDocCard; exports.GitHubActivityCard = GitHubActivityCard; exports.getVendorLogo = getVendorLogo; exports.VendorIcon = VendorIcon; exports.useChatCardItem = useChatCardItem; exports.MingoInfoCardActionProvider = MingoInfoCardActionProvider; exports.readFetchedCardTitle = readFetchedCardTitle; exports.readFetchedCardPath = readFetchedCardPath; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.sourceRowCtxFromRuntime = sourceRowCtxFromRuntime; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.resolveCardDestination = resolveCardDestination; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; 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.useWhatToAsk = useWhatToAsk; exports.awaitsDecision = awaitsDecision; exports.mergeByTime = mergeByTime; exports.chatProgressLabel = chatProgressLabel; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; 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.buildDiscussPrompt = buildDiscussPrompt; 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.chatChipClass = chatChipClass; exports.MINGO_V2_RAIL_WIDTH = MINGO_V2_RAIL_WIDTH; exports.CHAT_BLOCK_MIN_WIDTH = CHAT_BLOCK_MIN_WIDTH; exports.MINGO_V2_SPLIT_WIDTH = MINGO_V2_SPLIT_WIDTH;
|