@flamingo-stack/openframe-frontend-core 0.0.598 → 0.0.599-2039.5717.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-protocol/index.cjs +8 -1
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.d.ts +1 -0
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +7 -2
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/wire-narrow.d.ts +17 -0
- package/dist/chat-protocol/wire-narrow.d.ts.map +1 -0
- package/dist/{chunk-BK6CCQG6.js → chunk-2R6F56U5.js} +12 -12
- 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-QIKBISZM.cjs → chunk-4ZAQSPCQ.cjs} +242 -242
- package/dist/{chunk-QIKBISZM.cjs.map → chunk-4ZAQSPCQ.cjs.map} +1 -1
- package/dist/{chunk-JVZVVZOZ.cjs → chunk-5DORSDXA.cjs} +9 -9
- package/dist/{chunk-JVZVVZOZ.cjs.map → chunk-5DORSDXA.cjs.map} +1 -1
- package/dist/{chunk-YWBAIFI2.cjs → chunk-6D4DUONA.cjs} +105 -105
- package/dist/{chunk-YWBAIFI2.cjs.map → chunk-6D4DUONA.cjs.map} +1 -1
- package/dist/{chunk-KHOZ52NR.js → chunk-7654NDQB.js} +6 -6
- package/dist/{chunk-DI3SVVY5.cjs → chunk-AC5SWE3S.cjs} +85 -85
- package/dist/{chunk-DI3SVVY5.cjs.map → chunk-AC5SWE3S.cjs.map} +1 -1
- package/dist/{chunk-R4UV366K.js → chunk-AJU3NYAA.js} +6 -6
- package/dist/{chunk-GHYFVT52.js → chunk-B23ID4DM.js} +5 -5
- package/dist/{chunk-SE3PVN64.js → chunk-B6HSRLC5.js} +2 -2
- package/dist/{chunk-EVMHJB6X.js → chunk-BLUL2TE3.js} +4 -4
- package/dist/{chunk-GGQZBSFN.js → chunk-BVQEU5JB.js} +2 -2
- package/dist/{chunk-75YW6ET4.js → chunk-C4APMQWW.js} +4 -4
- 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-WPN545FW.js → chunk-CVYVYSP2.js} +12 -12
- 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-VIRTMRS4.js → chunk-EZOI5UR3.js} +7 -7
- package/dist/{chunk-WZJOILPU.js → chunk-F2KBCLUG.js} +2 -2
- package/dist/{chunk-MYBXCWEI.js → chunk-FKBM6U43.js} +2 -2
- package/dist/{chunk-2SYX2Z7R.cjs → chunk-GIG3WQTF.cjs} +34 -34
- package/dist/{chunk-2SYX2Z7R.cjs.map → chunk-GIG3WQTF.cjs.map} +1 -1
- package/dist/{chunk-LRQCKSZC.js → chunk-IW746HJ7.js} +2 -2
- package/dist/{chunk-YBPFIXV4.cjs → chunk-IYEKAU4X.cjs} +801 -482
- package/dist/chunk-IYEKAU4X.cjs.map +1 -0
- package/dist/{chunk-VLJTJAHJ.cjs → chunk-J3ODLFCA.cjs} +25 -25
- package/dist/{chunk-VLJTJAHJ.cjs.map → chunk-J3ODLFCA.cjs.map} +1 -1
- package/dist/{chunk-UE7OFLLS.cjs → chunk-J4RRF2EP.cjs} +14 -14
- package/dist/{chunk-UE7OFLLS.cjs.map → chunk-J4RRF2EP.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-UG7JNQZY.cjs → chunk-JKFWKPHW.cjs} +37 -37
- package/dist/{chunk-UG7JNQZY.cjs.map → chunk-JKFWKPHW.cjs.map} +1 -1
- package/dist/{chunk-3WSS7C2V.cjs → chunk-KAHI4QWA.cjs} +15 -15
- package/dist/{chunk-3WSS7C2V.cjs.map → chunk-KAHI4QWA.cjs.map} +1 -1
- package/dist/{chunk-VNSRNVPD.js → chunk-KJ5EQ6P6.js} +728 -409
- package/dist/chunk-KJ5EQ6P6.js.map +1 -0
- package/dist/{chunk-V2QK5W3O.cjs → chunk-L64FTMML.cjs} +3 -3
- package/dist/{chunk-V2QK5W3O.cjs.map → chunk-L64FTMML.cjs.map} +1 -1
- package/dist/{chunk-P24VPJTT.cjs → chunk-LT6GIGMZ.cjs} +15 -15
- package/dist/{chunk-P24VPJTT.cjs.map → chunk-LT6GIGMZ.cjs.map} +1 -1
- package/dist/{chunk-WDWCQD75.js → chunk-LVVDTK5X.js} +9 -9
- package/dist/{chunk-HWAYIK4U.cjs → chunk-MSPYY2F4.cjs} +22 -22
- package/dist/{chunk-HWAYIK4U.cjs.map → chunk-MSPYY2F4.cjs.map} +1 -1
- package/dist/{chunk-QD64Q4I2.cjs → chunk-N7LOLURS.cjs} +9 -9
- package/dist/{chunk-QD64Q4I2.cjs.map → chunk-N7LOLURS.cjs.map} +1 -1
- package/dist/{chunk-TZPVRWPU.js → chunk-O33JVUR5.js} +5 -5
- package/dist/{chunk-HLPAVYK7.js → chunk-ODPN724R.js} +4 -4
- package/dist/{chunk-NIAMPMKV.js → chunk-OQNKAF4F.js} +4 -4
- 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-BPVHDDNY.cjs → chunk-R2VBMBPJ.cjs} +8 -8
- package/dist/{chunk-BPVHDDNY.cjs.map → chunk-R2VBMBPJ.cjs.map} +1 -1
- package/dist/{chunk-UAAXUFK6.js → chunk-RU3IKVY2.js} +3 -3
- package/dist/{chunk-EZM5DNII.js → chunk-S6WBBSII.js} +3 -3
- package/dist/{chunk-2JNCZDJR.js → chunk-TSCIVH7T.js} +2 -2
- package/dist/{chunk-PX4IPM7Q.js → chunk-TYY6HOTI.js} +3 -3
- 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-PTK3CINU.js → chunk-VELZVF3F.js} +5 -5
- 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-RYXIRVDC.js → chunk-YB6FI2G3.js} +1 -1
- package/dist/chunk-YB6FI2G3.js.map +1 -0
- package/dist/{chunk-DAPOBLAK.cjs → chunk-YEO6W4CT.cjs} +39 -39
- package/dist/{chunk-DAPOBLAK.cjs.map → chunk-YEO6W4CT.cjs.map} +1 -1
- package/dist/{chunk-XNPAVMPB.js → chunk-YUELNVD5.js} +5 -5
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +8 -8
- package/dist/components/chat/embeddable-chat.d.ts +10 -19
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- 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 +13 -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 +53 -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 +12 -1
- package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +11 -5
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +10 -4
- package/dist/components/chat/types/unified-chat-state.types.d.ts +86 -6
- 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 +72 -66
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +28 -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 +14 -8
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +13 -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 +18 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/index.ts +1 -0
- package/src/chat-protocol/nats-decoder.ts +1 -5
- package/src/chat-protocol/wire-narrow.ts +22 -0
- package/src/components/chat/.embeddable-chat.md +4 -2
- package/src/components/chat/embeddable-chat.tsx +131 -87
- package/src/components/chat/hooks/.index.md +1 -1
- package/src/components/chat/hooks/.use-managed-dialog-list.md +31 -0
- package/src/components/chat/hooks/.use-nats-chat-adapter.md +3 -1
- package/src/components/chat/hooks/.use-sse-chat-adapter.md +8 -1
- package/src/components/chat/hooks/.use-unified-chat.md +2 -2
- package/src/components/chat/hooks/__tests__/managed-dialog-list.test.ts +280 -0
- package/src/components/chat/hooks/__tests__/nats-adapter-managed-dialogs.test.ts +193 -0
- package/src/components/chat/hooks/__tests__/sse-managed-dialogs.test.ts +310 -0
- package/src/components/chat/hooks/__tests__/unified-chat-dialog-capabilities.test.ts +129 -0
- package/src/components/chat/hooks/index.ts +2 -0
- package/src/components/chat/hooks/use-chat-history-hydration.ts +67 -24
- package/src/components/chat/hooks/use-managed-dialog-list.ts +339 -0
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +64 -150
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +238 -59
- package/src/components/chat/hooks/use-unified-chat.ts +26 -2
- package/src/components/chat/types/.unified-chat-state.types.md +13 -1
- package/src/components/chat/types/unified-chat-state.types.ts +93 -6
- package/src/components/chat/utils/.chat-conversations-api.md +16 -0
- package/src/components/chat/utils/.index.md +1 -1
- package/src/components/chat/utils/__tests__/chat-conversations-api-golden.test.ts +105 -0
- package/src/components/chat/utils/chat-conversations-api.ts +83 -0
- package/src/components/chat/utils/index.ts +7 -0
- package/src/contexts/.chat-runtime-context.md +3 -1
- 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-YBPFIXV4.cjs.map +0 -1
- /package/dist/{chunk-BK6CCQG6.js.map → chunk-2R6F56U5.js.map} +0 -0
- /package/dist/{chunk-KHOZ52NR.js.map → chunk-7654NDQB.js.map} +0 -0
- /package/dist/{chunk-R4UV366K.js.map → chunk-AJU3NYAA.js.map} +0 -0
- /package/dist/{chunk-GHYFVT52.js.map → chunk-B23ID4DM.js.map} +0 -0
- /package/dist/{chunk-SE3PVN64.js.map → chunk-B6HSRLC5.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-75YW6ET4.js.map → chunk-C4APMQWW.js.map} +0 -0
- /package/dist/{chunk-WPN545FW.js.map → chunk-CVYVYSP2.js.map} +0 -0
- /package/dist/{chunk-VIRTMRS4.js.map → chunk-EZOI5UR3.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-LRQCKSZC.js.map → chunk-IW746HJ7.js.map} +0 -0
- /package/dist/{chunk-WDWCQD75.js.map → chunk-LVVDTK5X.js.map} +0 -0
- /package/dist/{chunk-TZPVRWPU.js.map → chunk-O33JVUR5.js.map} +0 -0
- /package/dist/{chunk-HLPAVYK7.js.map → chunk-ODPN724R.js.map} +0 -0
- /package/dist/{chunk-NIAMPMKV.js.map → chunk-OQNKAF4F.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-2JNCZDJR.js.map → chunk-TSCIVH7T.js.map} +0 -0
- /package/dist/{chunk-PX4IPM7Q.js.map → chunk-TYY6HOTI.js.map} +0 -0
- /package/dist/{chunk-PTK3CINU.js.map → chunk-VELZVF3F.js.map} +0 -0
- /package/dist/{chunk-XNPAVMPB.js.map → chunk-YUELNVD5.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 ? {
|
|
@@ -16030,6 +16030,9 @@ var NETWORK_CONFIG = {
|
|
|
16030
16030
|
RETRY_BACKOFF_MULTIPLIER: 2
|
|
16031
16031
|
};
|
|
16032
16032
|
|
|
16033
|
+
// src/components/chat/types/unified-chat-state.types.ts
|
|
16034
|
+
var EMPTY_DIALOG_CAPABILITIES = Object.freeze({});
|
|
16035
|
+
|
|
16033
16036
|
// src/components/chat/hooks/use-chunk-catchup.ts
|
|
16034
16037
|
|
|
16035
16038
|
function makeSeqKey(messageType, chunkType, sequenceId) {
|
|
@@ -16955,7 +16958,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16955
16958
|
try {
|
|
16956
16959
|
const url = new URL(commandsUrl, window.location.origin);
|
|
16957
16960
|
if (prefix) url.searchParams.set("q", prefix);
|
|
16958
|
-
const res = await
|
|
16961
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url.toString(), { signal, headers: {} });
|
|
16959
16962
|
if (!res.ok) return [];
|
|
16960
16963
|
const data = await res.json();
|
|
16961
16964
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
@@ -17032,7 +17035,7 @@ var EMPTY_STATE_FALLBACK = {
|
|
|
17032
17035
|
async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
17033
17036
|
try {
|
|
17034
17037
|
const url = new URL(emptyStateUrl, window.location.origin);
|
|
17035
|
-
const res = await
|
|
17038
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url.toString(), { signal, headers: {} });
|
|
17036
17039
|
if (!res.ok) {
|
|
17037
17040
|
if (res.status >= 500) {
|
|
17038
17041
|
console.error(`[chat] empty-state config fetch failed (${res.status}): ${url.pathname}`);
|
|
@@ -17142,7 +17145,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
17142
17145
|
});
|
|
17143
17146
|
}
|
|
17144
17147
|
function useChatAttachments() {
|
|
17145
|
-
const runtime =
|
|
17148
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17146
17149
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
17147
17150
|
const [attachments, setAttachments] = _react.useState.call(void 0, []);
|
|
17148
17151
|
const controllersRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
|
|
@@ -17184,7 +17187,7 @@ function useChatAttachments() {
|
|
|
17184
17187
|
);
|
|
17185
17188
|
}
|
|
17186
17189
|
updateOne(att.id, { status: "uploading", progress: 5 });
|
|
17187
|
-
const urlResp = await
|
|
17190
|
+
const urlResp = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
17188
17191
|
method: "POST",
|
|
17189
17192
|
headers: { "Content-Type": "application/json" },
|
|
17190
17193
|
signal: _optionalChain([ctrl, 'optionalAccess', _555 => _555.signal]),
|
|
@@ -17314,7 +17317,7 @@ function useChatAttachments() {
|
|
|
17314
17317
|
|
|
17315
17318
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
17316
17319
|
function useChatAttachmentImageGallery() {
|
|
17317
|
-
const runtime =
|
|
17320
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17318
17321
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
17319
17322
|
const panelRef = _react.useRef.call(void 0, null);
|
|
17320
17323
|
const [state, setState] = _react.useState.call(void 0, CLOSED);
|
|
@@ -17348,7 +17351,7 @@ function useChatAttachmentImageGallery() {
|
|
|
17348
17351
|
return () => root.removeEventListener("click", onClick);
|
|
17349
17352
|
}, [viewUrlPrefix]);
|
|
17350
17353
|
const modal = state.isOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17351
|
-
|
|
17354
|
+
_chunkUQEOAPAIcjs.ImageGalleryModal,
|
|
17352
17355
|
{
|
|
17353
17356
|
images: state.images,
|
|
17354
17357
|
isOpen: state.isOpen,
|
|
@@ -17373,9 +17376,9 @@ var ANON_DEFAULTS = {
|
|
|
17373
17376
|
user: null
|
|
17374
17377
|
};
|
|
17375
17378
|
function useResolveChatIdentity(enabled) {
|
|
17376
|
-
const runtime =
|
|
17379
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
17377
17380
|
const url = runtime.endpoints.identityUrl;
|
|
17378
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([
|
|
17381
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkEHAYNUOLcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _561 => _561.email]), () => ( null));
|
|
17379
17382
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17380
17383
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17381
17384
|
const data = _optionalChain([resolved, 'optionalAccess', _562 => _562.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
@@ -17384,7 +17387,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
17384
17387
|
if (requestKey === null) return void 0;
|
|
17385
17388
|
let cancelled = false;
|
|
17386
17389
|
const ctrl = new AbortController();
|
|
17387
|
-
|
|
17390
|
+
_chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, url, { signal: ctrl.signal }).then(async (resp) => {
|
|
17388
17391
|
if (!resp.ok) return ANON_DEFAULTS;
|
|
17389
17392
|
return await resp.json();
|
|
17390
17393
|
}).then((next) => {
|
|
@@ -20218,11 +20221,11 @@ function useChatStreamReducer({
|
|
|
20218
20221
|
var STORAGE_KEY = "conversation";
|
|
20219
20222
|
var namespaceFor = (source) => {
|
|
20220
20223
|
const base = `mingo-chat-${source}`;
|
|
20221
|
-
const auth =
|
|
20224
|
+
const auth = _chunkEHAYNUOLcjs.getEmbedProxyAuth.call(void 0, );
|
|
20222
20225
|
return _optionalChain([auth, 'optionalAccess', _635 => _635.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
20223
20226
|
};
|
|
20224
20227
|
function createChatConversationStorage(source) {
|
|
20225
|
-
return
|
|
20228
|
+
return _chunkEHAYNUOLcjs.createLocalStorageAdapter.call(void 0, {
|
|
20226
20229
|
key: STORAGE_KEY,
|
|
20227
20230
|
namespace: () => namespaceFor(source),
|
|
20228
20231
|
validate: (parsed) => !!parsed && typeof parsed.conversationId === "string" && parsed.conversationId.length > 0,
|
|
@@ -20251,6 +20254,62 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
20251
20254
|
}
|
|
20252
20255
|
}
|
|
20253
20256
|
|
|
20257
|
+
// src/chat-protocol/wire-narrow.ts
|
|
20258
|
+
function isRecord(value) {
|
|
20259
|
+
return typeof value === "object" && value !== null;
|
|
20260
|
+
}
|
|
20261
|
+
function unwrapEnvelope(payload) {
|
|
20262
|
+
return isRecord(payload) && "data" in payload ? payload.data : payload;
|
|
20263
|
+
}
|
|
20264
|
+
|
|
20265
|
+
// src/components/chat/utils/chat-conversations-api.ts
|
|
20266
|
+
function toDialogItem(row) {
|
|
20267
|
+
if (!isRecord(row)) return null;
|
|
20268
|
+
const id = typeof row.id === "string" ? row.id : "";
|
|
20269
|
+
if (!id) return null;
|
|
20270
|
+
const title = typeof row.title === "string" && row.title.length > 0 ? row.title : "Untitled chat";
|
|
20271
|
+
const ts = typeof row.timestamp === "string" ? new Date(row.timestamp) : void 0;
|
|
20272
|
+
return {
|
|
20273
|
+
id,
|
|
20274
|
+
title,
|
|
20275
|
+
...ts && !Number.isNaN(ts.getTime()) ? { timestamp: ts } : {},
|
|
20276
|
+
...typeof row.lastMessage === "string" ? { lastMessage: row.lastMessage } : {}
|
|
20277
|
+
};
|
|
20278
|
+
}
|
|
20279
|
+
async function failWith(response, fallback) {
|
|
20280
|
+
const message = await readServerErrorMessage(response);
|
|
20281
|
+
throw new Error(_nullishCoalesce(message, () => ( `${fallback}: ${response.status}`)));
|
|
20282
|
+
}
|
|
20283
|
+
function createChatConversationsApi(baseUrl) {
|
|
20284
|
+
const base = baseUrl.replace(/\/+$/, "");
|
|
20285
|
+
const patch = async (id, body, what) => {
|
|
20286
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${base}/${encodeURIComponent(id)}`, {
|
|
20287
|
+
method: "PATCH",
|
|
20288
|
+
body: JSON.stringify(body)
|
|
20289
|
+
});
|
|
20290
|
+
if (!response.ok) await failWith(response, `${what} failed`);
|
|
20291
|
+
};
|
|
20292
|
+
return {
|
|
20293
|
+
async fetchDialogs({ status, cursor, limit, search }) {
|
|
20294
|
+
const qs = new URLSearchParams();
|
|
20295
|
+
qs.set("status", status);
|
|
20296
|
+
if (limit !== void 0) qs.set("limit", String(limit));
|
|
20297
|
+
if (cursor) qs.set("cursor", cursor);
|
|
20298
|
+
if (search) qs.set("search", search);
|
|
20299
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${base}?${qs.toString()}`, { method: "GET" });
|
|
20300
|
+
if (!response.ok) await failWith(response, "Conversation list failed");
|
|
20301
|
+
const body = unwrapEnvelope(await response.json());
|
|
20302
|
+
const rawDialogs = isRecord(body) && Array.isArray(body.dialogs) ? body.dialogs : [];
|
|
20303
|
+
const dialogs = rawDialogs.map(toDialogItem).filter((d) => d !== null);
|
|
20304
|
+
const nextCursor = isRecord(body) && typeof body.nextCursor === "string" ? body.nextCursor : null;
|
|
20305
|
+
return { dialogs, nextCursor };
|
|
20306
|
+
},
|
|
20307
|
+
renameDialog: (id, title) => patch(id, { title }, "Rename"),
|
|
20308
|
+
archiveDialog: (id) => patch(id, { archived: true }, "Archive"),
|
|
20309
|
+
unarchiveDialog: (id) => patch(id, { archived: false }, "Restore")
|
|
20310
|
+
};
|
|
20311
|
+
}
|
|
20312
|
+
|
|
20254
20313
|
// src/components/chat/utils/slash-dispatch-utils.ts
|
|
20255
20314
|
var WIRE_TABLE_ID_REGEX = /^[a-z][a-z0-9-]*$/;
|
|
20256
20315
|
var WIRE_ID_REGEX = /^[A-Za-z0-9._:/-]+$/;
|
|
@@ -20333,41 +20392,48 @@ function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
|
20333
20392
|
}
|
|
20334
20393
|
|
|
20335
20394
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
20336
|
-
function isRecord(value) {
|
|
20337
|
-
return typeof value === "object" && value !== null;
|
|
20338
|
-
}
|
|
20339
20395
|
function useChatHistoryHydration({
|
|
20340
20396
|
active,
|
|
20341
20397
|
source,
|
|
20342
20398
|
historyUrl,
|
|
20343
|
-
|
|
20399
|
+
conversationId,
|
|
20344
20400
|
sendCountRef,
|
|
20345
20401
|
hydrateMessages,
|
|
20346
|
-
bumpMetaTick
|
|
20402
|
+
bumpMetaTick,
|
|
20403
|
+
onOrphanedConversation
|
|
20347
20404
|
}) {
|
|
20348
20405
|
const [isHydratingHistory, setIsHydratingHistory] = _react.useState.call(void 0, false);
|
|
20349
20406
|
const hydratedKeyRef = _react.useRef.call(void 0, null);
|
|
20407
|
+
const runIdRef = _react.useRef.call(void 0, 0);
|
|
20350
20408
|
_react.useEffect.call(void 0, () => {
|
|
20351
|
-
if (!active) return
|
|
20352
|
-
const conversationId = conversationIdRef.current;
|
|
20353
|
-
if (!conversationId) return void 0;
|
|
20409
|
+
if (!active || !conversationId) return () => setIsHydratingHistory(false);
|
|
20354
20410
|
const key = `${source}:${conversationId}`;
|
|
20355
|
-
if (hydratedKeyRef.current === key) return
|
|
20411
|
+
if (hydratedKeyRef.current === key) return () => setIsHydratingHistory(false);
|
|
20356
20412
|
hydratedKeyRef.current = key;
|
|
20357
20413
|
let cancelled = false;
|
|
20414
|
+
let completed = false;
|
|
20415
|
+
const runId = ++runIdRef.current;
|
|
20416
|
+
const isCurrentRun = () => runIdRef.current === runId;
|
|
20358
20417
|
setIsHydratingHistory(true);
|
|
20359
20418
|
void (async () => {
|
|
20360
20419
|
try {
|
|
20361
|
-
const res = await
|
|
20420
|
+
const res = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, `${historyUrl}?conversationId=${encodeURIComponent(conversationId)}`, {
|
|
20362
20421
|
method: "GET"
|
|
20363
20422
|
});
|
|
20364
|
-
if (!res.ok)
|
|
20423
|
+
if (!res.ok) {
|
|
20424
|
+
if (isCurrentRun() && hydratedKeyRef.current === key) hydratedKeyRef.current = null;
|
|
20425
|
+
return;
|
|
20426
|
+
}
|
|
20365
20427
|
const payload = await res.json().catch(() => null);
|
|
20366
|
-
const
|
|
20367
|
-
const body = _nullishCoalesce(envelope, () => ( payload));
|
|
20428
|
+
const body = unwrapEnvelope(payload);
|
|
20368
20429
|
const rawRows = isRecord(body) ? body.messages : void 0;
|
|
20369
20430
|
const rows = Array.isArray(rawRows) ? rawRows.filter(isRecord) : [];
|
|
20370
|
-
if (cancelled
|
|
20431
|
+
if (cancelled) return;
|
|
20432
|
+
if (rows.length === 0) {
|
|
20433
|
+
const found = isRecord(body) ? body.found : void 0;
|
|
20434
|
+
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _640 => _640(conversationId)]);
|
|
20435
|
+
return;
|
|
20436
|
+
}
|
|
20371
20437
|
const hydrated = [];
|
|
20372
20438
|
const sourcesSeed = /* @__PURE__ */ new Map();
|
|
20373
20439
|
let userTurns = 0;
|
|
@@ -20395,32 +20461,218 @@ function useChatHistoryHydration({
|
|
|
20395
20461
|
hydrateMessages(hydrated, Array.from(sourcesSeed.entries()));
|
|
20396
20462
|
bumpMetaTick();
|
|
20397
20463
|
} catch (e63) {
|
|
20464
|
+
if (isCurrentRun() && hydratedKeyRef.current === key) hydratedKeyRef.current = null;
|
|
20398
20465
|
} finally {
|
|
20399
|
-
|
|
20466
|
+
completed = true;
|
|
20467
|
+
if (isCurrentRun()) setIsHydratingHistory(false);
|
|
20400
20468
|
}
|
|
20401
20469
|
})();
|
|
20402
20470
|
return () => {
|
|
20403
20471
|
cancelled = true;
|
|
20472
|
+
if (!completed && isCurrentRun() && hydratedKeyRef.current === key) hydratedKeyRef.current = null;
|
|
20473
|
+
if (isCurrentRun()) setIsHydratingHistory(false);
|
|
20404
20474
|
};
|
|
20405
|
-
}, [active, source, historyUrl, hydrateMessages, bumpMetaTick,
|
|
20475
|
+
}, [active, source, historyUrl, conversationId, hydrateMessages, bumpMetaTick, onOrphanedConversation, sendCountRef]);
|
|
20406
20476
|
return { isHydratingHistory, hydratedKeyRef };
|
|
20407
20477
|
}
|
|
20408
20478
|
|
|
20479
|
+
// src/components/chat/hooks/use-managed-dialog-list.ts
|
|
20480
|
+
|
|
20481
|
+
function useManagedDialogList({
|
|
20482
|
+
autoLoad,
|
|
20483
|
+
fetchDialogs,
|
|
20484
|
+
renameDialog: renameDialogCallback,
|
|
20485
|
+
archiveDialog: archiveDialogCallback,
|
|
20486
|
+
deleteDialog: deleteDialogCallback,
|
|
20487
|
+
pageSize,
|
|
20488
|
+
search,
|
|
20489
|
+
onDialogRemoved,
|
|
20490
|
+
logTag
|
|
20491
|
+
}) {
|
|
20492
|
+
const [dialogs, setDialogs] = _react.useState.call(void 0, []);
|
|
20493
|
+
const [dialogsNextCursor, setDialogsNextCursor] = _react.useState.call(void 0, null);
|
|
20494
|
+
const [isDialogsLoading, setIsDialogsLoading] = _react.useState.call(void 0, false);
|
|
20495
|
+
const [settledSearch, setSettledSearch] = _react.useState.call(void 0,
|
|
20496
|
+
autoLoad && fetchDialogs ? void 0 : null
|
|
20497
|
+
);
|
|
20498
|
+
const [autoLoadWas, setAutoLoadWas] = _react.useState.call(void 0, autoLoad);
|
|
20499
|
+
if (autoLoad !== autoLoadWas) {
|
|
20500
|
+
setAutoLoadWas(autoLoad);
|
|
20501
|
+
if (autoLoad && fetchDialogs) setSettledSearch(void 0);
|
|
20502
|
+
}
|
|
20503
|
+
const pendingRef = _react.useRef.call(void 0, false);
|
|
20504
|
+
const [dialogsError, setDialogsError] = _react.useState.call(void 0, false);
|
|
20505
|
+
const dialogsRef = _react.useRef.call(void 0, dialogs);
|
|
20506
|
+
_react.useEffect.call(void 0, () => {
|
|
20507
|
+
dialogsRef.current = dialogs;
|
|
20508
|
+
});
|
|
20509
|
+
const onDialogRemovedRef = _react.useRef.call(void 0, onDialogRemoved);
|
|
20510
|
+
_react.useEffect.call(void 0, () => {
|
|
20511
|
+
onDialogRemovedRef.current = onDialogRemoved;
|
|
20512
|
+
});
|
|
20513
|
+
const initialDialogsLoadedRef = _react.useRef.call(void 0, false);
|
|
20514
|
+
const requestIdRef = _react.useRef.call(void 0, 0);
|
|
20515
|
+
const loadDialogsPage = _react.useCallback.call(void 0,
|
|
20516
|
+
async (cursor) => {
|
|
20517
|
+
if (!fetchDialogs) return;
|
|
20518
|
+
const requestId = ++requestIdRef.current;
|
|
20519
|
+
const isCurrent = () => requestIdRef.current === requestId;
|
|
20520
|
+
pendingRef.current = true;
|
|
20521
|
+
setIsDialogsLoading(true);
|
|
20522
|
+
if (cursor === void 0) setDialogsError(false);
|
|
20523
|
+
try {
|
|
20524
|
+
const result = await fetchDialogs({
|
|
20525
|
+
cursor,
|
|
20526
|
+
limit: pageSize,
|
|
20527
|
+
// Only hosts that run a search ever see the key.
|
|
20528
|
+
...search !== void 0 ? { search } : {}
|
|
20529
|
+
});
|
|
20530
|
+
if (!isCurrent()) return;
|
|
20531
|
+
setDialogsNextCursor(result.nextCursor);
|
|
20532
|
+
if (cursor === void 0) {
|
|
20533
|
+
setDialogs(result.dialogs);
|
|
20534
|
+
} else {
|
|
20535
|
+
setDialogs((prev) => {
|
|
20536
|
+
const seen = new Set(prev.map((d) => d.id));
|
|
20537
|
+
return [...prev, ...result.dialogs.filter((d) => !seen.has(d.id))];
|
|
20538
|
+
});
|
|
20539
|
+
}
|
|
20540
|
+
} catch (err) {
|
|
20541
|
+
if (!isCurrent()) return;
|
|
20542
|
+
console.error(`${logTag} fetchDialogs failed:`, err);
|
|
20543
|
+
if (cursor === void 0) {
|
|
20544
|
+
setDialogsError(true);
|
|
20545
|
+
initialDialogsLoadedRef.current = false;
|
|
20546
|
+
}
|
|
20547
|
+
} finally {
|
|
20548
|
+
if (isCurrent()) {
|
|
20549
|
+
pendingRef.current = false;
|
|
20550
|
+
if (cursor === void 0) setSettledSearch(_nullishCoalesce(search, () => ( null)));
|
|
20551
|
+
setIsDialogsLoading(false);
|
|
20552
|
+
}
|
|
20553
|
+
}
|
|
20554
|
+
},
|
|
20555
|
+
[fetchDialogs, pageSize, search, logTag]
|
|
20556
|
+
);
|
|
20557
|
+
const reloadDialogs = _react.useCallback.call(void 0, () => {
|
|
20558
|
+
void loadDialogsPage();
|
|
20559
|
+
}, [loadDialogsPage]);
|
|
20560
|
+
const loadedSearchRef = _react.useRef.call(void 0, void 0);
|
|
20561
|
+
_react.useEffect.call(void 0, () => {
|
|
20562
|
+
if (!fetchDialogs) return;
|
|
20563
|
+
if (!autoLoad) return;
|
|
20564
|
+
if (initialDialogsLoadedRef.current && loadedSearchRef.current === search) return;
|
|
20565
|
+
initialDialogsLoadedRef.current = true;
|
|
20566
|
+
loadedSearchRef.current = search;
|
|
20567
|
+
void loadDialogsPage();
|
|
20568
|
+
}, [autoLoad, fetchDialogs, search, loadDialogsPage]);
|
|
20569
|
+
const removeLocal = _react.useCallback.call(void 0, (id) => {
|
|
20570
|
+
setDialogs((prev) => prev.filter((d) => d.id !== id));
|
|
20571
|
+
}, []);
|
|
20572
|
+
const deleteDialog = _react.useCallback.call(void 0,
|
|
20573
|
+
async (id) => {
|
|
20574
|
+
if (!deleteDialogCallback) return;
|
|
20575
|
+
try {
|
|
20576
|
+
await deleteDialogCallback(id);
|
|
20577
|
+
removeLocal(id);
|
|
20578
|
+
_optionalChain([onDialogRemovedRef, 'access', _641 => _641.current, 'optionalCall', _642 => _642(id, "deleted")]);
|
|
20579
|
+
} catch (err) {
|
|
20580
|
+
console.error(`${logTag} deleteDialog failed:`, err);
|
|
20581
|
+
throw err;
|
|
20582
|
+
}
|
|
20583
|
+
},
|
|
20584
|
+
[deleteDialogCallback, removeLocal, logTag]
|
|
20585
|
+
);
|
|
20586
|
+
const renameDialog = _react.useCallback.call(void 0,
|
|
20587
|
+
async (id, title) => {
|
|
20588
|
+
if (!renameDialogCallback) return;
|
|
20589
|
+
const previous = _optionalChain([dialogsRef, 'access', _643 => _643.current, 'access', _644 => _644.find, 'call', _645 => _645((d) => d.id === id), 'optionalAccess', _646 => _646.title]);
|
|
20590
|
+
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
20591
|
+
try {
|
|
20592
|
+
await renameDialogCallback(id, title);
|
|
20593
|
+
} catch (err) {
|
|
20594
|
+
console.error(`${logTag} renameDialog failed:`, err);
|
|
20595
|
+
if (previous !== void 0) {
|
|
20596
|
+
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title: previous } : d));
|
|
20597
|
+
}
|
|
20598
|
+
}
|
|
20599
|
+
},
|
|
20600
|
+
[renameDialogCallback, logTag]
|
|
20601
|
+
);
|
|
20602
|
+
const archiveDialog = _react.useCallback.call(void 0,
|
|
20603
|
+
async (id) => {
|
|
20604
|
+
if (!archiveDialogCallback) return;
|
|
20605
|
+
try {
|
|
20606
|
+
await archiveDialogCallback(id);
|
|
20607
|
+
removeLocal(id);
|
|
20608
|
+
_optionalChain([onDialogRemovedRef, 'access', _647 => _647.current, 'optionalCall', _648 => _648(id, "archived")]);
|
|
20609
|
+
} catch (err) {
|
|
20610
|
+
console.error(`${logTag} archiveDialog failed:`, err);
|
|
20611
|
+
throw err;
|
|
20612
|
+
}
|
|
20613
|
+
},
|
|
20614
|
+
[archiveDialogCallback, removeLocal, logTag]
|
|
20615
|
+
);
|
|
20616
|
+
const loadMoreDialogs = _react.useCallback.call(void 0, async () => {
|
|
20617
|
+
if (!dialogsNextCursor) return;
|
|
20618
|
+
if (pendingRef.current) return;
|
|
20619
|
+
await loadDialogsPage(dialogsNextCursor);
|
|
20620
|
+
}, [dialogsNextCursor, loadDialogsPage]);
|
|
20621
|
+
const upsertDialogTop = _react.useCallback.call(void 0, (item) => {
|
|
20622
|
+
setDialogs((prev) => [item, ...prev.filter((d) => d.id !== item.id)]);
|
|
20623
|
+
}, []);
|
|
20624
|
+
const bumpDialogToTop = _react.useCallback.call(void 0, (id) => {
|
|
20625
|
+
setDialogs((prev) => {
|
|
20626
|
+
const row = prev.find((d) => d.id === id);
|
|
20627
|
+
if (!row) return prev;
|
|
20628
|
+
return [{ ...row, timestamp: /* @__PURE__ */ new Date() }, ...prev.filter((d) => d.id !== id)];
|
|
20629
|
+
});
|
|
20630
|
+
}, []);
|
|
20631
|
+
const hasMoreDialogs = dialogsNextCursor != null;
|
|
20632
|
+
const awaitingFirstPage = !!fetchDialogs && settledSearch !== (_nullishCoalesce(search, () => ( null)));
|
|
20633
|
+
const dialogsLoading = isDialogsLoading || awaitingFirstPage;
|
|
20634
|
+
return _react.useMemo.call(void 0,
|
|
20635
|
+
() => ({
|
|
20636
|
+
dialogs,
|
|
20637
|
+
dialogsNextCursor,
|
|
20638
|
+
isDialogsLoading: dialogsLoading,
|
|
20639
|
+
dialogsError,
|
|
20640
|
+
hasMoreDialogs,
|
|
20641
|
+
loadDialogsPage,
|
|
20642
|
+
reloadDialogs,
|
|
20643
|
+
loadMoreDialogs,
|
|
20644
|
+
renameDialog,
|
|
20645
|
+
archiveDialog,
|
|
20646
|
+
deleteDialog,
|
|
20647
|
+
upsertDialogTop,
|
|
20648
|
+
bumpDialogToTop
|
|
20649
|
+
}),
|
|
20650
|
+
[
|
|
20651
|
+
dialogs,
|
|
20652
|
+
dialogsNextCursor,
|
|
20653
|
+
dialogsLoading,
|
|
20654
|
+
dialogsError,
|
|
20655
|
+
hasMoreDialogs,
|
|
20656
|
+
loadDialogsPage,
|
|
20657
|
+
reloadDialogs,
|
|
20658
|
+
loadMoreDialogs,
|
|
20659
|
+
renameDialog,
|
|
20660
|
+
archiveDialog,
|
|
20661
|
+
deleteDialog,
|
|
20662
|
+
upsertDialogTop,
|
|
20663
|
+
bumpDialogToTop
|
|
20664
|
+
]
|
|
20665
|
+
);
|
|
20666
|
+
}
|
|
20667
|
+
|
|
20409
20668
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
20410
|
-
var SSE_EMPTY_DIALOGS = [];
|
|
20411
20669
|
var noopSelectDialog = (_id) => {
|
|
20412
20670
|
};
|
|
20413
20671
|
var noopStartNewDialog = () => Promise.resolve(null);
|
|
20414
20672
|
var noopDeleteDialog = async (_id) => {
|
|
20415
20673
|
};
|
|
20416
|
-
var noopRenameDialog = async (_id, _title) => {
|
|
20417
|
-
};
|
|
20418
|
-
var noopArchiveDialog = async (_id) => {
|
|
20419
|
-
};
|
|
20420
20674
|
var noopAsync = async () => {
|
|
20421
20675
|
};
|
|
20422
|
-
var noopReloadDialogs = () => {
|
|
20423
|
-
};
|
|
20424
20676
|
var noopApproveRequest = async (_id) => {
|
|
20425
20677
|
};
|
|
20426
20678
|
var noopRejectRequest = async (_id, _reason) => {
|
|
@@ -20443,9 +20695,9 @@ function historyMessageToReducerMessage(m) {
|
|
|
20443
20695
|
}
|
|
20444
20696
|
function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
20445
20697
|
const { active = true } = runtimeOptions;
|
|
20446
|
-
const runtime =
|
|
20698
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
20447
20699
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
20448
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
20700
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _649 => _649.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
20449
20701
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
20450
20702
|
() => Promise.resolve(true)
|
|
20451
20703
|
);
|
|
@@ -20475,15 +20727,24 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20475
20727
|
dialogId: source,
|
|
20476
20728
|
createReducerOptions
|
|
20477
20729
|
});
|
|
20478
|
-
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
20479
20730
|
const conversationStorage = _react.useMemo.call(void 0, () => createChatConversationStorage(source), [source]);
|
|
20480
20731
|
const conversationIdRef = _react.useRef.call(void 0, null);
|
|
20481
20732
|
const restoredConversationRef = _react.useRef.call(void 0, false);
|
|
20482
20733
|
if (!restoredConversationRef.current) {
|
|
20483
20734
|
restoredConversationRef.current = true;
|
|
20484
20735
|
pruneStaleChatConversationStorage(source);
|
|
20485
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
20736
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _650 => _650.load, 'call', _651 => _651(), 'optionalAccess', _652 => _652.conversationId]), () => ( null));
|
|
20486
20737
|
}
|
|
20738
|
+
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
20739
|
+
const commitConversationId = _react.useCallback.call(void 0,
|
|
20740
|
+
(id) => {
|
|
20741
|
+
conversationIdRef.current = id;
|
|
20742
|
+
setConversationId(id);
|
|
20743
|
+
if (id) conversationStorage.save({ conversationId: id });
|
|
20744
|
+
else conversationStorage.clear();
|
|
20745
|
+
},
|
|
20746
|
+
[conversationStorage]
|
|
20747
|
+
);
|
|
20487
20748
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
20488
20749
|
const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
|
|
20489
20750
|
enabled: active
|
|
@@ -20531,54 +20792,132 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20531
20792
|
},
|
|
20532
20793
|
[mutate]
|
|
20533
20794
|
);
|
|
20795
|
+
const messagesLenRef = _react.useRef.call(void 0, 0);
|
|
20796
|
+
messagesLenRef.current = state.messages.length;
|
|
20797
|
+
const onOrphanedConversation = _react.useCallback.call(void 0,
|
|
20798
|
+
(id) => {
|
|
20799
|
+
if (conversationIdRef.current === id && messagesLenRef.current === 0) commitConversationId(null);
|
|
20800
|
+
},
|
|
20801
|
+
[commitConversationId]
|
|
20802
|
+
);
|
|
20534
20803
|
const { isHydratingHistory, hydratedKeyRef } = useChatHistoryHydration({
|
|
20535
20804
|
active,
|
|
20536
20805
|
source,
|
|
20537
20806
|
historyUrl,
|
|
20538
|
-
|
|
20807
|
+
conversationId,
|
|
20539
20808
|
sendCountRef: hydrationSendCountRef,
|
|
20540
20809
|
hydrateMessages,
|
|
20541
20810
|
// Meta invalidation is a reducer concern here: `seedSseMaps` (inside
|
|
20542
20811
|
// `hydrateMessages` above) already invalidates the snapshot.
|
|
20543
|
-
bumpMetaTick: noopBumpMetaTick
|
|
20812
|
+
bumpMetaTick: noopBumpMetaTick,
|
|
20813
|
+
// Drop a stored id the server no longer recognizes (deleted, or claimed by
|
|
20814
|
+
// an account while this browser is signed out) — keeping it would stream
|
|
20815
|
+
// answers the server refuses to persist. Guarded on "no live turn yet" so
|
|
20816
|
+
// a just-minted id is never dropped.
|
|
20817
|
+
//
|
|
20818
|
+
// IDENTITY-STABLE by construction: this is a dependency of the hydration
|
|
20819
|
+
// effect, so a callback that changed with the message count would CANCEL
|
|
20820
|
+
// an in-flight hydration the moment the user typed — silently discarding
|
|
20821
|
+
// the thread they just opened. The live count is read through a ref.
|
|
20822
|
+
onOrphanedConversation
|
|
20544
20823
|
});
|
|
20824
|
+
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
20825
|
+
const switchConversation = _react.useCallback.call(void 0,
|
|
20826
|
+
(id) => {
|
|
20827
|
+
_optionalChain([abortControllerRef, 'access', _653 => _653.current, 'optionalAccess', _654 => _654.abort, 'call', _655 => _655()]);
|
|
20828
|
+
flushDeltas();
|
|
20829
|
+
mutate((r) => r.reset());
|
|
20830
|
+
hydrationSendCountRef.current = 0;
|
|
20831
|
+
hydratedKeyRef.current = null;
|
|
20832
|
+
commitConversationId(id);
|
|
20833
|
+
},
|
|
20834
|
+
[flushDeltas, mutate, hydratedKeyRef, commitConversationId]
|
|
20835
|
+
);
|
|
20836
|
+
const conversationsUrl = runtime.endpoints.chatConversationsUrl;
|
|
20837
|
+
const conversationsApi = _react.useMemo.call(void 0,
|
|
20838
|
+
() => conversationsUrl ? createChatConversationsApi(conversationsUrl) : null,
|
|
20839
|
+
[conversationsUrl]
|
|
20840
|
+
);
|
|
20841
|
+
const [dialogSearch, setDialogSearch] = _react.useState.call(void 0, "");
|
|
20842
|
+
const fetchActiveDialogs = _react.useMemo.call(void 0,
|
|
20843
|
+
() => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "active" }) : void 0,
|
|
20844
|
+
[conversationsApi]
|
|
20845
|
+
);
|
|
20846
|
+
const fetchArchivedDialogs = _react.useMemo.call(void 0,
|
|
20847
|
+
() => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "archived" }) : void 0,
|
|
20848
|
+
[conversationsApi]
|
|
20849
|
+
);
|
|
20850
|
+
const {
|
|
20851
|
+
dialogs,
|
|
20852
|
+
isDialogsLoading,
|
|
20853
|
+
dialogsError,
|
|
20854
|
+
hasMoreDialogs,
|
|
20855
|
+
reloadDialogs,
|
|
20856
|
+
loadMoreDialogs,
|
|
20857
|
+
renameDialog,
|
|
20858
|
+
archiveDialog,
|
|
20859
|
+
upsertDialogTop,
|
|
20860
|
+
bumpDialogToTop
|
|
20861
|
+
} = useManagedDialogList({
|
|
20862
|
+
autoLoad: active,
|
|
20863
|
+
fetchDialogs: fetchActiveDialogs,
|
|
20864
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _656 => _656.renameDialog]),
|
|
20865
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _657 => _657.archiveDialog]),
|
|
20866
|
+
pageSize: 20,
|
|
20867
|
+
search: conversationsApi ? dialogSearch : void 0,
|
|
20868
|
+
logTag: "[useSseChatAdapter]",
|
|
20869
|
+
// Archiving the OPEN conversation drops back to the draft state (the
|
|
20870
|
+
// manager also clears the thread; both paths are idempotent).
|
|
20871
|
+
onDialogRemoved: (id) => {
|
|
20872
|
+
if (conversationIdRef.current === id) switchConversation(null);
|
|
20873
|
+
}
|
|
20874
|
+
});
|
|
20875
|
+
const unarchiveDialog = _react.useMemo.call(void 0,
|
|
20876
|
+
() => conversationsApi ? async (id) => {
|
|
20877
|
+
await conversationsApi.unarchiveDialog(id);
|
|
20878
|
+
reloadDialogs();
|
|
20879
|
+
} : void 0,
|
|
20880
|
+
[conversationsApi, reloadDialogs]
|
|
20881
|
+
);
|
|
20545
20882
|
const endpointsRef = _react.useRef.call(void 0, runtime.endpoints);
|
|
20546
20883
|
endpointsRef.current = runtime.endpoints;
|
|
20547
20884
|
const captureConversationId = _react.useCallback.call(void 0,
|
|
20548
20885
|
(event) => {
|
|
20549
|
-
if (event.type !== "metadata") return;
|
|
20886
|
+
if (event.type !== "metadata") return false;
|
|
20550
20887
|
const id = event.conversationId;
|
|
20551
|
-
if (typeof id !== "string" || !id) return;
|
|
20552
|
-
if (conversationIdRef.current === id) return;
|
|
20553
|
-
|
|
20554
|
-
|
|
20888
|
+
if (typeof id !== "string" || !id) return false;
|
|
20889
|
+
if (conversationIdRef.current === id) return false;
|
|
20890
|
+
hydratedKeyRef.current = `${source}:${id}`;
|
|
20891
|
+
commitConversationId(id);
|
|
20892
|
+
return true;
|
|
20555
20893
|
},
|
|
20556
|
-
[
|
|
20894
|
+
[commitConversationId, hydratedKeyRef, source]
|
|
20557
20895
|
);
|
|
20558
20896
|
const sendMessage = _react.useCallback.call(void 0,
|
|
20559
20897
|
// Resolves `true` on a clean turn, `false` when the request failed
|
|
20560
20898
|
// (surfaced to batch approve-all loops via the card callbacks).
|
|
20561
20899
|
async (text, sendOptions) => {
|
|
20562
20900
|
const { hidden, attachments, commandOverride, approvalAction } = _nullishCoalesce(sendOptions, () => ( {}));
|
|
20563
|
-
const
|
|
20901
|
+
const echoedConversationId = conversationIdRef.current;
|
|
20564
20902
|
const targetPath = approvalAction ? endpointsRef.current.approvalToolUrl : endpointsRef.current.chatStreamUrl;
|
|
20565
20903
|
const requestBody = approvalAction ? (
|
|
20566
20904
|
// Shared with every other transport that resolves a hub proposal —
|
|
20567
20905
|
// the body shape is the hub's, not this adapter's. `conversationId`
|
|
20568
20906
|
// is always present here: an approval can only happen inside an
|
|
20569
20907
|
// established conversation (the proposal turn captured the id).
|
|
20570
|
-
buildConfirmToolBody({ ...approvalAction, conversationId })
|
|
20908
|
+
buildConfirmToolBody({ ...approvalAction, conversationId: echoedConversationId })
|
|
20571
20909
|
) : {
|
|
20572
20910
|
messages: [{ role: "user", content: text }],
|
|
20573
20911
|
...commandOverride ? { commandOverride } : {},
|
|
20574
20912
|
...attachments && attachments.length > 0 ? { pendingAttachments: attachments } : {},
|
|
20575
|
-
...
|
|
20913
|
+
...echoedConversationId ? { conversationId: echoedConversationId } : {}
|
|
20576
20914
|
};
|
|
20577
20915
|
mutate((r) => r.beginSseSend({ text, hidden, userName: "You", assistantName: "Mingo AI" }));
|
|
20578
20916
|
const ctrl = new AbortController();
|
|
20579
20917
|
abortControllerRef.current = ctrl;
|
|
20918
|
+
let mintedThisTurn = false;
|
|
20580
20919
|
try {
|
|
20581
|
-
const response = await
|
|
20920
|
+
const response = await _chunkEHAYNUOLcjs.embedAuthedFetch.call(void 0, targetPath, {
|
|
20582
20921
|
method: "POST",
|
|
20583
20922
|
body: JSON.stringify(requestBody),
|
|
20584
20923
|
signal: ctrl.signal
|
|
@@ -20587,7 +20926,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20587
20926
|
const serverMessage = await readServerErrorMessage(response);
|
|
20588
20927
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
20589
20928
|
}
|
|
20590
|
-
const reader = _optionalChain([response, 'access',
|
|
20929
|
+
const reader = _optionalChain([response, 'access', _658 => _658.body, 'optionalAccess', _659 => _659.getReader, 'call', _660 => _660()]);
|
|
20591
20930
|
if (!reader) throw new Error("No response body");
|
|
20592
20931
|
const frameDecoder = createSseFrameDecoder();
|
|
20593
20932
|
let finished = false;
|
|
@@ -20597,7 +20936,13 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20597
20936
|
if (done) break;
|
|
20598
20937
|
if (ctrl.signal.aborted) break;
|
|
20599
20938
|
for (const event of frameDecoder.push(value)) {
|
|
20600
|
-
captureConversationId(event)
|
|
20939
|
+
if (captureConversationId(event)) {
|
|
20940
|
+
mintedThisTurn = true;
|
|
20941
|
+
const mintedId = conversationIdRef.current;
|
|
20942
|
+
if (conversationsApi && !hidden && mintedId) {
|
|
20943
|
+
upsertDialogTop({ id: mintedId, title: "New chat", timestamp: /* @__PURE__ */ new Date() });
|
|
20944
|
+
}
|
|
20945
|
+
}
|
|
20601
20946
|
applyEvent(event);
|
|
20602
20947
|
}
|
|
20603
20948
|
}
|
|
@@ -20610,7 +20955,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20610
20955
|
}
|
|
20611
20956
|
return true;
|
|
20612
20957
|
} catch (err) {
|
|
20613
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
20958
|
+
if (_optionalChain([err, 'optionalAccess', _661 => _661.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
20614
20959
|
return true;
|
|
20615
20960
|
}
|
|
20616
20961
|
flushDeltas();
|
|
@@ -20624,29 +20969,65 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20624
20969
|
}
|
|
20625
20970
|
flushDeltas();
|
|
20626
20971
|
mutate((r) => r.endSseTurn());
|
|
20972
|
+
if (conversationsApi && !ctrl.signal.aborted) {
|
|
20973
|
+
if (mintedThisTurn) {
|
|
20974
|
+
reloadDialogs();
|
|
20975
|
+
} else if (conversationIdRef.current) {
|
|
20976
|
+
bumpDialogToTop(conversationIdRef.current);
|
|
20977
|
+
}
|
|
20978
|
+
}
|
|
20627
20979
|
}
|
|
20628
20980
|
},
|
|
20629
|
-
[
|
|
20981
|
+
[
|
|
20982
|
+
mutate,
|
|
20983
|
+
applyEvent,
|
|
20984
|
+
flushDeltas,
|
|
20985
|
+
captureConversationId,
|
|
20986
|
+
conversationsApi,
|
|
20987
|
+
upsertDialogTop,
|
|
20988
|
+
reloadDialogs,
|
|
20989
|
+
bumpDialogToTop
|
|
20990
|
+
]
|
|
20630
20991
|
);
|
|
20631
20992
|
sendMessageRef.current = sendMessage;
|
|
20632
20993
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
20633
|
-
_optionalChain([abortControllerRef, 'access',
|
|
20994
|
+
_optionalChain([abortControllerRef, 'access', _662 => _662.current, 'optionalAccess', _663 => _663.abort, 'call', _664 => _664()]);
|
|
20634
20995
|
flushDeltas();
|
|
20635
20996
|
mutate((r) => r.setPhase("idle"));
|
|
20636
20997
|
}, [mutate, flushDeltas]);
|
|
20637
20998
|
const clearMessages = _react.useCallback.call(void 0, () => {
|
|
20638
20999
|
mutate((r) => r.reset());
|
|
20639
|
-
|
|
20640
|
-
conversationStorage.clear();
|
|
21000
|
+
commitConversationId(null);
|
|
20641
21001
|
hydrationSendCountRef.current = 0;
|
|
20642
21002
|
hydratedKeyRef.current = null;
|
|
20643
|
-
}, [mutate,
|
|
21003
|
+
}, [mutate, commitConversationId, hydratedKeyRef]);
|
|
21004
|
+
const selectDialog = _react.useCallback.call(void 0,
|
|
21005
|
+
(id) => {
|
|
21006
|
+
if (id === conversationIdRef.current) return;
|
|
21007
|
+
switchConversation(id);
|
|
21008
|
+
},
|
|
21009
|
+
[switchConversation]
|
|
21010
|
+
);
|
|
21011
|
+
const dialogCapabilities = _react.useMemo.call(void 0,
|
|
21012
|
+
() => conversationsApi ? {
|
|
21013
|
+
canRename: true,
|
|
21014
|
+
canArchive: true,
|
|
21015
|
+
fetchArchivedDialogs,
|
|
21016
|
+
unarchiveDialog,
|
|
21017
|
+
searchQuery: dialogSearch,
|
|
21018
|
+
onSearchChange: setDialogSearch,
|
|
21019
|
+
// A public panel's first-time visitor must reach the composer
|
|
21020
|
+
// without tapping through an empty list.
|
|
21021
|
+
emptyListSkipsToCompose: true
|
|
21022
|
+
} : void 0,
|
|
21023
|
+
[conversationsApi, fetchArchivedDialogs, unarchiveDialog, dialogSearch]
|
|
21024
|
+
);
|
|
20644
21025
|
const docMessages = _react.useMemo.call(void 0, () => {
|
|
20645
21026
|
const { meta, sources: sourcesMap } = state.turnMeta;
|
|
20646
21027
|
let sendIdx = -1;
|
|
20647
21028
|
return state.messages.map((m) => {
|
|
20648
21029
|
const segments = m.segments;
|
|
20649
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
21030
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _665 => _665.filter, 'call', _666 => _666((s) => s.type === "text"), 'access', _667 => _667.map, 'call', _668 => _668((s) => s.text), 'access', _669 => _669.join, 'call', _670 => _670("")]), () => ( ""));
|
|
20650
21031
|
let sources;
|
|
20651
21032
|
let scrollAnchor;
|
|
20652
21033
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -20655,7 +21036,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20655
21036
|
if (m.role === "assistant") {
|
|
20656
21037
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
20657
21038
|
sources = sourcesMap.get(lookupIdx);
|
|
20658
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
21039
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _671 => _671.get, 'call', _672 => _672(lookupIdx), 'optionalAccess', _673 => _673.scrollAnchor]), () => ( void 0));
|
|
20659
21040
|
}
|
|
20660
21041
|
return {
|
|
20661
21042
|
id: m.id,
|
|
@@ -20682,7 +21063,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20682
21063
|
);
|
|
20683
21064
|
return;
|
|
20684
21065
|
}
|
|
20685
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
21066
|
+
const refSlug = typeof _optionalChain([reference, 'access', _674 => _674.metadata, 'optionalAccess', _675 => _675.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
20686
21067
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
20687
21068
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
20688
21069
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -20728,38 +21109,41 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20728
21109
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
20729
21110
|
isHydratingHistory,
|
|
20730
21111
|
/** 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',
|
|
21112
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _676 => _676.provider]), () => ( null)),
|
|
21113
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _677 => _677.modelLabel]), () => ( null)),
|
|
21114
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _678 => _678.contextWindowMaxTokens]), () => ( null)),
|
|
20734
21115
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
20735
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21116
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _679 => _679.inputTokens]), () => ( null)),
|
|
20736
21117
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
20737
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21118
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _680 => _680.outputTokens]), () => ( null)),
|
|
20738
21119
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
20739
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21120
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _681 => _681.cacheHitRatePct]), () => ( null)),
|
|
20740
21121
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
20741
21122
|
* 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
|
-
|
|
21123
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _682 => _682.breakdown]), () => ( null)),
|
|
21124
|
+
// ─── Dialog management ───────────────────────────────────────────────
|
|
21125
|
+
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
21126
|
+
// list (shared `useManagedDialogList`); selecting a row re-hydrates through
|
|
21127
|
+
// the history route. WITHOUT it the same hook is inert by construction —
|
|
21128
|
+
// no `fetchDialogs`, so an empty list, false flags and memoized no-op
|
|
21129
|
+
// mutations — which is why only the four genuinely mode-dependent fields
|
|
21130
|
+
// are branched here.
|
|
21131
|
+
dialogs,
|
|
21132
|
+
isDialogsLoading,
|
|
21133
|
+
dialogsError,
|
|
21134
|
+
reloadDialogs,
|
|
21135
|
+
hasMoreDialogs,
|
|
21136
|
+
loadMoreDialogs,
|
|
21137
|
+
renameDialog,
|
|
21138
|
+
archiveDialog,
|
|
21139
|
+
// New chat = `clearMessages` (the server mints on the next send); there is
|
|
21140
|
+
// no create call. Delete is not offered — archive replaces it.
|
|
20752
21141
|
startNewDialog: noopStartNewDialog,
|
|
20753
21142
|
deleteDialog: noopDeleteDialog,
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
dialogsError: false,
|
|
20759
|
-
reloadDialogs: noopReloadDialogs,
|
|
20760
|
-
isMessagesLoading: false,
|
|
20761
|
-
hasMoreDialogs: false,
|
|
20762
|
-
loadMoreDialogs: noopAsync,
|
|
21143
|
+
activeDialogId: conversationsApi ? conversationId : null,
|
|
21144
|
+
selectDialog: conversationsApi ? selectDialog : noopSelectDialog,
|
|
21145
|
+
isMessagesLoading: conversationsApi ? isHydratingHistory : false,
|
|
21146
|
+
dialogCapabilities,
|
|
20763
21147
|
hasMoreMessages: false,
|
|
20764
21148
|
loadMoreMessages: noopAsync,
|
|
20765
21149
|
approveRequest: noopApproveRequest,
|
|
@@ -20773,9 +21157,6 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20773
21157
|
|
|
20774
21158
|
|
|
20775
21159
|
// src/chat-protocol/nats-decoder.ts
|
|
20776
|
-
function isRecord2(value) {
|
|
20777
|
-
return typeof value === "object" && value !== null;
|
|
20778
|
-
}
|
|
20779
21160
|
function str(value) {
|
|
20780
21161
|
return typeof value === "string" ? value : void 0;
|
|
20781
21162
|
}
|
|
@@ -20788,7 +21169,7 @@ function numOr(value, fallback = 0) {
|
|
|
20788
21169
|
}
|
|
20789
21170
|
function normalizeToolCalls(raw) {
|
|
20790
21171
|
if (!Array.isArray(raw)) return [];
|
|
20791
|
-
return raw.filter(
|
|
21172
|
+
return raw.filter(isRecord).map((item) => ({
|
|
20792
21173
|
toolExecutionRequestId: String(_nullishCoalesce(item.toolExecutionRequestId, () => ( ""))),
|
|
20793
21174
|
toolName: String(_nullishCoalesce(item.toolName, () => ( ""))),
|
|
20794
21175
|
toolTitle: typeof item.toolTitle === "string" ? item.toolTitle : void 0,
|
|
@@ -20796,12 +21177,12 @@ function normalizeToolCalls(raw) {
|
|
|
20796
21177
|
toolType: typeof item.toolType === "string" ? item.toolType : void 0,
|
|
20797
21178
|
requiresApproval: item.requiresApproval === true,
|
|
20798
21179
|
approvalType: typeof item.approvalType === "string" ? item.approvalType : null,
|
|
20799
|
-
toolCallArguments:
|
|
21180
|
+
toolCallArguments: isRecord(item.toolCallArguments) ? item.toolCallArguments : null
|
|
20800
21181
|
}));
|
|
20801
21182
|
}
|
|
20802
21183
|
function normalizeAskOptions(raw) {
|
|
20803
21184
|
if (!Array.isArray(raw)) return [];
|
|
20804
|
-
return raw.filter(
|
|
21185
|
+
return raw.filter(isRecord).map((item) => ({
|
|
20805
21186
|
label: typeof item.label === "string" ? item.label.trim() : "",
|
|
20806
21187
|
description: typeof item.description === "string" ? item.description : void 0
|
|
20807
21188
|
})).filter((option) => option.label.length > 0);
|
|
@@ -20870,7 +21251,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20870
21251
|
// the EXECUTING segment held. Dropping it here therefore blanks the
|
|
20871
21252
|
// card for the whole lifetime of the run.
|
|
20872
21253
|
toolExplanation: typeof data.toolExplanation === "string" ? data.toolExplanation : void 0,
|
|
20873
|
-
parameters:
|
|
21254
|
+
parameters: isRecord(data.parameters) ? data.parameters : void 0,
|
|
20874
21255
|
toolExecutionRequestId: typeof data.toolExecutionRequestId === "string" ? data.toolExecutionRequestId : void 0
|
|
20875
21256
|
},
|
|
20876
21257
|
...seq
|
|
@@ -20883,7 +21264,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20883
21264
|
integratedToolType: strOr(data.integratedToolType),
|
|
20884
21265
|
toolFunction: strOr(data.toolFunction),
|
|
20885
21266
|
toolTitle: typeof data.title === "string" ? data.title : void 0,
|
|
20886
|
-
parameters:
|
|
21267
|
+
parameters: isRecord(data.parameters) ? data.parameters : void 0,
|
|
20887
21268
|
result: str(data.result),
|
|
20888
21269
|
success: typeof data.success === "boolean" ? data.success : void 0,
|
|
20889
21270
|
toolExecutionRequestId: typeof data.toolExecutionRequestId === "string" ? data.toolExecutionRequestId : void 0
|
|
@@ -20984,7 +21365,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20984
21365
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
20985
21366
|
// Wire shape carries no label; fall back to the id (parity with
|
|
20986
21367
|
// the history path in `process-historical-messages.ts`).
|
|
20987
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
21368
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _683 => _683.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _684 => _684.id]) === "string").map((it) => ({
|
|
20988
21369
|
type: it.type,
|
|
20989
21370
|
id: it.id,
|
|
20990
21371
|
label: it.id
|
|
@@ -21075,7 +21456,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21075
21456
|
}
|
|
21076
21457
|
break;
|
|
21077
21458
|
case "approval_batch": {
|
|
21078
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
21459
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _685 => _685.data, 'access', _686 => _686.executions, 'optionalAccess', _687 => _687[c.toolExecutionRequestId], 'optionalAccess', _688 => _688.status]) === "done");
|
|
21079
21460
|
if (segment.status !== "rejected" && !allDone) {
|
|
21080
21461
|
hasIncompleteState = true;
|
|
21081
21462
|
}
|
|
@@ -21137,11 +21518,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21137
21518
|
function extractIncompleteTailState(messages) {
|
|
21138
21519
|
if (!messages || messages.length === 0) return void 0;
|
|
21139
21520
|
let start = messages.length;
|
|
21140
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
21521
|
+
while (start > 0 && _optionalChain([messages, 'access', _689 => _689[start - 1], 'optionalAccess', _690 => _690.role]) === "assistant") start -= 1;
|
|
21141
21522
|
if (start === messages.length) return void 0;
|
|
21142
21523
|
const segments = [];
|
|
21143
21524
|
for (let i = start; i < messages.length; i += 1) {
|
|
21144
|
-
const content = _optionalChain([messages, 'access',
|
|
21525
|
+
const content = _optionalChain([messages, 'access', _691 => _691[i], 'optionalAccess', _692 => _692.content]);
|
|
21145
21526
|
if (Array.isArray(content)) segments.push(...content);
|
|
21146
21527
|
}
|
|
21147
21528
|
if (segments.length === 0) return void 0;
|
|
@@ -21154,15 +21535,15 @@ function extractIncompleteTailState(messages) {
|
|
|
21154
21535
|
|
|
21155
21536
|
// src/components/chat/utils/process-historical-messages.ts
|
|
21156
21537
|
function getOwnerDisplayName(owner) {
|
|
21157
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
21538
|
+
if (_optionalChain([owner, 'optionalAccess', _693 => _693.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
21158
21539
|
const { firstName, lastName } = owner.user;
|
|
21159
21540
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
21160
21541
|
if (name) return name;
|
|
21161
21542
|
}
|
|
21162
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
21543
|
+
return _optionalChain([owner, 'optionalAccess', _694 => _694.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
21163
21544
|
}
|
|
21164
21545
|
function getOwnerAvatar(owner) {
|
|
21165
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
21546
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _695 => _695.user, 'optionalAccess', _696 => _696.image, 'optionalAccess', _697 => _697.imageUrl]), () => ( void 0));
|
|
21166
21547
|
}
|
|
21167
21548
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
21168
21549
|
messageDataArray.forEach((data) => {
|
|
@@ -21346,7 +21727,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21346
21727
|
event.offerId,
|
|
21347
21728
|
event.text,
|
|
21348
21729
|
event.origin,
|
|
21349
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
21730
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _698 => _698[event.offerId]]), () => ( "pending"))
|
|
21350
21731
|
);
|
|
21351
21732
|
break;
|
|
21352
21733
|
case "ticket-escalated":
|
|
@@ -21380,7 +21761,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21380
21761
|
);
|
|
21381
21762
|
break;
|
|
21382
21763
|
case "escalation-offer-resolved":
|
|
21383
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
21764
|
+
_optionalChain([offerResolutions, 'optionalAccess', _699 => _699.set, 'call', _700 => _700(event.offerId, {
|
|
21384
21765
|
status: event.status,
|
|
21385
21766
|
resolvedByName: event.resolvedByName
|
|
21386
21767
|
})]);
|
|
@@ -21444,7 +21825,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21444
21825
|
}
|
|
21445
21826
|
}
|
|
21446
21827
|
} else {
|
|
21447
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21828
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _701 => _701.set, 'call', _702 => _702(event.requestId, {
|
|
21448
21829
|
command: event.command || "",
|
|
21449
21830
|
explanation: event.explanation,
|
|
21450
21831
|
approvalType,
|
|
@@ -21459,8 +21840,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21459
21840
|
const existingStatus = approvalStatuses[requestId];
|
|
21460
21841
|
const status = existingStatus || event.status;
|
|
21461
21842
|
const resolvedByName = event.resolvedByName;
|
|
21462
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21463
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
21843
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _703 => _703.get, 'call', _704 => _704(requestId)]);
|
|
21844
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _705 => _705.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
21464
21845
|
if (batchApprovalsEnabled) {
|
|
21465
21846
|
accumulator.addApprovalBatch(
|
|
21466
21847
|
requestId,
|
|
@@ -21482,7 +21863,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21482
21863
|
);
|
|
21483
21864
|
}
|
|
21484
21865
|
}
|
|
21485
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21866
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _706 => _706.delete, 'call', _707 => _707(requestId)]);
|
|
21486
21867
|
break;
|
|
21487
21868
|
}
|
|
21488
21869
|
if (escalatedData) {
|
|
@@ -21491,7 +21872,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21491
21872
|
explanation: escalatedData.explanation,
|
|
21492
21873
|
approvalType: escalatedData.approvalType
|
|
21493
21874
|
});
|
|
21494
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21875
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _708 => _708.delete, 'call', _709 => _709(requestId)]);
|
|
21495
21876
|
}
|
|
21496
21877
|
const before = accumulator.getSegments();
|
|
21497
21878
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -21580,14 +21961,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21580
21961
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
21581
21962
|
return;
|
|
21582
21963
|
}
|
|
21583
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
21964
|
+
const isUserMessage = _optionalChain([msg, 'access', _710 => _710.owner, 'optionalAccess', _711 => _711.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _712 => _712.owner, 'optionalAccess', _713 => _713.type]) === OWNER_TYPE.ADMIN;
|
|
21584
21965
|
if (isUserMessage) {
|
|
21585
21966
|
flushAssistantMessage();
|
|
21586
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
21967
|
+
const userAuthorType = _optionalChain([msg, 'access', _714 => _714.owner, 'optionalAccess', _715 => _715.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
21587
21968
|
messageDataArray.forEach((data) => {
|
|
21588
21969
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
21589
21970
|
const rawContext = data.contextItems;
|
|
21590
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
21971
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _716 => _716.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _717 => _717.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
21591
21972
|
processedMessages.push({
|
|
21592
21973
|
id: msg.id,
|
|
21593
21974
|
role: "user",
|
|
@@ -21630,7 +22011,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21630
22011
|
});
|
|
21631
22012
|
const nextMsg = messages[index + 1];
|
|
21632
22013
|
const isLastMessage = index === messages.length - 1;
|
|
21633
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
22014
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _718 => _718.owner, 'optionalAccess', _719 => _719.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _720 => _720.owner, 'optionalAccess', _721 => _721.type]) === OWNER_TYPE.ADMIN);
|
|
21634
22015
|
if (isLastMessage || nextIsFromUser) {
|
|
21635
22016
|
flushAssistantMessage();
|
|
21636
22017
|
}
|
|
@@ -21748,6 +22129,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21748
22129
|
deleteDialog: deleteDialogCallback,
|
|
21749
22130
|
renameDialog: renameDialogCallback,
|
|
21750
22131
|
archiveDialog: archiveDialogCallback,
|
|
22132
|
+
fetchArchivedDialogs,
|
|
22133
|
+
unarchiveDialog,
|
|
21751
22134
|
approveRequest: approveRequestCallback,
|
|
21752
22135
|
rejectRequest: rejectRequestCallback,
|
|
21753
22136
|
stopGeneration: stopGenerationCallback,
|
|
@@ -21833,11 +22216,33 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21833
22216
|
},
|
|
21834
22217
|
[applyEvent]
|
|
21835
22218
|
);
|
|
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
22219
|
const [isCreatingDialog, setIsCreatingDialog] = _react.useState.call(void 0, false);
|
|
22220
|
+
const {
|
|
22221
|
+
dialogs,
|
|
22222
|
+
isDialogsLoading,
|
|
22223
|
+
dialogsError,
|
|
22224
|
+
hasMoreDialogs,
|
|
22225
|
+
reloadDialogs,
|
|
22226
|
+
loadMoreDialogs,
|
|
22227
|
+
renameDialog,
|
|
22228
|
+
archiveDialog,
|
|
22229
|
+
deleteDialog,
|
|
22230
|
+
upsertDialogTop
|
|
22231
|
+
} = useManagedDialogList({
|
|
22232
|
+
autoLoad: active,
|
|
22233
|
+
fetchDialogs,
|
|
22234
|
+
renameDialog: renameDialogCallback,
|
|
22235
|
+
archiveDialog: archiveDialogCallback,
|
|
22236
|
+
deleteDialog: deleteDialogCallback,
|
|
22237
|
+
pageSize: dialogsPageSize,
|
|
22238
|
+
logTag: "[useNatsChatAdapter]",
|
|
22239
|
+
onDialogRemoved: (id, reason) => {
|
|
22240
|
+
if (reason === "deleted") dialogStore.remove(id);
|
|
22241
|
+
if (isManagedMode && internalDialogId === id) {
|
|
22242
|
+
setInternalDialogId(null);
|
|
22243
|
+
}
|
|
22244
|
+
}
|
|
22245
|
+
});
|
|
21841
22246
|
const [messagesNextCursor, setMessagesNextCursor] = _react.useState.call(void 0, null);
|
|
21842
22247
|
const [isMessagesLoading, setIsMessagesLoading] = _react.useState.call(void 0, false);
|
|
21843
22248
|
const [connectedForDialog, setConnectedForDialog] = _react.useState.call(void 0, null);
|
|
@@ -21987,48 +22392,9 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21987
22392
|
}
|
|
21988
22393
|
});
|
|
21989
22394
|
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
22395
|
const sendMessage = _react.useCallback.call(void 0,
|
|
22030
22396
|
async (text, sendOptions) => {
|
|
22031
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
22397
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _722 => _722.hidden]), () => ( false));
|
|
22032
22398
|
mutate((r) => r.pushOptimisticSend(text, hidden));
|
|
22033
22399
|
await publishUserMessage(text, { hidden, dialogId });
|
|
22034
22400
|
},
|
|
@@ -22060,14 +22426,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22060
22426
|
try {
|
|
22061
22427
|
setIsCreatingDialog(true);
|
|
22062
22428
|
const result = await createDialogCallback();
|
|
22063
|
-
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
},
|
|
22069
|
-
...prev.filter((d) => d.id !== result.dialogId)
|
|
22070
|
-
]);
|
|
22429
|
+
upsertDialogTop({
|
|
22430
|
+
id: result.dialogId,
|
|
22431
|
+
title: "New Chat",
|
|
22432
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
22433
|
+
});
|
|
22071
22434
|
if (isManagedMode) {
|
|
22072
22435
|
setInternalDialogId(result.dialogId);
|
|
22073
22436
|
}
|
|
@@ -22078,65 +22441,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22078
22441
|
} finally {
|
|
22079
22442
|
setIsCreatingDialog(false);
|
|
22080
22443
|
}
|
|
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]);
|
|
22444
|
+
}, [createDialogCallback, isCreatingDialog, isManagedMode, upsertDialogTop]);
|
|
22140
22445
|
const loadMoreMessages = _react.useCallback.call(void 0, async () => {
|
|
22141
22446
|
if (!dialogId || !messagesNextCursor) return;
|
|
22142
22447
|
await loadDialogHistory(dialogId, messagesNextCursor);
|
|
@@ -22158,8 +22463,16 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22158
22463
|
);
|
|
22159
22464
|
const { messages, streamingPhase, dialogTokenUsage = null, liveModel = null } = state;
|
|
22160
22465
|
const isLoading = streamingPhase !== "idle";
|
|
22161
|
-
const hasMoreDialogs = dialogsNextCursor != null;
|
|
22162
22466
|
const hasMoreMessages = messagesNextCursor != null;
|
|
22467
|
+
const dialogCapabilities = _react.useMemo.call(void 0,
|
|
22468
|
+
() => ({
|
|
22469
|
+
canRename: isManagedMode && !!renameDialogCallback,
|
|
22470
|
+
canArchive: isManagedMode && !!archiveDialogCallback,
|
|
22471
|
+
fetchArchivedDialogs: isManagedMode ? fetchArchivedDialogs : void 0,
|
|
22472
|
+
unarchiveDialog: isManagedMode ? unarchiveDialog : void 0
|
|
22473
|
+
}),
|
|
22474
|
+
[isManagedMode, renameDialogCallback, archiveDialogCallback, fetchArchivedDialogs, unarchiveDialog]
|
|
22475
|
+
);
|
|
22163
22476
|
return _react.useMemo.call(void 0,
|
|
22164
22477
|
() => ({
|
|
22165
22478
|
messages,
|
|
@@ -22174,11 +22487,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22174
22487
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
22175
22488
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
22176
22489
|
// 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',
|
|
22490
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _723 => _723.provider]), () => ( modelProvider)), () => ( null)),
|
|
22491
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _724 => _724.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
22492
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _725 => _725.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _726 => _726.contextWindowMaxTokens]))), () => ( null)),
|
|
22493
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _727 => _727.inputTokensSize]), () => ( null)),
|
|
22494
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _728 => _728.outputTokensSize]), () => ( null)),
|
|
22182
22495
|
currentCacheHitRatePct: null,
|
|
22183
22496
|
currentUsageBreakdown: null,
|
|
22184
22497
|
// Dialog management
|
|
@@ -22197,6 +22510,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22197
22510
|
loadMoreDialogs,
|
|
22198
22511
|
hasMoreMessages,
|
|
22199
22512
|
loadMoreMessages,
|
|
22513
|
+
dialogCapabilities,
|
|
22200
22514
|
// Approval mutations
|
|
22201
22515
|
approveRequest,
|
|
22202
22516
|
rejectRequest,
|
|
@@ -22229,6 +22543,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22229
22543
|
loadMoreDialogs,
|
|
22230
22544
|
hasMoreMessages,
|
|
22231
22545
|
loadMoreMessages,
|
|
22546
|
+
dialogCapabilities,
|
|
22232
22547
|
approveRequest,
|
|
22233
22548
|
rejectRequest,
|
|
22234
22549
|
dialogTokenUsage,
|
|
@@ -22255,7 +22570,7 @@ function createDisabledNatsConfig() {
|
|
|
22255
22570
|
};
|
|
22256
22571
|
}
|
|
22257
22572
|
function useUnifiedChat(options) {
|
|
22258
|
-
const { modes, activeMode, mingoStateOverride } = options;
|
|
22573
|
+
const { modes, activeMode, mingoStateOverride, injectedDialogCapabilities } = options;
|
|
22259
22574
|
const [disabledNatsConfig] = _react.useState.call(void 0, createDisabledNatsConfig);
|
|
22260
22575
|
const sseActive = activeMode === "guide" && modes.guide !== void 0;
|
|
22261
22576
|
const natsActive = activeMode === "mingo" && modes.mingo !== void 0;
|
|
@@ -22264,6 +22579,8 @@ function useUnifiedChat(options) {
|
|
|
22264
22579
|
});
|
|
22265
22580
|
const natsState = useNatsChatAdapter(_nullishCoalesce(modes.mingo, () => ( disabledNatsConfig)), { active: natsActive });
|
|
22266
22581
|
const activeState = activeMode === "guide" ? sseState : _nullishCoalesce(mingoStateOverride, () => ( natsState));
|
|
22582
|
+
const activeStateIsInjected = activeState === mingoStateOverride;
|
|
22583
|
+
const dialogCapabilities = activeStateIsInjected ? _nullishCoalesce(_nullishCoalesce(activeState.dialogCapabilities, () => ( injectedDialogCapabilities)), () => ( EMPTY_DIALOG_CAPABILITIES)) : activeState.dialogCapabilities;
|
|
22267
22584
|
const activeStateRef = _react.useRef.call(void 0, activeState);
|
|
22268
22585
|
_react.useEffect.call(void 0, () => {
|
|
22269
22586
|
activeStateRef.current = activeState;
|
|
@@ -22279,7 +22596,7 @@ function useUnifiedChat(options) {
|
|
|
22279
22596
|
[]
|
|
22280
22597
|
);
|
|
22281
22598
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
22282
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
22599
|
+
(ref) => _optionalChain([activeStateRef, 'access', _729 => _729.current, 'access', _730 => _730.displayRef, 'optionalCall', _731 => _731(ref)]),
|
|
22283
22600
|
[]
|
|
22284
22601
|
);
|
|
22285
22602
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -22289,7 +22606,7 @@ function useUnifiedChat(options) {
|
|
|
22289
22606
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
22290
22607
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
22291
22608
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
22292
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
22609
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _732 => _732.current, 'access', _733 => _733.setDialogScope, 'optionalCall', _734 => _734(scope)]), []);
|
|
22293
22610
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
22294
22611
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
22295
22612
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -22334,6 +22651,8 @@ function useUnifiedChat(options) {
|
|
|
22334
22651
|
setDialogScope,
|
|
22335
22652
|
hasMoreMessages: activeState.hasMoreMessages,
|
|
22336
22653
|
loadMoreMessages,
|
|
22654
|
+
// THE conversation-list signal — resolved once, above.
|
|
22655
|
+
dialogCapabilities,
|
|
22337
22656
|
// Approvals
|
|
22338
22657
|
approveRequest,
|
|
22339
22658
|
rejectRequest,
|
|
@@ -22343,6 +22662,7 @@ function useUnifiedChat(options) {
|
|
|
22343
22662
|
}),
|
|
22344
22663
|
[
|
|
22345
22664
|
activeState,
|
|
22665
|
+
dialogCapabilities,
|
|
22346
22666
|
sendMessage,
|
|
22347
22667
|
stopMessage,
|
|
22348
22668
|
clearMessages,
|
|
@@ -22382,19 +22702,19 @@ function turnRequestKeys(content) {
|
|
|
22382
22702
|
if (!Array.isArray(content)) return keys;
|
|
22383
22703
|
for (const seg of content) {
|
|
22384
22704
|
if (seg.type === "tool_execution") {
|
|
22385
|
-
const id = _optionalChain([seg, 'access',
|
|
22705
|
+
const id = _optionalChain([seg, 'access', _735 => _735.data, 'optionalAccess', _736 => _736.toolExecutionRequestId]);
|
|
22386
22706
|
if (id) keys.add(id);
|
|
22387
22707
|
} else if (seg.type === "approval_request") {
|
|
22388
|
-
const id = _optionalChain([seg, 'access',
|
|
22708
|
+
const id = _optionalChain([seg, 'access', _737 => _737.data, 'optionalAccess', _738 => _738.requestId]);
|
|
22389
22709
|
if (id) keys.add(id);
|
|
22390
22710
|
} else if (seg.type === "escalation_offer") {
|
|
22391
|
-
const id = _optionalChain([seg, 'access',
|
|
22711
|
+
const id = _optionalChain([seg, 'access', _739 => _739.data, 'optionalAccess', _740 => _740.offerId]);
|
|
22392
22712
|
if (id) keys.add(id);
|
|
22393
22713
|
} else if (seg.type === "approval_batch") {
|
|
22394
22714
|
const data = seg.data;
|
|
22395
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
22396
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
22397
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
22715
|
+
if (_optionalChain([data, 'optionalAccess', _741 => _741.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
22716
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _742 => _742.toolCalls]), () => ( []))) {
|
|
22717
|
+
if (_optionalChain([call, 'optionalAccess', _743 => _743.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
22398
22718
|
}
|
|
22399
22719
|
}
|
|
22400
22720
|
}
|
|
@@ -22446,18 +22766,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22446
22766
|
}
|
|
22447
22767
|
}
|
|
22448
22768
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
22449
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
22450
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
22769
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _744 => _744.role]) === "assistant" ? trailing : null;
|
|
22770
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _745 => _745.content, 'access', _746 => _746.find, 'call', _747 => _747((s) => s.type === "approval_batch"), 'optionalAccess', _748 => _748.data, 'optionalAccess', _749 => _749.approvalRequestId]), () => ( null)) : null;
|
|
22451
22771
|
let processedToUse = processedHistory;
|
|
22452
22772
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22453
22773
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22454
22774
|
if (historyBatchId) {
|
|
22455
22775
|
const batchTwins = existingMessages.filter(
|
|
22456
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
22776
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _750 => _750.data, 'optionalAccess', _751 => _751.approvalRequestId]) === historyBatchId)
|
|
22457
22777
|
);
|
|
22458
22778
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
22459
22779
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
22460
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
22780
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _752 => _752.content])) ? historyTrailingAssistant.content.length : 0;
|
|
22461
22781
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
22462
22782
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
22463
22783
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -22499,9 +22819,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22499
22819
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
22500
22820
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
22501
22821
|
if (processedIds.has(m.id)) return false;
|
|
22502
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
22822
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _753 => _753.has, 'call', _754 => _754(m.id)])) return false;
|
|
22503
22823
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
22504
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22824
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _755 => _755.timestamp, 'optionalAccess', _756 => _756.getTime, 'call', _757 => _757()]), () => ( 0))) <= historyFetchedAt;
|
|
22505
22825
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
22506
22826
|
}
|
|
22507
22827
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -22525,7 +22845,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22525
22845
|
} else if (typeof m.streamSeq === "number") {
|
|
22526
22846
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
22527
22847
|
} else {
|
|
22528
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22848
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _758 => _758.timestamp, 'optionalAccess', _759 => _759.getTime, 'call', _760 => _760()]), () => ( 0))) <= historyFetchedAt;
|
|
22529
22849
|
}
|
|
22530
22850
|
if (covered) return false;
|
|
22531
22851
|
}
|
|
@@ -22595,7 +22915,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
22595
22915
|
function isHistoricalUserTurn(m) {
|
|
22596
22916
|
return !!m.owner;
|
|
22597
22917
|
}
|
|
22598
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
22918
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _761 => _761.type]) === "TEXT" && typeof d.text === "string";
|
|
22599
22919
|
var THINK_MS = 550;
|
|
22600
22920
|
var TOKEN_MS = 55;
|
|
22601
22921
|
var USER_MS = 480;
|
|
@@ -23215,7 +23535,7 @@ function useChatDialogManager({
|
|
|
23215
23535
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
23216
23536
|
if (restoreTarget) {
|
|
23217
23537
|
try {
|
|
23218
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
23538
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _762 => _762(restoreTarget.id)]);
|
|
23219
23539
|
} catch (err) {
|
|
23220
23540
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
23221
23541
|
return;
|
|
@@ -23282,12 +23602,18 @@ function useChatDialogManager({
|
|
|
23282
23602
|
|
|
23283
23603
|
// src/components/chat/embeddable-chat.tsx
|
|
23284
23604
|
|
|
23605
|
+
var HISTORY_RAIL_WIDTH = 320;
|
|
23606
|
+
var CHAT_BLOCK_MIN_WIDTH = 400;
|
|
23607
|
+
var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
23285
23608
|
var DRAWER_DEFAULT_WIDTH_RATIO = 0.5;
|
|
23286
|
-
var DRAWER_WIDTH_KEY = "mingo-chat-width-
|
|
23609
|
+
var DRAWER_WIDTH_KEY = "mingo-chat-width-v4";
|
|
23287
23610
|
var DRAWER_DEFAULT_WIDTH_PX = 750;
|
|
23288
|
-
|
|
23611
|
+
var SPLIT_DEFAULT_WIDTH_ALLOWANCE = 16;
|
|
23612
|
+
function drawerDefaultWidth(withHistoryRail) {
|
|
23289
23613
|
if (typeof window === "undefined") return DRAWER_DEFAULT_WIDTH_PX;
|
|
23290
|
-
|
|
23614
|
+
const ratioWidth = Math.round(window.innerWidth * DRAWER_DEFAULT_WIDTH_RATIO);
|
|
23615
|
+
if (!withHistoryRail) return ratioWidth;
|
|
23616
|
+
return Math.max(ratioWidth, SPLIT_MIN_WIDTH + SPLIT_DEFAULT_WIDTH_ALLOWANCE);
|
|
23291
23617
|
}
|
|
23292
23618
|
var formatRelativePath = (p) => p.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
23293
23619
|
var mentionTokenOf = (key, markerByType) => {
|
|
@@ -23297,9 +23623,6 @@ var mentionTokenOf = (key, markerByType) => {
|
|
|
23297
23623
|
return `${_nullishCoalesce(markerByType.get(type), () => ( type.toLowerCase()))}:${id}`;
|
|
23298
23624
|
};
|
|
23299
23625
|
var FALLBACK_TOP_RETRIEVED = 3;
|
|
23300
|
-
var HISTORY_RAIL_WIDTH = 320;
|
|
23301
|
-
var CHAT_BLOCK_MIN_WIDTH = 400;
|
|
23302
|
-
var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
23303
23626
|
var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
23304
23627
|
var NO_CONTEXT_ITEMS = [];
|
|
23305
23628
|
var RAIL_ANIM_MS = 320;
|
|
@@ -23381,7 +23704,7 @@ function SourceChip({
|
|
|
23381
23704
|
onClose,
|
|
23382
23705
|
onDiscuss
|
|
23383
23706
|
}) {
|
|
23384
|
-
const runtime =
|
|
23707
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
23385
23708
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
23386
23709
|
const cta = resolveSourceRowCTA(
|
|
23387
23710
|
{
|
|
@@ -23398,7 +23721,7 @@ function SourceChip({
|
|
|
23398
23721
|
const Icon = cta.icon;
|
|
23399
23722
|
const icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: "h-3.5 w-3.5" });
|
|
23400
23723
|
const chipClass = chatChipClass({ tone: "secondary" });
|
|
23401
|
-
const decideTab = (href, targetPlatform) =>
|
|
23724
|
+
const decideTab = (href, targetPlatform) => _chunkUQEOAPAIcjs.computeIsNewTab.call(void 0, runtime, href, targetPlatform);
|
|
23402
23725
|
if (src.items && src.items.length > 0) {
|
|
23403
23726
|
const dropdownItems = src.items.map((item) => {
|
|
23404
23727
|
const itemCta = resolveSourceRowCTA(
|
|
@@ -23487,7 +23810,7 @@ function SourceChip({
|
|
|
23487
23810
|
"a",
|
|
23488
23811
|
{
|
|
23489
23812
|
href: resolvedHref,
|
|
23490
|
-
...
|
|
23813
|
+
..._chunkUQEOAPAIcjs.newTabAnchorAttrs.call(void 0, isNewTab),
|
|
23491
23814
|
onClick: buildClickHandler(resolvedHref, null, _nullishCoalesce(cta.targetPlatform, () => ( null)), isNewTab),
|
|
23492
23815
|
className: chipClass,
|
|
23493
23816
|
children: chipBody(src.name)
|
|
@@ -23503,7 +23826,7 @@ function SourceChip({
|
|
|
23503
23826
|
"a",
|
|
23504
23827
|
{
|
|
23505
23828
|
href: resolvedHref,
|
|
23506
|
-
...
|
|
23829
|
+
..._chunkUQEOAPAIcjs.newTabAnchorAttrs.call(void 0, isNewTab),
|
|
23507
23830
|
onClick: buildClickHandler(resolvedHref, src.path, _nullishCoalesce(cta.targetPlatform, () => ( null)), isNewTab),
|
|
23508
23831
|
className: chipClass,
|
|
23509
23832
|
title: displayName,
|
|
@@ -23626,7 +23949,7 @@ function EmbeddableChatInner({
|
|
|
23626
23949
|
handleRef
|
|
23627
23950
|
}) {
|
|
23628
23951
|
const shellLess = shell === "none";
|
|
23629
|
-
const runtime =
|
|
23952
|
+
const runtime = _chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, );
|
|
23630
23953
|
const source = _nullishCoalesce(runtime.source, () => ( ""));
|
|
23631
23954
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
23632
23955
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
@@ -23695,34 +24018,12 @@ function EmbeddableChatInner({
|
|
|
23695
24018
|
}),
|
|
23696
24019
|
[commandsUrl]
|
|
23697
24020
|
);
|
|
23698
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
24021
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _763 => _763.name, 'optionalAccess', _764 => _764.trim, 'call', _765 => _765()]) || [_optionalChain([identityUser, 'optionalAccess', _766 => _766.firstName]), _optionalChain([identityUser, 'optionalAccess', _767 => _767.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _768 => _768.trim, 'call', _769 => _769()]) || void 0;
|
|
23699
24022
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
23700
24023
|
if (modes) return modes;
|
|
23701
24024
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
23702
24025
|
return { guide: guideOptions };
|
|
23703
24026
|
}, [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
24027
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
23727
24028
|
const initialActiveMode = _nullishCoalesce(_nullishCoalesce(controlledActiveMode, () => ( defaultActiveMode)), () => ( (effectiveModes.guide ? "guide" : "mingo")));
|
|
23728
24029
|
const [uncontrolledActiveMode, setUncontrolledActiveMode] = _react.useState.call(void 0, initialActiveMode);
|
|
@@ -23732,7 +24033,7 @@ function EmbeddableChatInner({
|
|
|
23732
24033
|
if (controlledActiveMode === void 0) {
|
|
23733
24034
|
setUncontrolledActiveMode(next);
|
|
23734
24035
|
}
|
|
23735
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
24036
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _770 => _770(next)]);
|
|
23736
24037
|
},
|
|
23737
24038
|
[controlledActiveMode, onActiveModeChange]
|
|
23738
24039
|
);
|
|
@@ -23759,7 +24060,7 @@ function EmbeddableChatInner({
|
|
|
23759
24060
|
);
|
|
23760
24061
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
23761
24062
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
23762
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
24063
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _771 => _771.title]) === "string" ? guideWelcome.title : null)));
|
|
23763
24064
|
const {
|
|
23764
24065
|
messages: rawMessages,
|
|
23765
24066
|
isLoading: chatLoading,
|
|
@@ -23790,8 +24091,23 @@ function EmbeddableChatInner({
|
|
|
23790
24091
|
dialogScope,
|
|
23791
24092
|
setDialogScope,
|
|
23792
24093
|
hasMoreMessages,
|
|
23793
|
-
loadMoreMessages
|
|
23794
|
-
|
|
24094
|
+
loadMoreMessages,
|
|
24095
|
+
dialogCapabilities
|
|
24096
|
+
} = useUnifiedChat({
|
|
24097
|
+
modes: effectiveModes,
|
|
24098
|
+
activeMode,
|
|
24099
|
+
mingoStateOverride: mingoState,
|
|
24100
|
+
injectedDialogCapabilities: mingoDialogCapabilities
|
|
24101
|
+
});
|
|
24102
|
+
const historyListMode = dialogCapabilities !== void 0;
|
|
24103
|
+
const mingoCaps = _react.useMemo.call(void 0,
|
|
24104
|
+
() => ({
|
|
24105
|
+
...dialogCapabilities,
|
|
24106
|
+
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _772 => _772.canRename]), () => ( false)),
|
|
24107
|
+
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _773 => _773.canArchive]), () => ( false))
|
|
24108
|
+
}),
|
|
24109
|
+
[dialogCapabilities]
|
|
24110
|
+
);
|
|
23795
24111
|
const guidePromptSentRef = _react.useRef.call(void 0, false);
|
|
23796
24112
|
_react.useEffect.call(void 0, () => {
|
|
23797
24113
|
if (!guidePendingPrompt) {
|
|
@@ -23803,7 +24119,7 @@ function EmbeddableChatInner({
|
|
|
23803
24119
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
23804
24120
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
23805
24121
|
});
|
|
23806
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
24122
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _774 => _774()]);
|
|
23807
24123
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
23808
24124
|
const {
|
|
23809
24125
|
attachments: stagedAttachments,
|
|
@@ -23814,7 +24130,7 @@ function EmbeddableChatInner({
|
|
|
23814
24130
|
clear: clearAttachments
|
|
23815
24131
|
} = useChatAttachments();
|
|
23816
24132
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
23817
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24133
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _775 => _775.maxItems]), () => ( 10));
|
|
23818
24134
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
23819
24135
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
23820
24136
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -23835,10 +24151,10 @@ function EmbeddableChatInner({
|
|
|
23835
24151
|
}, [activeDialogId, activeMode]);
|
|
23836
24152
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
23837
24153
|
const m = /* @__PURE__ */ new Map();
|
|
23838
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
24154
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _776 => _776.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
23839
24155
|
return m;
|
|
23840
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
23841
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
24156
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _777 => _777.entityTypes])]);
|
|
24157
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _778 => _778.entityTypes]);
|
|
23842
24158
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
23843
24159
|
const byType = /* @__PURE__ */ new Map();
|
|
23844
24160
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -23850,7 +24166,7 @@ function EmbeddableChatInner({
|
|
|
23850
24166
|
if (mentionActiveRef.current) {
|
|
23851
24167
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
23852
24168
|
if (contextItems.length >= contextMaxItems) return;
|
|
23853
|
-
_optionalChain([chatInputRef, 'access',
|
|
24169
|
+
_optionalChain([chatInputRef, 'access', _779 => _779.current, 'optionalAccess', _780 => _780.commitMention, 'call', _781 => _781(mentionTokenOf(key, mentionMarkerByType), {
|
|
23854
24170
|
label: item.label,
|
|
23855
24171
|
icon: resolveContextIcon(item)
|
|
23856
24172
|
})]);
|
|
@@ -23873,9 +24189,9 @@ function EmbeddableChatInner({
|
|
|
23873
24189
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
23874
24190
|
if (mentionKeysRef.current.has(key)) {
|
|
23875
24191
|
mentionKeysRef.current.delete(key);
|
|
23876
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
24192
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _782 => _782.current, 'optionalAccess', _783 => _783.getValue, 'call', _784 => _784()]), () => ( ""));
|
|
23877
24193
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
23878
|
-
_optionalChain([chatInputRef, 'access',
|
|
24194
|
+
_optionalChain([chatInputRef, 'access', _785 => _785.current, 'optionalAccess', _786 => _786.setValue, 'call', _787 => _787(next)]);
|
|
23879
24195
|
}
|
|
23880
24196
|
},
|
|
23881
24197
|
[mentionMarkerByType]
|
|
@@ -23897,7 +24213,7 @@ function EmbeddableChatInner({
|
|
|
23897
24213
|
}, []);
|
|
23898
24214
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
23899
24215
|
if (mentionActiveRef.current) {
|
|
23900
|
-
_optionalChain([chatInputRef, 'access',
|
|
24216
|
+
_optionalChain([chatInputRef, 'access', _788 => _788.current, 'optionalAccess', _789 => _789.removeMentionTrigger, 'call', _790 => _790()]);
|
|
23901
24217
|
}
|
|
23902
24218
|
setContextPickerOpen(false);
|
|
23903
24219
|
setMentionQuery(null);
|
|
@@ -23931,8 +24247,8 @@ function EmbeddableChatInner({
|
|
|
23931
24247
|
[effectiveAssistantIcon]
|
|
23932
24248
|
);
|
|
23933
24249
|
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',
|
|
24250
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _791 => _791.firstName]), _optionalChain([identityUser, 'optionalAccess', _792 => _792.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _793 => _793.name, 'optionalAccess', _794 => _794.trim, 'call', _795 => _795()]) || void 0 : void 0;
|
|
24251
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _796 => _796.avatarUrl, 'optionalAccess', _797 => _797.trim, 'call', _798 => _798()]) || void 0 : void 0;
|
|
23936
24252
|
const messages = _react.useMemo.call(void 0, () => {
|
|
23937
24253
|
const cache = timestampCache;
|
|
23938
24254
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -24091,7 +24407,8 @@ function EmbeddableChatInner({
|
|
|
24091
24407
|
const hasMessages = messages.length > 0;
|
|
24092
24408
|
const dialogsInitialLoading = isDialogsLoading && dialogs.length === 0;
|
|
24093
24409
|
const dialogsLoadError = dialogsError && dialogs.length === 0;
|
|
24094
|
-
const
|
|
24410
|
+
const isLoadingActiveDialogMessages = activeDialogId != null && isMessagesLoading;
|
|
24411
|
+
const hasConversation = hasMessages || isOpeningDialog || isViewingArchived || isLoadingActiveDialogMessages || previewMode && isMessagesLoading;
|
|
24095
24412
|
const messagesInitialLoading = isMessagesLoading && !hasMessages;
|
|
24096
24413
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
24097
24414
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
@@ -24121,9 +24438,9 @@ function EmbeddableChatInner({
|
|
|
24121
24438
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
24122
24439
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
24123
24440
|
if (chatLoading) return void 0;
|
|
24124
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24441
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _799 => _799.sources]);
|
|
24125
24442
|
if (!sources || sources.length === 0) return void 0;
|
|
24126
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
24443
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _800 => _800.content]) || "";
|
|
24127
24444
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
|
|
24128
24445
|
const seenOrder = /* @__PURE__ */ new Map();
|
|
24129
24446
|
citationOrder.forEach((idx) => {
|
|
@@ -24136,21 +24453,18 @@ function EmbeddableChatInner({
|
|
|
24136
24453
|
const [portalHost, setPortalHost] = _react.useState.call(void 0, null);
|
|
24137
24454
|
const [panelBoundary, setPanelBoundary] = _react.useState.call(void 0, null);
|
|
24138
24455
|
const [panelWidth, setPanelWidth] = _react.useState.call(void 0, 0);
|
|
24139
|
-
const panelMeasureRef = _react.useRef.call(void 0, null);
|
|
24140
24456
|
_react.useEffect.call(void 0, () => {
|
|
24141
|
-
|
|
24142
|
-
if (!el || typeof ResizeObserver === "undefined") return void 0;
|
|
24457
|
+
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
24143
24458
|
const ro = new ResizeObserver((entries) => {
|
|
24144
|
-
const w = _optionalChain([entries, 'access',
|
|
24459
|
+
const w = _optionalChain([entries, 'access', _801 => _801[0], 'optionalAccess', _802 => _802.contentRect, 'optionalAccess', _803 => _803.width]);
|
|
24145
24460
|
if (typeof w === "number") setPanelWidth(w);
|
|
24146
24461
|
});
|
|
24147
|
-
ro.observe(
|
|
24148
|
-
setPanelWidth(el.clientWidth);
|
|
24462
|
+
ro.observe(panelBoundary);
|
|
24149
24463
|
return () => ro.disconnect();
|
|
24150
|
-
}, []);
|
|
24464
|
+
}, [panelBoundary]);
|
|
24151
24465
|
const setPanelNode = _react.useCallback.call(void 0, (node) => {
|
|
24152
|
-
panelMeasureRef.current = node;
|
|
24153
24466
|
setPanelBoundary(node);
|
|
24467
|
+
if (node) setPanelWidth(node.clientWidth);
|
|
24154
24468
|
}, []);
|
|
24155
24469
|
const [railCollapsed, setRailCollapsed] = _react.useState.call(void 0, false);
|
|
24156
24470
|
const railStorageHydrated = useIsHydrated();
|
|
@@ -24173,7 +24487,7 @@ function EmbeddableChatInner({
|
|
|
24173
24487
|
});
|
|
24174
24488
|
}, []);
|
|
24175
24489
|
const [railSearchOpen, setRailSearchOpen] = _react.useState.call(void 0, false);
|
|
24176
|
-
const splitEligible =
|
|
24490
|
+
const splitEligible = historyListMode;
|
|
24177
24491
|
const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
|
|
24178
24492
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
24179
24493
|
const splitActive = wideMingo && !railCollapsed;
|
|
@@ -24181,20 +24495,22 @@ function EmbeddableChatInner({
|
|
|
24181
24495
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
24182
24496
|
const [composeOpen, setComposeOpen] = _react.useState.call(void 0, false);
|
|
24183
24497
|
if (hasConversation && composeOpen) setComposeOpen(false);
|
|
24184
|
-
const isMingoMode =
|
|
24185
|
-
const
|
|
24498
|
+
const isMingoMode = historyListMode;
|
|
24499
|
+
const emptyListSkipped = mingoCaps.emptyListSkipsToCompose === true && dialogs.length === 0 && !dialogsInitialLoading && !mingoCaps.searchQuery;
|
|
24500
|
+
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
|
|
24186
24501
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
24187
|
-
const
|
|
24502
|
+
const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
|
|
24503
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _804 => _804.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
|
|
24188
24504
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
24189
24505
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
24190
24506
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
24191
24507
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
24192
24508
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
24193
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
24509
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _805 => _805.onCopyLink, 'optionalCall', _806 => _806(activeDialog)]) : void 0;
|
|
24194
24510
|
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',
|
|
24511
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _807 => _807.owner]) : void 0;
|
|
24512
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _808 => _808.name, 'optionalAccess', _809 => _809.trim, 'call', _810 => _810()]) || headerUserName;
|
|
24513
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _811 => _811.avatarUrl, 'optionalAccess', _812 => _812.trim, 'call', _813 => _813()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _814 => _814.avatarUrl, 'optionalAccess', _815 => _815.trim, 'call', _816 => _816()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _817 => _817.trim, 'call', _818 => _818()]) || void 0;
|
|
24198
24514
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
24199
24515
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
24200
24516
|
resetToNewChat();
|
|
@@ -24214,10 +24530,10 @@ function EmbeddableChatInner({
|
|
|
24214
24530
|
headerOnRename && { id: "rename", label: "Rename chat", onClick: headerOnRename },
|
|
24215
24531
|
headerOnArchive && { id: "archive", label: "Archive chat", onClick: headerOnArchive }
|
|
24216
24532
|
].filter(Boolean);
|
|
24217
|
-
const narrowMingoEmpty = isMingoMode && !hasConversation && !archiveOpen;
|
|
24533
|
+
const narrowMingoEmpty = isMingoMode && !hasConversation && !archiveOpen && !emptyListSkipped;
|
|
24218
24534
|
const narrowHeaderProps = narrowMingoEmpty ? composeOpen ? {
|
|
24219
24535
|
showBack: true,
|
|
24220
|
-
title:
|
|
24536
|
+
title: freshConversationTitle,
|
|
24221
24537
|
subtitle: headerUserName,
|
|
24222
24538
|
avatar: headerAvatar,
|
|
24223
24539
|
backAriaLabel: "Back to chats",
|
|
@@ -24334,13 +24650,13 @@ function EmbeddableChatInner({
|
|
|
24334
24650
|
),
|
|
24335
24651
|
/* @__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
24652
|
/* @__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 :
|
|
24653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate leading-tight text-ods-text-primary text-h3", children: headerShowBack || isGuideEmpty ? headerTitle : freshConversationTitle }),
|
|
24338
24654
|
headerPersonName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "truncate leading-tight text-ods-text-secondary text-h6", children: headerPersonName })
|
|
24339
24655
|
] }),
|
|
24340
24656
|
headerAvatar ? (
|
|
24341
24657
|
// Owner avatar at the title cell's right edge (Figma 113:63273).
|
|
24342
24658
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24343
|
-
|
|
24659
|
+
_chunkUQEOAPAIcjs.SquareAvatar,
|
|
24344
24660
|
{
|
|
24345
24661
|
variant: "round",
|
|
24346
24662
|
sizePx: 32,
|
|
@@ -24524,9 +24840,9 @@ function EmbeddableChatInner({
|
|
|
24524
24840
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
24525
24841
|
subtitleLoading: emptyStateLoading,
|
|
24526
24842
|
...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',
|
|
24843
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _819 => _819.title]))),
|
|
24844
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _820 => _820.icon]))),
|
|
24845
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _821 => _821.quickActions]), () => ( guideSuggestedActions)),
|
|
24530
24846
|
onQuickAction: (action) => {
|
|
24531
24847
|
setQuickActionPreview(null);
|
|
24532
24848
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -24600,8 +24916,8 @@ function EmbeddableChatInner({
|
|
|
24600
24916
|
selectedContextItems: contextItems,
|
|
24601
24917
|
onToggleContextItem: toggleContextItem,
|
|
24602
24918
|
onRemoveContextItem: removeContextItem,
|
|
24603
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
24604
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
24919
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _822 => _822.items]),
|
|
24920
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _823 => _823.onRemove]),
|
|
24605
24921
|
contextPickerOpen,
|
|
24606
24922
|
onOpenContextPicker: openContextPicker,
|
|
24607
24923
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -24656,7 +24972,7 @@ function EmbeddableChatInner({
|
|
|
24656
24972
|
resizable: true,
|
|
24657
24973
|
minSize: 480,
|
|
24658
24974
|
maxSize: 1600,
|
|
24659
|
-
defaultSize: drawerDefaultWidth(),
|
|
24975
|
+
defaultSize: drawerDefaultWidth(historyListMode),
|
|
24660
24976
|
storageKey: DRAWER_WIDTH_KEY,
|
|
24661
24977
|
resizeAriaLabel: "Resize chat panel",
|
|
24662
24978
|
overlayClassName: "mingo-chat-overlay",
|
|
@@ -25062,5 +25378,8 @@ function EmbeddableChatInner({
|
|
|
25062
25378
|
|
|
25063
25379
|
|
|
25064
25380
|
|
|
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
|
-
|
|
25381
|
+
|
|
25382
|
+
|
|
25383
|
+
|
|
25384
|
+
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.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;
|
|
25385
|
+
//# sourceMappingURL=chunk-IYEKAU4X.cjs.map
|