@flamingo-stack/openframe-frontend-core 0.0.597 → 0.0.598-2039.5702.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PT54TJWD.js → chunk-26MKONC3.js} +5 -5
- package/dist/{chunk-NK6COZ3P.cjs → chunk-2TWJF4AB.cjs} +22 -22
- package/dist/{chunk-NK6COZ3P.cjs.map → chunk-2TWJF4AB.cjs.map} +1 -1
- package/dist/{chunk-E74GL4E3.cjs → chunk-3GLZDKWZ.cjs} +8 -8
- package/dist/{chunk-E74GL4E3.cjs.map → chunk-3GLZDKWZ.cjs.map} +1 -1
- package/dist/{chunk-STYNZ4QM.cjs → chunk-3IXDZI3R.cjs} +3 -3
- package/dist/{chunk-STYNZ4QM.cjs.map → chunk-3IXDZI3R.cjs.map} +1 -1
- package/dist/{chunk-DNQP4VPB.js → chunk-3XHNV6W7.js} +12 -12
- package/dist/{chunk-TVK7PQON.js → chunk-442V6CPU.js} +6 -6
- package/dist/{chunk-BZ4UEHNJ.js → chunk-5IMAIYID.js} +9 -9
- package/dist/{chunk-VQ6INRQ4.cjs → chunk-5VQKQIOG.cjs} +105 -105
- package/dist/{chunk-VQ6INRQ4.cjs.map → chunk-5VQKQIOG.cjs.map} +1 -1
- package/dist/{chunk-6QZNDPMV.cjs → chunk-7WTEFZP7.cjs} +9 -9
- package/dist/{chunk-6QZNDPMV.cjs.map → chunk-7WTEFZP7.cjs.map} +1 -1
- package/dist/{chunk-B4BZRBKC.js → chunk-7YMVB7GE.js} +4 -4
- package/dist/{chunk-BOILDHSY.js → chunk-AC2TI6UT.js} +12 -12
- package/dist/{chunk-YBPFIXV4.cjs → chunk-B6ZJV7L4.cjs} +746 -448
- package/dist/{chunk-YBPFIXV4.cjs.map → chunk-B6ZJV7L4.cjs.map} +1 -1
- package/dist/{chunk-RYZKWZBG.cjs → chunk-B72CD6YE.cjs} +15 -15
- package/dist/{chunk-RYZKWZBG.cjs.map → chunk-B72CD6YE.cjs.map} +1 -1
- package/dist/{chunk-EVMHJB6X.js → chunk-BLUL2TE3.js} +4 -4
- package/dist/{chunk-GGQZBSFN.js → chunk-BVQEU5JB.js} +2 -2
- package/dist/{chunk-H64ZHSYR.cjs → chunk-CCWI3622.cjs} +4 -4
- package/dist/{chunk-H64ZHSYR.cjs.map → chunk-CCWI3622.cjs.map} +1 -1
- package/dist/{chunk-ELG2QNW5.js → chunk-D7X33EAT.js} +7 -7
- package/dist/{chunk-L3L2ATFK.cjs → chunk-E2K2LYSM.cjs} +85 -85
- package/dist/{chunk-L3L2ATFK.cjs.map → chunk-E2K2LYSM.cjs.map} +1 -1
- package/dist/{chunk-YH6IQTPI.cjs → chunk-EHAYNUOL.cjs} +3 -3
- package/dist/{chunk-YH6IQTPI.cjs.map → chunk-EHAYNUOL.cjs.map} +1 -1
- package/dist/{chunk-WZJOILPU.js → chunk-F2KBCLUG.js} +2 -2
- package/dist/{chunk-MYBXCWEI.js → chunk-FKBM6U43.js} +2 -2
- package/dist/{chunk-FKOYQPMK.js → chunk-GQLYYZF4.js} +5 -5
- package/dist/{chunk-LRQCKSZC.js → chunk-IW746HJ7.js} +2 -2
- package/dist/{chunk-GKZUTZT3.cjs → chunk-JI2R4UW5.cjs} +15 -15
- package/dist/{chunk-GKZUTZT3.cjs.map → chunk-JI2R4UW5.cjs.map} +1 -1
- package/dist/{chunk-M4YQUHOR.cjs → chunk-JJUV7Z4L.cjs} +15 -15
- package/dist/{chunk-M4YQUHOR.cjs.map → chunk-JJUV7Z4L.cjs.map} +1 -1
- package/dist/{chunk-2JOIC34G.cjs → chunk-KJMXCDYI.cjs} +37 -37
- package/dist/{chunk-2JOIC34G.cjs.map → chunk-KJMXCDYI.cjs.map} +1 -1
- package/dist/{chunk-IRXLB6GV.js → chunk-KV24I5MD.js} +5 -5
- package/dist/{chunk-Z4QFA4BF.cjs → chunk-M7U3MT2Q.cjs} +14 -14
- package/dist/{chunk-Z4QFA4BF.cjs.map → chunk-M7U3MT2Q.cjs.map} +1 -1
- package/dist/{chunk-R2YJKREE.js → chunk-NJCVIERS.js} +4 -4
- package/dist/{chunk-VXEHG53O.js → chunk-OIUXJUMH.js} +6 -6
- package/dist/{chunk-SAEJGTCI.cjs → chunk-QPAPUIF3.cjs} +35 -35
- package/dist/{chunk-SAEJGTCI.cjs.map → chunk-QPAPUIF3.cjs.map} +1 -1
- package/dist/{chunk-CPJP7GKL.cjs → chunk-R6LFBCGC.cjs} +3 -3
- package/dist/{chunk-CPJP7GKL.cjs.map → chunk-R6LFBCGC.cjs.map} +1 -1
- package/dist/{chunk-FHWL7QFL.js → chunk-RTCKC6RH.js} +5 -5
- package/dist/{chunk-UAAXUFK6.js → chunk-RU3IKVY2.js} +3 -3
- package/dist/{chunk-EZM5DNII.js → chunk-S6WBBSII.js} +3 -3
- package/dist/{chunk-WWGSYT7R.js → chunk-SYFSVIGH.js} +2 -2
- package/dist/{chunk-R2MOCGZ7.cjs → chunk-SZRP4264.cjs} +34 -34
- package/dist/{chunk-R2MOCGZ7.cjs.map → chunk-SZRP4264.cjs.map} +1 -1
- package/dist/{chunk-2JNCZDJR.js → chunk-TSCIVH7T.js} +2 -2
- package/dist/{chunk-JJFYMYBJ.cjs → chunk-TYENRLNN.cjs} +39 -39
- package/dist/{chunk-JJFYMYBJ.cjs.map → chunk-TYENRLNN.cjs.map} +1 -1
- package/dist/{chunk-EGQ345IA.js → chunk-UHWDSVZI.js} +4 -4
- package/dist/{chunk-RDTOMWDN.cjs → chunk-UPKZU6QU.cjs} +1 -1
- package/dist/chunk-UPKZU6QU.cjs.map +1 -0
- package/dist/{chunk-WCBRZCU4.cjs → chunk-UQEOAPAI.cjs} +9 -9
- package/dist/{chunk-WCBRZCU4.cjs.map → chunk-UQEOAPAI.cjs.map} +1 -1
- package/dist/{chunk-O4VZOA2Q.cjs → chunk-UXOOVP77.cjs} +3 -3
- package/dist/{chunk-O4VZOA2Q.cjs.map → chunk-UXOOVP77.cjs.map} +1 -1
- package/dist/{chunk-BZEWPW5A.cjs → chunk-VIBREYUK.cjs} +3 -3
- package/dist/{chunk-BZEWPW5A.cjs.map → chunk-VIBREYUK.cjs.map} +1 -1
- package/dist/{chunk-E27AKT4A.cjs → chunk-WRZV3HGH.cjs} +9 -9
- package/dist/{chunk-E27AKT4A.cjs.map → chunk-WRZV3HGH.cjs.map} +1 -1
- package/dist/{chunk-PIQRGLTF.cjs → chunk-WU53IOY6.cjs} +25 -25
- package/dist/{chunk-PIQRGLTF.cjs.map → chunk-WU53IOY6.cjs.map} +1 -1
- package/dist/{chunk-VNSRNVPD.js → chunk-XAJZIDFH.js} +673 -375
- package/dist/chunk-XAJZIDFH.js.map +1 -0
- package/dist/{chunk-UIVLSMEZ.cjs → chunk-XRVFQQ7W.cjs} +242 -242
- package/dist/{chunk-UIVLSMEZ.cjs.map → chunk-XRVFQQ7W.cjs.map} +1 -1
- package/dist/{chunk-RYXIRVDC.js → chunk-YB6FI2G3.js} +1 -1
- package/dist/chunk-YB6FI2G3.js.map +1 -0
- package/dist/{chunk-V6KX4KO3.js → chunk-YPJB4LJD.js} +3 -3
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +8 -8
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat-history-hydration.d.ts +5 -3
- package/dist/components/chat/hooks/use-chat-history-hydration.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-managed-dialog-list.d.ts +49 -0
- package/dist/components/chat/hooks/use-managed-dialog-list.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +2 -16
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +9 -5
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +8 -4
- package/dist/components/chat/types/unified-chat-state.types.d.ts +55 -0
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-conversations-api.d.ts +29 -0
- package/dist/components/chat/utils/chat-conversations-api.d.ts.map +1 -0
- package/dist/components/chat/utils/index.d.ts +1 -0
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +9 -9
- package/dist/components/contact/index.js +8 -8
- package/dist/components/docs/index.cjs +12 -12
- package/dist/components/docs/index.js +11 -11
- package/dist/components/embeds/index.cjs +9 -9
- package/dist/components/embeds/index.js +8 -8
- package/dist/components/faq/index.cjs +10 -10
- package/dist/components/faq/index.js +9 -9
- package/dist/components/features/index.cjs +8 -8
- package/dist/components/features/index.js +7 -7
- package/dist/components/help-center-pages/index.cjs +31 -31
- package/dist/components/help-center-pages/index.js +22 -22
- package/dist/components/index.cjs +70 -66
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +26 -22
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +49 -49
- package/dist/components/meeting-scheduler/index.js +9 -9
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/onboarding-guides/index.cjs +12 -12
- package/dist/components/onboarding-guides/index.js +11 -11
- package/dist/components/related-content/index.cjs +7 -7
- package/dist/components/related-content/index.js +6 -6
- package/dist/components/tickets/index.cjs +13 -13
- package/dist/components/tickets/index.js +12 -12
- package/dist/components/ui/index.cjs +12 -8
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +11 -7
- package/dist/contexts/chat-runtime-context.d.ts +12 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.js +4 -4
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/.embeddable-chat.md +2 -1
- package/src/components/chat/embeddable-chat.tsx +69 -37
- package/src/components/chat/hooks/.use-managed-dialog-list.md +28 -0
- package/src/components/chat/hooks/.use-nats-chat-adapter.md +2 -0
- package/src/components/chat/hooks/.use-sse-chat-adapter.md +7 -0
- package/src/components/chat/hooks/.use-unified-chat.md +1 -1
- package/src/components/chat/hooks/__tests__/managed-dialog-list.test.ts +92 -0
- package/src/components/chat/hooks/__tests__/nats-adapter-managed-dialogs.test.ts +167 -0
- package/src/components/chat/hooks/__tests__/sse-managed-dialogs.test.ts +256 -0
- package/src/components/chat/hooks/index.ts +2 -0
- package/src/components/chat/hooks/use-chat-history-hydration.ts +8 -7
- package/src/components/chat/hooks/use-managed-dialog-list.ts +263 -0
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +65 -150
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +213 -39
- package/src/components/chat/hooks/use-unified-chat.ts +5 -0
- package/src/components/chat/types/unified-chat-state.types.ts +62 -0
- package/src/components/chat/utils/.chat-conversations-api.md +16 -0
- package/src/components/chat/utils/__tests__/chat-conversations-api-golden.test.ts +90 -0
- package/src/components/chat/utils/chat-conversations-api.ts +92 -0
- package/src/components/chat/utils/index.ts +7 -0
- package/src/contexts/.chat-runtime-context.md +2 -0
- package/src/contexts/chat-runtime-context.tsx +12 -0
- package/dist/chunk-RDTOMWDN.cjs.map +0 -1
- package/dist/chunk-RYXIRVDC.js.map +0 -1
- package/dist/chunk-VNSRNVPD.js.map +0 -1
- /package/dist/{chunk-PT54TJWD.js.map → chunk-26MKONC3.js.map} +0 -0
- /package/dist/{chunk-DNQP4VPB.js.map → chunk-3XHNV6W7.js.map} +0 -0
- /package/dist/{chunk-TVK7PQON.js.map → chunk-442V6CPU.js.map} +0 -0
- /package/dist/{chunk-BZ4UEHNJ.js.map → chunk-5IMAIYID.js.map} +0 -0
- /package/dist/{chunk-B4BZRBKC.js.map → chunk-7YMVB7GE.js.map} +0 -0
- /package/dist/{chunk-BOILDHSY.js.map → chunk-AC2TI6UT.js.map} +0 -0
- /package/dist/{chunk-EVMHJB6X.js.map → chunk-BLUL2TE3.js.map} +0 -0
- /package/dist/{chunk-GGQZBSFN.js.map → chunk-BVQEU5JB.js.map} +0 -0
- /package/dist/{chunk-ELG2QNW5.js.map → chunk-D7X33EAT.js.map} +0 -0
- /package/dist/{chunk-WZJOILPU.js.map → chunk-F2KBCLUG.js.map} +0 -0
- /package/dist/{chunk-MYBXCWEI.js.map → chunk-FKBM6U43.js.map} +0 -0
- /package/dist/{chunk-FKOYQPMK.js.map → chunk-GQLYYZF4.js.map} +0 -0
- /package/dist/{chunk-LRQCKSZC.js.map → chunk-IW746HJ7.js.map} +0 -0
- /package/dist/{chunk-IRXLB6GV.js.map → chunk-KV24I5MD.js.map} +0 -0
- /package/dist/{chunk-R2YJKREE.js.map → chunk-NJCVIERS.js.map} +0 -0
- /package/dist/{chunk-VXEHG53O.js.map → chunk-OIUXJUMH.js.map} +0 -0
- /package/dist/{chunk-FHWL7QFL.js.map → chunk-RTCKC6RH.js.map} +0 -0
- /package/dist/{chunk-UAAXUFK6.js.map → chunk-RU3IKVY2.js.map} +0 -0
- /package/dist/{chunk-EZM5DNII.js.map → chunk-S6WBBSII.js.map} +0 -0
- /package/dist/{chunk-WWGSYT7R.js.map → chunk-SYFSVIGH.js.map} +0 -0
- /package/dist/{chunk-2JNCZDJR.js.map → chunk-TSCIVH7T.js.map} +0 -0
- /package/dist/{chunk-EGQ345IA.js.map → chunk-UHWDSVZI.js.map} +0 -0
- /package/dist/{chunk-V6KX4KO3.js.map → chunk-YPJB4LJD.js.map} +0 -0
|
@@ -170,7 +170,7 @@ var _chunkGSQM4PDRcjs = require('./chunk-GSQM4PDR.cjs');
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
|
|
173
|
-
var
|
|
173
|
+
var _chunkUQEOAPAIcjs = require('./chunk-UQEOAPAI.cjs');
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
var _chunkWLSFBRT5cjs = require('./chunk-WLSFBRT5.cjs');
|
|
@@ -183,14 +183,14 @@ var _chunkWLSFBRT5cjs = require('./chunk-WLSFBRT5.cjs');
|
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
|
|
186
|
-
var
|
|
186
|
+
var _chunkEHAYNUOLcjs = require('./chunk-EHAYNUOL.cjs');
|
|
187
187
|
|
|
188
188
|
|
|
189
189
|
var _chunk63QUMV72cjs = require('./chunk-63QUMV72.cjs');
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
|
|
193
|
-
var
|
|
193
|
+
var _chunkUPKZU6QUcjs = require('./chunk-UPKZU6QU.cjs');
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
|
|
@@ -1583,7 +1583,7 @@ var MermaidDiagram = ({ chart }) => {
|
|
|
1583
1583
|
// src/components/ui/markdown/base-components.tsx
|
|
1584
1584
|
|
|
1585
1585
|
var MarkdownContentImage = ({ src, alt }) => {
|
|
1586
|
-
const resolvedSrc =
|
|
1586
|
+
const resolvedSrc = _chunkEHAYNUOLcjs.useAuthedImageSrc.call(void 0, src);
|
|
1587
1587
|
if (!resolvedSrc) return null;
|
|
1588
1588
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1589
1589
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
@@ -4086,13 +4086,13 @@ function getSemanticColor(semanticName, platform) {
|
|
|
4086
4086
|
}
|
|
4087
4087
|
function getPlatformConfig(platform) {
|
|
4088
4088
|
const currentPlatform = platform || getCurrentPlatform();
|
|
4089
|
-
const isDarkTheme =
|
|
4089
|
+
const isDarkTheme = _chunkEHAYNUOLcjs.PLATFORM_THEME === "dark";
|
|
4090
4090
|
return {
|
|
4091
4091
|
platform: currentPlatform,
|
|
4092
|
-
accentColor:
|
|
4092
|
+
accentColor: _chunkEHAYNUOLcjs.getPlatformAccentColor.call(void 0, currentPlatform),
|
|
4093
4093
|
isDarkTheme,
|
|
4094
4094
|
isLightTheme: !isDarkTheme,
|
|
4095
|
-
brandName:
|
|
4095
|
+
brandName: _chunkEHAYNUOLcjs.getPlatformDisplayName.call(void 0, currentPlatform)
|
|
4096
4096
|
};
|
|
4097
4097
|
}
|
|
4098
4098
|
function usePlatformColors(platform) {
|
|
@@ -4758,7 +4758,7 @@ function MspOrganizationCard({
|
|
|
4758
4758
|
className
|
|
4759
4759
|
),
|
|
4760
4760
|
children: [
|
|
4761
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.SquareAvatar, { src: logoUrl, alt: name, fallback: name, size: "lg", variant: "square" }),
|
|
4762
4762
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
4763
4763
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate text-ods-text-primary text-h3", children: _nullishCoalesce(title, () => ( `Your IT is managed by ${name}`)) }),
|
|
4764
4764
|
website ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate text-ods-text-secondary text-h4", children: website }) : null
|
|
@@ -4891,7 +4891,7 @@ var ChatHeader = _react.forwardRef.call(void 0,
|
|
|
4891
4891
|
] })
|
|
4892
4892
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
4893
4893
|
userIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-ods-accent", children: userIcon }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4894
|
-
|
|
4894
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
4895
4895
|
{
|
|
4896
4896
|
src: userAvatar,
|
|
4897
4897
|
alt: userName,
|
|
@@ -7254,7 +7254,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7254
7254
|
// Host-supplied brand icon (e.g. Mingo): render it directly,
|
|
7255
7255
|
// no filled pill — the icon carries its own brand accent.
|
|
7256
7256
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-shrink-0 items-center justify-center", children: assistantIcon })
|
|
7257
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7257
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.SquareAvatar, { ...avatarProps })),
|
|
7258
7258
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
7259
7259
|
"span",
|
|
7260
7260
|
{
|
|
@@ -8039,8 +8039,8 @@ ChatMessageList.displayName = "ChatMessageList";
|
|
|
8039
8039
|
|
|
8040
8040
|
// src/components/chat/hooks/use-proxied-image-url.ts
|
|
8041
8041
|
function useProxiedImageUrl(url) {
|
|
8042
|
-
const r =
|
|
8043
|
-
return _nullishCoalesce(
|
|
8042
|
+
const r = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
8043
|
+
return _nullishCoalesce(_chunkUQEOAPAIcjs.getProxiedImageUrl.call(void 0, _nullishCoalesce(url, () => ( "")), {
|
|
8044
8044
|
proxyPrefix: r.endpoints.imageProxyUrlPrefix,
|
|
8045
8045
|
skipDomains: r.endpoints.imageProxySkipDomains,
|
|
8046
8046
|
directHttps: true
|
|
@@ -8066,7 +8066,7 @@ function ChatMessageRow({ displayName, avatarUrl, timeLabel, body, footer }) {
|
|
|
8066
8066
|
height: 40,
|
|
8067
8067
|
onError: () => setFailedSrc(_nullishCoalesce(resolvedAvatar, () => ( null)))
|
|
8068
8068
|
}
|
|
8069
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg border border-ods-border bg-ods-bg text-ods-text-primary text-h6 md:h-10 md:w-10", children:
|
|
8069
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg border border-ods-border bg-ods-bg text-ods-text-primary text-h6 md:h-10 md:w-10", children: _chunkUQEOAPAIcjs.personInitials.call(void 0, displayName) || "?" }),
|
|
8070
8070
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 max-w-full flex-1", children: [
|
|
8071
8071
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-1 flex min-w-0 max-w-full items-center gap-2", children: [
|
|
8072
8072
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate font-body text-[14px] font-bold leading-[1.33] tracking-[-0.02em] text-ods-text-primary md:text-[15px]", children: displayName }),
|
|
@@ -9346,7 +9346,7 @@ function MingoChatHistoryRow({
|
|
|
9346
9346
|
hasMenu && (menuOpen ? "pointer-events-none opacity-0" : "md:group-hover/row:pointer-events-none md:group-hover/row:opacity-0 md:peer-[:focus-within]/menu:pointer-events-none md:peer-[:focus-within]/menu:opacity-0")
|
|
9347
9347
|
),
|
|
9348
9348
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9349
|
-
|
|
9349
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
9350
9350
|
{
|
|
9351
9351
|
variant: "round",
|
|
9352
9352
|
sizePx: 24,
|
|
@@ -10487,7 +10487,7 @@ function ChatPanelHeader({
|
|
|
10487
10487
|
avatar && (avatar.name || avatar.avatarUrl) ? (
|
|
10488
10488
|
// Owner avatar at the title cell's right edge (Figma 113:63273).
|
|
10489
10489
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10490
|
-
|
|
10490
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
10491
10491
|
{
|
|
10492
10492
|
variant: "round",
|
|
10493
10493
|
sizePx: 32,
|
|
@@ -10701,8 +10701,8 @@ function AttachmentChip({ attachment, onRemove, disabled, size: size2 = "default
|
|
|
10701
10701
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "truncate text-ods-text-primary text-h6", title: file.name, children: file.name }),
|
|
10702
10702
|
(!compact || status !== "ready") && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-ods-text-muted text-h6", children: [
|
|
10703
10703
|
status === "sniffing" && "Checking\u2026",
|
|
10704
|
-
status === "uploading" && `${progress}% \xB7 ${
|
|
10705
|
-
status === "ready" &&
|
|
10704
|
+
status === "uploading" && `${progress}% \xB7 ${_chunkUQEOAPAIcjs.formatFileSize.call(void 0, file.size)}`,
|
|
10705
|
+
status === "ready" && _chunkUQEOAPAIcjs.formatFileSize.call(void 0, file.size),
|
|
10706
10706
|
status === "error" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-error", title: errorMessage, children: _nullishCoalesce(errorMessage, () => ( "Upload failed")) })
|
|
10707
10707
|
] })
|
|
10708
10708
|
] }),
|
|
@@ -11499,10 +11499,10 @@ function resolveExternalNavigation(args) {
|
|
|
11499
11499
|
|
|
11500
11500
|
// src/components/chat/utils/execute-navigation.ts
|
|
11501
11501
|
function isForeignOriginHref(href) {
|
|
11502
|
-
return /^https?:\/\//i.test(href) && !
|
|
11502
|
+
return /^https?:\/\//i.test(href) && !_chunkUQEOAPAIcjs.isSameOriginAbsoluteHref.call(void 0, href);
|
|
11503
11503
|
}
|
|
11504
11504
|
function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
11505
|
-
const isNewTab = runtime ?
|
|
11505
|
+
const isNewTab = runtime ? _chunkUQEOAPAIcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
|
|
11506
11506
|
if (isNewTab) {
|
|
11507
11507
|
if (_optionalChain([runtime, 'optionalAccess', _203 => _203.navigation, 'access', _204 => _204.openExternal])) runtime.navigation.openExternal(href);
|
|
11508
11508
|
else window.open(href, "_blank", NEW_TAB_FEATURES);
|
|
@@ -11557,11 +11557,11 @@ function NavLinkAnchorViaRuntime({
|
|
|
11557
11557
|
className,
|
|
11558
11558
|
children
|
|
11559
11559
|
}) {
|
|
11560
|
-
const runtime =
|
|
11560
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
11561
11561
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
11562
11562
|
const panel = useChatPanel();
|
|
11563
11563
|
const resolvedHref = resolveHrefForRuntime(href, runtime);
|
|
11564
|
-
const isNewTab =
|
|
11564
|
+
const isNewTab = _chunkUQEOAPAIcjs.computeIsNewTab.call(void 0, runtime, resolvedHref, _nullishCoalesce(targetPlatform, () => ( null)));
|
|
11565
11565
|
const onClick = (e) => {
|
|
11566
11566
|
const handled = executeNavigation({
|
|
11567
11567
|
event: e,
|
|
@@ -11573,7 +11573,7 @@ function NavLinkAnchorViaRuntime({
|
|
|
11573
11573
|
});
|
|
11574
11574
|
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _208 => _208.closeChat])) panel.closeChat();
|
|
11575
11575
|
};
|
|
11576
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ...
|
|
11576
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkUQEOAPAIcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
|
|
11577
11577
|
}
|
|
11578
11578
|
|
|
11579
11579
|
// src/components/chat/source-action-button.tsx
|
|
@@ -11751,7 +11751,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
11751
11751
|
// src/components/features/use-captions.ts
|
|
11752
11752
|
|
|
11753
11753
|
function useCaptions() {
|
|
11754
|
-
const endpoints = _nullishCoalesce(_optionalChain([
|
|
11754
|
+
const endpoints = _nullishCoalesce(_optionalChain([_chunkUPKZU6QUcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _211 => _211.endpoints]), () => ( null));
|
|
11755
11755
|
return _react.useMemo.call(void 0,
|
|
11756
11756
|
() => ({
|
|
11757
11757
|
forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
|
|
@@ -11831,7 +11831,7 @@ function saveDataEnabled() {
|
|
|
11831
11831
|
return _optionalChain([conn, 'optionalAccess', _218 => _218.saveData]) === true;
|
|
11832
11832
|
}
|
|
11833
11833
|
function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
|
|
11834
|
-
const runtime =
|
|
11834
|
+
const runtime = _chunkUPKZU6QUcjs.useChatRuntime.call(void 0, );
|
|
11835
11835
|
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _219 => _219.endpoints, 'access', _220 => _220.supabaseStorageOrigin])));
|
|
11836
11836
|
try {
|
|
11837
11837
|
_reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
@@ -11850,7 +11850,7 @@ function useVideoWarmup({
|
|
|
11850
11850
|
supabaseStorageOrigin,
|
|
11851
11851
|
nearMargin = "1000px"
|
|
11852
11852
|
} = {}) {
|
|
11853
|
-
const runtime =
|
|
11853
|
+
const runtime = _chunkUPKZU6QUcjs.useChatRuntime.call(void 0, );
|
|
11854
11854
|
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _221 => _221.endpoints, 'access', _222 => _222.supabaseStorageOrigin])));
|
|
11855
11855
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
11856
11856
|
const { ref, isNear } = _chunkYXWGSDK4cjs.useNearViewport.call(void 0, nearMargin);
|
|
@@ -12201,7 +12201,7 @@ function FilePlayer({
|
|
|
12201
12201
|
className
|
|
12202
12202
|
}) {
|
|
12203
12203
|
const effectivePreload = _nullishCoalesce(preload, () => ( (saveDataEnabled() ? "none" : "metadata")));
|
|
12204
|
-
const resolvedCaptionsUrl =
|
|
12204
|
+
const resolvedCaptionsUrl = _chunkEHAYNUOLcjs.useAuthedAssetSrc.call(void 0, captionsUrl, "text/vtt, */*");
|
|
12205
12205
|
const [hoverMutedFallback, setHoverMutedFallback] = _react.useState.call(void 0, () => Boolean(startMuted));
|
|
12206
12206
|
const hoverPlayerRef = _react.useRef.call(void 0, null);
|
|
12207
12207
|
const [mutedFallbackBlocked, setMutedFallbackBlocked] = _react.useState.call(void 0, false);
|
|
@@ -12815,9 +12815,9 @@ function UserDisplay({
|
|
|
12815
12815
|
}) {
|
|
12816
12816
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk23V5BSHDcjs.cn.call(void 0, "flex min-w-0 items-center gap-2", className), children: [
|
|
12817
12817
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12818
|
-
|
|
12818
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
12819
12819
|
{
|
|
12820
|
-
src: avatarUrl ?
|
|
12820
|
+
src: avatarUrl ? _chunkUQEOAPAIcjs.getProxiedImageUrl.call(void 0, avatarUrl) || avatarUrl : void 0,
|
|
12821
12821
|
fallback: name,
|
|
12822
12822
|
alt: name,
|
|
12823
12823
|
sizePx: size2,
|
|
@@ -13317,7 +13317,7 @@ function VideoHoverPreviewSurface({
|
|
|
13317
13317
|
return () => io.disconnect();
|
|
13318
13318
|
}, [gateControlled]);
|
|
13319
13319
|
const showMedia = continuation || (gateControlled ? playerMounted : isNear);
|
|
13320
|
-
const { src: posterSrc, onError: onPosterError } =
|
|
13320
|
+
const { src: posterSrc, onError: onPosterError } = _chunkUQEOAPAIcjs.useCoverImageFallback.call(void 0, posterUrl);
|
|
13321
13321
|
const facadeSkipped = preload === "none" && !posterSrc;
|
|
13322
13322
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rootElRef, className: _chunk23V5BSHDcjs.cn.call(void 0, "absolute inset-0", className), inert: isClone || void 0, children: showMedia ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13323
13323
|
posterSrc ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -13435,7 +13435,7 @@ function groupByAspectRatio(items, getAspectRatio) {
|
|
|
13435
13435
|
|
|
13436
13436
|
function VideoBitesStrip({
|
|
13437
13437
|
bites,
|
|
13438
|
-
title =
|
|
13438
|
+
title = _chunkUQEOAPAIcjs.DEFAULT_VIDEO_BITES_TITLE,
|
|
13439
13439
|
showTitle = true,
|
|
13440
13440
|
filterPublished = true,
|
|
13441
13441
|
profile = null,
|
|
@@ -13448,7 +13448,7 @@ function VideoBitesStrip({
|
|
|
13448
13448
|
cardHeightMobile = 300,
|
|
13449
13449
|
showChevrons = true,
|
|
13450
13450
|
onBiteNavigate,
|
|
13451
|
-
sortComparator =
|
|
13451
|
+
sortComparator = _chunkUQEOAPAIcjs.sortBitesByCreatedAtDesc,
|
|
13452
13452
|
className
|
|
13453
13453
|
}) {
|
|
13454
13454
|
const items = _react.useMemo.call(void 0, () => {
|
|
@@ -13673,7 +13673,7 @@ function EntityVideoSection({
|
|
|
13673
13673
|
title = "Video",
|
|
13674
13674
|
videoSummary,
|
|
13675
13675
|
videoBites,
|
|
13676
|
-
bitesTitle =
|
|
13676
|
+
bitesTitle = _chunkUQEOAPAIcjs.DEFAULT_VIDEO_BITES_TITLE,
|
|
13677
13677
|
filterPublishedBites = true,
|
|
13678
13678
|
bitesProfile = null,
|
|
13679
13679
|
bitesHref,
|
|
@@ -13912,7 +13912,7 @@ function ReviewStateBadge({ state, className = "" }) {
|
|
|
13912
13912
|
function GitHubActivityCard({ item, variant = "compact", className, anchorProps }) {
|
|
13913
13913
|
const kind = _nullishCoalesce(item.kind, () => ( "commit"));
|
|
13914
13914
|
const repo = _nullishCoalesce(_nullishCoalesce(item.repo, () => ( parseRepoFromUrl(item.url))), () => ( ""));
|
|
13915
|
-
const dateText =
|
|
13915
|
+
const dateText = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, item.dateUpdated, { fallback: "", timezone: "local" });
|
|
13916
13916
|
const idLabel = formatActivityId(item.id, kind);
|
|
13917
13917
|
const { display: title, reviewState } = parseGithubTitle(item.title, kind);
|
|
13918
13918
|
const primaryText = kind === "pr_review" ? title.replace(/^by\s+/i, "").trim() || "Reviewer" : title;
|
|
@@ -13946,26 +13946,26 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
|
|
|
13946
13946
|
metaParts.push(
|
|
13947
13947
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "whitespace-nowrap", children: dateText }, "date")
|
|
13948
13948
|
);
|
|
13949
|
-
const href =
|
|
13949
|
+
const href = _chunkUQEOAPAIcjs.safeHref.call(void 0, item.url);
|
|
13950
13950
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13951
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13952
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
13953
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
13951
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_ICON_SLOT, children: kindIcon(kind, "h-5 w-5") }),
|
|
13952
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
13953
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW} flex-nowrap gap-1.5`, children: [
|
|
13954
13954
|
reviewState ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ReviewStateBadge, { state: reviewState }) : null,
|
|
13955
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13955
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE, children: primaryText })
|
|
13956
13956
|
] }),
|
|
13957
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13957
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react2.default.Fragment, { children: [
|
|
13958
13958
|
i > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-ods-text-secondary/40", children: "\xB7" }) : null,
|
|
13959
13959
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate", children: part })
|
|
13960
13960
|
] }, i)) }) }),
|
|
13961
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13961
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUMMARY, children: _chunkUQEOAPAIcjs.COMPACT_CARD_ROW_FILLER }) })
|
|
13962
13962
|
] }),
|
|
13963
13963
|
href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
13964
13964
|
] });
|
|
13965
13965
|
if (anchorProps) {
|
|
13966
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
13966
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body });
|
|
13967
13967
|
}
|
|
13968
|
-
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${
|
|
13968
|
+
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
13969
13969
|
}
|
|
13970
13970
|
function GitHubActivityCardSkeleton({
|
|
13971
13971
|
variant = "compact",
|
|
@@ -13982,12 +13982,12 @@ function GitHubActivityCardSkeleton({
|
|
|
13982
13982
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 w-20 shrink-0 rounded bg-ods-bg/60" })
|
|
13983
13983
|
] });
|
|
13984
13984
|
}
|
|
13985
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
13986
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13987
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
13988
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13989
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13990
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
13985
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
13986
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
13987
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
13988
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }) }),
|
|
13989
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-1/2 rounded bg-ods-bg/70" }) }),
|
|
13990
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUMMARY, children: _chunkUQEOAPAIcjs.COMPACT_CARD_ROW_FILLER }) })
|
|
13991
13991
|
] }),
|
|
13992
13992
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
13993
13993
|
] });
|
|
@@ -14011,7 +14011,7 @@ function parseChannelFromUrl(url) {
|
|
|
14011
14011
|
}
|
|
14012
14012
|
function SlackMessageCard({ item, variant = "compact", className, anchorProps }) {
|
|
14013
14013
|
const channel = _nullishCoalesce(_nullishCoalesce(item.channel, () => ( parseChannelFromUrl(item.url))), () => ( null));
|
|
14014
|
-
const dateText =
|
|
14014
|
+
const dateText = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, item.dateUpdated, { fallback: "", timezone: "local" });
|
|
14015
14015
|
if (variant === "row") {
|
|
14016
14016
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex min-w-0 items-center gap-3 ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14017
14017
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOQCA5X5cjs.SlackIcon, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
@@ -14037,23 +14037,23 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
|
|
|
14037
14037
|
metaParts.push(
|
|
14038
14038
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "whitespace-nowrap", children: dateText }, "date")
|
|
14039
14039
|
);
|
|
14040
|
-
const href =
|
|
14040
|
+
const href = _chunkUQEOAPAIcjs.safeHref.call(void 0, item.url);
|
|
14041
14041
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14042
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14043
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14044
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14045
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14046
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14042
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOQCA5X5cjs.SlackIcon, { className: "h-5 w-5" }) }),
|
|
14043
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14044
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE, children: item.title }) }),
|
|
14045
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUMMARY, children: item.preview || _chunkUQEOAPAIcjs.COMPACT_CARD_ROW_FILLER }) }),
|
|
14046
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW, children: metaParts.length > 0 ? metaParts.map((part, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react2.default.Fragment, { children: [
|
|
14047
14047
|
i > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-ods-text-secondary/40", children: "\xB7" }) : null,
|
|
14048
14048
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate", children: part })
|
|
14049
|
-
] }, i)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14049
|
+
] }, i)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUMMARY, children: _chunkUQEOAPAIcjs.COMPACT_CARD_ROW_FILLER }) }) })
|
|
14050
14050
|
] }),
|
|
14051
14051
|
href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14052
14052
|
] });
|
|
14053
14053
|
if (anchorProps) {
|
|
14054
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
14054
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body });
|
|
14055
14055
|
}
|
|
14056
|
-
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${
|
|
14056
|
+
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
14057
14057
|
}
|
|
14058
14058
|
function SlackMessageCardSkeleton({
|
|
14059
14059
|
variant = "compact",
|
|
@@ -14068,12 +14068,12 @@ function SlackMessageCardSkeleton({
|
|
|
14068
14068
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 w-20 shrink-0 rounded bg-ods-bg/60" })
|
|
14069
14069
|
] });
|
|
14070
14070
|
}
|
|
14071
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
14072
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14073
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14074
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14075
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14071
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14072
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
14073
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }) }),
|
|
14075
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-5/6 rounded bg-ods-bg/60" }) }),
|
|
14076
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-1/3 rounded bg-ods-bg/70" }) })
|
|
14077
14077
|
] }),
|
|
14078
14078
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
14079
14079
|
] });
|
|
@@ -14104,12 +14104,12 @@ function statusScheme(status) {
|
|
|
14104
14104
|
function HubspotTicketCard({ item, variant = "compact", className, anchorProps }) {
|
|
14105
14105
|
const statusText = _nullishCoalesce(item.statusLabel, () => ( formatToken(item.status)));
|
|
14106
14106
|
const priorityText = formatToken(item.priority);
|
|
14107
|
-
const dateText =
|
|
14107
|
+
const dateText = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, item.dateUpdated, { fallback: "", timezone: "local" });
|
|
14108
14108
|
if (variant === "row") {
|
|
14109
14109
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex min-w-0 items-center gap-3 ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14110
14110
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "max-w-[260px] shrink-0 truncate text-ods-text-primary text-h6", children: item.title }),
|
|
14111
14111
|
item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-ods-text-secondary text-h6", children: item.preview }) : null,
|
|
14112
|
-
statusText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14112
|
+
statusText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.StatusBadge, { text: statusText, variant: "button", colorScheme: statusScheme(item.status) }) : null,
|
|
14113
14113
|
dateText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-24 shrink-0 text-right text-ods-text-secondary text-h6", children: dateText }) : null
|
|
14114
14114
|
] });
|
|
14115
14115
|
}
|
|
@@ -14123,13 +14123,13 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
14123
14123
|
metaParts.push(
|
|
14124
14124
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "whitespace-nowrap", children: dateText }, "date")
|
|
14125
14125
|
);
|
|
14126
|
-
const href =
|
|
14126
|
+
const href = _chunkUQEOAPAIcjs.safeHref.call(void 0, item.url);
|
|
14127
14127
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14128
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14128
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14129
14129
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
14130
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${
|
|
14130
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
|
|
14131
14131
|
priorityText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14132
|
-
|
|
14132
|
+
_chunkUQEOAPAIcjs.StatusBadge,
|
|
14133
14133
|
{
|
|
14134
14134
|
text: priorityText,
|
|
14135
14135
|
variant: "button",
|
|
@@ -14138,7 +14138,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
14138
14138
|
}
|
|
14139
14139
|
) : null,
|
|
14140
14140
|
statusText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14141
|
-
|
|
14141
|
+
_chunkUQEOAPAIcjs.StatusBadge,
|
|
14142
14142
|
{
|
|
14143
14143
|
text: statusText,
|
|
14144
14144
|
variant: "button",
|
|
@@ -14152,7 +14152,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
14152
14152
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate", children: item.customerEmail })
|
|
14153
14153
|
] }) : null,
|
|
14154
14154
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-4 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "italic text-ods-text-secondary/60", children: "No description provided." }) }) }),
|
|
14155
|
-
metaParts.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14155
|
+
metaParts.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react2.default.Fragment, { children: [
|
|
14156
14156
|
i > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-ods-text-secondary/40", children: "\xB7" }) : null,
|
|
14157
14157
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate", children: part })
|
|
14158
14158
|
] }, i)) }) }) : null
|
|
@@ -14160,9 +14160,9 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
14160
14160
|
href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14161
14161
|
] });
|
|
14162
14162
|
if (anchorProps) {
|
|
14163
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
14163
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body });
|
|
14164
14164
|
}
|
|
14165
|
-
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${
|
|
14165
|
+
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, target: "_blank", rel: "noopener noreferrer", className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
14166
14166
|
}
|
|
14167
14167
|
function HubspotTicketCardSkeleton({
|
|
14168
14168
|
variant = "compact",
|
|
@@ -14176,8 +14176,8 @@ function HubspotTicketCardSkeleton({
|
|
|
14176
14176
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 w-20 shrink-0 rounded bg-ods-bg/60" })
|
|
14177
14177
|
] });
|
|
14178
14178
|
}
|
|
14179
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
14180
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14179
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14180
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14181
14181
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
14182
14182
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
14183
14183
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-4 w-12 rounded-full bg-ods-bg/60" }),
|
|
@@ -14190,7 +14190,7 @@ function HubspotTicketCardSkeleton({
|
|
|
14190
14190
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-5 w-3/4 rounded bg-ods-bg/60" }),
|
|
14191
14191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-5 w-2/5 rounded bg-ods-bg/60" })
|
|
14192
14192
|
] }),
|
|
14193
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14193
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-1/3 rounded bg-ods-bg/70" }) })
|
|
14194
14194
|
] }),
|
|
14195
14195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
14196
14196
|
] });
|
|
@@ -14201,10 +14201,10 @@ function HubspotTicketCardSkeleton({
|
|
|
14201
14201
|
|
|
14202
14202
|
function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
14203
14203
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14204
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14204
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14205
14205
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
14206
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${
|
|
14207
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14206
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
|
|
14207
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.StatusBadge, { text: badgeText, variant: "button", colorScheme: "cyan", className: "shrink-0" })
|
|
14208
14208
|
] }),
|
|
14209
14209
|
item.path ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 items-center gap-1 text-ods-text-secondary text-h6", children: [
|
|
14210
14210
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 text-ods-text-secondary/70", children: "Path:" }),
|
|
@@ -14215,13 +14215,13 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
14215
14215
|
_optionalChain([anchorProps, 'optionalAccess', _343 => _343.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14216
14216
|
] });
|
|
14217
14217
|
if (!anchorProps) {
|
|
14218
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${
|
|
14218
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
14219
14219
|
}
|
|
14220
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
14220
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body });
|
|
14221
14221
|
}
|
|
14222
14222
|
function DataRoomDocCardSkeleton({ className }) {
|
|
14223
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
14224
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14223
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14224
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14225
14225
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
14226
14226
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
14227
14227
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-4 w-16 rounded-full bg-ods-bg/60" })
|
|
@@ -14242,29 +14242,29 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
14242
14242
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
14243
14243
|
const goalsCount = _optionalChain([campaign, 'access', _344 => _344.goals, 'optionalAccess', _345 => _345.length]) || 0;
|
|
14244
14244
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14245
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14246
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14247
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14248
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14249
|
-
campaign.start_date ?
|
|
14245
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
14246
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14247
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE, children: campaign.name }) }),
|
|
14248
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUBTITLE, children: [
|
|
14249
|
+
campaign.start_date ? _chunkUQEOAPAIcjs.formatDateShort.call(void 0, campaign.start_date) : null,
|
|
14250
14250
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
14251
14251
|
"Marketing campaign"
|
|
14252
14252
|
].filter(Boolean).join(" \xB7 ") }) }),
|
|
14253
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14253
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SUMMARY, children: campaign.description || _chunkUQEOAPAIcjs.COMPACT_CARD_ROW_FILLER }) })
|
|
14254
14254
|
] })
|
|
14255
14255
|
] });
|
|
14256
14256
|
if (anchorProps) {
|
|
14257
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
14257
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: innerChildren });
|
|
14258
14258
|
}
|
|
14259
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${
|
|
14259
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: innerChildren });
|
|
14260
14260
|
}
|
|
14261
14261
|
function CampaignCardAdminSkeleton({ className }) {
|
|
14262
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
14263
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14264
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14265
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14266
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14267
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14262
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14263
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
14264
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14265
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-3/5 rounded bg-ods-bg" }) }),
|
|
14266
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-1/2 rounded bg-ods-bg/70" }) }),
|
|
14267
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3 w-11/12 rounded bg-ods-bg/40" }) })
|
|
14268
14268
|
] })
|
|
14269
14269
|
] });
|
|
14270
14270
|
}
|
|
@@ -14273,14 +14273,14 @@ function CampaignCardAdminSkeleton({ className }) {
|
|
|
14273
14273
|
|
|
14274
14274
|
|
|
14275
14275
|
function GenericEntityCard({ item, className, anchorProps }) {
|
|
14276
|
-
const href =
|
|
14277
|
-
const dateText =
|
|
14276
|
+
const href = _chunkUQEOAPAIcjs.safeHref.call(void 0, item.url);
|
|
14277
|
+
const dateText = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, item.dateUpdated, { fallback: "", timezone: "local" });
|
|
14278
14278
|
const body = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14279
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14279
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14280
14280
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
14281
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${
|
|
14281
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
|
|
14282
14282
|
item.badge ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14283
|
-
|
|
14283
|
+
_chunkUQEOAPAIcjs.StatusBadge,
|
|
14284
14284
|
{
|
|
14285
14285
|
text: item.badge.text,
|
|
14286
14286
|
variant: "button",
|
|
@@ -14298,18 +14298,18 @@ function GenericEntityCard({ item, className, anchorProps }) {
|
|
|
14298
14298
|
] }),
|
|
14299
14299
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate font-medium text-ods-text-primary", children: f.value })
|
|
14300
14300
|
] }, i)) }) : null,
|
|
14301
|
-
dateText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className:
|
|
14301
|
+
dateText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "whitespace-nowrap", children: dateText }) }) }) : null
|
|
14302
14302
|
] }),
|
|
14303
14303
|
href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14304
14304
|
] });
|
|
14305
14305
|
if (anchorProps) {
|
|
14306
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${
|
|
14306
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { ...anchorProps, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body });
|
|
14307
14307
|
}
|
|
14308
|
-
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, className: `${
|
|
14308
|
+
return href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href, className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: body }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
14309
14309
|
}
|
|
14310
14310
|
function GenericEntityCardSkeleton({ className }) {
|
|
14311
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${
|
|
14312
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className:
|
|
14311
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_SKELETON_OUTER} ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14312
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14313
14313
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
14314
14314
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
14315
14315
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-4 w-16 rounded-full bg-ods-bg/60" })
|
|
@@ -14349,17 +14349,17 @@ function parseFaqHash(hash) {
|
|
|
14349
14349
|
// src/components/chat/hooks/use-chat-card-item.ts
|
|
14350
14350
|
|
|
14351
14351
|
function useChatCardItem(type, id) {
|
|
14352
|
-
const runtime =
|
|
14352
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
14353
14353
|
const url = runtime.endpoints.buildListUrl(type, [id]);
|
|
14354
14354
|
const query = _reactquery.useQuery.call(void 0, {
|
|
14355
14355
|
queryKey: ["chat-card-item", type, id],
|
|
14356
14356
|
queryFn: async () => {
|
|
14357
14357
|
if (!url) return null;
|
|
14358
|
-
const res = await
|
|
14358
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url);
|
|
14359
14359
|
if (!res.ok) throw new Error(`chat card fetch failed: ${res.status}`);
|
|
14360
14360
|
const data = await res.json();
|
|
14361
|
-
const items =
|
|
14362
|
-
const match = items.find((it) =>
|
|
14361
|
+
const items = _chunkUQEOAPAIcjs.extractItems.call(void 0, data);
|
|
14362
|
+
const match = items.find((it) => _chunkUQEOAPAIcjs.extractItemId.call(void 0, type, it) === id);
|
|
14363
14363
|
return _nullishCoalesce(match, () => ( null));
|
|
14364
14364
|
},
|
|
14365
14365
|
enabled: !!url && id.length > 0,
|
|
@@ -14392,7 +14392,7 @@ function useChatCardItem(type, id) {
|
|
|
14392
14392
|
function CardMedia({ imageSrc, imageAlt, icon }) {
|
|
14393
14393
|
if (imageSrc) {
|
|
14394
14394
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "relative block size-10 shrink-0", children: [
|
|
14395
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute inset-0 flex items-center justify-center rounded-sm border border-ods-border bg-ods-bg text-ods-text-primary text-h6", children:
|
|
14395
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute inset-0 flex items-center justify-center rounded-sm border border-ods-border bg-ods-bg text-ods-text-primary text-h6", children: _chunkUQEOAPAIcjs.personInitials.call(void 0, imageAlt) || "?" }),
|
|
14396
14396
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14397
14397
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
14398
14398
|
{
|
|
@@ -14550,7 +14550,7 @@ function resolveFetchedCardHref({
|
|
|
14550
14550
|
composeContentUrl
|
|
14551
14551
|
}) {
|
|
14552
14552
|
if (!composeContentUrl || !contentRefType || !id) return null;
|
|
14553
|
-
const canonicalType =
|
|
14553
|
+
const canonicalType = _chunkUQEOAPAIcjs.canonicalContentRefType.call(void 0, contentRefType);
|
|
14554
14554
|
return composeContentUrl({
|
|
14555
14555
|
// The card registry keys some entries by the legacy rail vocabulary
|
|
14556
14556
|
// (`blog_post_existing`) because that is what `buildListUrl` expects.
|
|
@@ -14754,16 +14754,16 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
14754
14754
|
if (docTarget) {
|
|
14755
14755
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
14756
14756
|
const base = `${_chunk23V5BSHDcjs.getBaseUrl.call(void 0, docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
14757
|
-
href = _nullishCoalesce(
|
|
14757
|
+
href = _nullishCoalesce(_chunkUQEOAPAIcjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
|
|
14758
14758
|
targetPlatform = docTarget.platform;
|
|
14759
14759
|
} else if (ctx.chipBasePlatform) {
|
|
14760
14760
|
const base = `${_chunk23V5BSHDcjs.getBaseUrl.call(void 0, ctx.chipBasePlatform)}/knowledge-base/`;
|
|
14761
|
-
href = _nullishCoalesce(
|
|
14761
|
+
href = _nullishCoalesce(_chunkUQEOAPAIcjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
|
|
14762
14762
|
targetPlatform = ctx.chipBasePlatform;
|
|
14763
14763
|
} else if (ctx.baseRoute) {
|
|
14764
14764
|
const synthetic = `https://_internal_.local${ctx.baseRoute.startsWith("/") ? ctx.baseRoute : "/" + ctx.baseRoute}/`;
|
|
14765
14765
|
const absolute = new URL(safePath, synthetic).toString();
|
|
14766
|
-
href = _nullishCoalesce(
|
|
14766
|
+
href = _nullishCoalesce(_chunkUQEOAPAIcjs.safeHref.call(void 0, absolute.replace("https://_internal_.local", "")), () => ( null));
|
|
14767
14767
|
targetPlatform = _nullishCoalesce(ctx.currentPlatform, () => ( null));
|
|
14768
14768
|
}
|
|
14769
14769
|
}
|
|
@@ -14772,15 +14772,15 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
14772
14772
|
// Canonical vocabulary only — a rail-vocab alias would miss the host's
|
|
14773
14773
|
// `hostedTypes` / `overrides` and fall through to the seam's default
|
|
14774
14774
|
// `<origin>/<type>/<id>` branch. Same canonicalizer `buildListUrl` uses.
|
|
14775
|
-
type:
|
|
14775
|
+
type: _chunkUQEOAPAIcjs.canonicalContentRefType.call(void 0, row.documentType),
|
|
14776
14776
|
identifier: idValue,
|
|
14777
14777
|
externalUrl: row.externalUrl,
|
|
14778
14778
|
targetPlatform: _nullishCoalesce(row.targetPlatform, () => ( null))
|
|
14779
14779
|
});
|
|
14780
|
-
href = composed.href ? _nullishCoalesce(
|
|
14780
|
+
href = composed.href ? _nullishCoalesce(_chunkUQEOAPAIcjs.safeHref.call(void 0, composed.href), () => ( null)) : null;
|
|
14781
14781
|
targetPlatform = composed.targetPlatform;
|
|
14782
14782
|
} else if (row.externalUrl) {
|
|
14783
|
-
href = _nullishCoalesce(
|
|
14783
|
+
href = _nullishCoalesce(_chunkUQEOAPAIcjs.safeHref.call(void 0, row.externalUrl), () => ( null));
|
|
14784
14784
|
targetPlatform = _nullishCoalesce(row.targetPlatform, () => ( null));
|
|
14785
14785
|
}
|
|
14786
14786
|
const documentType = row.documentType;
|
|
@@ -14815,11 +14815,11 @@ function resolveSourceIcon(input, ctx = {}) {
|
|
|
14815
14815
|
|
|
14816
14816
|
function DeletedDataCard({ title, entityLabel, recoveryNote, className }) {
|
|
14817
14817
|
const label = entityLabel || "Item";
|
|
14818
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `${
|
|
14819
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
14820
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className:
|
|
14821
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
14822
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
14818
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_OUTER_STATIC} opacity-70 ${_nullishCoalesce(className, () => ( ""))}`, children: [
|
|
14819
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2, { className: "h-4 w-4 text-ods-text-secondary" }) }),
|
|
14820
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
14821
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkUQEOAPAIcjs.COMPACT_CARD_TITLE} text-ods-text-secondary line-through`, children: title || `Deleted ${label.toLowerCase()}` }) }),
|
|
14822
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkUQEOAPAIcjs.COMPACT_CARD_META_ROW, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-ods-text-secondary", children: [
|
|
14823
14823
|
label,
|
|
14824
14824
|
" deleted",
|
|
14825
14825
|
recoveryNote ? ` \xB7 ${recoveryNote}` : ""
|
|
@@ -14865,7 +14865,7 @@ function GitHubChatCard({
|
|
|
14865
14865
|
const title = kind === "pr_review" ? display.replace(/^by\s+/i, "").trim() || "Reviewer" : display;
|
|
14866
14866
|
const status = kind === "pr_review" && reviewState ? { label: reviewStateLabel(reviewState), variant: reviewStateToVariant(reviewState) } : { label: kindLabel(kind), variant: "grey" };
|
|
14867
14867
|
const idLabel = formatActivityId(chatRef.id, kind);
|
|
14868
|
-
const dateText =
|
|
14868
|
+
const dateText = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, _nullishCoalesce(chatRef.date, () => ( null)), { fallback: "", timezone: "local" });
|
|
14869
14869
|
const description = [idLabel, dateText].filter(Boolean).join(" \xB7 ") || void 0;
|
|
14870
14870
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14871
14871
|
MingoInfoCard,
|
|
@@ -14874,7 +14874,7 @@ function GitHubChatCard({
|
|
|
14874
14874
|
description,
|
|
14875
14875
|
icon: githubKindIcon(kind),
|
|
14876
14876
|
status,
|
|
14877
|
-
anchorProps:
|
|
14877
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
14878
14878
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
14879
14879
|
menuAriaLabel: "Activity actions"
|
|
14880
14880
|
}
|
|
@@ -15021,7 +15021,7 @@ function HubspotTicketChatCard({
|
|
|
15021
15021
|
description: _nullishCoalesce(chatRef.preview, () => ( void 0)),
|
|
15022
15022
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TagIcon, { size: 24 }),
|
|
15023
15023
|
status: statusText ? { label: statusText, variant: hubspotStatusToVariant(status) } : void 0,
|
|
15024
|
-
anchorProps:
|
|
15024
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15025
15025
|
menuGroups: cardMenuGroups(chatRef.url, discuss, {
|
|
15026
15026
|
label: "Open Ticket Details",
|
|
15027
15027
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TagIcon, { size: 20 })
|
|
@@ -15044,7 +15044,7 @@ function FaqChatCard({
|
|
|
15044
15044
|
description: _nullishCoalesce(chatRef.preview, () => ( void 0)),
|
|
15045
15045
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.QuestionCircleIcon, { size: 24 }),
|
|
15046
15046
|
status: { label: statusLabel, variant: "grey" },
|
|
15047
|
-
anchorProps:
|
|
15047
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15048
15048
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
15049
15049
|
menuAriaLabel: "FAQ actions"
|
|
15050
15050
|
}
|
|
@@ -15064,7 +15064,7 @@ function SlackChatCard({
|
|
|
15064
15064
|
title,
|
|
15065
15065
|
description: _nullishCoalesce(chatRef.preview, () => ( void 0)),
|
|
15066
15066
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.SlackLogoGreyIcon, { size: 24 }),
|
|
15067
|
-
anchorProps:
|
|
15067
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15068
15068
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
15069
15069
|
menuAriaLabel: "Message actions"
|
|
15070
15070
|
}
|
|
@@ -15082,7 +15082,7 @@ function GlyphChatCard({
|
|
|
15082
15082
|
title: chatRef.title,
|
|
15083
15083
|
description: _nullishCoalesce(chatRef.preview, () => ( void 0)),
|
|
15084
15084
|
icon,
|
|
15085
|
-
anchorProps:
|
|
15085
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15086
15086
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
15087
15087
|
menuAriaLabel: "Card actions"
|
|
15088
15088
|
}
|
|
@@ -15101,7 +15101,7 @@ function DataRoomDocChatCard({
|
|
|
15101
15101
|
description: _nullishCoalesce(chatRef.preview, () => ( void 0)),
|
|
15102
15102
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.FileContentIcon, { size: 24 }),
|
|
15103
15103
|
status: { label: badgeText, variant: "grey" },
|
|
15104
|
-
anchorProps:
|
|
15104
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15105
15105
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
15106
15106
|
menuAriaLabel: "Document actions"
|
|
15107
15107
|
}
|
|
@@ -15120,7 +15120,7 @@ function GenericFinancialChatCard({
|
|
|
15120
15120
|
title: chatRef.title,
|
|
15121
15121
|
description: subtitle,
|
|
15122
15122
|
icon,
|
|
15123
|
-
anchorProps:
|
|
15123
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15124
15124
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
15125
15125
|
menuAriaLabel: "Document actions"
|
|
15126
15126
|
}
|
|
@@ -15206,7 +15206,7 @@ function CampaignChatCard({
|
|
|
15206
15206
|
}) {
|
|
15207
15207
|
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _377 => _377.goals])) ? item.goals.length : 0;
|
|
15208
15208
|
const meta = [
|
|
15209
|
-
_optionalChain([item, 'optionalAccess', _378 => _378.start_date]) ?
|
|
15209
|
+
_optionalChain([item, 'optionalAccess', _378 => _378.start_date]) ? _chunkUQEOAPAIcjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
15210
15210
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
15211
15211
|
"Marketing campaign"
|
|
15212
15212
|
].filter(Boolean).join(" \xB7 ");
|
|
@@ -15245,7 +15245,7 @@ function EntityMingoCard({
|
|
|
15245
15245
|
imageAlt: typeof title === "string" ? title : void 0,
|
|
15246
15246
|
icon: fallbackIcon,
|
|
15247
15247
|
status,
|
|
15248
|
-
anchorProps:
|
|
15248
|
+
anchorProps: _chunkUQEOAPAIcjs.buildAnchorProps.call(void 0, chatRef.url, isNewTab),
|
|
15249
15249
|
menuGroups: cardMenuGroups(chatRef.url, discuss, openDetails, externalLink),
|
|
15250
15250
|
menuAriaLabel
|
|
15251
15251
|
}
|
|
@@ -15257,7 +15257,7 @@ function entityCover(image, ogPlaceholder) {
|
|
|
15257
15257
|
function statusPill(status) {
|
|
15258
15258
|
const s = typeof status === "string" ? status.trim() : "";
|
|
15259
15259
|
if (!s) return void 0;
|
|
15260
|
-
const scheme =
|
|
15260
|
+
const scheme = _chunkUQEOAPAIcjs.getStatusColorScheme.call(void 0, s);
|
|
15261
15261
|
const variant = scheme === "success" || scheme === "error" || scheme === "warning" ? scheme : "grey";
|
|
15262
15262
|
return { label: s, variant };
|
|
15263
15263
|
}
|
|
@@ -15344,7 +15344,7 @@ function InvestorUpdateChatCard({
|
|
|
15344
15344
|
EntityMingoCard,
|
|
15345
15345
|
{
|
|
15346
15346
|
title,
|
|
15347
|
-
description: _optionalChain([item, 'optionalAccess', _406 => _406.strategic_update]) || _optionalChain([item, 'optionalAccess', _407 => _407.content]) ||
|
|
15347
|
+
description: _optionalChain([item, 'optionalAccess', _406 => _406.strategic_update]) || _optionalChain([item, 'optionalAccess', _407 => _407.content]) || _chunkUQEOAPAIcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _408 => _408.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _409 => _409.period_end]), () => ( null))) || void 0,
|
|
15348
15348
|
cover: entityCover(_optionalChain([item, 'optionalAccess', _410 => _410.featured_image]), ogPlaceholder),
|
|
15349
15349
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.PresentationLineIcon, { size: 24 }),
|
|
15350
15350
|
status: { label: "Investor update", variant: "grey" },
|
|
@@ -15391,15 +15391,15 @@ function ProgramChatCard({
|
|
|
15391
15391
|
const isScheduled = _optionalChain([item, 'optionalAccess', _417 => _417.status]) === "scheduled";
|
|
15392
15392
|
let typeMeta;
|
|
15393
15393
|
if (configKey === "podcast" && typeof _optionalChain([item, 'optionalAccess', _418 => _418.duration_seconds]) === "number" && item.duration_seconds > 0 && !isScheduled) {
|
|
15394
|
-
typeMeta =
|
|
15394
|
+
typeMeta = _chunkUQEOAPAIcjs.formatDurationCompact.call(void 0, item.duration_seconds);
|
|
15395
15395
|
} else if (configKey === "event" && typeof _optionalChain([item, 'optionalAccess', _419 => _419.location_name]) === "string" && item.location_name.trim().length > 0) {
|
|
15396
15396
|
typeMeta = item.location_name;
|
|
15397
15397
|
} else if (configKey === "webinar" && _optionalChain([item, 'optionalAccess', _420 => _420.start_at])) {
|
|
15398
|
-
const time =
|
|
15399
|
-
const dur =
|
|
15398
|
+
const time = _chunkUQEOAPAIcjs.formatTimeWithTimezone.call(void 0, item.start_at, _nullishCoalesce(item.timezone, () => ( null)));
|
|
15399
|
+
const dur = _chunkUQEOAPAIcjs.formatDurationFromRange.call(void 0, item.start_at, item.end_at);
|
|
15400
15400
|
typeMeta = dur ? `${time} \xB7 ${dur}` : time;
|
|
15401
15401
|
}
|
|
15402
|
-
const itemDate =
|
|
15402
|
+
const itemDate = _chunkUQEOAPAIcjs.formatDateUTC.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _421 => _421.date]), () => ( null)), { fallback: "", timezone: "local" });
|
|
15403
15403
|
const meta = [itemDate, typeMeta].filter(Boolean).join(" \xB7 ");
|
|
15404
15404
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15405
15405
|
EntityMingoCard,
|
|
@@ -15426,7 +15426,7 @@ function RoadmapChatCard({
|
|
|
15426
15426
|
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _425 => _425.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
15427
15427
|
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _426 => _426.customItemId]) != null;
|
|
15428
15428
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MapIcon, { size: 24 });
|
|
15429
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15429
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _427 => _427.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
15430
15430
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
15431
15431
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
15432
15432
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -15550,7 +15550,7 @@ function programRegistryEntries() {
|
|
|
15550
15550
|
label: cfg.label,
|
|
15551
15551
|
contentRefType: cfg.contentRefType,
|
|
15552
15552
|
bareInline: true,
|
|
15553
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15553
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.ProgramCardSkeleton, { size: "sm" }),
|
|
15554
15554
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15555
15555
|
ProgramChatCard,
|
|
15556
15556
|
{
|
|
@@ -15591,7 +15591,7 @@ function roadmapRegistryEntries() {
|
|
|
15591
15591
|
bareInline: true,
|
|
15592
15592
|
...cfg.noComposedHref ? { noComposedHref: true } : {},
|
|
15593
15593
|
...cfg.fallbackHref ? { fallbackHref: cfg.fallbackHref } : {},
|
|
15594
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15594
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.RoadmapCardSkeleton, { size: "sm" }),
|
|
15595
15595
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15596
15596
|
RoadmapChatCard,
|
|
15597
15597
|
{
|
|
@@ -15667,7 +15667,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15667
15667
|
label: "Blog post",
|
|
15668
15668
|
contentRefType: "blog_post_existing",
|
|
15669
15669
|
bareInline: true,
|
|
15670
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15670
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.BlogCardSkeleton, { size: "sm" }),
|
|
15671
15671
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15672
15672
|
BlogChatCard,
|
|
15673
15673
|
{
|
|
@@ -15684,7 +15684,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15684
15684
|
label: "Case study",
|
|
15685
15685
|
contentRefType: "case_study",
|
|
15686
15686
|
bareInline: true,
|
|
15687
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15687
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.CaseStudyCardSkeleton, { size: "sm" }),
|
|
15688
15688
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15689
15689
|
CaseStudyChatCard,
|
|
15690
15690
|
{
|
|
@@ -15700,7 +15700,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15700
15700
|
label: "Customer interview",
|
|
15701
15701
|
contentRefType: "customer_interview",
|
|
15702
15702
|
bareInline: true,
|
|
15703
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15703
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.CustomerInterviewCardSkeleton, { size: "sm" }),
|
|
15704
15704
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15705
15705
|
CustomerInterviewChatCard,
|
|
15706
15706
|
{
|
|
@@ -15716,9 +15716,9 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15716
15716
|
label: "Product release",
|
|
15717
15717
|
contentRefType: "product_release",
|
|
15718
15718
|
bareInline: true,
|
|
15719
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15719
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
15720
15720
|
render: (item, chatRef, opts) => {
|
|
15721
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _460 => _460.extras, 'optionalAccess', _461 => _461.buildProductReleaseCardProps]), () => (
|
|
15721
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _460 => _460.extras, 'optionalAccess', _461 => _461.buildProductReleaseCardProps]), () => ( _chunkUQEOAPAIcjs.defaultBuildProductReleaseCardProps));
|
|
15722
15722
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15723
15723
|
ProductReleaseChatCard,
|
|
15724
15724
|
{
|
|
@@ -15736,7 +15736,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15736
15736
|
label: "Investor update",
|
|
15737
15737
|
contentRefType: "investor_update",
|
|
15738
15738
|
bareInline: true,
|
|
15739
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15739
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.InvestorUpdateCardSkeleton, { size: "sm" }),
|
|
15740
15740
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15741
15741
|
InvestorUpdateChatCard,
|
|
15742
15742
|
{
|
|
@@ -15754,7 +15754,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15754
15754
|
bareInline: true,
|
|
15755
15755
|
// "Display" affordance (verbatim guide body) instead of "Ask".
|
|
15756
15756
|
displayAction: true,
|
|
15757
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15757
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUQEOAPAIcjs.OnboardingGuideCardSkeleton, { size: "sm" }),
|
|
15758
15758
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15759
15759
|
OnboardingGuideChatCard,
|
|
15760
15760
|
{
|
|
@@ -15785,7 +15785,7 @@ function ChatCardNavWrap({
|
|
|
15785
15785
|
isNewTab,
|
|
15786
15786
|
children
|
|
15787
15787
|
}) {
|
|
15788
|
-
const runtime =
|
|
15788
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
15789
15789
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
15790
15790
|
const panel = useChatPanel();
|
|
15791
15791
|
const onClickCapture = (e) => {
|
|
@@ -15810,7 +15810,7 @@ function ChatCardLoader({
|
|
|
15810
15810
|
chipBasePlatform,
|
|
15811
15811
|
extras
|
|
15812
15812
|
}) {
|
|
15813
|
-
const runtime =
|
|
15813
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
15814
15814
|
const resolvedChatRef = _react2.default.useMemo(() => {
|
|
15815
15815
|
const cta = resolveSourceRowCTA(
|
|
15816
15816
|
{
|
|
@@ -15851,13 +15851,13 @@ function ChatCardLoader({
|
|
|
15851
15851
|
}) : null;
|
|
15852
15852
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
15853
15853
|
...resolvedChatRef,
|
|
15854
|
-
url:
|
|
15854
|
+
url: _chunkUQEOAPAIcjs.safeHref.call(void 0, hrefChoice.href),
|
|
15855
15855
|
// The `item` branch carries no platform of its own — keep the ref's.
|
|
15856
15856
|
targetPlatform: _nullishCoalesce(_nullishCoalesce(hrefChoice.targetPlatform, () => ( resolvedChatRef.targetPlatform)), () => ( null))
|
|
15857
15857
|
} : resolvedChatRef;
|
|
15858
15858
|
const fetchedTitle = fetchEntry && item ? readFetchedCardTitle(item) : null;
|
|
15859
15859
|
const finalChatRef = fetchedTitle && (!hrefResolvedChatRef.title || hrefResolvedChatRef.title === hrefResolvedChatRef.id) ? { ...hrefResolvedChatRef, title: fetchedTitle } : hrefResolvedChatRef;
|
|
15860
|
-
const isNewTab =
|
|
15860
|
+
const isNewTab = _chunkUQEOAPAIcjs.computeIsNewTab.call(void 0, runtime, finalChatRef.url, _nullishCoalesce(finalChatRef.targetPlatform, () => ( null)));
|
|
15861
15861
|
const useDisplay = !!entry.displayAction && !!onDisplay;
|
|
15862
15862
|
const discussFn = useDisplay ? onDisplay : onDiscuss;
|
|
15863
15863
|
const discuss = discussFn ? {
|
|
@@ -16955,7 +16955,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16955
16955
|
try {
|
|
16956
16956
|
const url = new URL(commandsUrl, window.location.origin);
|
|
16957
16957
|
if (prefix) url.searchParams.set("q", prefix);
|
|
16958
|
-
const res = await
|
|
16958
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url.toString(), { signal, headers: {} });
|
|
16959
16959
|
if (!res.ok) return [];
|
|
16960
16960
|
const data = await res.json();
|
|
16961
16961
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
@@ -17032,7 +17032,7 @@ var EMPTY_STATE_FALLBACK = {
|
|
|
17032
17032
|
async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
17033
17033
|
try {
|
|
17034
17034
|
const url = new URL(emptyStateUrl, window.location.origin);
|
|
17035
|
-
const res = await
|
|
17035
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url.toString(), { signal, headers: {} });
|
|
17036
17036
|
if (!res.ok) {
|
|
17037
17037
|
if (res.status >= 500) {
|
|
17038
17038
|
console.error(`[chat] empty-state config fetch failed (${res.status}): ${url.pathname}`);
|
|
@@ -17142,7 +17142,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
17142
17142
|
});
|
|
17143
17143
|
}
|
|
17144
17144
|
function useChatAttachments() {
|
|
17145
|
-
const runtime =
|
|
17145
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17146
17146
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
17147
17147
|
const [attachments, setAttachments] = _react.useState.call(void 0, []);
|
|
17148
17148
|
const controllersRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
|
|
@@ -17184,7 +17184,7 @@ function useChatAttachments() {
|
|
|
17184
17184
|
);
|
|
17185
17185
|
}
|
|
17186
17186
|
updateOne(att.id, { status: "uploading", progress: 5 });
|
|
17187
|
-
const urlResp = await
|
|
17187
|
+
const urlResp = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
17188
17188
|
method: "POST",
|
|
17189
17189
|
headers: { "Content-Type": "application/json" },
|
|
17190
17190
|
signal: _optionalChain([ctrl, 'optionalAccess', _555 => _555.signal]),
|
|
@@ -17314,7 +17314,7 @@ function useChatAttachments() {
|
|
|
17314
17314
|
|
|
17315
17315
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
17316
17316
|
function useChatAttachmentImageGallery() {
|
|
17317
|
-
const runtime =
|
|
17317
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17318
17318
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
17319
17319
|
const panelRef = _react.useRef.call(void 0, null);
|
|
17320
17320
|
const [state, setState] = _react.useState.call(void 0, CLOSED);
|
|
@@ -17348,7 +17348,7 @@ function useChatAttachmentImageGallery() {
|
|
|
17348
17348
|
return () => root.removeEventListener("click", onClick);
|
|
17349
17349
|
}, [viewUrlPrefix]);
|
|
17350
17350
|
const modal = state.isOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17351
|
-
|
|
17351
|
+
_chunkUQEOAPAIcjs.ImageGalleryModal,
|
|
17352
17352
|
{
|
|
17353
17353
|
images: state.images,
|
|
17354
17354
|
isOpen: state.isOpen,
|
|
@@ -17373,9 +17373,9 @@ var ANON_DEFAULTS = {
|
|
|
17373
17373
|
user: null
|
|
17374
17374
|
};
|
|
17375
17375
|
function useResolveChatIdentity(enabled) {
|
|
17376
|
-
const runtime =
|
|
17376
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17377
17377
|
const url = runtime.endpoints.identityUrl;
|
|
17378
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([
|
|
17378
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkEHAYNUOLcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _561 => _561.email]), () => ( null));
|
|
17379
17379
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17380
17380
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17381
17381
|
const data = _optionalChain([resolved, 'optionalAccess', _562 => _562.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
@@ -17384,7 +17384,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
17384
17384
|
if (requestKey === null) return void 0;
|
|
17385
17385
|
let cancelled = false;
|
|
17386
17386
|
const ctrl = new AbortController();
|
|
17387
|
-
|
|
17387
|
+
_chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url, { signal: ctrl.signal }).then(async (resp) => {
|
|
17388
17388
|
if (!resp.ok) return ANON_DEFAULTS;
|
|
17389
17389
|
return await resp.json();
|
|
17390
17390
|
}).then((next) => {
|
|
@@ -20218,11 +20218,11 @@ function useChatStreamReducer({
|
|
|
20218
20218
|
var STORAGE_KEY = "conversation";
|
|
20219
20219
|
var namespaceFor = (source) => {
|
|
20220
20220
|
const base = `mingo-chat-${source}`;
|
|
20221
|
-
const auth =
|
|
20221
|
+
const auth = _chunkEHAYNUOLcjs.getEmbedProxyAuth.call(void 0, );
|
|
20222
20222
|
return _optionalChain([auth, 'optionalAccess', _635 => _635.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
20223
20223
|
};
|
|
20224
20224
|
function createChatConversationStorage(source) {
|
|
20225
|
-
return
|
|
20225
|
+
return _chunkEHAYNUOLcjs.createLocalStorageAdapter.call(void 0, {
|
|
20226
20226
|
key: STORAGE_KEY,
|
|
20227
20227
|
namespace: () => namespaceFor(source),
|
|
20228
20228
|
validate: (parsed) => !!parsed && typeof parsed.conversationId === "string" && parsed.conversationId.length > 0,
|
|
@@ -20251,6 +20251,60 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
20251
20251
|
}
|
|
20252
20252
|
}
|
|
20253
20253
|
|
|
20254
|
+
// src/components/chat/utils/chat-conversations-api.ts
|
|
20255
|
+
function isRecord(value) {
|
|
20256
|
+
return typeof value === "object" && value !== null;
|
|
20257
|
+
}
|
|
20258
|
+
function unwrapEnvelope(payload) {
|
|
20259
|
+
return isRecord(payload) && "data" in payload ? payload.data : payload;
|
|
20260
|
+
}
|
|
20261
|
+
function toDialogItem(row) {
|
|
20262
|
+
if (!isRecord(row)) return null;
|
|
20263
|
+
const id = typeof row.id === "string" ? row.id : "";
|
|
20264
|
+
if (!id) return null;
|
|
20265
|
+
const title = typeof row.title === "string" && row.title.length > 0 ? row.title : "Untitled chat";
|
|
20266
|
+
const ts = typeof row.timestamp === "string" ? new Date(row.timestamp) : void 0;
|
|
20267
|
+
return {
|
|
20268
|
+
id,
|
|
20269
|
+
title,
|
|
20270
|
+
...ts && !Number.isNaN(ts.getTime()) ? { timestamp: ts } : {},
|
|
20271
|
+
...typeof row.lastMessage === "string" ? { lastMessage: row.lastMessage } : {}
|
|
20272
|
+
};
|
|
20273
|
+
}
|
|
20274
|
+
async function failWith(response, fallback) {
|
|
20275
|
+
const message = await readServerErrorMessage(response);
|
|
20276
|
+
throw new Error(_nullishCoalesce(message, () => ( `${fallback}: ${response.status}`)));
|
|
20277
|
+
}
|
|
20278
|
+
function createChatConversationsApi(baseUrl) {
|
|
20279
|
+
const base = baseUrl.replace(/\/+$/, "");
|
|
20280
|
+
const patch = async (id, body, what) => {
|
|
20281
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${base}/${encodeURIComponent(id)}`, {
|
|
20282
|
+
method: "PATCH",
|
|
20283
|
+
body: JSON.stringify(body)
|
|
20284
|
+
});
|
|
20285
|
+
if (!response.ok) await failWith(response, `${what} failed`);
|
|
20286
|
+
};
|
|
20287
|
+
return {
|
|
20288
|
+
async fetchDialogs({ status, cursor, limit, search }) {
|
|
20289
|
+
const qs = new URLSearchParams();
|
|
20290
|
+
qs.set("status", status);
|
|
20291
|
+
if (limit !== void 0) qs.set("limit", String(limit));
|
|
20292
|
+
if (cursor) qs.set("cursor", cursor);
|
|
20293
|
+
if (search) qs.set("search", search);
|
|
20294
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${base}?${qs.toString()}`, { method: "GET" });
|
|
20295
|
+
if (!response.ok) await failWith(response, "Conversation list failed");
|
|
20296
|
+
const body = unwrapEnvelope(await response.json());
|
|
20297
|
+
const rawDialogs = isRecord(body) && Array.isArray(body.dialogs) ? body.dialogs : [];
|
|
20298
|
+
const dialogs = rawDialogs.map(toDialogItem).filter((d) => d !== null);
|
|
20299
|
+
const nextCursor = isRecord(body) && typeof body.nextCursor === "string" ? body.nextCursor : null;
|
|
20300
|
+
return { dialogs, nextCursor };
|
|
20301
|
+
},
|
|
20302
|
+
renameDialog: (id, title) => patch(id, { title }, "Rename"),
|
|
20303
|
+
archiveDialog: (id) => patch(id, { archived: true }, "Archive"),
|
|
20304
|
+
unarchiveDialog: (id) => patch(id, { archived: false }, "Restore")
|
|
20305
|
+
};
|
|
20306
|
+
}
|
|
20307
|
+
|
|
20254
20308
|
// src/components/chat/utils/slash-dispatch-utils.ts
|
|
20255
20309
|
var WIRE_TABLE_ID_REGEX = /^[a-z][a-z0-9-]*$/;
|
|
20256
20310
|
var WIRE_ID_REGEX = /^[A-Za-z0-9._:/-]+$/;
|
|
@@ -20333,14 +20387,14 @@ function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
|
20333
20387
|
}
|
|
20334
20388
|
|
|
20335
20389
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
20336
|
-
function
|
|
20390
|
+
function isRecord2(value) {
|
|
20337
20391
|
return typeof value === "object" && value !== null;
|
|
20338
20392
|
}
|
|
20339
20393
|
function useChatHistoryHydration({
|
|
20340
20394
|
active,
|
|
20341
20395
|
source,
|
|
20342
20396
|
historyUrl,
|
|
20343
|
-
|
|
20397
|
+
conversationId,
|
|
20344
20398
|
sendCountRef,
|
|
20345
20399
|
hydrateMessages,
|
|
20346
20400
|
bumpMetaTick
|
|
@@ -20349,7 +20403,6 @@ function useChatHistoryHydration({
|
|
|
20349
20403
|
const hydratedKeyRef = _react.useRef.call(void 0, null);
|
|
20350
20404
|
_react.useEffect.call(void 0, () => {
|
|
20351
20405
|
if (!active) return void 0;
|
|
20352
|
-
const conversationId = conversationIdRef.current;
|
|
20353
20406
|
if (!conversationId) return void 0;
|
|
20354
20407
|
const key = `${source}:${conversationId}`;
|
|
20355
20408
|
if (hydratedKeyRef.current === key) return void 0;
|
|
@@ -20358,15 +20411,15 @@ function useChatHistoryHydration({
|
|
|
20358
20411
|
setIsHydratingHistory(true);
|
|
20359
20412
|
void (async () => {
|
|
20360
20413
|
try {
|
|
20361
|
-
const res = await
|
|
20414
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${historyUrl}?conversationId=${encodeURIComponent(conversationId)}`, {
|
|
20362
20415
|
method: "GET"
|
|
20363
20416
|
});
|
|
20364
20417
|
if (!res.ok) return;
|
|
20365
20418
|
const payload = await res.json().catch(() => null);
|
|
20366
|
-
const envelope =
|
|
20419
|
+
const envelope = isRecord2(payload) ? payload.data : void 0;
|
|
20367
20420
|
const body = _nullishCoalesce(envelope, () => ( payload));
|
|
20368
|
-
const rawRows =
|
|
20369
|
-
const rows = Array.isArray(rawRows) ? rawRows.filter(
|
|
20421
|
+
const rawRows = isRecord2(body) ? body.messages : void 0;
|
|
20422
|
+
const rows = Array.isArray(rawRows) ? rawRows.filter(isRecord2) : [];
|
|
20370
20423
|
if (cancelled || rows.length === 0) return;
|
|
20371
20424
|
const hydrated = [];
|
|
20372
20425
|
const sourcesSeed = /* @__PURE__ */ new Map();
|
|
@@ -20402,10 +20455,168 @@ function useChatHistoryHydration({
|
|
|
20402
20455
|
return () => {
|
|
20403
20456
|
cancelled = true;
|
|
20404
20457
|
};
|
|
20405
|
-
}, [active, source, historyUrl, hydrateMessages, bumpMetaTick,
|
|
20458
|
+
}, [active, source, historyUrl, conversationId, hydrateMessages, bumpMetaTick, sendCountRef]);
|
|
20406
20459
|
return { isHydratingHistory, hydratedKeyRef };
|
|
20407
20460
|
}
|
|
20408
20461
|
|
|
20462
|
+
// src/components/chat/hooks/use-managed-dialog-list.ts
|
|
20463
|
+
|
|
20464
|
+
function useManagedDialogList({
|
|
20465
|
+
active,
|
|
20466
|
+
fetchDialogs,
|
|
20467
|
+
renameDialog: renameDialogCallback,
|
|
20468
|
+
archiveDialog: archiveDialogCallback,
|
|
20469
|
+
deleteDialog: deleteDialogCallback,
|
|
20470
|
+
pageSize,
|
|
20471
|
+
search,
|
|
20472
|
+
onDialogRemoved,
|
|
20473
|
+
logTag
|
|
20474
|
+
}) {
|
|
20475
|
+
const [dialogs, setDialogs] = _react.useState.call(void 0, []);
|
|
20476
|
+
const [dialogsNextCursor, setDialogsNextCursor] = _react.useState.call(void 0, null);
|
|
20477
|
+
const [isDialogsLoading, setIsDialogsLoading] = _react.useState.call(void 0, false);
|
|
20478
|
+
const [dialogsError, setDialogsError] = _react.useState.call(void 0, false);
|
|
20479
|
+
const dialogsRef = _react.useRef.call(void 0, dialogs);
|
|
20480
|
+
_react.useEffect.call(void 0, () => {
|
|
20481
|
+
dialogsRef.current = dialogs;
|
|
20482
|
+
});
|
|
20483
|
+
const onDialogRemovedRef = _react.useRef.call(void 0, onDialogRemoved);
|
|
20484
|
+
_react.useEffect.call(void 0, () => {
|
|
20485
|
+
onDialogRemovedRef.current = onDialogRemoved;
|
|
20486
|
+
});
|
|
20487
|
+
const initialDialogsLoadedRef = _react.useRef.call(void 0, false);
|
|
20488
|
+
const loadDialogsPage = _react.useCallback.call(void 0,
|
|
20489
|
+
async (cursor) => {
|
|
20490
|
+
if (!fetchDialogs) return;
|
|
20491
|
+
setIsDialogsLoading(true);
|
|
20492
|
+
if (cursor === void 0) setDialogsError(false);
|
|
20493
|
+
try {
|
|
20494
|
+
const result = await fetchDialogs({
|
|
20495
|
+
cursor,
|
|
20496
|
+
limit: pageSize,
|
|
20497
|
+
// Only hosts that run a search ever see the key.
|
|
20498
|
+
...search !== void 0 ? { search } : {}
|
|
20499
|
+
});
|
|
20500
|
+
setDialogsNextCursor(result.nextCursor);
|
|
20501
|
+
if (cursor === void 0) {
|
|
20502
|
+
setDialogs(result.dialogs);
|
|
20503
|
+
} else {
|
|
20504
|
+
setDialogs((prev) => [...prev, ...result.dialogs]);
|
|
20505
|
+
}
|
|
20506
|
+
} catch (err) {
|
|
20507
|
+
console.error(`${logTag} fetchDialogs failed:`, err);
|
|
20508
|
+
if (cursor === void 0) {
|
|
20509
|
+
setDialogsError(true);
|
|
20510
|
+
initialDialogsLoadedRef.current = false;
|
|
20511
|
+
}
|
|
20512
|
+
} finally {
|
|
20513
|
+
setIsDialogsLoading(false);
|
|
20514
|
+
}
|
|
20515
|
+
},
|
|
20516
|
+
[fetchDialogs, pageSize, search, logTag]
|
|
20517
|
+
);
|
|
20518
|
+
const reloadDialogs = _react.useCallback.call(void 0, () => {
|
|
20519
|
+
void loadDialogsPage();
|
|
20520
|
+
}, [loadDialogsPage]);
|
|
20521
|
+
const loadedSearchRef = _react.useRef.call(void 0, void 0);
|
|
20522
|
+
_react.useEffect.call(void 0, () => {
|
|
20523
|
+
if (!fetchDialogs) return;
|
|
20524
|
+
if (!active) return;
|
|
20525
|
+
if (initialDialogsLoadedRef.current && loadedSearchRef.current === search) return;
|
|
20526
|
+
initialDialogsLoadedRef.current = true;
|
|
20527
|
+
loadedSearchRef.current = search;
|
|
20528
|
+
void loadDialogsPage();
|
|
20529
|
+
}, [active, fetchDialogs, search, loadDialogsPage]);
|
|
20530
|
+
const removeLocal = _react.useCallback.call(void 0, (id) => {
|
|
20531
|
+
setDialogs((prev) => prev.filter((d) => d.id !== id));
|
|
20532
|
+
}, []);
|
|
20533
|
+
const deleteDialog = _react.useCallback.call(void 0,
|
|
20534
|
+
async (id) => {
|
|
20535
|
+
if (!deleteDialogCallback) return;
|
|
20536
|
+
try {
|
|
20537
|
+
await deleteDialogCallback(id);
|
|
20538
|
+
removeLocal(id);
|
|
20539
|
+
_optionalChain([onDialogRemovedRef, 'access', _640 => _640.current, 'optionalCall', _641 => _641(id, "deleted")]);
|
|
20540
|
+
} catch (err) {
|
|
20541
|
+
console.error(`${logTag} deleteDialog failed:`, err);
|
|
20542
|
+
}
|
|
20543
|
+
},
|
|
20544
|
+
[deleteDialogCallback, removeLocal, logTag]
|
|
20545
|
+
);
|
|
20546
|
+
const renameDialog = _react.useCallback.call(void 0,
|
|
20547
|
+
async (id, title) => {
|
|
20548
|
+
if (!renameDialogCallback) return;
|
|
20549
|
+
const previous = _optionalChain([dialogsRef, 'access', _642 => _642.current, 'access', _643 => _643.find, 'call', _644 => _644((d) => d.id === id), 'optionalAccess', _645 => _645.title]);
|
|
20550
|
+
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
20551
|
+
try {
|
|
20552
|
+
await renameDialogCallback(id, title);
|
|
20553
|
+
} catch (err) {
|
|
20554
|
+
console.error(`${logTag} renameDialog failed:`, err);
|
|
20555
|
+
if (previous !== void 0) {
|
|
20556
|
+
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title: previous } : d));
|
|
20557
|
+
}
|
|
20558
|
+
}
|
|
20559
|
+
},
|
|
20560
|
+
[renameDialogCallback, logTag]
|
|
20561
|
+
);
|
|
20562
|
+
const archiveDialog = _react.useCallback.call(void 0,
|
|
20563
|
+
async (id) => {
|
|
20564
|
+
if (!archiveDialogCallback) return;
|
|
20565
|
+
try {
|
|
20566
|
+
await archiveDialogCallback(id);
|
|
20567
|
+
removeLocal(id);
|
|
20568
|
+
_optionalChain([onDialogRemovedRef, 'access', _646 => _646.current, 'optionalCall', _647 => _647(id, "archived")]);
|
|
20569
|
+
} catch (err) {
|
|
20570
|
+
console.error(`${logTag} archiveDialog failed:`, err);
|
|
20571
|
+
}
|
|
20572
|
+
},
|
|
20573
|
+
[archiveDialogCallback, removeLocal, logTag]
|
|
20574
|
+
);
|
|
20575
|
+
const loadMoreDialogs = _react.useCallback.call(void 0, async () => {
|
|
20576
|
+
if (!dialogsNextCursor) return;
|
|
20577
|
+
await loadDialogsPage(dialogsNextCursor);
|
|
20578
|
+
}, [dialogsNextCursor, loadDialogsPage]);
|
|
20579
|
+
const upsertDialogTop = _react.useCallback.call(void 0, (item) => {
|
|
20580
|
+
setDialogs((prev) => [item, ...prev.filter((d) => d.id !== item.id)]);
|
|
20581
|
+
}, []);
|
|
20582
|
+
const patchDialog = _react.useCallback.call(void 0, (id, patch) => {
|
|
20583
|
+
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, ...patch } : d));
|
|
20584
|
+
}, []);
|
|
20585
|
+
const hasMoreDialogs = dialogsNextCursor != null;
|
|
20586
|
+
return _react.useMemo.call(void 0,
|
|
20587
|
+
() => ({
|
|
20588
|
+
dialogs,
|
|
20589
|
+
dialogsNextCursor,
|
|
20590
|
+
isDialogsLoading,
|
|
20591
|
+
dialogsError,
|
|
20592
|
+
hasMoreDialogs,
|
|
20593
|
+
loadDialogsPage,
|
|
20594
|
+
reloadDialogs,
|
|
20595
|
+
loadMoreDialogs,
|
|
20596
|
+
renameDialog,
|
|
20597
|
+
archiveDialog,
|
|
20598
|
+
deleteDialog,
|
|
20599
|
+
upsertDialogTop,
|
|
20600
|
+
patchDialog
|
|
20601
|
+
}),
|
|
20602
|
+
[
|
|
20603
|
+
dialogs,
|
|
20604
|
+
dialogsNextCursor,
|
|
20605
|
+
isDialogsLoading,
|
|
20606
|
+
dialogsError,
|
|
20607
|
+
hasMoreDialogs,
|
|
20608
|
+
loadDialogsPage,
|
|
20609
|
+
reloadDialogs,
|
|
20610
|
+
loadMoreDialogs,
|
|
20611
|
+
renameDialog,
|
|
20612
|
+
archiveDialog,
|
|
20613
|
+
deleteDialog,
|
|
20614
|
+
upsertDialogTop,
|
|
20615
|
+
patchDialog
|
|
20616
|
+
]
|
|
20617
|
+
);
|
|
20618
|
+
}
|
|
20619
|
+
|
|
20409
20620
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
20410
20621
|
var SSE_EMPTY_DIALOGS = [];
|
|
20411
20622
|
var noopSelectDialog = (_id) => {
|
|
@@ -20443,9 +20654,9 @@ function historyMessageToReducerMessage(m) {
|
|
|
20443
20654
|
}
|
|
20444
20655
|
function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
20445
20656
|
const { active = true } = runtimeOptions;
|
|
20446
|
-
const runtime =
|
|
20657
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
20447
20658
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
20448
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
20659
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _648 => _648.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
20449
20660
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
20450
20661
|
() => Promise.resolve(true)
|
|
20451
20662
|
);
|
|
@@ -20475,15 +20686,24 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20475
20686
|
dialogId: source,
|
|
20476
20687
|
createReducerOptions
|
|
20477
20688
|
});
|
|
20478
|
-
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
20479
20689
|
const conversationStorage = _react.useMemo.call(void 0, () => createChatConversationStorage(source), [source]);
|
|
20480
20690
|
const conversationIdRef = _react.useRef.call(void 0, null);
|
|
20481
20691
|
const restoredConversationRef = _react.useRef.call(void 0, false);
|
|
20482
20692
|
if (!restoredConversationRef.current) {
|
|
20483
20693
|
restoredConversationRef.current = true;
|
|
20484
20694
|
pruneStaleChatConversationStorage(source);
|
|
20485
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
20695
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _649 => _649.load, 'call', _650 => _650(), 'optionalAccess', _651 => _651.conversationId]), () => ( null));
|
|
20486
20696
|
}
|
|
20697
|
+
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
20698
|
+
const commitConversationId = _react.useCallback.call(void 0,
|
|
20699
|
+
(id) => {
|
|
20700
|
+
conversationIdRef.current = id;
|
|
20701
|
+
setConversationId(id);
|
|
20702
|
+
if (id) conversationStorage.save({ conversationId: id });
|
|
20703
|
+
else conversationStorage.clear();
|
|
20704
|
+
},
|
|
20705
|
+
[conversationStorage]
|
|
20706
|
+
);
|
|
20487
20707
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
20488
20708
|
const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
|
|
20489
20709
|
enabled: active
|
|
@@ -20535,50 +20755,110 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20535
20755
|
active,
|
|
20536
20756
|
source,
|
|
20537
20757
|
historyUrl,
|
|
20538
|
-
|
|
20758
|
+
conversationId,
|
|
20539
20759
|
sendCountRef: hydrationSendCountRef,
|
|
20540
20760
|
hydrateMessages,
|
|
20541
20761
|
// Meta invalidation is a reducer concern here: `seedSseMaps` (inside
|
|
20542
20762
|
// `hydrateMessages` above) already invalidates the snapshot.
|
|
20543
20763
|
bumpMetaTick: noopBumpMetaTick
|
|
20544
20764
|
});
|
|
20765
|
+
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
20766
|
+
const switchConversation = _react.useCallback.call(void 0,
|
|
20767
|
+
(id) => {
|
|
20768
|
+
_optionalChain([abortControllerRef, 'access', _652 => _652.current, 'optionalAccess', _653 => _653.abort, 'call', _654 => _654()]);
|
|
20769
|
+
flushDeltas();
|
|
20770
|
+
mutate((r) => r.reset());
|
|
20771
|
+
hydrationSendCountRef.current = 0;
|
|
20772
|
+
hydratedKeyRef.current = null;
|
|
20773
|
+
commitConversationId(id);
|
|
20774
|
+
},
|
|
20775
|
+
[flushDeltas, mutate, hydratedKeyRef, commitConversationId]
|
|
20776
|
+
);
|
|
20777
|
+
const conversationsUrl = runtime.endpoints.chatConversationsUrl;
|
|
20778
|
+
const conversationsApi = _react.useMemo.call(void 0,
|
|
20779
|
+
() => conversationsUrl ? createChatConversationsApi(conversationsUrl) : null,
|
|
20780
|
+
[conversationsUrl]
|
|
20781
|
+
);
|
|
20782
|
+
const [dialogSearch, setDialogSearch] = _react.useState.call(void 0, "");
|
|
20783
|
+
const fetchActiveDialogs = _react.useMemo.call(void 0,
|
|
20784
|
+
() => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "active" }) : void 0,
|
|
20785
|
+
[conversationsApi]
|
|
20786
|
+
);
|
|
20787
|
+
const fetchArchivedDialogs = _react.useMemo.call(void 0,
|
|
20788
|
+
() => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "archived" }) : void 0,
|
|
20789
|
+
[conversationsApi]
|
|
20790
|
+
);
|
|
20791
|
+
const {
|
|
20792
|
+
dialogs,
|
|
20793
|
+
isDialogsLoading,
|
|
20794
|
+
dialogsError,
|
|
20795
|
+
hasMoreDialogs,
|
|
20796
|
+
reloadDialogs,
|
|
20797
|
+
loadMoreDialogs,
|
|
20798
|
+
renameDialog,
|
|
20799
|
+
archiveDialog,
|
|
20800
|
+
upsertDialogTop,
|
|
20801
|
+
patchDialog
|
|
20802
|
+
} = useManagedDialogList({
|
|
20803
|
+
active,
|
|
20804
|
+
fetchDialogs: fetchActiveDialogs,
|
|
20805
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _655 => _655.renameDialog]),
|
|
20806
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _656 => _656.archiveDialog]),
|
|
20807
|
+
pageSize: 20,
|
|
20808
|
+
search: conversationsApi ? dialogSearch : void 0,
|
|
20809
|
+
logTag: "[useSseChatAdapter]",
|
|
20810
|
+
// Archiving the OPEN conversation drops back to the draft state (the
|
|
20811
|
+
// manager also clears the thread; both paths are idempotent).
|
|
20812
|
+
onDialogRemoved: (id) => {
|
|
20813
|
+
if (conversationIdRef.current === id) switchConversation(null);
|
|
20814
|
+
}
|
|
20815
|
+
});
|
|
20816
|
+
const unarchiveDialog = _react.useMemo.call(void 0,
|
|
20817
|
+
() => conversationsApi ? async (id) => {
|
|
20818
|
+
await conversationsApi.unarchiveDialog(id);
|
|
20819
|
+
reloadDialogs();
|
|
20820
|
+
} : void 0,
|
|
20821
|
+
[conversationsApi, reloadDialogs]
|
|
20822
|
+
);
|
|
20545
20823
|
const endpointsRef = _react.useRef.call(void 0, runtime.endpoints);
|
|
20546
20824
|
endpointsRef.current = runtime.endpoints;
|
|
20547
20825
|
const captureConversationId = _react.useCallback.call(void 0,
|
|
20548
20826
|
(event) => {
|
|
20549
|
-
if (event.type !== "metadata") return;
|
|
20827
|
+
if (event.type !== "metadata") return false;
|
|
20550
20828
|
const id = event.conversationId;
|
|
20551
|
-
if (typeof id !== "string" || !id) return;
|
|
20552
|
-
if (conversationIdRef.current === id) return;
|
|
20553
|
-
|
|
20554
|
-
|
|
20829
|
+
if (typeof id !== "string" || !id) return false;
|
|
20830
|
+
if (conversationIdRef.current === id) return false;
|
|
20831
|
+
hydratedKeyRef.current = `${source}:${id}`;
|
|
20832
|
+
commitConversationId(id);
|
|
20833
|
+
return true;
|
|
20555
20834
|
},
|
|
20556
|
-
[
|
|
20835
|
+
[commitConversationId, hydratedKeyRef, source]
|
|
20557
20836
|
);
|
|
20558
20837
|
const sendMessage = _react.useCallback.call(void 0,
|
|
20559
20838
|
// Resolves `true` on a clean turn, `false` when the request failed
|
|
20560
20839
|
// (surfaced to batch approve-all loops via the card callbacks).
|
|
20561
20840
|
async (text, sendOptions) => {
|
|
20562
20841
|
const { hidden, attachments, commandOverride, approvalAction } = _nullishCoalesce(sendOptions, () => ( {}));
|
|
20563
|
-
const
|
|
20842
|
+
const echoedConversationId = conversationIdRef.current;
|
|
20564
20843
|
const targetPath = approvalAction ? endpointsRef.current.approvalToolUrl : endpointsRef.current.chatStreamUrl;
|
|
20565
20844
|
const requestBody = approvalAction ? (
|
|
20566
20845
|
// Shared with every other transport that resolves a hub proposal —
|
|
20567
20846
|
// the body shape is the hub's, not this adapter's. `conversationId`
|
|
20568
20847
|
// is always present here: an approval can only happen inside an
|
|
20569
20848
|
// established conversation (the proposal turn captured the id).
|
|
20570
|
-
buildConfirmToolBody({ ...approvalAction, conversationId })
|
|
20849
|
+
buildConfirmToolBody({ ...approvalAction, conversationId: echoedConversationId })
|
|
20571
20850
|
) : {
|
|
20572
20851
|
messages: [{ role: "user", content: text }],
|
|
20573
20852
|
...commandOverride ? { commandOverride } : {},
|
|
20574
20853
|
...attachments && attachments.length > 0 ? { pendingAttachments: attachments } : {},
|
|
20575
|
-
...
|
|
20854
|
+
...echoedConversationId ? { conversationId: echoedConversationId } : {}
|
|
20576
20855
|
};
|
|
20577
20856
|
mutate((r) => r.beginSseSend({ text, hidden, userName: "You", assistantName: "Mingo AI" }));
|
|
20578
20857
|
const ctrl = new AbortController();
|
|
20579
20858
|
abortControllerRef.current = ctrl;
|
|
20859
|
+
let mintedThisTurn = false;
|
|
20580
20860
|
try {
|
|
20581
|
-
const response = await
|
|
20861
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, targetPath, {
|
|
20582
20862
|
method: "POST",
|
|
20583
20863
|
body: JSON.stringify(requestBody),
|
|
20584
20864
|
signal: ctrl.signal
|
|
@@ -20587,7 +20867,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20587
20867
|
const serverMessage = await readServerErrorMessage(response);
|
|
20588
20868
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
20589
20869
|
}
|
|
20590
|
-
const reader = _optionalChain([response, 'access',
|
|
20870
|
+
const reader = _optionalChain([response, 'access', _657 => _657.body, 'optionalAccess', _658 => _658.getReader, 'call', _659 => _659()]);
|
|
20591
20871
|
if (!reader) throw new Error("No response body");
|
|
20592
20872
|
const frameDecoder = createSseFrameDecoder();
|
|
20593
20873
|
let finished = false;
|
|
@@ -20597,7 +20877,16 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20597
20877
|
if (done) break;
|
|
20598
20878
|
if (ctrl.signal.aborted) break;
|
|
20599
20879
|
for (const event of frameDecoder.push(value)) {
|
|
20600
|
-
captureConversationId(event)
|
|
20880
|
+
if (captureConversationId(event)) {
|
|
20881
|
+
mintedThisTurn = true;
|
|
20882
|
+
if (conversationsApi && !hidden) {
|
|
20883
|
+
upsertDialogTop({
|
|
20884
|
+
id: _nullishCoalesce(conversationIdRef.current, () => ( "")),
|
|
20885
|
+
title: text.slice(0, 80),
|
|
20886
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
20887
|
+
});
|
|
20888
|
+
}
|
|
20889
|
+
}
|
|
20601
20890
|
applyEvent(event);
|
|
20602
20891
|
}
|
|
20603
20892
|
}
|
|
@@ -20610,7 +20899,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20610
20899
|
}
|
|
20611
20900
|
return true;
|
|
20612
20901
|
} catch (err) {
|
|
20613
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
20902
|
+
if (_optionalChain([err, 'optionalAccess', _660 => _660.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
20614
20903
|
return true;
|
|
20615
20904
|
}
|
|
20616
20905
|
flushDeltas();
|
|
@@ -20624,29 +20913,59 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20624
20913
|
}
|
|
20625
20914
|
flushDeltas();
|
|
20626
20915
|
mutate((r) => r.endSseTurn());
|
|
20916
|
+
if (conversationsApi && !ctrl.signal.aborted) {
|
|
20917
|
+
if (mintedThisTurn) reloadDialogs();
|
|
20918
|
+
else if (conversationIdRef.current) patchDialog(conversationIdRef.current, { timestamp: /* @__PURE__ */ new Date() });
|
|
20919
|
+
}
|
|
20627
20920
|
}
|
|
20628
20921
|
},
|
|
20629
|
-
[
|
|
20922
|
+
[
|
|
20923
|
+
mutate,
|
|
20924
|
+
applyEvent,
|
|
20925
|
+
flushDeltas,
|
|
20926
|
+
captureConversationId,
|
|
20927
|
+
conversationsApi,
|
|
20928
|
+
upsertDialogTop,
|
|
20929
|
+
reloadDialogs,
|
|
20930
|
+
patchDialog
|
|
20931
|
+
]
|
|
20630
20932
|
);
|
|
20631
20933
|
sendMessageRef.current = sendMessage;
|
|
20632
20934
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
20633
|
-
_optionalChain([abortControllerRef, 'access',
|
|
20935
|
+
_optionalChain([abortControllerRef, 'access', _661 => _661.current, 'optionalAccess', _662 => _662.abort, 'call', _663 => _663()]);
|
|
20634
20936
|
flushDeltas();
|
|
20635
20937
|
mutate((r) => r.setPhase("idle"));
|
|
20636
20938
|
}, [mutate, flushDeltas]);
|
|
20637
20939
|
const clearMessages = _react.useCallback.call(void 0, () => {
|
|
20638
20940
|
mutate((r) => r.reset());
|
|
20639
|
-
|
|
20640
|
-
conversationStorage.clear();
|
|
20941
|
+
commitConversationId(null);
|
|
20641
20942
|
hydrationSendCountRef.current = 0;
|
|
20642
20943
|
hydratedKeyRef.current = null;
|
|
20643
|
-
}, [mutate,
|
|
20944
|
+
}, [mutate, commitConversationId, hydratedKeyRef]);
|
|
20945
|
+
const selectDialog = _react.useCallback.call(void 0,
|
|
20946
|
+
(id) => {
|
|
20947
|
+
if (id === conversationIdRef.current) return;
|
|
20948
|
+
switchConversation(id);
|
|
20949
|
+
},
|
|
20950
|
+
[switchConversation]
|
|
20951
|
+
);
|
|
20952
|
+
const dialogCapabilities = _react.useMemo.call(void 0,
|
|
20953
|
+
() => conversationsApi ? {
|
|
20954
|
+
canRename: true,
|
|
20955
|
+
canArchive: true,
|
|
20956
|
+
fetchArchivedDialogs,
|
|
20957
|
+
unarchiveDialog,
|
|
20958
|
+
searchQuery: dialogSearch,
|
|
20959
|
+
onSearchChange: setDialogSearch
|
|
20960
|
+
} : void 0,
|
|
20961
|
+
[conversationsApi, fetchArchivedDialogs, unarchiveDialog, dialogSearch]
|
|
20962
|
+
);
|
|
20644
20963
|
const docMessages = _react.useMemo.call(void 0, () => {
|
|
20645
20964
|
const { meta, sources: sourcesMap } = state.turnMeta;
|
|
20646
20965
|
let sendIdx = -1;
|
|
20647
20966
|
return state.messages.map((m) => {
|
|
20648
20967
|
const segments = m.segments;
|
|
20649
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
20968
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _664 => _664.filter, 'call', _665 => _665((s) => s.type === "text"), 'access', _666 => _666.map, 'call', _667 => _667((s) => s.text), 'access', _668 => _668.join, 'call', _669 => _669("")]), () => ( ""));
|
|
20650
20969
|
let sources;
|
|
20651
20970
|
let scrollAnchor;
|
|
20652
20971
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -20655,7 +20974,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20655
20974
|
if (m.role === "assistant") {
|
|
20656
20975
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
20657
20976
|
sources = sourcesMap.get(lookupIdx);
|
|
20658
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
20977
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _670 => _670.get, 'call', _671 => _671(lookupIdx), 'optionalAccess', _672 => _672.scrollAnchor]), () => ( void 0));
|
|
20659
20978
|
}
|
|
20660
20979
|
return {
|
|
20661
20980
|
id: m.id,
|
|
@@ -20682,7 +21001,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20682
21001
|
);
|
|
20683
21002
|
return;
|
|
20684
21003
|
}
|
|
20685
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
21004
|
+
const refSlug = typeof _optionalChain([reference, 'access', _673 => _673.metadata, 'optionalAccess', _674 => _674.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
20686
21005
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
20687
21006
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
20688
21007
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -20728,38 +21047,58 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20728
21047
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
20729
21048
|
isHydratingHistory,
|
|
20730
21049
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
20731
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20732
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20733
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21050
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _675 => _675.provider]), () => ( null)),
|
|
21051
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _676 => _676.modelLabel]), () => ( null)),
|
|
21052
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _677 => _677.contextWindowMaxTokens]), () => ( null)),
|
|
20734
21053
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
20735
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21054
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _678 => _678.inputTokens]), () => ( null)),
|
|
20736
21055
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
20737
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21056
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _679 => _679.outputTokens]), () => ( null)),
|
|
20738
21057
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
20739
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21058
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _680 => _680.cacheHitRatePct]), () => ( null)),
|
|
20740
21059
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
20741
21060
|
* token counts). null until the trailing usage frame lands. */
|
|
20742
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20743
|
-
// ─── Dialog management
|
|
20744
|
-
//
|
|
20745
|
-
// (`
|
|
20746
|
-
//
|
|
20747
|
-
//
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
21061
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _681 => _681.breakdown]), () => ( null)),
|
|
21062
|
+
// ─── Dialog management ───────────────────────────────────────────────
|
|
21063
|
+
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
21064
|
+
// list (shared `useManagedDialogList`); selecting a row re-hydrates
|
|
21065
|
+
// through the history route. Without it (hosts that never set the
|
|
21066
|
+
// endpoint) the single-thread stubs below are returned unchanged.
|
|
21067
|
+
...conversationsApi ? {
|
|
21068
|
+
dialogs,
|
|
21069
|
+
activeDialogId: conversationId,
|
|
21070
|
+
selectDialog,
|
|
21071
|
+
// New chat = `clearMessages` (the server mints on the next send);
|
|
21072
|
+
// there is no create call.
|
|
21073
|
+
startNewDialog: noopStartNewDialog,
|
|
21074
|
+
deleteDialog: noopDeleteDialog,
|
|
21075
|
+
renameDialog,
|
|
21076
|
+
archiveDialog,
|
|
21077
|
+
isDialogsLoading,
|
|
21078
|
+
dialogsError,
|
|
21079
|
+
reloadDialogs,
|
|
21080
|
+
isMessagesLoading: isHydratingHistory,
|
|
21081
|
+
hasMoreDialogs,
|
|
21082
|
+
loadMoreDialogs,
|
|
21083
|
+
dialogsManaged: true,
|
|
21084
|
+
dialogCapabilities
|
|
21085
|
+
} : {
|
|
21086
|
+
dialogs: SSE_EMPTY_DIALOGS,
|
|
21087
|
+
activeDialogId: null,
|
|
21088
|
+
selectDialog: noopSelectDialog,
|
|
21089
|
+
startNewDialog: noopStartNewDialog,
|
|
21090
|
+
deleteDialog: noopDeleteDialog,
|
|
21091
|
+
renameDialog: noopRenameDialog,
|
|
21092
|
+
archiveDialog: noopArchiveDialog,
|
|
21093
|
+
isDialogsLoading: false,
|
|
21094
|
+
// No server-side dialog list — never errors, nothing to retry.
|
|
21095
|
+
dialogsError: false,
|
|
21096
|
+
reloadDialogs: noopReloadDialogs,
|
|
21097
|
+
isMessagesLoading: false,
|
|
21098
|
+
hasMoreDialogs: false,
|
|
21099
|
+
loadMoreDialogs: noopAsync,
|
|
21100
|
+
dialogsManaged: false
|
|
21101
|
+
},
|
|
20763
21102
|
hasMoreMessages: false,
|
|
20764
21103
|
loadMoreMessages: noopAsync,
|
|
20765
21104
|
approveRequest: noopApproveRequest,
|
|
@@ -20773,7 +21112,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20773
21112
|
|
|
20774
21113
|
|
|
20775
21114
|
// src/chat-protocol/nats-decoder.ts
|
|
20776
|
-
function
|
|
21115
|
+
function isRecord3(value) {
|
|
20777
21116
|
return typeof value === "object" && value !== null;
|
|
20778
21117
|
}
|
|
20779
21118
|
function str(value) {
|
|
@@ -20788,7 +21127,7 @@ function numOr(value, fallback = 0) {
|
|
|
20788
21127
|
}
|
|
20789
21128
|
function normalizeToolCalls(raw) {
|
|
20790
21129
|
if (!Array.isArray(raw)) return [];
|
|
20791
|
-
return raw.filter(
|
|
21130
|
+
return raw.filter(isRecord3).map((item) => ({
|
|
20792
21131
|
toolExecutionRequestId: String(_nullishCoalesce(item.toolExecutionRequestId, () => ( ""))),
|
|
20793
21132
|
toolName: String(_nullishCoalesce(item.toolName, () => ( ""))),
|
|
20794
21133
|
toolTitle: typeof item.toolTitle === "string" ? item.toolTitle : void 0,
|
|
@@ -20796,12 +21135,12 @@ function normalizeToolCalls(raw) {
|
|
|
20796
21135
|
toolType: typeof item.toolType === "string" ? item.toolType : void 0,
|
|
20797
21136
|
requiresApproval: item.requiresApproval === true,
|
|
20798
21137
|
approvalType: typeof item.approvalType === "string" ? item.approvalType : null,
|
|
20799
|
-
toolCallArguments:
|
|
21138
|
+
toolCallArguments: isRecord3(item.toolCallArguments) ? item.toolCallArguments : null
|
|
20800
21139
|
}));
|
|
20801
21140
|
}
|
|
20802
21141
|
function normalizeAskOptions(raw) {
|
|
20803
21142
|
if (!Array.isArray(raw)) return [];
|
|
20804
|
-
return raw.filter(
|
|
21143
|
+
return raw.filter(isRecord3).map((item) => ({
|
|
20805
21144
|
label: typeof item.label === "string" ? item.label.trim() : "",
|
|
20806
21145
|
description: typeof item.description === "string" ? item.description : void 0
|
|
20807
21146
|
})).filter((option) => option.label.length > 0);
|
|
@@ -20870,7 +21209,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20870
21209
|
// the EXECUTING segment held. Dropping it here therefore blanks the
|
|
20871
21210
|
// card for the whole lifetime of the run.
|
|
20872
21211
|
toolExplanation: typeof data.toolExplanation === "string" ? data.toolExplanation : void 0,
|
|
20873
|
-
parameters:
|
|
21212
|
+
parameters: isRecord3(data.parameters) ? data.parameters : void 0,
|
|
20874
21213
|
toolExecutionRequestId: typeof data.toolExecutionRequestId === "string" ? data.toolExecutionRequestId : void 0
|
|
20875
21214
|
},
|
|
20876
21215
|
...seq
|
|
@@ -20883,7 +21222,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20883
21222
|
integratedToolType: strOr(data.integratedToolType),
|
|
20884
21223
|
toolFunction: strOr(data.toolFunction),
|
|
20885
21224
|
toolTitle: typeof data.title === "string" ? data.title : void 0,
|
|
20886
|
-
parameters:
|
|
21225
|
+
parameters: isRecord3(data.parameters) ? data.parameters : void 0,
|
|
20887
21226
|
result: str(data.result),
|
|
20888
21227
|
success: typeof data.success === "boolean" ? data.success : void 0,
|
|
20889
21228
|
toolExecutionRequestId: typeof data.toolExecutionRequestId === "string" ? data.toolExecutionRequestId : void 0
|
|
@@ -20984,7 +21323,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20984
21323
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
20985
21324
|
// Wire shape carries no label; fall back to the id (parity with
|
|
20986
21325
|
// the history path in `process-historical-messages.ts`).
|
|
20987
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
21326
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _682 => _682.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _683 => _683.id]) === "string").map((it) => ({
|
|
20988
21327
|
type: it.type,
|
|
20989
21328
|
id: it.id,
|
|
20990
21329
|
label: it.id
|
|
@@ -21075,7 +21414,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21075
21414
|
}
|
|
21076
21415
|
break;
|
|
21077
21416
|
case "approval_batch": {
|
|
21078
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
21417
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _684 => _684.data, 'access', _685 => _685.executions, 'optionalAccess', _686 => _686[c.toolExecutionRequestId], 'optionalAccess', _687 => _687.status]) === "done");
|
|
21079
21418
|
if (segment.status !== "rejected" && !allDone) {
|
|
21080
21419
|
hasIncompleteState = true;
|
|
21081
21420
|
}
|
|
@@ -21137,11 +21476,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21137
21476
|
function extractIncompleteTailState(messages) {
|
|
21138
21477
|
if (!messages || messages.length === 0) return void 0;
|
|
21139
21478
|
let start = messages.length;
|
|
21140
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
21479
|
+
while (start > 0 && _optionalChain([messages, 'access', _688 => _688[start - 1], 'optionalAccess', _689 => _689.role]) === "assistant") start -= 1;
|
|
21141
21480
|
if (start === messages.length) return void 0;
|
|
21142
21481
|
const segments = [];
|
|
21143
21482
|
for (let i = start; i < messages.length; i += 1) {
|
|
21144
|
-
const content = _optionalChain([messages, 'access',
|
|
21483
|
+
const content = _optionalChain([messages, 'access', _690 => _690[i], 'optionalAccess', _691 => _691.content]);
|
|
21145
21484
|
if (Array.isArray(content)) segments.push(...content);
|
|
21146
21485
|
}
|
|
21147
21486
|
if (segments.length === 0) return void 0;
|
|
@@ -21154,15 +21493,15 @@ function extractIncompleteTailState(messages) {
|
|
|
21154
21493
|
|
|
21155
21494
|
// src/components/chat/utils/process-historical-messages.ts
|
|
21156
21495
|
function getOwnerDisplayName(owner) {
|
|
21157
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
21496
|
+
if (_optionalChain([owner, 'optionalAccess', _692 => _692.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
21158
21497
|
const { firstName, lastName } = owner.user;
|
|
21159
21498
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
21160
21499
|
if (name) return name;
|
|
21161
21500
|
}
|
|
21162
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
21501
|
+
return _optionalChain([owner, 'optionalAccess', _693 => _693.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
21163
21502
|
}
|
|
21164
21503
|
function getOwnerAvatar(owner) {
|
|
21165
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
21504
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _694 => _694.user, 'optionalAccess', _695 => _695.image, 'optionalAccess', _696 => _696.imageUrl]), () => ( void 0));
|
|
21166
21505
|
}
|
|
21167
21506
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
21168
21507
|
messageDataArray.forEach((data) => {
|
|
@@ -21346,7 +21685,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21346
21685
|
event.offerId,
|
|
21347
21686
|
event.text,
|
|
21348
21687
|
event.origin,
|
|
21349
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
21688
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _697 => _697[event.offerId]]), () => ( "pending"))
|
|
21350
21689
|
);
|
|
21351
21690
|
break;
|
|
21352
21691
|
case "ticket-escalated":
|
|
@@ -21380,7 +21719,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21380
21719
|
);
|
|
21381
21720
|
break;
|
|
21382
21721
|
case "escalation-offer-resolved":
|
|
21383
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
21722
|
+
_optionalChain([offerResolutions, 'optionalAccess', _698 => _698.set, 'call', _699 => _699(event.offerId, {
|
|
21384
21723
|
status: event.status,
|
|
21385
21724
|
resolvedByName: event.resolvedByName
|
|
21386
21725
|
})]);
|
|
@@ -21444,7 +21783,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21444
21783
|
}
|
|
21445
21784
|
}
|
|
21446
21785
|
} else {
|
|
21447
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21786
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _700 => _700.set, 'call', _701 => _701(event.requestId, {
|
|
21448
21787
|
command: event.command || "",
|
|
21449
21788
|
explanation: event.explanation,
|
|
21450
21789
|
approvalType,
|
|
@@ -21459,8 +21798,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21459
21798
|
const existingStatus = approvalStatuses[requestId];
|
|
21460
21799
|
const status = existingStatus || event.status;
|
|
21461
21800
|
const resolvedByName = event.resolvedByName;
|
|
21462
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21463
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
21801
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _702 => _702.get, 'call', _703 => _703(requestId)]);
|
|
21802
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _704 => _704.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
21464
21803
|
if (batchApprovalsEnabled) {
|
|
21465
21804
|
accumulator.addApprovalBatch(
|
|
21466
21805
|
requestId,
|
|
@@ -21482,7 +21821,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21482
21821
|
);
|
|
21483
21822
|
}
|
|
21484
21823
|
}
|
|
21485
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21824
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _705 => _705.delete, 'call', _706 => _706(requestId)]);
|
|
21486
21825
|
break;
|
|
21487
21826
|
}
|
|
21488
21827
|
if (escalatedData) {
|
|
@@ -21491,7 +21830,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21491
21830
|
explanation: escalatedData.explanation,
|
|
21492
21831
|
approvalType: escalatedData.approvalType
|
|
21493
21832
|
});
|
|
21494
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21833
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _707 => _707.delete, 'call', _708 => _708(requestId)]);
|
|
21495
21834
|
}
|
|
21496
21835
|
const before = accumulator.getSegments();
|
|
21497
21836
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -21580,14 +21919,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21580
21919
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
21581
21920
|
return;
|
|
21582
21921
|
}
|
|
21583
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
21922
|
+
const isUserMessage = _optionalChain([msg, 'access', _709 => _709.owner, 'optionalAccess', _710 => _710.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _711 => _711.owner, 'optionalAccess', _712 => _712.type]) === OWNER_TYPE.ADMIN;
|
|
21584
21923
|
if (isUserMessage) {
|
|
21585
21924
|
flushAssistantMessage();
|
|
21586
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
21925
|
+
const userAuthorType = _optionalChain([msg, 'access', _713 => _713.owner, 'optionalAccess', _714 => _714.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
21587
21926
|
messageDataArray.forEach((data) => {
|
|
21588
21927
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
21589
21928
|
const rawContext = data.contextItems;
|
|
21590
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
21929
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _715 => _715.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _716 => _716.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
21591
21930
|
processedMessages.push({
|
|
21592
21931
|
id: msg.id,
|
|
21593
21932
|
role: "user",
|
|
@@ -21630,7 +21969,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21630
21969
|
});
|
|
21631
21970
|
const nextMsg = messages[index + 1];
|
|
21632
21971
|
const isLastMessage = index === messages.length - 1;
|
|
21633
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
21972
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _717 => _717.owner, 'optionalAccess', _718 => _718.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _719 => _719.owner, 'optionalAccess', _720 => _720.type]) === OWNER_TYPE.ADMIN);
|
|
21634
21973
|
if (isLastMessage || nextIsFromUser) {
|
|
21635
21974
|
flushAssistantMessage();
|
|
21636
21975
|
}
|
|
@@ -21748,6 +22087,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21748
22087
|
deleteDialog: deleteDialogCallback,
|
|
21749
22088
|
renameDialog: renameDialogCallback,
|
|
21750
22089
|
archiveDialog: archiveDialogCallback,
|
|
22090
|
+
fetchArchivedDialogs,
|
|
22091
|
+
unarchiveDialog,
|
|
21751
22092
|
approveRequest: approveRequestCallback,
|
|
21752
22093
|
rejectRequest: rejectRequestCallback,
|
|
21753
22094
|
stopGeneration: stopGenerationCallback,
|
|
@@ -21833,11 +22174,33 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21833
22174
|
},
|
|
21834
22175
|
[applyEvent]
|
|
21835
22176
|
);
|
|
21836
|
-
const [dialogs, setDialogs] = _react.useState.call(void 0, []);
|
|
21837
|
-
const [dialogsNextCursor, setDialogsNextCursor] = _react.useState.call(void 0, null);
|
|
21838
|
-
const [isDialogsLoading, setIsDialogsLoading] = _react.useState.call(void 0, false);
|
|
21839
|
-
const [dialogsError, setDialogsError] = _react.useState.call(void 0, false);
|
|
21840
22177
|
const [isCreatingDialog, setIsCreatingDialog] = _react.useState.call(void 0, false);
|
|
22178
|
+
const {
|
|
22179
|
+
dialogs,
|
|
22180
|
+
isDialogsLoading,
|
|
22181
|
+
dialogsError,
|
|
22182
|
+
hasMoreDialogs,
|
|
22183
|
+
reloadDialogs,
|
|
22184
|
+
loadMoreDialogs,
|
|
22185
|
+
renameDialog,
|
|
22186
|
+
archiveDialog,
|
|
22187
|
+
deleteDialog,
|
|
22188
|
+
upsertDialogTop
|
|
22189
|
+
} = useManagedDialogList({
|
|
22190
|
+
active,
|
|
22191
|
+
fetchDialogs,
|
|
22192
|
+
renameDialog: renameDialogCallback,
|
|
22193
|
+
archiveDialog: archiveDialogCallback,
|
|
22194
|
+
deleteDialog: deleteDialogCallback,
|
|
22195
|
+
pageSize: dialogsPageSize,
|
|
22196
|
+
logTag: "[useNatsChatAdapter]",
|
|
22197
|
+
onDialogRemoved: (id, reason) => {
|
|
22198
|
+
if (reason === "deleted") dialogStore.remove(id);
|
|
22199
|
+
if (isManagedMode && internalDialogId === id) {
|
|
22200
|
+
setInternalDialogId(null);
|
|
22201
|
+
}
|
|
22202
|
+
}
|
|
22203
|
+
});
|
|
21841
22204
|
const [messagesNextCursor, setMessagesNextCursor] = _react.useState.call(void 0, null);
|
|
21842
22205
|
const [isMessagesLoading, setIsMessagesLoading] = _react.useState.call(void 0, false);
|
|
21843
22206
|
const [connectedForDialog, setConnectedForDialog] = _react.useState.call(void 0, null);
|
|
@@ -21987,48 +22350,9 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21987
22350
|
}
|
|
21988
22351
|
});
|
|
21989
22352
|
const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
|
|
21990
|
-
const initialDialogsLoadedRef = _react.useRef.call(void 0, false);
|
|
21991
|
-
const loadDialogsPage = _react.useCallback.call(void 0,
|
|
21992
|
-
async (cursor) => {
|
|
21993
|
-
if (!fetchDialogs) return;
|
|
21994
|
-
setIsDialogsLoading(true);
|
|
21995
|
-
if (cursor === void 0) setDialogsError(false);
|
|
21996
|
-
try {
|
|
21997
|
-
const result = await fetchDialogs({
|
|
21998
|
-
cursor,
|
|
21999
|
-
limit: dialogsPageSize
|
|
22000
|
-
});
|
|
22001
|
-
setDialogsNextCursor(result.nextCursor);
|
|
22002
|
-
if (cursor === void 0) {
|
|
22003
|
-
setDialogs(result.dialogs);
|
|
22004
|
-
} else {
|
|
22005
|
-
setDialogs((prev) => [...prev, ...result.dialogs]);
|
|
22006
|
-
}
|
|
22007
|
-
} catch (err) {
|
|
22008
|
-
console.error("[useNatsChatAdapter] fetchDialogs failed:", err);
|
|
22009
|
-
if (cursor === void 0) {
|
|
22010
|
-
setDialogsError(true);
|
|
22011
|
-
initialDialogsLoadedRef.current = false;
|
|
22012
|
-
}
|
|
22013
|
-
} finally {
|
|
22014
|
-
setIsDialogsLoading(false);
|
|
22015
|
-
}
|
|
22016
|
-
},
|
|
22017
|
-
[fetchDialogs, dialogsPageSize]
|
|
22018
|
-
);
|
|
22019
|
-
const reloadDialogs = _react.useCallback.call(void 0, () => {
|
|
22020
|
-
void loadDialogsPage();
|
|
22021
|
-
}, [loadDialogsPage]);
|
|
22022
|
-
_react.useEffect.call(void 0, () => {
|
|
22023
|
-
if (!fetchDialogs) return;
|
|
22024
|
-
if (!active) return;
|
|
22025
|
-
if (initialDialogsLoadedRef.current) return;
|
|
22026
|
-
initialDialogsLoadedRef.current = true;
|
|
22027
|
-
void loadDialogsPage();
|
|
22028
|
-
}, [active, fetchDialogs, loadDialogsPage]);
|
|
22029
22353
|
const sendMessage = _react.useCallback.call(void 0,
|
|
22030
22354
|
async (text, sendOptions) => {
|
|
22031
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
22355
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _721 => _721.hidden]), () => ( false));
|
|
22032
22356
|
mutate((r) => r.pushOptimisticSend(text, hidden));
|
|
22033
22357
|
await publishUserMessage(text, { hidden, dialogId });
|
|
22034
22358
|
},
|
|
@@ -22060,14 +22384,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22060
22384
|
try {
|
|
22061
22385
|
setIsCreatingDialog(true);
|
|
22062
22386
|
const result = await createDialogCallback();
|
|
22063
|
-
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
},
|
|
22069
|
-
...prev.filter((d) => d.id !== result.dialogId)
|
|
22070
|
-
]);
|
|
22387
|
+
upsertDialogTop({
|
|
22388
|
+
id: result.dialogId,
|
|
22389
|
+
title: "New Chat",
|
|
22390
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
22391
|
+
});
|
|
22071
22392
|
if (isManagedMode) {
|
|
22072
22393
|
setInternalDialogId(result.dialogId);
|
|
22073
22394
|
}
|
|
@@ -22078,65 +22399,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22078
22399
|
} finally {
|
|
22079
22400
|
setIsCreatingDialog(false);
|
|
22080
22401
|
}
|
|
22081
|
-
}, [createDialogCallback, isCreatingDialog, isManagedMode]);
|
|
22082
|
-
const deleteDialog = _react.useCallback.call(void 0,
|
|
22083
|
-
async (id) => {
|
|
22084
|
-
if (!deleteDialogCallback) return;
|
|
22085
|
-
try {
|
|
22086
|
-
await deleteDialogCallback(id);
|
|
22087
|
-
setDialogs((prev) => prev.filter((d) => d.id !== id));
|
|
22088
|
-
dialogStore.remove(id);
|
|
22089
|
-
if (isManagedMode && internalDialogId === id) {
|
|
22090
|
-
setInternalDialogId(null);
|
|
22091
|
-
}
|
|
22092
|
-
} catch (err) {
|
|
22093
|
-
console.error("[useNatsChatAdapter] deleteDialog failed:", err);
|
|
22094
|
-
}
|
|
22095
|
-
},
|
|
22096
|
-
[deleteDialogCallback, dialogStore, internalDialogId, isManagedMode]
|
|
22097
|
-
);
|
|
22098
|
-
const renameDialog = _react.useCallback.call(void 0,
|
|
22099
|
-
async (id, title) => {
|
|
22100
|
-
if (!renameDialogCallback) return;
|
|
22101
|
-
let previous;
|
|
22102
|
-
setDialogs(
|
|
22103
|
-
(prev) => prev.map((d) => {
|
|
22104
|
-
if (d.id !== id) return d;
|
|
22105
|
-
previous = d.title;
|
|
22106
|
-
return { ...d, title };
|
|
22107
|
-
})
|
|
22108
|
-
);
|
|
22109
|
-
try {
|
|
22110
|
-
await renameDialogCallback(id, title);
|
|
22111
|
-
} catch (err) {
|
|
22112
|
-
console.error("[useNatsChatAdapter] renameDialog failed:", err);
|
|
22113
|
-
const rollbackTitle = previous;
|
|
22114
|
-
if (rollbackTitle !== void 0) {
|
|
22115
|
-
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title: rollbackTitle } : d));
|
|
22116
|
-
}
|
|
22117
|
-
}
|
|
22118
|
-
},
|
|
22119
|
-
[renameDialogCallback]
|
|
22120
|
-
);
|
|
22121
|
-
const archiveDialog = _react.useCallback.call(void 0,
|
|
22122
|
-
async (id) => {
|
|
22123
|
-
if (!archiveDialogCallback) return;
|
|
22124
|
-
try {
|
|
22125
|
-
await archiveDialogCallback(id);
|
|
22126
|
-
setDialogs((prev) => prev.filter((d) => d.id !== id));
|
|
22127
|
-
if (isManagedMode && internalDialogId === id) {
|
|
22128
|
-
setInternalDialogId(null);
|
|
22129
|
-
}
|
|
22130
|
-
} catch (err) {
|
|
22131
|
-
console.error("[useNatsChatAdapter] archiveDialog failed:", err);
|
|
22132
|
-
}
|
|
22133
|
-
},
|
|
22134
|
-
[archiveDialogCallback, internalDialogId, isManagedMode]
|
|
22135
|
-
);
|
|
22136
|
-
const loadMoreDialogs = _react.useCallback.call(void 0, async () => {
|
|
22137
|
-
if (!dialogsNextCursor) return;
|
|
22138
|
-
await loadDialogsPage(dialogsNextCursor);
|
|
22139
|
-
}, [dialogsNextCursor, loadDialogsPage]);
|
|
22402
|
+
}, [createDialogCallback, isCreatingDialog, isManagedMode, upsertDialogTop]);
|
|
22140
22403
|
const loadMoreMessages = _react.useCallback.call(void 0, async () => {
|
|
22141
22404
|
if (!dialogId || !messagesNextCursor) return;
|
|
22142
22405
|
await loadDialogHistory(dialogId, messagesNextCursor);
|
|
@@ -22158,8 +22421,16 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22158
22421
|
);
|
|
22159
22422
|
const { messages, streamingPhase, dialogTokenUsage = null, liveModel = null } = state;
|
|
22160
22423
|
const isLoading = streamingPhase !== "idle";
|
|
22161
|
-
const hasMoreDialogs = dialogsNextCursor != null;
|
|
22162
22424
|
const hasMoreMessages = messagesNextCursor != null;
|
|
22425
|
+
const dialogCapabilities = _react.useMemo.call(void 0,
|
|
22426
|
+
() => isManagedMode ? {
|
|
22427
|
+
canRename: !!renameDialogCallback,
|
|
22428
|
+
canArchive: !!archiveDialogCallback,
|
|
22429
|
+
fetchArchivedDialogs,
|
|
22430
|
+
unarchiveDialog
|
|
22431
|
+
} : void 0,
|
|
22432
|
+
[isManagedMode, renameDialogCallback, archiveDialogCallback, fetchArchivedDialogs, unarchiveDialog]
|
|
22433
|
+
);
|
|
22163
22434
|
return _react.useMemo.call(void 0,
|
|
22164
22435
|
() => ({
|
|
22165
22436
|
messages,
|
|
@@ -22174,11 +22445,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22174
22445
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
22175
22446
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
22176
22447
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
22177
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
22178
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
22179
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
22180
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
22181
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
22448
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _722 => _722.provider]), () => ( modelProvider)), () => ( null)),
|
|
22449
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _723 => _723.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
22450
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _724 => _724.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _725 => _725.contextWindowMaxTokens]))), () => ( null)),
|
|
22451
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _726 => _726.inputTokensSize]), () => ( null)),
|
|
22452
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _727 => _727.outputTokensSize]), () => ( null)),
|
|
22182
22453
|
currentCacheHitRatePct: null,
|
|
22183
22454
|
currentUsageBreakdown: null,
|
|
22184
22455
|
// Dialog management
|
|
@@ -22197,6 +22468,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22197
22468
|
loadMoreDialogs,
|
|
22198
22469
|
hasMoreMessages,
|
|
22199
22470
|
loadMoreMessages,
|
|
22471
|
+
dialogsManaged: isManagedMode,
|
|
22472
|
+
dialogCapabilities,
|
|
22200
22473
|
// Approval mutations
|
|
22201
22474
|
approveRequest,
|
|
22202
22475
|
rejectRequest,
|
|
@@ -22229,6 +22502,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22229
22502
|
loadMoreDialogs,
|
|
22230
22503
|
hasMoreMessages,
|
|
22231
22504
|
loadMoreMessages,
|
|
22505
|
+
isManagedMode,
|
|
22506
|
+
dialogCapabilities,
|
|
22232
22507
|
approveRequest,
|
|
22233
22508
|
rejectRequest,
|
|
22234
22509
|
dialogTokenUsage,
|
|
@@ -22279,7 +22554,7 @@ function useUnifiedChat(options) {
|
|
|
22279
22554
|
[]
|
|
22280
22555
|
);
|
|
22281
22556
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
22282
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
22557
|
+
(ref) => _optionalChain([activeStateRef, 'access', _728 => _728.current, 'access', _729 => _729.displayRef, 'optionalCall', _730 => _730(ref)]),
|
|
22283
22558
|
[]
|
|
22284
22559
|
);
|
|
22285
22560
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -22289,7 +22564,7 @@ function useUnifiedChat(options) {
|
|
|
22289
22564
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
22290
22565
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
22291
22566
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
22292
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
22567
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _731 => _731.current, 'access', _732 => _732.setDialogScope, 'optionalCall', _733 => _733(scope)]), []);
|
|
22293
22568
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
22294
22569
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
22295
22570
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -22334,6 +22609,11 @@ function useUnifiedChat(options) {
|
|
|
22334
22609
|
setDialogScope,
|
|
22335
22610
|
hasMoreMessages: activeState.hasMoreMessages,
|
|
22336
22611
|
loadMoreMessages,
|
|
22612
|
+
// Adapter-owned dialog list flag + capabilities (SSE with a
|
|
22613
|
+
// conversations endpoint, NATS managed mode). Forwarded verbatim —
|
|
22614
|
+
// `EmbeddableChat` gates the history UI on them.
|
|
22615
|
+
dialogsManaged: activeState.dialogsManaged,
|
|
22616
|
+
dialogCapabilities: activeState.dialogCapabilities,
|
|
22337
22617
|
// Approvals
|
|
22338
22618
|
approveRequest,
|
|
22339
22619
|
rejectRequest,
|
|
@@ -22382,19 +22662,19 @@ function turnRequestKeys(content) {
|
|
|
22382
22662
|
if (!Array.isArray(content)) return keys;
|
|
22383
22663
|
for (const seg of content) {
|
|
22384
22664
|
if (seg.type === "tool_execution") {
|
|
22385
|
-
const id = _optionalChain([seg, 'access',
|
|
22665
|
+
const id = _optionalChain([seg, 'access', _734 => _734.data, 'optionalAccess', _735 => _735.toolExecutionRequestId]);
|
|
22386
22666
|
if (id) keys.add(id);
|
|
22387
22667
|
} else if (seg.type === "approval_request") {
|
|
22388
|
-
const id = _optionalChain([seg, 'access',
|
|
22668
|
+
const id = _optionalChain([seg, 'access', _736 => _736.data, 'optionalAccess', _737 => _737.requestId]);
|
|
22389
22669
|
if (id) keys.add(id);
|
|
22390
22670
|
} else if (seg.type === "escalation_offer") {
|
|
22391
|
-
const id = _optionalChain([seg, 'access',
|
|
22671
|
+
const id = _optionalChain([seg, 'access', _738 => _738.data, 'optionalAccess', _739 => _739.offerId]);
|
|
22392
22672
|
if (id) keys.add(id);
|
|
22393
22673
|
} else if (seg.type === "approval_batch") {
|
|
22394
22674
|
const data = seg.data;
|
|
22395
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
22396
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
22397
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
22675
|
+
if (_optionalChain([data, 'optionalAccess', _740 => _740.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
22676
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _741 => _741.toolCalls]), () => ( []))) {
|
|
22677
|
+
if (_optionalChain([call, 'optionalAccess', _742 => _742.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
22398
22678
|
}
|
|
22399
22679
|
}
|
|
22400
22680
|
}
|
|
@@ -22446,18 +22726,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22446
22726
|
}
|
|
22447
22727
|
}
|
|
22448
22728
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
22449
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
22450
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
22729
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _743 => _743.role]) === "assistant" ? trailing : null;
|
|
22730
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _744 => _744.content, 'access', _745 => _745.find, 'call', _746 => _746((s) => s.type === "approval_batch"), 'optionalAccess', _747 => _747.data, 'optionalAccess', _748 => _748.approvalRequestId]), () => ( null)) : null;
|
|
22451
22731
|
let processedToUse = processedHistory;
|
|
22452
22732
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22453
22733
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22454
22734
|
if (historyBatchId) {
|
|
22455
22735
|
const batchTwins = existingMessages.filter(
|
|
22456
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
22736
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _749 => _749.data, 'optionalAccess', _750 => _750.approvalRequestId]) === historyBatchId)
|
|
22457
22737
|
);
|
|
22458
22738
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
22459
22739
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
22460
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
22740
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _751 => _751.content])) ? historyTrailingAssistant.content.length : 0;
|
|
22461
22741
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
22462
22742
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
22463
22743
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -22499,9 +22779,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22499
22779
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
22500
22780
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
22501
22781
|
if (processedIds.has(m.id)) return false;
|
|
22502
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
22782
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _752 => _752.has, 'call', _753 => _753(m.id)])) return false;
|
|
22503
22783
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
22504
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22784
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _754 => _754.timestamp, 'optionalAccess', _755 => _755.getTime, 'call', _756 => _756()]), () => ( 0))) <= historyFetchedAt;
|
|
22505
22785
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
22506
22786
|
}
|
|
22507
22787
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -22525,7 +22805,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22525
22805
|
} else if (typeof m.streamSeq === "number") {
|
|
22526
22806
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
22527
22807
|
} else {
|
|
22528
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22808
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _757 => _757.timestamp, 'optionalAccess', _758 => _758.getTime, 'call', _759 => _759()]), () => ( 0))) <= historyFetchedAt;
|
|
22529
22809
|
}
|
|
22530
22810
|
if (covered) return false;
|
|
22531
22811
|
}
|
|
@@ -22595,7 +22875,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
22595
22875
|
function isHistoricalUserTurn(m) {
|
|
22596
22876
|
return !!m.owner;
|
|
22597
22877
|
}
|
|
22598
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
22878
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _760 => _760.type]) === "TEXT" && typeof d.text === "string";
|
|
22599
22879
|
var THINK_MS = 550;
|
|
22600
22880
|
var TOKEN_MS = 55;
|
|
22601
22881
|
var USER_MS = 480;
|
|
@@ -23215,7 +23495,7 @@ function useChatDialogManager({
|
|
|
23215
23495
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
23216
23496
|
if (restoreTarget) {
|
|
23217
23497
|
try {
|
|
23218
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
23498
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _761 => _761(restoreTarget.id)]);
|
|
23219
23499
|
} catch (err) {
|
|
23220
23500
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
23221
23501
|
return;
|
|
@@ -23381,7 +23661,7 @@ function SourceChip({
|
|
|
23381
23661
|
onClose,
|
|
23382
23662
|
onDiscuss
|
|
23383
23663
|
}) {
|
|
23384
|
-
const runtime =
|
|
23664
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
23385
23665
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
23386
23666
|
const cta = resolveSourceRowCTA(
|
|
23387
23667
|
{
|
|
@@ -23398,7 +23678,7 @@ function SourceChip({
|
|
|
23398
23678
|
const Icon = cta.icon;
|
|
23399
23679
|
const icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: "h-3.5 w-3.5" });
|
|
23400
23680
|
const chipClass = chatChipClass({ tone: "secondary" });
|
|
23401
|
-
const decideTab = (href, targetPlatform) =>
|
|
23681
|
+
const decideTab = (href, targetPlatform) => _chunkUQEOAPAIcjs.computeIsNewTab.call(void 0, runtime, href, targetPlatform);
|
|
23402
23682
|
if (src.items && src.items.length > 0) {
|
|
23403
23683
|
const dropdownItems = src.items.map((item) => {
|
|
23404
23684
|
const itemCta = resolveSourceRowCTA(
|
|
@@ -23487,7 +23767,7 @@ function SourceChip({
|
|
|
23487
23767
|
"a",
|
|
23488
23768
|
{
|
|
23489
23769
|
href: resolvedHref,
|
|
23490
|
-
...
|
|
23770
|
+
..._chunkUQEOAPAIcjs.newTabAnchorAttrs.call(void 0, isNewTab),
|
|
23491
23771
|
onClick: buildClickHandler(resolvedHref, null, _nullishCoalesce(cta.targetPlatform, () => ( null)), isNewTab),
|
|
23492
23772
|
className: chipClass,
|
|
23493
23773
|
children: chipBody(src.name)
|
|
@@ -23503,7 +23783,7 @@ function SourceChip({
|
|
|
23503
23783
|
"a",
|
|
23504
23784
|
{
|
|
23505
23785
|
href: resolvedHref,
|
|
23506
|
-
...
|
|
23786
|
+
..._chunkUQEOAPAIcjs.newTabAnchorAttrs.call(void 0, isNewTab),
|
|
23507
23787
|
onClick: buildClickHandler(resolvedHref, src.path, _nullishCoalesce(cta.targetPlatform, () => ( null)), isNewTab),
|
|
23508
23788
|
className: chipClass,
|
|
23509
23789
|
title: displayName,
|
|
@@ -23626,7 +23906,7 @@ function EmbeddableChatInner({
|
|
|
23626
23906
|
handleRef
|
|
23627
23907
|
}) {
|
|
23628
23908
|
const shellLess = shell === "none";
|
|
23629
|
-
const runtime =
|
|
23909
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
23630
23910
|
const source = _nullishCoalesce(runtime.source, () => ( ""));
|
|
23631
23911
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
23632
23912
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
@@ -23695,34 +23975,12 @@ function EmbeddableChatInner({
|
|
|
23695
23975
|
}),
|
|
23696
23976
|
[commandsUrl]
|
|
23697
23977
|
);
|
|
23698
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
23978
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _762 => _762.name, 'optionalAccess', _763 => _763.trim, 'call', _764 => _764()]) || [_optionalChain([identityUser, 'optionalAccess', _765 => _765.firstName]), _optionalChain([identityUser, 'optionalAccess', _766 => _766.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _767 => _767.trim, 'call', _768 => _768()]) || void 0;
|
|
23699
23979
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
23700
23980
|
if (modes) return modes;
|
|
23701
23981
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
23702
23982
|
return { guide: guideOptions };
|
|
23703
23983
|
}, [modes, tableIdForDocumentType]);
|
|
23704
|
-
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
23705
|
-
if (mingoState) {
|
|
23706
|
-
return {
|
|
23707
|
-
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _756 => _756.canRename]), () => ( false)),
|
|
23708
|
-
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _757 => _757.canArchive]), () => ( false)),
|
|
23709
|
-
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _758 => _758.fetchArchivedDialogs]),
|
|
23710
|
-
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _759 => _759.unarchiveDialog]),
|
|
23711
|
-
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _760 => _760.searchQuery]),
|
|
23712
|
-
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _761 => _761.onSearchChange]),
|
|
23713
|
-
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _762 => _762.onCopyLink])
|
|
23714
|
-
};
|
|
23715
|
-
}
|
|
23716
|
-
return {
|
|
23717
|
-
canRename: !!_optionalChain([effectiveModes, 'access', _763 => _763.mingo, 'optionalAccess', _764 => _764.renameDialog]),
|
|
23718
|
-
canArchive: !!_optionalChain([effectiveModes, 'access', _765 => _765.mingo, 'optionalAccess', _766 => _766.archiveDialog]),
|
|
23719
|
-
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _767 => _767.mingo, 'optionalAccess', _768 => _768.fetchArchivedDialogs]),
|
|
23720
|
-
unarchiveDialog: _optionalChain([effectiveModes, 'access', _769 => _769.mingo, 'optionalAccess', _770 => _770.unarchiveDialog]),
|
|
23721
|
-
searchQuery: void 0,
|
|
23722
|
-
onSearchChange: void 0,
|
|
23723
|
-
onCopyLink: void 0
|
|
23724
|
-
};
|
|
23725
|
-
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
23726
23984
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
23727
23985
|
const initialActiveMode = _nullishCoalesce(_nullishCoalesce(controlledActiveMode, () => ( defaultActiveMode)), () => ( (effectiveModes.guide ? "guide" : "mingo")));
|
|
23728
23986
|
const [uncontrolledActiveMode, setUncontrolledActiveMode] = _react.useState.call(void 0, initialActiveMode);
|
|
@@ -23732,7 +23990,7 @@ function EmbeddableChatInner({
|
|
|
23732
23990
|
if (controlledActiveMode === void 0) {
|
|
23733
23991
|
setUncontrolledActiveMode(next);
|
|
23734
23992
|
}
|
|
23735
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
23993
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _769 => _769(next)]);
|
|
23736
23994
|
},
|
|
23737
23995
|
[controlledActiveMode, onActiveModeChange]
|
|
23738
23996
|
);
|
|
@@ -23759,7 +24017,7 @@ function EmbeddableChatInner({
|
|
|
23759
24017
|
);
|
|
23760
24018
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
23761
24019
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
23762
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
24020
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _770 => _770.title]) === "string" ? guideWelcome.title : null)));
|
|
23763
24021
|
const {
|
|
23764
24022
|
messages: rawMessages,
|
|
23765
24023
|
isLoading: chatLoading,
|
|
@@ -23790,8 +24048,44 @@ function EmbeddableChatInner({
|
|
|
23790
24048
|
dialogScope,
|
|
23791
24049
|
setDialogScope,
|
|
23792
24050
|
hasMoreMessages,
|
|
23793
|
-
loadMoreMessages
|
|
24051
|
+
loadMoreMessages,
|
|
24052
|
+
dialogsManaged,
|
|
24053
|
+
dialogCapabilities
|
|
23794
24054
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
24055
|
+
const historyListMode = activeMode === "mingo" || dialogsManaged === true;
|
|
24056
|
+
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
24057
|
+
if (dialogCapabilities) {
|
|
24058
|
+
return {
|
|
24059
|
+
canRename: _nullishCoalesce(dialogCapabilities.canRename, () => ( false)),
|
|
24060
|
+
canArchive: _nullishCoalesce(dialogCapabilities.canArchive, () => ( false)),
|
|
24061
|
+
fetchArchivedDialogs: dialogCapabilities.fetchArchivedDialogs,
|
|
24062
|
+
unarchiveDialog: dialogCapabilities.unarchiveDialog,
|
|
24063
|
+
searchQuery: dialogCapabilities.searchQuery,
|
|
24064
|
+
onSearchChange: dialogCapabilities.onSearchChange,
|
|
24065
|
+
onCopyLink: dialogCapabilities.onCopyLink
|
|
24066
|
+
};
|
|
24067
|
+
}
|
|
24068
|
+
if (mingoState) {
|
|
24069
|
+
return {
|
|
24070
|
+
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _771 => _771.canRename]), () => ( false)),
|
|
24071
|
+
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _772 => _772.canArchive]), () => ( false)),
|
|
24072
|
+
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _773 => _773.fetchArchivedDialogs]),
|
|
24073
|
+
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _774 => _774.unarchiveDialog]),
|
|
24074
|
+
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _775 => _775.searchQuery]),
|
|
24075
|
+
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _776 => _776.onSearchChange]),
|
|
24076
|
+
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _777 => _777.onCopyLink])
|
|
24077
|
+
};
|
|
24078
|
+
}
|
|
24079
|
+
return {
|
|
24080
|
+
canRename: !!_optionalChain([effectiveModes, 'access', _778 => _778.mingo, 'optionalAccess', _779 => _779.renameDialog]),
|
|
24081
|
+
canArchive: !!_optionalChain([effectiveModes, 'access', _780 => _780.mingo, 'optionalAccess', _781 => _781.archiveDialog]),
|
|
24082
|
+
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _782 => _782.mingo, 'optionalAccess', _783 => _783.fetchArchivedDialogs]),
|
|
24083
|
+
unarchiveDialog: _optionalChain([effectiveModes, 'access', _784 => _784.mingo, 'optionalAccess', _785 => _785.unarchiveDialog]),
|
|
24084
|
+
searchQuery: void 0,
|
|
24085
|
+
onSearchChange: void 0,
|
|
24086
|
+
onCopyLink: void 0
|
|
24087
|
+
};
|
|
24088
|
+
}, [dialogCapabilities, mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
23795
24089
|
const guidePromptSentRef = _react.useRef.call(void 0, false);
|
|
23796
24090
|
_react.useEffect.call(void 0, () => {
|
|
23797
24091
|
if (!guidePendingPrompt) {
|
|
@@ -23803,7 +24097,7 @@ function EmbeddableChatInner({
|
|
|
23803
24097
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
23804
24098
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
23805
24099
|
});
|
|
23806
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
24100
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _786 => _786()]);
|
|
23807
24101
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
23808
24102
|
const {
|
|
23809
24103
|
attachments: stagedAttachments,
|
|
@@ -23814,7 +24108,7 @@ function EmbeddableChatInner({
|
|
|
23814
24108
|
clear: clearAttachments
|
|
23815
24109
|
} = useChatAttachments();
|
|
23816
24110
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
23817
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24111
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _787 => _787.maxItems]), () => ( 10));
|
|
23818
24112
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
23819
24113
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
23820
24114
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -23835,10 +24129,10 @@ function EmbeddableChatInner({
|
|
|
23835
24129
|
}, [activeDialogId, activeMode]);
|
|
23836
24130
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
23837
24131
|
const m = /* @__PURE__ */ new Map();
|
|
23838
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24132
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _788 => _788.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
23839
24133
|
return m;
|
|
23840
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
23841
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
24134
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _789 => _789.entityTypes])]);
|
|
24135
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _790 => _790.entityTypes]);
|
|
23842
24136
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
23843
24137
|
const byType = /* @__PURE__ */ new Map();
|
|
23844
24138
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -23850,7 +24144,7 @@ function EmbeddableChatInner({
|
|
|
23850
24144
|
if (mentionActiveRef.current) {
|
|
23851
24145
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
23852
24146
|
if (contextItems.length >= contextMaxItems) return;
|
|
23853
|
-
_optionalChain([chatInputRef, 'access',
|
|
24147
|
+
_optionalChain([chatInputRef, 'access', _791 => _791.current, 'optionalAccess', _792 => _792.commitMention, 'call', _793 => _793(mentionTokenOf(key, mentionMarkerByType), {
|
|
23854
24148
|
label: item.label,
|
|
23855
24149
|
icon: resolveContextIcon(item)
|
|
23856
24150
|
})]);
|
|
@@ -23873,9 +24167,9 @@ function EmbeddableChatInner({
|
|
|
23873
24167
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
23874
24168
|
if (mentionKeysRef.current.has(key)) {
|
|
23875
24169
|
mentionKeysRef.current.delete(key);
|
|
23876
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
24170
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _794 => _794.current, 'optionalAccess', _795 => _795.getValue, 'call', _796 => _796()]), () => ( ""));
|
|
23877
24171
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
23878
|
-
_optionalChain([chatInputRef, 'access',
|
|
24172
|
+
_optionalChain([chatInputRef, 'access', _797 => _797.current, 'optionalAccess', _798 => _798.setValue, 'call', _799 => _799(next)]);
|
|
23879
24173
|
}
|
|
23880
24174
|
},
|
|
23881
24175
|
[mentionMarkerByType]
|
|
@@ -23897,7 +24191,7 @@ function EmbeddableChatInner({
|
|
|
23897
24191
|
}, []);
|
|
23898
24192
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
23899
24193
|
if (mentionActiveRef.current) {
|
|
23900
|
-
_optionalChain([chatInputRef, 'access',
|
|
24194
|
+
_optionalChain([chatInputRef, 'access', _800 => _800.current, 'optionalAccess', _801 => _801.removeMentionTrigger, 'call', _802 => _802()]);
|
|
23901
24195
|
}
|
|
23902
24196
|
setContextPickerOpen(false);
|
|
23903
24197
|
setMentionQuery(null);
|
|
@@ -23931,8 +24225,8 @@ function EmbeddableChatInner({
|
|
|
23931
24225
|
[effectiveAssistantIcon]
|
|
23932
24226
|
);
|
|
23933
24227
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
23934
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
23935
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
24228
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _803 => _803.firstName]), _optionalChain([identityUser, 'optionalAccess', _804 => _804.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _805 => _805.name, 'optionalAccess', _806 => _806.trim, 'call', _807 => _807()]) || void 0 : void 0;
|
|
24229
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _808 => _808.avatarUrl, 'optionalAccess', _809 => _809.trim, 'call', _810 => _810()]) || void 0 : void 0;
|
|
23936
24230
|
const messages = _react.useMemo.call(void 0, () => {
|
|
23937
24231
|
const cache = timestampCache;
|
|
23938
24232
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -24091,7 +24385,7 @@ function EmbeddableChatInner({
|
|
|
24091
24385
|
const hasMessages = messages.length > 0;
|
|
24092
24386
|
const dialogsInitialLoading = isDialogsLoading && dialogs.length === 0;
|
|
24093
24387
|
const dialogsLoadError = dialogsError && dialogs.length === 0;
|
|
24094
|
-
const hasConversation = hasMessages || isOpeningDialog || isViewingArchived || previewMode && isMessagesLoading;
|
|
24388
|
+
const hasConversation = hasMessages || isOpeningDialog || isViewingArchived || (previewMode || activeMode === "guide" && dialogsManaged === true) && isMessagesLoading;
|
|
24095
24389
|
const messagesInitialLoading = isMessagesLoading && !hasMessages;
|
|
24096
24390
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
24097
24391
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
@@ -24121,9 +24415,9 @@ function EmbeddableChatInner({
|
|
|
24121
24415
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
24122
24416
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
24123
24417
|
if (chatLoading) return void 0;
|
|
24124
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24418
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _811 => _811.sources]);
|
|
24125
24419
|
if (!sources || sources.length === 0) return void 0;
|
|
24126
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24420
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _812 => _812.content]) || "";
|
|
24127
24421
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
|
|
24128
24422
|
const seenOrder = /* @__PURE__ */ new Map();
|
|
24129
24423
|
citationOrder.forEach((idx) => {
|
|
@@ -24141,7 +24435,7 @@ function EmbeddableChatInner({
|
|
|
24141
24435
|
const el = panelMeasureRef.current;
|
|
24142
24436
|
if (!el || typeof ResizeObserver === "undefined") return void 0;
|
|
24143
24437
|
const ro = new ResizeObserver((entries) => {
|
|
24144
|
-
const w = _optionalChain([entries, 'access',
|
|
24438
|
+
const w = _optionalChain([entries, 'access', _813 => _813[0], 'optionalAccess', _814 => _814.contentRect, 'optionalAccess', _815 => _815.width]);
|
|
24145
24439
|
if (typeof w === "number") setPanelWidth(w);
|
|
24146
24440
|
});
|
|
24147
24441
|
ro.observe(el);
|
|
@@ -24173,7 +24467,7 @@ function EmbeddableChatInner({
|
|
|
24173
24467
|
});
|
|
24174
24468
|
}, []);
|
|
24175
24469
|
const [railSearchOpen, setRailSearchOpen] = _react.useState.call(void 0, false);
|
|
24176
|
-
const splitEligible =
|
|
24470
|
+
const splitEligible = historyListMode;
|
|
24177
24471
|
const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
|
|
24178
24472
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
24179
24473
|
const splitActive = wideMingo && !railCollapsed;
|
|
@@ -24181,20 +24475,20 @@ function EmbeddableChatInner({
|
|
|
24181
24475
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
24182
24476
|
const [composeOpen, setComposeOpen] = _react.useState.call(void 0, false);
|
|
24183
24477
|
if (hasConversation && composeOpen) setComposeOpen(false);
|
|
24184
|
-
const isMingoMode =
|
|
24478
|
+
const isMingoMode = historyListMode;
|
|
24185
24479
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen;
|
|
24186
24480
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
24187
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
24481
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _816 => _816.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
|
|
24188
24482
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
24189
24483
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
24190
24484
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
24191
24485
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
24192
24486
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
24193
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
24487
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _817 => _817.onCopyLink, 'optionalCall', _818 => _818(activeDialog)]) : void 0;
|
|
24194
24488
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
24195
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
24196
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
24197
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
24489
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _819 => _819.owner]) : void 0;
|
|
24490
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _820 => _820.name, 'optionalAccess', _821 => _821.trim, 'call', _822 => _822()]) || headerUserName;
|
|
24491
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _823 => _823.avatarUrl, 'optionalAccess', _824 => _824.trim, 'call', _825 => _825()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _826 => _826.avatarUrl, 'optionalAccess', _827 => _827.trim, 'call', _828 => _828()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _829 => _829.trim, 'call', _830 => _830()]) || void 0;
|
|
24198
24492
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
24199
24493
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
24200
24494
|
resetToNewChat();
|
|
@@ -24217,7 +24511,9 @@ function EmbeddableChatInner({
|
|
|
24217
24511
|
const narrowMingoEmpty = isMingoMode && !hasConversation && !archiveOpen;
|
|
24218
24512
|
const narrowHeaderProps = narrowMingoEmpty ? composeOpen ? {
|
|
24219
24513
|
showBack: true,
|
|
24220
|
-
|
|
24514
|
+
// Guide's compose view is its own welcome (assistant name), not a
|
|
24515
|
+
// Mingo "New Chat".
|
|
24516
|
+
title: isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat",
|
|
24221
24517
|
subtitle: headerUserName,
|
|
24222
24518
|
avatar: headerAvatar,
|
|
24223
24519
|
backAriaLabel: "Back to chats",
|
|
@@ -24334,13 +24630,13 @@ function EmbeddableChatInner({
|
|
|
24334
24630
|
),
|
|
24335
24631
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 items-center gap-[var(--spacing-system-m)] px-[var(--spacing-system-mf)] py-[var(--spacing-system-sf)]", children: [
|
|
24336
24632
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
24337
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate leading-tight text-ods-text-primary text-h3", children: headerShowBack ? headerTitle : "New Chat" }),
|
|
24633
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate leading-tight text-ods-text-primary text-h3", children: headerShowBack || isGuideEmpty ? headerTitle : "New Chat" }),
|
|
24338
24634
|
headerPersonName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate leading-tight text-ods-text-secondary text-h6", children: headerPersonName })
|
|
24339
24635
|
] }),
|
|
24340
24636
|
headerAvatar ? (
|
|
24341
24637
|
// Owner avatar at the title cell's right edge (Figma 113:63273).
|
|
24342
24638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24343
|
-
|
|
24639
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
24344
24640
|
{
|
|
24345
24641
|
variant: "round",
|
|
24346
24642
|
sizePx: 32,
|
|
@@ -24524,9 +24820,9 @@ function EmbeddableChatInner({
|
|
|
24524
24820
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
24525
24821
|
subtitleLoading: emptyStateLoading,
|
|
24526
24822
|
...guideWelcome,
|
|
24527
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24528
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24529
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
24823
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _831 => _831.title]))),
|
|
24824
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _832 => _832.icon]))),
|
|
24825
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _833 => _833.quickActions]), () => ( guideSuggestedActions)),
|
|
24530
24826
|
onQuickAction: (action) => {
|
|
24531
24827
|
setQuickActionPreview(null);
|
|
24532
24828
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -24600,8 +24896,8 @@ function EmbeddableChatInner({
|
|
|
24600
24896
|
selectedContextItems: contextItems,
|
|
24601
24897
|
onToggleContextItem: toggleContextItem,
|
|
24602
24898
|
onRemoveContextItem: removeContextItem,
|
|
24603
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
24604
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
24899
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _834 => _834.items]),
|
|
24900
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _835 => _835.onRemove]),
|
|
24605
24901
|
contextPickerOpen,
|
|
24606
24902
|
onOpenContextPicker: openContextPicker,
|
|
24607
24903
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -25062,5 +25358,7 @@ function EmbeddableChatInner({
|
|
|
25062
25358
|
|
|
25063
25359
|
|
|
25064
25360
|
|
|
25065
|
-
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
25066
|
-
|
|
25361
|
+
|
|
25362
|
+
|
|
25363
|
+
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
25364
|
+
//# sourceMappingURL=chunk-B6ZJV7L4.cjs.map
|