@flamingo-stack/openframe-frontend-core 0.0.584-1973.5461.1 → 0.0.584

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.
Files changed (162) hide show
  1. package/dist/chat-protocol/events.d.ts +2 -8
  2. package/dist/chat-protocol/events.d.ts.map +1 -1
  3. package/dist/chat-protocol/index.cjs +0 -188
  4. package/dist/chat-protocol/index.cjs.map +1 -1
  5. package/dist/chat-protocol/index.js +0 -188
  6. package/dist/chat-protocol/index.js.map +1 -1
  7. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  8. package/dist/{chunk-U7MJV2V7.cjs → chunk-33DHEEMP.cjs} +33 -33
  9. package/dist/{chunk-U7MJV2V7.cjs.map → chunk-33DHEEMP.cjs.map} +1 -1
  10. package/dist/{chunk-23VBGHBL.js → chunk-3ELW4VML.js} +2 -2
  11. package/dist/{chunk-7KBKLN2Z.cjs → chunk-3ZA2OYRE.cjs} +3 -3
  12. package/dist/{chunk-7KBKLN2Z.cjs.map → chunk-3ZA2OYRE.cjs.map} +1 -1
  13. package/dist/{chunk-73XDYWYG.js → chunk-4T5KOD3G.js} +5 -5
  14. package/dist/{chunk-MI6PPL3P.js → chunk-5CJKZHWO.js} +5 -5
  15. package/dist/{chunk-E7Q24T4G.js → chunk-6BJYPG2V.js} +3 -3
  16. package/dist/{chunk-YXNMLGFI.cjs → chunk-7X5TCK4R.cjs} +10 -10
  17. package/dist/{chunk-YXNMLGFI.cjs.map → chunk-7X5TCK4R.cjs.map} +1 -1
  18. package/dist/{chunk-7DEGEI7G.js → chunk-EJKEDCTH.js} +6 -6
  19. package/dist/{chunk-XIV5VDWL.cjs → chunk-HCKEDTKJ.cjs} +10 -10
  20. package/dist/{chunk-XIV5VDWL.cjs.map → chunk-HCKEDTKJ.cjs.map} +1 -1
  21. package/dist/{chunk-EQGAYDTC.cjs → chunk-IIT5HWLY.cjs} +9 -9
  22. package/dist/{chunk-EQGAYDTC.cjs.map → chunk-IIT5HWLY.cjs.map} +1 -1
  23. package/dist/{chunk-7SMYBCYH.cjs → chunk-IKUSKKFZ.cjs} +540 -883
  24. package/dist/chunk-IKUSKKFZ.cjs.map +1 -0
  25. package/dist/{chunk-JKYALZB7.cjs → chunk-JAJQ5P2Q.cjs} +22 -22
  26. package/dist/{chunk-JKYALZB7.cjs.map → chunk-JAJQ5P2Q.cjs.map} +1 -1
  27. package/dist/{chunk-WAXL3E3B.cjs → chunk-JFKK3ZOA.cjs} +43 -43
  28. package/dist/{chunk-WAXL3E3B.cjs.map → chunk-JFKK3ZOA.cjs.map} +1 -1
  29. package/dist/{chunk-AWAHYAII.js → chunk-JVWRMLQZ.js} +2 -2
  30. package/dist/{chunk-PZ27ELFP.cjs → chunk-JWKAJTNA.cjs} +43 -33
  31. package/dist/chunk-JWKAJTNA.cjs.map +1 -0
  32. package/dist/{chunk-PISJGXXI.js → chunk-KP6VJP36.js} +3 -3
  33. package/dist/{chunk-NSDZAUJK.js → chunk-LNKULR4V.js} +2 -2
  34. package/dist/{chunk-AFQB4YL7.cjs → chunk-MEJFHD5N.cjs} +15 -15
  35. package/dist/{chunk-AFQB4YL7.cjs.map → chunk-MEJFHD5N.cjs.map} +1 -1
  36. package/dist/{chunk-5VHCSN44.js → chunk-MYEG5ZDT.js} +2 -2
  37. package/dist/{chunk-MMA3MTJD.cjs → chunk-P2VRLSAP.cjs} +21 -21
  38. package/dist/{chunk-MMA3MTJD.cjs.map → chunk-P2VRLSAP.cjs.map} +1 -1
  39. package/dist/{chunk-7Q34BVL7.cjs → chunk-Q66AMADB.cjs} +4 -4
  40. package/dist/{chunk-7Q34BVL7.cjs.map → chunk-Q66AMADB.cjs.map} +1 -1
  41. package/dist/{chunk-4ARYZTGV.cjs → chunk-QJR32JM2.cjs} +159 -159
  42. package/dist/{chunk-4ARYZTGV.cjs.map → chunk-QJR32JM2.cjs.map} +1 -1
  43. package/dist/{chunk-M4IIK3B7.js → chunk-RURZ6QLN.js} +3 -3
  44. package/dist/{chunk-TCEU6DCF.js → chunk-TLKHLGAB.js} +3 -3
  45. package/dist/{chunk-JCWUJHOD.js → chunk-TOUD3AGK.js} +23 -13
  46. package/dist/chunk-TOUD3AGK.js.map +1 -0
  47. package/dist/{chunk-CHI7GJ3K.cjs → chunk-UCNEQKIT.cjs} +5 -5
  48. package/dist/{chunk-CHI7GJ3K.cjs.map → chunk-UCNEQKIT.cjs.map} +1 -1
  49. package/dist/{chunk-ZRGBLM6W.cjs → chunk-VOAZU46B.cjs} +69 -69
  50. package/dist/{chunk-ZRGBLM6W.cjs.map → chunk-VOAZU46B.cjs.map} +1 -1
  51. package/dist/{chunk-GYJVLFK5.js → chunk-VZSTL5VG.js} +2 -2
  52. package/dist/{chunk-3CAC3AAE.js → chunk-XPJKQ63S.js} +3 -3
  53. package/dist/{chunk-KSC5LNSY.js → chunk-XWBND4G5.js} +187 -530
  54. package/dist/chunk-XWBND4G5.js.map +1 -0
  55. package/dist/{chunk-22DWXIV3.js → chunk-YFZDIEVC.js} +5 -5
  56. package/dist/{chunk-7J7XDGY6.cjs → chunk-ZHUBNWEX.cjs} +3 -3
  57. package/dist/{chunk-7J7XDGY6.cjs.map → chunk-ZHUBNWEX.cjs.map} +1 -1
  58. package/dist/components/case-studies/index.cjs +9 -9
  59. package/dist/components/case-studies/index.js +3 -3
  60. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  61. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  62. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  63. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  64. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +1 -4
  65. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
  66. package/dist/components/chat/hooks/use-slash-commands.d.ts +3 -3
  67. package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
  68. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +28 -2
  69. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
  70. package/dist/components/chat/index.cjs +2 -2
  71. package/dist/components/chat/index.js +1 -1
  72. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  73. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  74. package/dist/components/chat/types/component.types.d.ts +0 -4
  75. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  76. package/dist/components/chat/types/message.types.d.ts +1 -35
  77. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  78. package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
  79. package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
  80. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  81. package/dist/components/contact/index.cjs +4 -4
  82. package/dist/components/contact/index.js +3 -3
  83. package/dist/components/docs/index.cjs +7 -7
  84. package/dist/components/docs/index.js +6 -6
  85. package/dist/components/embeds/index.cjs +4 -4
  86. package/dist/components/embeds/index.js +3 -3
  87. package/dist/components/faq/index.cjs +4 -4
  88. package/dist/components/faq/index.js +3 -3
  89. package/dist/components/features/index.cjs +3 -3
  90. package/dist/components/features/index.js +2 -2
  91. package/dist/components/help-center-pages/index.cjs +23 -23
  92. package/dist/components/help-center-pages/index.js +14 -14
  93. package/dist/components/index.cjs +36 -36
  94. package/dist/components/index.js +13 -13
  95. package/dist/components/meeting-scheduler/index.cjs +21 -21
  96. package/dist/components/meeting-scheduler/index.js +2 -2
  97. package/dist/components/navigation/index.cjs +6 -6
  98. package/dist/components/navigation/index.js +5 -5
  99. package/dist/components/navigation/navigation-sidebar-item.d.ts.map +1 -1
  100. package/dist/components/onboarding-guides/index.cjs +6 -6
  101. package/dist/components/onboarding-guides/index.js +5 -5
  102. package/dist/components/tickets/index.cjs +7 -7
  103. package/dist/components/tickets/index.js +6 -6
  104. package/dist/components/ui/hover-dropdown.d.ts.map +1 -1
  105. package/dist/components/ui/index.cjs +3 -3
  106. package/dist/components/ui/index.js +2 -2
  107. package/dist/index.cjs +7 -7
  108. package/dist/index.js +6 -6
  109. package/dist/utils/index.cjs.map +1 -1
  110. package/dist/utils/index.js.map +1 -1
  111. package/package.json +1 -1
  112. package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +0 -130
  113. package/src/chat-protocol/events.ts +1 -9
  114. package/src/chat-protocol/nats-decoder.ts +0 -7
  115. package/src/components/chat/__tests__/chat-message-list.test.tsx +0 -70
  116. package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +0 -86
  117. package/src/components/chat/chat-message-enhanced.tsx +13 -28
  118. package/src/components/chat/chat-message-list.tsx +22 -27
  119. package/src/components/chat/embeddable-chat.tsx +36 -55
  120. package/src/components/chat/entity-cards/dispatch.tsx +17 -86
  121. package/src/components/chat/hooks/use-nats-chat-adapter.ts +0 -7
  122. package/src/components/chat/hooks/use-slash-commands.ts +5 -9
  123. package/src/components/chat/hooks/use-sse-chat-adapter.ts +29 -2
  124. package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -56
  125. package/src/components/chat/stream/chat-stream-reducer.ts +0 -31
  126. package/src/components/chat/tool-execution-display.tsx +2 -5
  127. package/src/components/chat/types/component.types.ts +0 -4
  128. package/src/components/chat/types/message.types.ts +0 -39
  129. package/src/components/chat/types/unified-chat-state.types.ts +3 -4
  130. package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +0 -57
  131. package/src/components/chat/utils/process-historical-messages.ts +1 -19
  132. package/src/components/navigation/navigation-sidebar-item.tsx +19 -9
  133. package/src/components/ui/hover-dropdown.tsx +3 -8
  134. package/dist/chat-protocol/source-metadata.d.ts +0 -5
  135. package/dist/chat-protocol/source-metadata.d.ts.map +0 -1
  136. package/dist/chunk-7SMYBCYH.cjs.map +0 -1
  137. package/dist/chunk-JCWUJHOD.js.map +0 -1
  138. package/dist/chunk-KSC5LNSY.js.map +0 -1
  139. package/dist/chunk-PZ27ELFP.cjs.map +0 -1
  140. package/dist/components/chat/utils/chat-source-metadata.d.ts +0 -5
  141. package/dist/components/chat/utils/chat-source-metadata.d.ts.map +0 -1
  142. package/src/chat-protocol/__tests__/source-metadata.test.ts +0 -74
  143. package/src/chat-protocol/source-metadata.ts +0 -202
  144. package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +0 -411
  145. package/src/components/chat/__tests__/tool-execution-display.test.tsx +0 -93
  146. package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +0 -74
  147. package/src/components/chat/hooks/__tests__/use-slash-commands.test.ts +0 -64
  148. package/src/components/chat/utils/chat-source-metadata.ts +0 -19
  149. /package/dist/{chunk-23VBGHBL.js.map → chunk-3ELW4VML.js.map} +0 -0
  150. /package/dist/{chunk-73XDYWYG.js.map → chunk-4T5KOD3G.js.map} +0 -0
  151. /package/dist/{chunk-MI6PPL3P.js.map → chunk-5CJKZHWO.js.map} +0 -0
  152. /package/dist/{chunk-E7Q24T4G.js.map → chunk-6BJYPG2V.js.map} +0 -0
  153. /package/dist/{chunk-7DEGEI7G.js.map → chunk-EJKEDCTH.js.map} +0 -0
  154. /package/dist/{chunk-AWAHYAII.js.map → chunk-JVWRMLQZ.js.map} +0 -0
  155. /package/dist/{chunk-PISJGXXI.js.map → chunk-KP6VJP36.js.map} +0 -0
  156. /package/dist/{chunk-NSDZAUJK.js.map → chunk-LNKULR4V.js.map} +0 -0
  157. /package/dist/{chunk-5VHCSN44.js.map → chunk-MYEG5ZDT.js.map} +0 -0
  158. /package/dist/{chunk-M4IIK3B7.js.map → chunk-RURZ6QLN.js.map} +0 -0
  159. /package/dist/{chunk-TCEU6DCF.js.map → chunk-TLKHLGAB.js.map} +0 -0
  160. /package/dist/{chunk-GYJVLFK5.js.map → chunk-VZSTL5VG.js.map} +0 -0
  161. /package/dist/{chunk-3CAC3AAE.js.map → chunk-XPJKQ63S.js.map} +0 -0
  162. /package/dist/{chunk-22DWXIV3.js.map → chunk-YFZDIEVC.js.map} +0 -0
@@ -1156,8 +1156,6 @@ import { forwardRef as forwardRef6 } from "react";
1156
1156
  var MESSAGE_TYPE = {
1157
1157
  TEXT: "TEXT",
1158
1158
  THINKING: "THINKING",
1159
- GUIDE: "GUIDE",
1160
- SOURCES: "SOURCES",
1161
1159
  ASK: "ASK",
1162
1160
  EXECUTING_TOOL: "EXECUTING_TOOL",
1163
1161
  EXECUTED_TOOL: "EXECUTED_TOOL",
@@ -6856,8 +6854,6 @@ var ToolExecutionDisplay = forwardRef15(
6856
6854
  }, [message.parameters, variant]);
6857
6855
  const hasResult = isExecuted && typeof message.result === "string" && message.result.length > 0;
6858
6856
  const hasBody = argEntries.length > 0 || hasResult || isExecuting;
6859
- const isConciseRemoteRead = !message.integratedToolType && !!message.toolTitle?.trim() && argEntries.length === 0 && !hasResult;
6860
- const isStaticRow = isClientView || isConciseRemoteRead;
6861
6857
  const renderStatusIcon = () => {
6862
6858
  if (isExecuting) return /* @__PURE__ */ jsx34(DotsLoaderIcon, { size: 16, className: "text-ods-text-secondary" });
6863
6859
  if (isExecuted && message.success === true) return /* @__PURE__ */ jsx34(CheckCircleIcon, { className: "h-4 w-4 text-ods-success" });
@@ -6877,7 +6873,7 @@ var ToolExecutionDisplay = forwardRef15(
6877
6873
  }
6878
6874
  ),
6879
6875
  /* @__PURE__ */ jsx34("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: renderStatusIcon() }),
6880
- !isStaticRow && /* @__PURE__ */ jsx34("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx34(ExpandChevron, { expanded }) })
6876
+ !isClientView && /* @__PURE__ */ jsx34("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx34(ExpandChevron, { expanded }) })
6881
6877
  ] });
6882
6878
  return /* @__PURE__ */ jsx34(
6883
6879
  "div",
@@ -6890,7 +6886,7 @@ var ToolExecutionDisplay = forwardRef15(
6890
6886
  className
6891
6887
  ),
6892
6888
  ...props,
6893
- children: isStaticRow ? (
6889
+ children: isClientView ? (
6894
6890
  // Client (Fae end-user): static, non-expandable row — no chevron, no
6895
6891
  // body. Just the explanation + status; command/args/result are hidden.
6896
6892
  /* @__PURE__ */ jsx34("div", { className: "flex w-full items-start gap-[var(--spacing-system-xs)] p-[var(--spacing-system-s)] text-left", children: headerContent })
@@ -6984,7 +6980,6 @@ var ChatMessageEnhanced = forwardRef16(
6984
6980
  renderContextItem,
6985
6981
  renderMention,
6986
6982
  renderEntityCard,
6987
- refs,
6988
6983
  onAskSelect,
6989
6984
  NavLinkAnchor,
6990
6985
  ...props
@@ -6993,10 +6988,6 @@ var ChatMessageEnhanced = forwardRef16(
6993
6988
  const isError = role === "error";
6994
6989
  const authorType = authorTypeProp ?? (isUser ? "user" : assistantType === "mingo" ? "mingo" : "fae");
6995
6990
  const hasMarkerSupport = !!renderEntityCard;
6996
- const refsByKey = useMemo8(
6997
- () => new Map((refs ?? []).map((reference) => [`${reference.type}:${reference.id}`, reference])),
6998
- [refs]
6999
- );
7000
6991
  const segments = useMemo8(() => normalizeContent(content), [content]);
7001
6992
  const askRuns = useMemo8(() => groupAskRuns(segments), [segments]);
7002
6993
  const hasMentionSupport = !!renderMention;
@@ -7045,15 +7036,14 @@ var ChatMessageEnhanced = forwardRef16(
7045
7036
  const key = `${cardType}:${cardId}`;
7046
7037
  usedKeys.add(key);
7047
7038
  let entry = cache.get(key);
7048
- const enrichedRef = refsByKey.get(key);
7049
- const refForRender = enrichedRef ?? {
7050
- type: cardType,
7051
- id: cardId,
7052
- title: cardId,
7053
- url: null
7054
- };
7055
- if (!entry || entry.render !== render || entry.reference !== refForRender) {
7056
- entry = { render, reference: refForRender, node: render(refForRender) };
7039
+ if (!entry || entry.render !== render) {
7040
+ const refForRender = {
7041
+ type: cardType,
7042
+ id: cardId,
7043
+ title: cardId,
7044
+ url: null
7045
+ };
7046
+ entry = { render, node: render(refForRender) };
7057
7047
  cache.set(key, entry);
7058
7048
  }
7059
7049
  const rendered = entry.node;
@@ -7087,7 +7077,7 @@ var ChatMessageEnhanced = forwardRef16(
7087
7077
  }
7088
7078
  });
7089
7079
  return { inlineByKey, partsBySegment, usedKeys };
7090
- }, [hasMarkerSupport, refsByKey, renderEntityCard, segments]);
7080
+ }, [hasMarkerSupport, renderEntityCard, segments]);
7091
7081
  useEffect6(() => {
7092
7082
  const cache = renderedCardNodeCache.current;
7093
7083
  const usedKeys = renderingPlan?.usedKeys;
@@ -7314,7 +7304,7 @@ var MemoizedChatMessageEnhanced = memo2(ChatMessageEnhanced, (prevProps, nextPro
7314
7304
  // message (it's set once on the optimistic send and never mutated).
7315
7305
  prevProps.contextItems === nextProps.contextItems && prevProps.resolveContextIcon === nextProps.resolveContextIcon && prevProps.renderContextItem === nextProps.renderContextItem && // Host keeps this stable (module const / useCallback), so reference
7316
7306
  // equality holds across streaming chunks.
7317
- prevProps.renderMention === nextProps.renderMention && prevProps.renderEntityCard === nextProps.renderEntityCard && prevProps.refs === nextProps.refs && // Same stability contract as the renderers above: hosts pass a `useCallback`
7307
+ prevProps.renderMention === nextProps.renderMention && prevProps.renderEntityCard === nextProps.renderEntityCard && // Same stability contract as the renderers above: hosts pass a `useCallback`
7318
7308
  // (EmbeddableChat passes its memoized `handleSend`), so this holds across
7319
7309
  // streaming chunks instead of re-rendering every ask card per chunk.
7320
7310
  prevProps.onAskSelect === nextProps.onAskSelect && prevProps.NavLinkAnchor === nextProps.NavLinkAnchor;
@@ -7323,7 +7313,6 @@ MemoizedChatMessageEnhanced.displayName = "MemoizedChatMessageEnhanced";
7323
7313
 
7324
7314
  // src/components/chat/chat-message-list.tsx
7325
7315
  import {
7326
- Fragment as Fragment11,
7327
7316
  useRef as useRef5,
7328
7317
  useState as useState14,
7329
7318
  useCallback as useCallback5,
@@ -7527,7 +7516,6 @@ var ChatMessageList = forwardRef17(
7527
7516
  renderContextItem,
7528
7517
  renderMention,
7529
7518
  onAskSelect,
7530
- renderAfterMessage,
7531
7519
  NavLinkAnchor,
7532
7520
  ...props
7533
7521
  }, ref) => {
@@ -7884,34 +7872,31 @@ var ChatMessageList = forwardRef17(
7884
7872
  if (message.hidden) return null;
7885
7873
  const isEmptyPendingTurn = index === messages.length - 1 && isTyping && message.role === "assistant" && !hasNonEmptyContent(message.content) && (!Array.isArray(message.content) || message.content.every((s) => s.type === "text"));
7886
7874
  if (isEmptyPendingTurn) return null;
7887
- return /* @__PURE__ */ jsxs28(Fragment11, { children: [
7888
- /* @__PURE__ */ jsx38(
7889
- MemoizedChatMessageEnhanced,
7890
- {
7891
- ref: getRegisterMessageEl(message.id),
7892
- role: message.role,
7893
- name: message.name,
7894
- content: message.content,
7895
- timestamp: message.timestamp,
7896
- isTyping: index === messages.length - 1 && isTyping && message.role === "assistant",
7897
- avatar: showAvatars ? message.avatar : null,
7898
- showAvatar: showAvatars,
7899
- assistantType: message.assistantType || assistantType,
7900
- approvalVariant,
7901
- authorType: message.authorType,
7902
- assistantIcon: message.role !== "user" ? assistantIcon : void 0,
7903
- contextItems: message.contextItems,
7904
- resolveContextIcon,
7905
- renderContextItem,
7906
- renderMention,
7907
- renderEntityCard,
7908
- refs: message.refs,
7909
- onAskSelect: index > lastUserMessageIndex ? onAskSelect : void 0,
7910
- NavLinkAnchor
7911
- }
7912
- ),
7913
- renderAfterMessage?.(message, index)
7914
- ] }, message.id);
7875
+ return /* @__PURE__ */ jsx38(
7876
+ MemoizedChatMessageEnhanced,
7877
+ {
7878
+ ref: getRegisterMessageEl(message.id),
7879
+ role: message.role,
7880
+ name: message.name,
7881
+ content: message.content,
7882
+ timestamp: message.timestamp,
7883
+ isTyping: index === messages.length - 1 && isTyping && message.role === "assistant",
7884
+ avatar: showAvatars ? message.avatar : null,
7885
+ showAvatar: showAvatars,
7886
+ assistantType: message.assistantType || assistantType,
7887
+ approvalVariant,
7888
+ authorType: message.authorType,
7889
+ assistantIcon: message.role !== "user" ? assistantIcon : void 0,
7890
+ contextItems: message.contextItems,
7891
+ resolveContextIcon,
7892
+ renderContextItem,
7893
+ renderMention,
7894
+ renderEntityCard,
7895
+ onAskSelect: index > lastUserMessageIndex ? onAskSelect : void 0,
7896
+ NavLinkAnchor
7897
+ },
7898
+ message.id
7899
+ );
7915
7900
  })
7916
7901
  ]
7917
7902
  }
@@ -8089,7 +8074,7 @@ function EntityIcon({
8089
8074
  }
8090
8075
 
8091
8076
  // src/components/chat/quick-action-chip.tsx
8092
- import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
8077
+ import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
8093
8078
  var AGENT_ACCENTS = { fae: "pink", mingo: "cyan" };
8094
8079
  function getAgentAccent(slug) {
8095
8080
  return slug === "fae" || slug === "mingo" ? AGENT_ACCENTS[slug] : void 0;
@@ -8117,7 +8102,7 @@ function renderQuickActionIcon(icon) {
8117
8102
  }
8118
8103
  function composeChipLabel(label, lozenge) {
8119
8104
  if (!lozenge) return label;
8120
- return /* @__PURE__ */ jsxs30(Fragment12, { children: [
8105
+ return /* @__PURE__ */ jsxs30(Fragment11, { children: [
8121
8106
  /* @__PURE__ */ jsx42(
8122
8107
  "span",
8123
8108
  {
@@ -8154,7 +8139,7 @@ function QuickActionChipSkeleton({
8154
8139
  size: size2,
8155
8140
  className,
8156
8141
  icon: icon ? /* @__PURE__ */ jsx42(ChipSkelBar, { className: size2 === "large" ? "block size-5" : "block size-4" }) : void 0,
8157
- label: /* @__PURE__ */ jsxs30(Fragment12, { children: [
8142
+ label: /* @__PURE__ */ jsxs30(Fragment11, { children: [
8158
8143
  lozenge && /* @__PURE__ */ jsx42(ChipSkelBar, { className: "mr-2 inline-block h-[16px] w-[26px] translate-y-[2px]" }),
8159
8144
  /* @__PURE__ */ jsx42(ChipSkelBar, { className: "inline-block h-[0.9em] translate-y-[0.08em]", style: { width: `${labelCh}ch` } })
8160
8145
  ] })
@@ -8244,7 +8229,7 @@ import {
8244
8229
  useState as useState16,
8245
8230
  useSyncExternalStore as useSyncExternalStore2
8246
8231
  } from "react";
8247
- import { Fragment as Fragment13, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
8232
+ import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
8248
8233
  function normalizeFades(fade) {
8249
8234
  if (fade === void 0) return [];
8250
8235
  return typeof fade === "string" ? [fade] : fade;
@@ -8332,7 +8317,7 @@ function MarqueeWallFades({
8332
8317
  fadeColor = "var(--color-bg)",
8333
8318
  fadeSize
8334
8319
  }) {
8335
- return /* @__PURE__ */ jsx43(Fragment13, { children: normalizeFades(fade).map((edge) => {
8320
+ return /* @__PURE__ */ jsx43(Fragment12, { children: normalizeFades(fade).map((edge) => {
8336
8321
  const size2 = (typeof fadeSize === "object" && fadeSize !== null ? fadeSize[edge] : fadeSize) ?? DEFAULT_FADE_SIZE[edge];
8337
8322
  const px = typeof size2 === "number" ? `${size2}px` : size2;
8338
8323
  const isY = edge === "top" || edge === "bottom";
@@ -9421,7 +9406,7 @@ function MingoChatHistory({
9421
9406
  }
9422
9407
 
9423
9408
  // src/components/chat/mingo-welcome.tsx
9424
- import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
9409
+ import { Fragment as Fragment13, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
9425
9410
  var DEFAULT_SUBTITLE = "Ready to help with your technical tasks. What can I do for you?";
9426
9411
  var DEFAULT_PROMO = {
9427
9412
  title: "New to OpenFrame?",
@@ -9488,7 +9473,7 @@ function MingoWelcome({
9488
9473
  /* @__PURE__ */ jsx52("p", { className: "text-body-sm text-ods-text-secondary", children: "Something went wrong reaching the server. Check your connection and try again." })
9489
9474
  ] }),
9490
9475
  onRetry && /* @__PURE__ */ jsx52(Button, { variant: "outline", size: "small", leftIcon: /* @__PURE__ */ jsx52(Refresh01RightIcon, {}), onClick: onRetry, children: "Try again" })
9491
- ] }) : isLoadingHistory ? /* @__PURE__ */ jsx52(MingoChatHistorySkeleton, {}) : /* @__PURE__ */ jsx52(Fragment14, { children: /* @__PURE__ */ jsxs39("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [
9476
+ ] }) : isLoadingHistory ? /* @__PURE__ */ jsx52(MingoChatHistorySkeleton, {}) : /* @__PURE__ */ jsx52(Fragment13, { children: /* @__PURE__ */ jsxs39("div", { className: "relative flex min-h-0 flex-1 flex-col", children: [
9492
9477
  /* @__PURE__ */ jsx52(
9493
9478
  "div",
9494
9479
  {
@@ -10085,7 +10070,7 @@ var ModalFooter = forwardRef20(({ children, className }, ref) => /* @__PURE__ */
10085
10070
  ModalFooter.displayName = "ModalV2Footer";
10086
10071
 
10087
10072
  // src/components/chat/mingo-chat-modals.tsx
10088
- import { Fragment as Fragment15, jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
10073
+ import { Fragment as Fragment14, jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
10089
10074
  var footerBtn = "flex-1 min-w-0 rounded-md px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent disabled:opacity-50 disabled:cursor-not-allowed";
10090
10075
  var cancelBtn = cn(footerBtn, "border border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-bg-hover");
10091
10076
  var saveBtn = cn(footerBtn, "bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover");
@@ -10156,7 +10141,7 @@ function ChatDialogModals({
10156
10141
  setRestoreTarget,
10157
10142
  onConfirmRestore
10158
10143
  }) {
10159
- return /* @__PURE__ */ jsxs45(Fragment15, { children: [
10144
+ return /* @__PURE__ */ jsxs45(Fragment14, { children: [
10160
10145
  /* @__PURE__ */ jsx58(
10161
10146
  RenameChatModal,
10162
10147
  {
@@ -10362,7 +10347,7 @@ function ChatPanelHeaderMobile({
10362
10347
  }
10363
10348
 
10364
10349
  // src/components/chat/chat-panel-header.tsx
10365
- import { Fragment as Fragment16, jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
10350
+ import { Fragment as Fragment15, jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
10366
10351
  function ChatPanelHeader({
10367
10352
  showBack = false,
10368
10353
  title,
@@ -10389,7 +10374,7 @@ function ChatPanelHeader({
10389
10374
  onRename && { id: "rename", label: "Rename chat", onClick: onRename },
10390
10375
  onArchive && { id: "archive", label: "Archive chat", onClick: onArchive }
10391
10376
  ].filter(Boolean);
10392
- return /* @__PURE__ */ jsxs48(Fragment16, { children: [
10377
+ return /* @__PURE__ */ jsxs48(Fragment15, { children: [
10393
10378
  !compact && /* @__PURE__ */ jsx62(
10394
10379
  ChatPanelHeaderMobile,
10395
10380
  {
@@ -10527,7 +10512,7 @@ function stripChatAttachmentMarkdown(text) {
10527
10512
  }
10528
10513
 
10529
10514
  // src/components/chat/chat-attachment-bar.tsx
10530
- import { Fragment as Fragment17, jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
10515
+ import { Fragment as Fragment16, jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
10531
10516
  var CHAT_ATTACHMENT_MIME_TYPES = [
10532
10517
  "image/jpeg",
10533
10518
  "image/png",
@@ -10557,7 +10542,7 @@ function ChatAttachmentAddButton({
10557
10542
  if (!canAddMore) return;
10558
10543
  fileInputRef.current?.click();
10559
10544
  };
10560
- return /* @__PURE__ */ jsxs49(Fragment17, { children: [
10545
+ return /* @__PURE__ */ jsxs49(Fragment16, { children: [
10561
10546
  /* @__PURE__ */ jsx63(
10562
10547
  "input",
10563
10548
  {
@@ -11104,11 +11089,11 @@ function ChatComposer({
11104
11089
  }
11105
11090
 
11106
11091
  // src/components/chat/chat-archive-page.tsx
11107
- import { Fragment as Fragment18, jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
11092
+ import { Fragment as Fragment17, jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
11108
11093
  function ChatArchivePage(props) {
11109
11094
  const { dialogs, onSelectDialog, isLoading = false, isFetching = false, hasMore = false, onLoadMore } = props;
11110
11095
  const suppressEmptyStateWhileFetching = isFetching;
11111
- return /* @__PURE__ */ jsxs53(Fragment18, { children: [
11096
+ return /* @__PURE__ */ jsxs53(Fragment17, { children: [
11112
11097
  !props.embedded && /* @__PURE__ */ jsx68(
11113
11098
  ChatPanelHeaderMobile,
11114
11099
  {
@@ -11214,7 +11199,7 @@ var ChatSidebarSkeleton = forwardRef23(
11214
11199
  ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
11215
11200
 
11216
11201
  // src/components/chat/chat-sidebar.tsx
11217
- import { Fragment as Fragment19, jsx as jsx70, jsxs as jsxs55 } from "react/jsx-runtime";
11202
+ import { Fragment as Fragment18, jsx as jsx70, jsxs as jsxs55 } from "react/jsx-runtime";
11218
11203
  var DialogListItem = forwardRef24(
11219
11204
  ({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
11220
11205
  const handleClick = (e) => {
@@ -11351,7 +11336,7 @@ var ChatSidebar = forwardRef24(
11351
11336
  },
11352
11337
  dialog.id
11353
11338
  )),
11354
- hasNextPage && /* @__PURE__ */ jsx70("div", { ref: loadMoreRef, children: isFetchingNextPage && /* @__PURE__ */ jsxs55(Fragment19, { children: [
11339
+ hasNextPage && /* @__PURE__ */ jsx70("div", { ref: loadMoreRef, children: isFetchingNextPage && /* @__PURE__ */ jsxs55(Fragment18, { children: [
11355
11340
  /* @__PURE__ */ jsx70(DialogListItemSkeleton, {}),
11356
11341
  /* @__PURE__ */ jsx70(DialogListItemSkeleton, {}),
11357
11342
  /* @__PURE__ */ jsx70(DialogListItemSkeleton, {})
@@ -11596,7 +11581,7 @@ function captionsEntityTypeForDocType(docType) {
11596
11581
  }
11597
11582
 
11598
11583
  // src/components/layout/page-heading.tsx
11599
- import { Fragment as Fragment20, jsx as jsx73, jsxs as jsxs56 } from "react/jsx-runtime";
11584
+ import { Fragment as Fragment19, jsx as jsx73, jsxs as jsxs56 } from "react/jsx-runtime";
11600
11585
  var PAGE_HEADING_CLASS = "text-h1 text-ods-text-primary";
11601
11586
  var SECTION_HEADING_CLASS = "text-h2 text-ods-text-primary";
11602
11587
  var DESCRIPTION_CLASS = "mt-6 max-w-[640px] font-body text-[16px] md:text-[18px] leading-[24px] md:leading-[28px] text-ods-text-secondary";
@@ -11610,7 +11595,7 @@ function PageHeading({
11610
11595
  const headingClass = className ? `${PAGE_HEADING_CLASS} ${className}` : PAGE_HEADING_CLASS;
11611
11596
  const descClass = descriptionClassName ? `${DESCRIPTION_CLASS} ${descriptionClassName}` : DESCRIPTION_CLASS;
11612
11597
  const hasDescription = description != null && description !== "" && typeof description !== "boolean";
11613
- return /* @__PURE__ */ jsxs56(Fragment20, { children: [
11598
+ return /* @__PURE__ */ jsxs56(Fragment19, { children: [
11614
11599
  /* @__PURE__ */ jsx73(Tag2, { className: headingClass, children }),
11615
11600
  hasDescription && /* @__PURE__ */ jsx73("p", { className: descClass, children: description })
11616
11601
  ] });
@@ -12776,7 +12761,7 @@ function CardHitLayer({
12776
12761
 
12777
12762
  // src/components/features/cards-strip.tsx
12778
12763
  import React5, { useCallback as useCallback12, useEffect as useEffect20, useMemo as useMemo21, useRef as useRef16, useState as useState26 } from "react";
12779
- import { Fragment as Fragment21, jsx as jsx79, jsxs as jsxs59 } from "react/jsx-runtime";
12764
+ import { Fragment as Fragment20, jsx as jsx79, jsxs as jsxs59 } from "react/jsx-runtime";
12780
12765
  var TRACK_GAP_PX = 16;
12781
12766
  var CHEVRON_SUPPRESS_MS = 4e3;
12782
12767
  var USER_SCROLL_SUPPRESS_MS = 3e3;
@@ -13153,7 +13138,7 @@ function CardsStrip(props) {
13153
13138
  ) })
13154
13139
  }
13155
13140
  ),
13156
- showChevrons && overflows && /* @__PURE__ */ jsxs59(Fragment21, { children: [
13141
+ showChevrons && overflows && /* @__PURE__ */ jsxs59(Fragment20, { children: [
13157
13142
  /* @__PURE__ */ jsx79(
13158
13143
  Button,
13159
13144
  {
@@ -13187,7 +13172,7 @@ function CardsStrip(props) {
13187
13172
 
13188
13173
  // src/components/features/video-hover-preview.tsx
13189
13174
  import { useEffect as useEffect21, useRef as useRef17, useState as useState27 } from "react";
13190
- import { Fragment as Fragment22, jsx as jsx80, jsxs as jsxs60 } from "react/jsx-runtime";
13175
+ import { Fragment as Fragment21, jsx as jsx80, jsxs as jsxs60 } from "react/jsx-runtime";
13191
13176
  function VideoHoverPreviewSurface({
13192
13177
  url,
13193
13178
  posterUrl = null,
@@ -13226,7 +13211,7 @@ function VideoHoverPreviewSurface({
13226
13211
  const showMedia = continuation || (gateControlled ? playerMounted : isNear);
13227
13212
  const { src: posterSrc, onError: onPosterError } = useCoverImageFallback(posterUrl);
13228
13213
  const facadeSkipped = preload === "none" && !posterSrc;
13229
- return /* @__PURE__ */ jsx80("div", { ref: rootElRef, className: cn("absolute inset-0", className), inert: isClone || void 0, children: showMedia ? /* @__PURE__ */ jsxs60(Fragment22, { children: [
13214
+ return /* @__PURE__ */ jsx80("div", { ref: rootElRef, className: cn("absolute inset-0", className), inert: isClone || void 0, children: showMedia ? /* @__PURE__ */ jsxs60(Fragment21, { children: [
13230
13215
  posterSrc ? /* @__PURE__ */ jsx80(
13231
13216
  next_image_default,
13232
13217
  {
@@ -13275,7 +13260,7 @@ function VideoHoverPreviewSurface({
13275
13260
  }
13276
13261
 
13277
13262
  // src/components/features/video-ratio-tabs.tsx
13278
- import { Fragment as Fragment23, jsx as jsx81, jsxs as jsxs61 } from "react/jsx-runtime";
13263
+ import { Fragment as Fragment22, jsx as jsx81, jsxs as jsxs61 } from "react/jsx-runtime";
13279
13264
  var TAB_TRIGGER_CLASS = "rounded-none border-b-2 border-transparent data-[state=active]:border-ods-accent data-[state=active]:bg-transparent data-[state=active]:shadow-none px-4 py-2 text-h6 text-ods-text-secondary data-[state=active]:text-ods-text-primary";
13280
13265
  var RATIO_GRID_CLASS = {
13281
13266
  portrait: "grid grid-cols-2 md:grid-cols-3 gap-4",
@@ -13296,7 +13281,7 @@ function RatioTabs({ groups, defaultTab, className = "" }) {
13296
13281
  const activeTabs = RATIO_TAB_CONFIG.filter((t) => groups[t.key].count > 0);
13297
13282
  if (activeTabs.length <= 1) {
13298
13283
  const active = activeTabs[0];
13299
- return active ? /* @__PURE__ */ jsx81(Fragment23, { children: groups[active.key].render() }) : null;
13284
+ return active ? /* @__PURE__ */ jsx81(Fragment22, { children: groups[active.key].render() }) : null;
13300
13285
  }
13301
13286
  const firstTab = defaultTab && groups[defaultTab].count > 0 ? defaultTab : activeTabs[0].key;
13302
13287
  return /* @__PURE__ */ jsxs61(Tabs, { defaultValue: firstTab, className: `w-full ${className}`, children: [
@@ -13339,7 +13324,7 @@ function groupByAspectRatio(items, getAspectRatio) {
13339
13324
  }
13340
13325
 
13341
13326
  // src/components/features/video-bites-strip.tsx
13342
- import { Fragment as Fragment24, jsx as jsx82, jsxs as jsxs62 } from "react/jsx-runtime";
13327
+ import { Fragment as Fragment23, jsx as jsx82, jsxs as jsxs62 } from "react/jsx-runtime";
13343
13328
  function VideoBitesStrip({
13344
13329
  bites,
13345
13330
  title = DEFAULT_VIDEO_BITES_TITLE,
@@ -13452,7 +13437,7 @@ function VideoBiteCard({
13452
13437
  if (isTouch && !isActive) activate();
13453
13438
  };
13454
13439
  const titleClass = "text-h6 text-ods-text-primary";
13455
- const overlayContent = /* @__PURE__ */ jsxs62(Fragment24, { children: [
13440
+ const overlayContent = /* @__PURE__ */ jsxs62(Fragment23, { children: [
13456
13441
  titleEditable ? (
13457
13442
  // Textarea, not input: the public title wraps to two lines
13458
13443
  // (line-clamp-2) and the editor must render identically. rows=1 +
@@ -13524,7 +13509,7 @@ function VideoBiteCard({
13524
13509
  // the bottom strip, so the card centre (where the play glyph sits) was
13525
13510
  // not clickable and showed no pointer cursor even though the glyph
13526
13511
  // accented on hover. One interactive element, no a11y duplication.
13527
- /* @__PURE__ */ jsxs62(Fragment24, { children: [
13512
+ /* @__PURE__ */ jsxs62(Fragment23, { children: [
13528
13513
  /* @__PURE__ */ jsx82(
13529
13514
  CardHitLayer,
13530
13515
  {
@@ -13570,7 +13555,7 @@ function VideoBiteCard({
13570
13555
  }
13571
13556
 
13572
13557
  // src/components/features/entity-video-section.tsx
13573
- import { Fragment as Fragment25, jsx as jsx83, jsxs as jsxs63 } from "react/jsx-runtime";
13558
+ import { Fragment as Fragment24, jsx as jsx83, jsxs as jsxs63 } from "react/jsx-runtime";
13574
13559
  function EntityVideoSection({
13575
13560
  mainVideoUrl,
13576
13561
  youtubeUrl,
@@ -13606,7 +13591,7 @@ function EntityVideoSection({
13606
13591
  }
13607
13592
  const fullVideoUrl = youtubeUrl || mainVideoUrl || null;
13608
13593
  const fullVideoKind = youtubeUrl ? "youtube" : "auto";
13609
- return /* @__PURE__ */ jsxs63(Fragment25, { children: [
13594
+ return /* @__PURE__ */ jsxs63(Fragment24, { children: [
13610
13595
  hasVideo && (fullVideoUrl && hasHighlight ? /* @__PURE__ */ jsxs63(Tabs, { defaultValue: "full-video", className: "w-full", children: [
13611
13596
  /* @__PURE__ */ jsxs63(TabsList, { className: "inline-flex h-auto justify-start gap-0 rounded-none bg-transparent p-0", children: [
13612
13597
  /* @__PURE__ */ jsx83(
@@ -13719,7 +13704,7 @@ function ChatVideoEntityCard({ chatRef }) {
13719
13704
  // src/components/chat/entity-cards/github-activity-card.tsx
13720
13705
  import { GitPullRequest, Eye, ExternalLink } from "lucide-react";
13721
13706
  import React6 from "react";
13722
- import { Fragment as Fragment26, jsx as jsx85, jsxs as jsxs64 } from "react/jsx-runtime";
13707
+ import { Fragment as Fragment25, jsx as jsx85, jsxs as jsxs64 } from "react/jsx-runtime";
13723
13708
  function parseRepoFromUrl(url) {
13724
13709
  if (!url) return null;
13725
13710
  try {
@@ -13854,7 +13839,7 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
13854
13839
  /* @__PURE__ */ jsx85("span", { className: "whitespace-nowrap", children: dateText }, "date")
13855
13840
  );
13856
13841
  const href = safeHref(item.url);
13857
- const body = /* @__PURE__ */ jsxs64(Fragment26, { children: [
13842
+ const body = /* @__PURE__ */ jsxs64(Fragment25, { children: [
13858
13843
  /* @__PURE__ */ jsx85("span", { className: COMPACT_CARD_ICON_SLOT, children: kindIcon(kind, "h-5 w-5") }),
13859
13844
  /* @__PURE__ */ jsxs64("span", { className: COMPACT_CARD_TEXT_COL, children: [
13860
13845
  /* @__PURE__ */ jsxs64("span", { className: `${COMPACT_CARD_TITLE_ROW} flex-nowrap gap-1.5`, children: [
@@ -13903,7 +13888,7 @@ function GitHubActivityCardSkeleton({
13903
13888
  // src/components/chat/entity-cards/slack-message-card.tsx
13904
13889
  import { ExternalLink as ExternalLink2, Hash } from "lucide-react";
13905
13890
  import React7 from "react";
13906
- import { Fragment as Fragment27, jsx as jsx86, jsxs as jsxs65 } from "react/jsx-runtime";
13891
+ import { Fragment as Fragment26, jsx as jsx86, jsxs as jsxs65 } from "react/jsx-runtime";
13907
13892
  function parseChannelFromUrl(url) {
13908
13893
  if (!url) return null;
13909
13894
  try {
@@ -13945,7 +13930,7 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
13945
13930
  /* @__PURE__ */ jsx86("span", { className: "whitespace-nowrap", children: dateText }, "date")
13946
13931
  );
13947
13932
  const href = safeHref(item.url);
13948
- const body = /* @__PURE__ */ jsxs65(Fragment27, { children: [
13933
+ const body = /* @__PURE__ */ jsxs65(Fragment26, { children: [
13949
13934
  /* @__PURE__ */ jsx86("span", { className: COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ jsx86(SlackIcon, { className: "h-5 w-5" }) }),
13950
13935
  /* @__PURE__ */ jsxs65("span", { className: COMPACT_CARD_TEXT_COL, children: [
13951
13936
  /* @__PURE__ */ jsx86("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx86("span", { className: COMPACT_CARD_TITLE, children: item.title }) }),
@@ -13989,7 +13974,7 @@ function SlackMessageCardSkeleton({
13989
13974
  // src/components/chat/entity-cards/hubspot-ticket-card.tsx
13990
13975
  import { ExternalLink as ExternalLink3 } from "lucide-react";
13991
13976
  import React8 from "react";
13992
- import { Fragment as Fragment28, jsx as jsx87, jsxs as jsxs66 } from "react/jsx-runtime";
13977
+ import { Fragment as Fragment27, jsx as jsx87, jsxs as jsxs66 } from "react/jsx-runtime";
13993
13978
  function formatToken(token) {
13994
13979
  if (!token) return null;
13995
13980
  const lower = token.toLowerCase().replace(/_/g, " ");
@@ -14031,7 +14016,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
14031
14016
  /* @__PURE__ */ jsx87("span", { className: "whitespace-nowrap", children: dateText }, "date")
14032
14017
  );
14033
14018
  const href = safeHref(item.url);
14034
- const body = /* @__PURE__ */ jsxs66(Fragment28, { children: [
14019
+ const body = /* @__PURE__ */ jsxs66(Fragment27, { children: [
14035
14020
  /* @__PURE__ */ jsxs66("span", { className: COMPACT_CARD_TEXT_COL, children: [
14036
14021
  /* @__PURE__ */ jsxs66("span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
14037
14022
  /* @__PURE__ */ jsx87("span", { className: `${COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
@@ -14105,9 +14090,9 @@ function HubspotTicketCardSkeleton({
14105
14090
 
14106
14091
  // src/components/chat/entity-cards/data-room-doc-card.tsx
14107
14092
  import { ExternalLink as ExternalLink4 } from "lucide-react";
14108
- import { Fragment as Fragment29, jsx as jsx88, jsxs as jsxs67 } from "react/jsx-runtime";
14093
+ import { Fragment as Fragment28, jsx as jsx88, jsxs as jsxs67 } from "react/jsx-runtime";
14109
14094
  function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
14110
- const body = /* @__PURE__ */ jsxs67(Fragment29, { children: [
14095
+ const body = /* @__PURE__ */ jsxs67(Fragment28, { children: [
14111
14096
  /* @__PURE__ */ jsxs67("span", { className: COMPACT_CARD_TEXT_COL, children: [
14112
14097
  /* @__PURE__ */ jsxs67("span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
14113
14098
  /* @__PURE__ */ jsx88("span", { className: `${COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
@@ -14145,10 +14130,10 @@ function DataRoomDocCardSkeleton({ className }) {
14145
14130
 
14146
14131
  // src/components/chat/entity-cards/campaign-card-admin.tsx
14147
14132
  import { Megaphone as Megaphone3 } from "lucide-react";
14148
- import { Fragment as Fragment30, jsx as jsx89, jsxs as jsxs68 } from "react/jsx-runtime";
14133
+ import { Fragment as Fragment29, jsx as jsx89, jsxs as jsxs68 } from "react/jsx-runtime";
14149
14134
  function CampaignCardAdmin({ campaign, className, anchorProps }) {
14150
14135
  const goalsCount = campaign.goals?.length || 0;
14151
- const innerChildren = /* @__PURE__ */ jsxs68(Fragment30, { children: [
14136
+ const innerChildren = /* @__PURE__ */ jsxs68(Fragment29, { children: [
14152
14137
  /* @__PURE__ */ jsx89("span", { className: COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ jsx89(Megaphone3, { className: "h-5 w-5" }) }),
14153
14138
  /* @__PURE__ */ jsxs68("span", { className: COMPACT_CARD_TEXT_COL, children: [
14154
14139
  /* @__PURE__ */ jsx89("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx89("span", { className: COMPACT_CARD_TITLE, children: campaign.name }) }),
@@ -14178,11 +14163,11 @@ function CampaignCardAdminSkeleton({ className }) {
14178
14163
 
14179
14164
  // src/components/chat/entity-cards/generic-entity-card.tsx
14180
14165
  import { ExternalLink as ExternalLink5 } from "lucide-react";
14181
- import { Fragment as Fragment31, jsx as jsx90, jsxs as jsxs69 } from "react/jsx-runtime";
14166
+ import { Fragment as Fragment30, jsx as jsx90, jsxs as jsxs69 } from "react/jsx-runtime";
14182
14167
  function GenericEntityCard({ item, className, anchorProps }) {
14183
14168
  const href = safeHref(item.url);
14184
14169
  const dateText = formatDateUTC(item.dateUpdated, { fallback: "", timezone: "local" });
14185
- const body = /* @__PURE__ */ jsxs69(Fragment31, { children: [
14170
+ const body = /* @__PURE__ */ jsxs69(Fragment30, { children: [
14186
14171
  /* @__PURE__ */ jsxs69("span", { className: COMPACT_CARD_TEXT_COL, children: [
14187
14172
  /* @__PURE__ */ jsxs69("span", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
14188
14173
  /* @__PURE__ */ jsx90("span", { className: `${COMPACT_CARD_TITLE} min-w-0 shrink`, children: item.title }),
@@ -14235,190 +14220,6 @@ function GenericEntityCardSkeleton({ className }) {
14235
14220
  // src/components/chat/entity-cards/dispatch.tsx
14236
14221
  import React9 from "react";
14237
14222
 
14238
- // src/chat-protocol/source-metadata.ts
14239
- var CARD_REFERENCE = /^\[card:\/\/([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)\]$/;
14240
- var SOURCE_METADATA_MATCHED = "sourceMetadataMatched";
14241
- function isSourceMetadataCardRef(ref) {
14242
- return ref.metadata?.[SOURCE_METADATA_MATCHED] === true;
14243
- }
14244
- function requiredString(value) {
14245
- if (typeof value !== "string") return null;
14246
- const normalized = value.trim();
14247
- return normalized ? normalized : null;
14248
- }
14249
- function optionalString(value) {
14250
- return requiredString(value) ?? void 0;
14251
- }
14252
- function httpsUrl(value) {
14253
- const candidate = optionalString(value);
14254
- if (!candidate) return void 0;
14255
- try {
14256
- return new URL(candidate).protocol === "https:" ? candidate : void 0;
14257
- } catch {
14258
- return void 0;
14259
- }
14260
- }
14261
- function youtubeId(value) {
14262
- const candidate = optionalString(value);
14263
- if (!candidate) return void 0;
14264
- if (/^[A-Za-z0-9_-]{11}$/.test(candidate)) return candidate;
14265
- const url = httpsUrl(candidate);
14266
- if (!url) return void 0;
14267
- const parsed = new URL(url);
14268
- const hostname = parsed.hostname.toLowerCase();
14269
- const youtubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
14270
- if (!youtubeHost) return void 0;
14271
- const pathId = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : parsed.pathname.match(/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/)?.[1];
14272
- const id = pathId ?? parsed.searchParams.get("v") ?? void 0;
14273
- return id && /^[A-Za-z0-9_-]{11}$/.test(id) ? id : void 0;
14274
- }
14275
- function nullableString(value) {
14276
- return value === null ? null : optionalString(value);
14277
- }
14278
- function normalizeSourceItems(value) {
14279
- if (!Array.isArray(value)) return void 0;
14280
- const items = value.flatMap((candidate) => {
14281
- if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
14282
- const item = candidate;
14283
- const id = requiredString(item.id);
14284
- const documentType = requiredString(item.documentType);
14285
- const name = requiredString(item.name);
14286
- if (!id || !documentType || !name) return [];
14287
- const externalUrl = httpsUrl(item.externalUrl);
14288
- const targetPlatform = nullableString(item.targetPlatform);
14289
- const path = nullableString(item.path);
14290
- return [
14291
- {
14292
- id,
14293
- documentType,
14294
- name,
14295
- ...externalUrl ? { externalUrl } : {},
14296
- ...targetPlatform !== void 0 ? { targetPlatform } : {},
14297
- ...path !== void 0 ? { path } : {}
14298
- }
14299
- ];
14300
- });
14301
- return items.length > 0 ? items : void 0;
14302
- }
14303
- function normalizeSources(value) {
14304
- if (!Array.isArray(value)) return [];
14305
- const seen = /* @__PURE__ */ new Set();
14306
- const sources = [];
14307
- for (const candidate of value) {
14308
- if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
14309
- const source = candidate;
14310
- const index = source.index;
14311
- const name = requiredString(source.name);
14312
- const path = requiredString(source.path);
14313
- const documentType = requiredString(source.documentType);
14314
- const validIndex = typeof index === "number" && Number.isFinite(index) && Number.isInteger(index) && index > 0 && !seen.has(index);
14315
- if (!validIndex || !name || !path || !documentType) continue;
14316
- seen.add(index);
14317
- const externalUrl = httpsUrl(source.externalUrl);
14318
- const targetPlatform = nullableString(source.targetPlatform);
14319
- const id = optionalString(source.id);
14320
- const sourceRepo = optionalString(source.sourceRepo);
14321
- const label = optionalString(source.label);
14322
- const items = normalizeSourceItems(source.items);
14323
- sources.push({
14324
- index,
14325
- name,
14326
- path,
14327
- documentType,
14328
- ...externalUrl ? { externalUrl } : {},
14329
- ...targetPlatform !== void 0 ? { targetPlatform } : {},
14330
- ...id ? { id } : {},
14331
- ...sourceRepo ? { sourceRepo } : {},
14332
- ...label ? { label } : {},
14333
- ...items ? { items } : {}
14334
- });
14335
- }
14336
- return sources;
14337
- }
14338
- function normalizeVideoMetadata(value) {
14339
- if (!value || typeof value !== "object" || Array.isArray(value)) return {};
14340
- const input = value;
14341
- const metadata = {};
14342
- for (const key of ["videoUrl", "highlightVideoUrl", "videoPoster", "highlightVideoPoster"]) {
14343
- const url = httpsUrl(input[key]);
14344
- if (url) metadata[key] = url;
14345
- }
14346
- const id = youtubeId(input.youtubeUrl);
14347
- if (id) metadata.youtubeUrl = id;
14348
- return metadata;
14349
- }
14350
- function normalizeVideos(value) {
14351
- if (!Array.isArray(value)) return [];
14352
- return value.flatMap((candidate) => {
14353
- if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
14354
- const video = candidate;
14355
- const match = typeof video.ref === "string" ? CARD_REFERENCE.exec(video.ref) : null;
14356
- if (!match || match[1] !== "video") return [];
14357
- const id = match[2];
14358
- const title = optionalString(video.title) ?? id;
14359
- const url = httpsUrl(video.url) ?? null;
14360
- const sourceRepo = optionalString(video.sourceRepo);
14361
- const metadata = normalizeVideoMetadata(video.metadata);
14362
- if (url) {
14363
- const idFromUrl = youtubeId(url);
14364
- if (idFromUrl) {
14365
- metadata.youtubeUrl = idFromUrl;
14366
- delete metadata.videoUrl;
14367
- } else {
14368
- metadata.videoUrl = url;
14369
- delete metadata.youtubeUrl;
14370
- }
14371
- }
14372
- return [
14373
- {
14374
- type: "video",
14375
- id,
14376
- title,
14377
- url,
14378
- ...sourceRepo ? { sourceRepo } : {},
14379
- ...Object.keys(metadata).length > 0 ? { metadata } : {}
14380
- }
14381
- ];
14382
- });
14383
- }
14384
- function normalizeCards(value, sources) {
14385
- if (!Array.isArray(value)) return [];
14386
- return value.flatMap((candidate) => {
14387
- if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return [];
14388
- const card = candidate;
14389
- const match = typeof card.ref === "string" ? CARD_REFERENCE.exec(card.ref) : null;
14390
- if (!match || match[1] === "video") return [];
14391
- const type = requiredString(card.entityType);
14392
- const id = requiredString(card.entityId);
14393
- if (!type || !id || type !== match[1] || id !== match[2]) return [];
14394
- const source = sources.find((item) => item.id === id && item.documentType === type);
14395
- const ref = {
14396
- type,
14397
- id,
14398
- title: source?.name ?? id,
14399
- url: source?.externalUrl ?? null,
14400
- ...source?.sourceRepo ? { sourceRepo: source.sourceRepo } : {},
14401
- ...source?.targetPlatform !== void 0 ? { targetPlatform: source.targetPlatform } : {},
14402
- ...source?.path ? { metadata: { path: source.path, [SOURCE_METADATA_MATCHED]: true } } : {}
14403
- };
14404
- return [ref];
14405
- });
14406
- }
14407
- function sourceMetadataEvent(payload) {
14408
- if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
14409
- const metadata = payload;
14410
- const sources = normalizeSources(metadata.sources);
14411
- const refs = [...normalizeVideos(metadata.videos), ...normalizeCards(metadata.cards, sources)];
14412
- const refsByIdentity = /* @__PURE__ */ new Map();
14413
- refs.forEach((ref) => {
14414
- const identity = `${ref.type}:${ref.id}`;
14415
- if (!refsByIdentity.has(identity)) refsByIdentity.set(identity, ref);
14416
- });
14417
- const uniqueRefs = Array.from(refsByIdentity.values());
14418
- if (sources.length === 0 && uniqueRefs.length === 0) return null;
14419
- return { type: "sources", sources, ...uniqueRefs.length > 0 ? { refs: uniqueRefs } : {} };
14420
- }
14421
-
14422
14223
  // src/utils/faq-anchor.ts
14423
14224
  function faqSectionSlug(section) {
14424
14225
  return "faq-" + section.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
@@ -14479,7 +14280,7 @@ function useChatCardItem(type, id) {
14479
14280
  }
14480
14281
 
14481
14282
  // src/components/chat/mingo-info-card.tsx
14482
- import { Fragment as Fragment32, jsx as jsx91, jsxs as jsxs70 } from "react/jsx-runtime";
14283
+ import { Fragment as Fragment31, jsx as jsx91, jsxs as jsxs70 } from "react/jsx-runtime";
14483
14284
  function CardMedia({ imageSrc, imageAlt, icon }) {
14484
14285
  if (imageSrc) {
14485
14286
  return /* @__PURE__ */ jsxs70("span", { className: "relative block size-10 shrink-0", children: [
@@ -14542,7 +14343,7 @@ function MingoInfoCard({
14542
14343
  const hasMenu = !!menuGroups && menuGroups.length > 0;
14543
14344
  const isAnchor = !!anchorProps;
14544
14345
  const isInteractive = isAnchor || !!onClick;
14545
- const content = /* @__PURE__ */ jsxs70(Fragment32, { children: [
14346
+ const content = /* @__PURE__ */ jsxs70(Fragment31, { children: [
14546
14347
  hasMedia && /* @__PURE__ */ jsx91(CardMedia, { imageSrc, imageAlt, icon }),
14547
14348
  /* @__PURE__ */ jsxs70("span", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [
14548
14349
  /* @__PURE__ */ jsx91("span", { className: "truncate text-ods-text-primary text-h4", children: title }),
@@ -14899,7 +14700,7 @@ function DeletedDataCard({ title, entityLabel, recoveryNote, className }) {
14899
14700
  }
14900
14701
 
14901
14702
  // src/components/chat/entity-cards/dispatch.tsx
14902
- import { Fragment as Fragment33, jsx as jsx93, jsxs as jsxs72 } from "react/jsx-runtime";
14703
+ import { Fragment as Fragment32, jsx as jsx93, jsxs as jsxs72 } from "react/jsx-runtime";
14903
14704
  function githubKindIcon(kind) {
14904
14705
  switch (kind) {
14905
14706
  case "pull_request":
@@ -14998,14 +14799,6 @@ function hubspotStatusToVariant(status) {
14998
14799
  if (s === "OPEN") return "warning";
14999
14800
  return "grey";
15000
14801
  }
15001
- function validatedHttpsUrl(value) {
15002
- if (typeof value !== "string") return null;
15003
- try {
15004
- return new URL(value).protocol === "https:" ? value : null;
15005
- } catch {
15006
- return null;
15007
- }
15008
- }
15009
14802
  function decodeVideoMarkerId(id) {
15010
14803
  const mux = id.match(/^mux-([A-Za-z0-9_-]+)$/);
15011
14804
  if (mux) {
@@ -15018,8 +14811,8 @@ function decodeVideoMarkerId(id) {
15018
14811
  try {
15019
14812
  const b64 = mp4[1].replace(/-/g, "+").replace(/_/g, "/");
15020
14813
  const url = atob(b64);
15021
- const safeUrl = validatedHttpsUrl(url);
15022
- return safeUrl ? { videoUrl: safeUrl } : null;
14814
+ if (!/^https:\/\//.test(url)) return null;
14815
+ return { videoUrl: url };
15023
14816
  } catch {
15024
14817
  return null;
15025
14818
  }
@@ -15027,26 +14820,6 @@ function decodeVideoMarkerId(id) {
15027
14820
  if (/^[A-Za-z0-9_-]{11}$/.test(id)) return { youtubeUrl: id };
15028
14821
  return null;
15029
14822
  }
15030
- function validatedVideoMetadata(chatRef) {
15031
- const input = chatRef.metadata ?? {};
15032
- const metadata = {};
15033
- for (const key of ["videoUrl", "highlightVideoUrl", "videoPoster", "highlightVideoPoster"]) {
15034
- const url = validatedHttpsUrl(input[key]);
15035
- if (url) metadata[key] = url;
15036
- }
15037
- const youtubeUrl = input.youtubeUrl;
15038
- if (typeof youtubeUrl === "string" && /^[A-Za-z0-9_-]{11}$/.test(youtubeUrl)) {
15039
- metadata.youtubeUrl = youtubeUrl;
15040
- }
15041
- const safeUrl = validatedHttpsUrl(chatRef.url);
15042
- if (safeUrl) {
15043
- const youtubeId2 = extractYouTubeId(safeUrl);
15044
- delete metadata.videoUrl;
15045
- delete metadata.youtubeUrl;
15046
- metadata[youtubeId2 ? "youtubeUrl" : "videoUrl"] = youtubeId2 ?? safeUrl;
15047
- }
15048
- return Object.keys(metadata).length > 0 ? metadata : null;
15049
- }
15050
14823
  function itemVideoMetadata(item) {
15051
14824
  const pick = (...vals) => {
15052
14825
  for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
@@ -15530,7 +15303,7 @@ function RoadmapChatCard({
15530
15303
  }
15531
15304
  );
15532
15305
  }
15533
- function refHydratedEntry(docType, label, renderRef, renderFromSourceMetadata = false) {
15306
+ function refHydratedEntry(docType, label, renderRef) {
15534
15307
  return {
15535
15308
  label,
15536
15309
  bareInline: true,
@@ -15538,19 +15311,7 @@ function refHydratedEntry(docType, label, renderRef, renderFromSourceMetadata =
15538
15311
  noComposedHref: true,
15539
15312
  fallbackHref: (item) => item?.url ?? null,
15540
15313
  skeleton: () => /* @__PURE__ */ jsx93(MingoInfoCardSkeleton, {}),
15541
- render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts),
15542
- renderFromSourceMetadata
15543
- };
15544
- }
15545
- function sourceMetadataCardItem(chatRef) {
15546
- return {
15547
- type: chatRef.type,
15548
- id: chatRef.id,
15549
- title: chatRef.title,
15550
- url: chatRef.url,
15551
- targetPlatform: chatRef.targetPlatform,
15552
- sourceRepo: chatRef.sourceRepo,
15553
- metadata: chatRef.metadata
15314
+ render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
15554
15315
  };
15555
15316
  }
15556
15317
  var FINANCIAL_CARD_CONFIGS = {
@@ -15702,18 +15463,8 @@ var CHAT_CARD_REGISTRY = {
15702
15463
  // config's searchFilter is deliberately fail-closed there. Same
15703
15464
  // ChatRef item shape (`buildHubspotTicketSelfRef` SSOT), same preset.
15704
15465
  hubspot_ticket_self: refHydratedEntry("hubspot_ticket_self", "HubSpot ticket (self)", (displayRef, opts) => /* @__PURE__ */ jsx93(HubspotTicketChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss })),
15705
- data_room_doc: refHydratedEntry(
15706
- "data_room_doc",
15707
- "Data-room doc",
15708
- (displayRef, opts) => /* @__PURE__ */ jsx93(DataRoomDocChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss }),
15709
- true
15710
- ),
15711
- markdown: refHydratedEntry(
15712
- "markdown",
15713
- "Doc page (markdown)",
15714
- (displayRef, opts) => /* @__PURE__ */ jsx93(DataRoomDocChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss }),
15715
- true
15716
- ),
15466
+ data_room_doc: refHydratedEntry("data_room_doc", "Data-room doc", (displayRef, opts) => /* @__PURE__ */ jsx93(DataRoomDocChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss })),
15467
+ markdown: refHydratedEntry("markdown", "Doc page (markdown)", (displayRef, opts) => /* @__PURE__ */ jsx93(DataRoomDocChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss })),
15717
15468
  // Body-synthesized video ids (`shortVideoId` content hashes / YouTube
15718
15469
  // ids) have no backing table row to fetch — ref-only by nature.
15719
15470
  video: {
@@ -15951,7 +15702,7 @@ function ChatCardLoader({
15951
15702
  children
15952
15703
  }
15953
15704
  );
15954
- const finish = (node) => entry.bareInline ? /* @__PURE__ */ jsx93(Fragment33, { children: navWrap(node) }) : /* @__PURE__ */ jsx93(
15705
+ const finish = (node) => entry.bareInline ? /* @__PURE__ */ jsx93(Fragment32, { children: navWrap(node) }) : /* @__PURE__ */ jsx93(
15955
15706
  ChatCardWithDiscuss,
15956
15707
  {
15957
15708
  chatRef: finalChatRef,
@@ -15964,12 +15715,8 @@ function ChatCardLoader({
15964
15715
  if (!fetchEntry) {
15965
15716
  return finish(entry.render(void 0, finalChatRef, renderOpts));
15966
15717
  }
15967
- if (isLoading) return /* @__PURE__ */ jsx93(Fragment33, { children: fetchEntry.skeleton?.() ?? null });
15718
+ if (isLoading) return /* @__PURE__ */ jsx93(Fragment32, { children: fetchEntry.skeleton?.() ?? null });
15968
15719
  if (!item) {
15969
- const hasSourceMetadata = fetchEntry.renderFromSourceMetadata && isSourceMetadataCardRef(chatRef) && typeof finalChatRef.metadata?.path === "string";
15970
- if (hasSourceMetadata) {
15971
- return finish(fetchEntry.render(sourceMetadataCardItem(finalChatRef), finalChatRef, renderOpts));
15972
- }
15973
15720
  if (isError) {
15974
15721
  return /* @__PURE__ */ jsx93(CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
15975
15722
  }
@@ -16010,15 +15757,13 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
16010
15757
  }
16011
15758
  );
16012
15759
  if (chatRef.type === "video") {
16013
- const enrichedMetadata = validatedVideoMetadata(chatRef);
16014
15760
  const decoded = decodeVideoMarkerId(chatRef.id);
16015
- const playableMetadata = enrichedMetadata ?? decoded;
16016
- if (playableMetadata) {
15761
+ if (decoded) {
16017
15762
  const displayRef = {
16018
15763
  ...chatRef,
16019
15764
  title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : "Video",
16020
- url: chatRef.url ?? (typeof playableMetadata.videoUrl === "string" ? playableMetadata.videoUrl : null) ?? (typeof playableMetadata.youtubeUrl === "string" ? `https://www.youtube.com/watch?v=${playableMetadata.youtubeUrl}` : null),
16021
- metadata: playableMetadata
15765
+ url: chatRef.url ?? decoded.videoUrl ?? (decoded.youtubeUrl ? `https://www.youtube.com/watch?v=${decoded.youtubeUrl}` : null),
15766
+ metadata: { ...chatRef.metadata ?? {}, ...decoded }
16022
15767
  };
16023
15768
  return /* @__PURE__ */ jsx93(BlockCard, { inline: /* @__PURE__ */ jsx93(ChatInlineVideoPill, { chatRef: displayRef }), children: /* @__PURE__ */ jsx93(ChatVideoEntityCard, { chatRef: displayRef }) });
16024
15769
  }
@@ -17017,17 +16762,14 @@ function buildNatsWsUrl(apiBaseUrl, options) {
17017
16762
  // src/components/chat/hooks/use-slash-commands.ts
17018
16763
  import { useQuery as useQuery2 } from "@tanstack/react-query";
17019
16764
  import { useEffect as useEffect26, useState as useState32 } from "react";
17020
- var COMMANDS_MAX_RESULTS = 10;
17021
16765
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
17022
16766
  try {
17023
16767
  const url = new URL(commandsUrl, window.location.origin);
16768
+ if (prefix) url.searchParams.set("q", prefix);
17024
16769
  const res = await embedAuthedFetch(url.toString(), { signal, headers: {} });
17025
16770
  if (!res.ok) return [];
17026
16771
  const data = await res.json();
17027
- const commands = data.commands ?? [];
17028
- const normalizedPrefix = prefix.trim().toLowerCase();
17029
- if (!normalizedPrefix) return commands;
17030
- return commands.filter(({ id }) => id.startsWith(normalizedPrefix)).slice(0, COMMANDS_MAX_RESULTS);
16772
+ return data.commands ?? [];
17031
16773
  } catch (err) {
17032
16774
  if (err?.name === "AbortError") throw err;
17033
16775
  console.warn("[chat] slash-commands fetch failed, showing none:", err);
@@ -18120,23 +17862,6 @@ function approvalDisplaysInline(approvalType, displayApprovalTypes) {
18120
17862
  return !displayApprovalTypes || displayApprovalTypes.includes(approvalType);
18121
17863
  }
18122
17864
 
18123
- // src/components/chat/utils/chat-source-metadata.ts
18124
- function mergeChatSources(current, incoming) {
18125
- const sourcesByIndex = new Map((current ?? []).map((source) => [source.index, source]));
18126
- incoming.forEach((source) => {
18127
- if (!sourcesByIndex.has(source.index)) sourcesByIndex.set(source.index, source);
18128
- });
18129
- return Array.from(sourcesByIndex.values());
18130
- }
18131
- function mergeChatRefs(current, incoming) {
18132
- const refsByIdentity = new Map((current ?? []).map((ref) => [`${ref.type}:${ref.id}`, ref]));
18133
- incoming.forEach((ref) => {
18134
- const identity = `${ref.type}:${ref.id}`;
18135
- if (!refsByIdentity.has(identity)) refsByIdentity.set(identity, ref);
18136
- });
18137
- return Array.from(refsByIdentity.values());
18138
- }
18139
-
18140
17865
  // src/components/chat/stream/message-mutations.ts
18141
17866
  function nextId(role) {
18142
17867
  return `${role}-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
@@ -18996,8 +18721,6 @@ function createChatStreamReducer(options = {}) {
18996
18721
  const sourcesMap = /* @__PURE__ */ new Map();
18997
18722
  let sendCount = 0;
18998
18723
  let sseCurrentText = "";
18999
- let pendingSources;
19000
- let pendingRefs;
19001
18724
  let stateCache = null;
19002
18725
  function invalidate() {
19003
18726
  stateCache = null;
@@ -19059,17 +18782,6 @@ function createChatStreamReducer(options = {}) {
19059
18782
  }
19060
18783
  setMessagesInternal(stampTrailingAssistantSeq(updateTrailingAssistant(messages, segments), seq));
19061
18784
  }
19062
- function attachPendingSourceMetadata() {
19063
- if (!pendingSources && !pendingRefs) return;
19064
- const last = messages[messages.length - 1];
19065
- if (!last || last.role !== "assistant") return;
19066
- const next = {
19067
- ...last,
19068
- ...pendingSources ? { sources: pendingSources } : {},
19069
- ...pendingRefs ? { refs: pendingRefs } : {}
19070
- };
19071
- setMessagesInternal([...messages.slice(0, -1), next]);
19072
- }
19073
18785
  function applyStreamStartToState() {
19074
18786
  setPhaseInternal("streaming");
19075
18787
  const adoptTail = adoptTrailingAssistant;
@@ -19188,8 +18900,6 @@ function createChatStreamReducer(options = {}) {
19188
18900
  }
19189
18901
  switch (event.type) {
19190
18902
  case "turn-start": {
19191
- pendingSources = void 0;
19192
- pendingRefs = void 0;
19193
18903
  isInStream = true;
19194
18904
  hasEverStreamed = true;
19195
18905
  turnStartedAt = Date.now();
@@ -19204,14 +18914,6 @@ function createChatStreamReducer(options = {}) {
19204
18914
  emit("onStreamEnd");
19205
18915
  setPhaseInternal("idle");
19206
18916
  accumulator.resetSegments();
19207
- pendingSources = void 0;
19208
- pendingRefs = void 0;
19209
- break;
19210
- }
19211
- case "sources": {
19212
- pendingSources = mergeChatSources(pendingSources, event.sources);
19213
- if (event.refs) pendingRefs = mergeChatRefs(pendingRefs, event.refs);
19214
- attachPendingSourceMetadata();
19215
18917
  break;
19216
18918
  }
19217
18919
  case "metadata": {
@@ -19240,12 +18942,10 @@ function createChatStreamReducer(options = {}) {
19240
18942
  if (isInStream || !hasEverStreamed) {
19241
18943
  emitSegments(segments);
19242
18944
  applySegmentsToState(segments, withSeqMeta(void 0));
19243
- attachPendingSourceMetadata();
19244
18945
  } else {
19245
18946
  const delta = [{ type: kind, text: event.text }];
19246
18947
  emitSegments(delta, { append: true });
19247
18948
  applySegmentsToState(delta, withSeqMeta({ append: true }));
19248
- attachPendingSourceMetadata();
19249
18949
  }
19250
18950
  break;
19251
18951
  }
@@ -20933,11 +20633,6 @@ function decodeNatsChunk(chunk) {
20933
20633
  return { type: "thinking-delta", text: data.text, ...seq };
20934
20634
  }
20935
20635
  return null;
20936
- case MESSAGE_TYPE.GUIDE:
20937
- case MESSAGE_TYPE.SOURCES: {
20938
- const event = sourceMetadataEvent(data.payload);
20939
- return event ? { ...event, ...seq } : null;
20940
- }
20941
20636
  // An ask card is only an ask card with something to pick: a question and at
20942
20637
  // least one option. Anything less is dropped rather than rendered as an
20943
20638
  // empty card the user can't answer — the backend already falls back to a
@@ -21289,9 +20984,6 @@ function decodeHistoricalMessageData(data) {
21289
20984
  return { type: "thinking-delta", text: data.text };
21290
20985
  }
21291
20986
  return null;
21292
- case MESSAGE_TYPE.GUIDE:
21293
- case MESSAGE_TYPE.SOURCES:
21294
- return decodeNatsChunk({ type: data.type, payload: data.payload });
21295
20987
  // Same completeness gate as the live decoder (`decodeNatsChunk`): a
21296
20988
  // persisted row without a question or without options is not a card the
21297
20989
  // user can answer, so it replays as nothing rather than as empty chrome.
@@ -21647,8 +21339,6 @@ function processHistoricalMessages(messages, options = {}) {
21647
21339
  let currentAssistantTimestamp = null;
21648
21340
  let lastAssistantId = null;
21649
21341
  let currentAssistantStreamSeq;
21650
- let currentAssistantSources;
21651
- let currentAssistantRefs;
21652
21342
  const flushAssistantMessage = () => {
21653
21343
  const idToUse = lastAssistantId || currentAssistantId;
21654
21344
  if (idToUse && accumulator.hasContent()) {
@@ -21661,8 +21351,6 @@ function processHistoricalMessages(messages, options = {}) {
21661
21351
  authorType: assistantType,
21662
21352
  timestamp: currentAssistantTimestamp || /* @__PURE__ */ new Date(),
21663
21353
  avatar: assistantAvatar,
21664
- ...currentAssistantSources ? { sources: currentAssistantSources } : {},
21665
- ...currentAssistantRefs ? { refs: currentAssistantRefs } : {},
21666
21354
  ...currentAssistantStreamSeq !== void 0 ? { streamSeq: currentAssistantStreamSeq } : {}
21667
21355
  });
21668
21356
  accumulator.resetSegments();
@@ -21671,8 +21359,6 @@ function processHistoricalMessages(messages, options = {}) {
21671
21359
  currentAssistantTimestamp = null;
21672
21360
  lastAssistantId = null;
21673
21361
  currentAssistantStreamSeq = void 0;
21674
- currentAssistantSources = void 0;
21675
- currentAssistantRefs = void 0;
21676
21362
  };
21677
21363
  messages.forEach((msg, index) => {
21678
21364
  if (chatTypeFilter && msg.chatType !== chatTypeFilter) return;
@@ -21716,11 +21402,6 @@ function processHistoricalMessages(messages, options = {}) {
21716
21402
  messageDataArray.forEach((data) => {
21717
21403
  const event = decodeHistoricalMessageData(data);
21718
21404
  if (!event) return;
21719
- if (event.type === "sources") {
21720
- currentAssistantSources = mergeChatSources(currentAssistantSources, event.sources);
21721
- if (event.refs) currentAssistantRefs = mergeChatRefs(currentAssistantRefs, event.refs);
21722
- return;
21723
- }
21724
21405
  applyHistoryEvent(
21725
21406
  event,
21726
21407
  accumulator,
@@ -21813,17 +21494,13 @@ function mapProcessedToUnified(processed) {
21813
21494
  id: m.id,
21814
21495
  role: m.role,
21815
21496
  content: "",
21816
- segments: m.content,
21817
- ...m.sources ? { sources: m.sources } : {},
21818
- ...m.refs ? { refs: m.refs } : {}
21497
+ segments: m.content
21819
21498
  });
21820
21499
  } else {
21821
21500
  out.push({
21822
21501
  id: m.id,
21823
21502
  role: m.role,
21824
- content: m.content,
21825
- ...m.sources ? { sources: m.sources } : {},
21826
- ...m.refs ? { refs: m.refs } : {}
21503
+ content: m.content
21827
21504
  });
21828
21505
  }
21829
21506
  }
@@ -23107,7 +22784,7 @@ DrawerFooter.displayName = "DrawerFooter";
23107
22784
 
23108
22785
  // src/components/ui/hover-dropdown.tsx
23109
22786
  import { useState as useState43, useRef as useRef32, useCallback as useCallback24 } from "react";
23110
- import { Fragment as Fragment34, jsx as jsx96, jsxs as jsxs74 } from "react/jsx-runtime";
22787
+ import { Fragment as Fragment33, jsx as jsx96, jsxs as jsxs74 } from "react/jsx-runtime";
23111
22788
  function DefaultAnchor({ href, className, children }) {
23112
22789
  return /* @__PURE__ */ jsx96("a", { href, className, children });
23113
22790
  }
@@ -23121,7 +22798,6 @@ function HoverDropdown({
23121
22798
  }) {
23122
22799
  const [open, setOpen] = useState43(false);
23123
22800
  const timeoutRef = useRef32(void 0);
23124
- const clickPinnedRef = useRef32(false);
23125
22801
  const containerRef = useRef32(null);
23126
22802
  const panelRef = useRef32(null);
23127
22803
  useIsomorphicLayoutEffect(() => {
@@ -23156,17 +22832,14 @@ function HoverDropdown({
23156
22832
  setOpen(true);
23157
22833
  }, []);
23158
22834
  const hide = useCallback24(() => {
23159
- if (clickPinnedRef.current) return;
23160
22835
  timeoutRef.current = setTimeout(() => setOpen(false), hideDelay);
23161
22836
  }, [hideDelay]);
23162
22837
  const toggle = useCallback24((e) => {
23163
22838
  e.stopPropagation();
23164
22839
  clearTimeout(timeoutRef.current);
23165
- const pinned = !clickPinnedRef.current;
23166
- clickPinnedRef.current = pinned;
23167
- setOpen(pinned);
22840
+ setOpen((prev) => !prev);
23168
22841
  }, []);
23169
- if (items.length === 0) return /* @__PURE__ */ jsx96(Fragment34, { children });
22842
+ if (items.length === 0) return /* @__PURE__ */ jsx96(Fragment33, { children });
23170
22843
  const renderAnchorFn = renderAnchor ?? DefaultAnchor;
23171
22844
  return /* @__PURE__ */ jsxs74("div", { ref: containerRef, className: "relative inline-flex", onMouseEnter: show, onMouseLeave: hide, onClick: toggle, children: [
23172
22845
  children,
@@ -23176,7 +22849,7 @@ function HoverDropdown({
23176
22849
  className: `fixed z-[9999] max-h-[420px] min-w-[220px] max-w-[340px] overflow-y-auto rounded-lg border border-ods-border bg-ods-card p-1 shadow-xl ${className || ""}`,
23177
22850
  ref: panelRef,
23178
22851
  children: items.map((item, i) => {
23179
- const content = /* @__PURE__ */ jsxs74(Fragment34, { children: [
22852
+ const content = /* @__PURE__ */ jsxs74(Fragment33, { children: [
23180
22853
  item.icon && /* @__PURE__ */ jsx96("span", { className: "flex-shrink-0 [&_svg]:size-3.5", children: item.icon }),
23181
22854
  /* @__PURE__ */ jsx96("span", { className: "min-w-0 flex-1 truncate", children: item.label })
23182
22855
  ] });
@@ -23396,7 +23069,7 @@ function useChatDialogManager({
23396
23069
  }
23397
23070
 
23398
23071
  // src/components/chat/embeddable-chat.tsx
23399
- import { Fragment as Fragment35, jsx as jsx97, jsxs as jsxs75 } from "react/jsx-runtime";
23072
+ import { Fragment as Fragment34, jsx as jsx97, jsxs as jsxs75 } from "react/jsx-runtime";
23400
23073
  var DRAWER_DEFAULT_WIDTH_RATIO = 0.5;
23401
23074
  var DRAWER_WIDTH_KEY = "mingo-chat-width-v3";
23402
23075
  var DRAWER_DEFAULT_WIDTH_PX = 750;
@@ -23570,7 +23243,7 @@ function SourceChip({
23570
23243
  );
23571
23244
  }
23572
23245
  const displayName = src.name || formatRelativePath(src.path);
23573
- const chipBody = (label) => /* @__PURE__ */ jsxs75(Fragment35, { children: [
23246
+ const chipBody = (label) => /* @__PURE__ */ jsxs75(Fragment34, { children: [
23574
23247
  icon,
23575
23248
  /* @__PURE__ */ jsxs75("span", { className: "max-w-[160px] truncate", children: [
23576
23249
  "[",
@@ -23641,34 +23314,21 @@ function SourceChips({
23641
23314
  }) {
23642
23315
  const [expanded, setExpanded] = useState45(false);
23643
23316
  if (cited.length === 0) {
23644
- const visible = expanded ? uncited : uncited.slice(0, FALLBACK_TOP_RETRIEVED);
23645
- const hiddenCount2 = Math.max(0, uncited.length - FALLBACK_TOP_RETRIEVED);
23646
- if (visible.length === 0) return null;
23317
+ const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
23318
+ if (fallback.length === 0) return null;
23647
23319
  return /* @__PURE__ */ jsxs75("div", { className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
23648
23320
  /* @__PURE__ */ jsx97("span", { className: "uppercase text-ods-text-muted text-h6", children: "Top retrieved sources" }),
23649
- /* @__PURE__ */ jsxs75("div", { className: `flex flex-wrap gap-1.5 ${expanded ? "max-h-[200px] overflow-y-auto overscroll-contain" : ""}`, children: [
23650
- visible.map((src) => /* @__PURE__ */ jsx97(
23651
- SourceChip,
23652
- {
23653
- src,
23654
- baseRoute,
23655
- chipBasePlatform,
23656
- onClose,
23657
- onDiscuss
23658
- },
23659
- src.index
23660
- )),
23661
- hiddenCount2 > 0 && /* @__PURE__ */ jsx97(
23662
- "button",
23663
- {
23664
- onClick: () => setExpanded(!expanded),
23665
- className: "inline-flex cursor-pointer items-center gap-1 rounded border border-ods-accent bg-ods-card px-2 py-0.5 text-ods-accent transition-colors text-h6 hover:bg-ods-accent/10",
23666
- "aria-expanded": expanded,
23667
- "aria-label": expanded ? "Show fewer sources" : `Show ${hiddenCount2} additional retrieved sources`,
23668
- children: expanded ? "Show less" : `+${hiddenCount2} more retrieved ${hiddenCount2 === 1 ? "source" : "sources"}`
23669
- }
23670
- )
23671
- ] })
23321
+ /* @__PURE__ */ jsx97("div", { className: "flex flex-wrap gap-1.5", children: fallback.map((src) => /* @__PURE__ */ jsx97(
23322
+ SourceChip,
23323
+ {
23324
+ src,
23325
+ baseRoute,
23326
+ chipBasePlatform,
23327
+ onClose,
23328
+ onDiscuss
23329
+ },
23330
+ src.index
23331
+ )) })
23672
23332
  ] });
23673
23333
  }
23674
23334
  const hiddenCount = uncited.length;
@@ -24095,10 +23755,6 @@ function EmbeddableChatInner({
24095
23755
  // explicitly — see `Message.hidden` and `chat-message-list`'s skip.
24096
23756
  ...m.hidden ? { hidden: true } : {},
24097
23757
  ...m.scrollAnchor ? { scrollAnchor: m.scrollAnchor } : {},
24098
- // Preserve same-turn rich metadata. Source chips and entity-card
24099
- // renderers consume it after this raw-to-Message projection.
24100
- ...m.sources && m.sources.length > 0 ? { sources: m.sources } : {},
24101
- ...m.refs && m.refs.length > 0 ? { refs: m.refs } : {},
24102
23758
  // Forward attached context items so the user bubble renders its chips.
24103
23759
  ...m.contextItems && m.contextItems.length > 0 ? { contextItems: m.contextItems } : {}
24104
23760
  };
@@ -24250,32 +23906,21 @@ function EmbeddableChatInner({
24250
23906
  });
24251
23907
  return out;
24252
23908
  }, [commandsById, enabledSet]);
24253
- const renderSourcesAfterMessage = useCallback26(
24254
- (message, index) => {
24255
- if (message.role !== "assistant" || !message.sources?.length) return null;
24256
- if (chatLoading && index === messages.length - 1) return null;
24257
- const content = typeof message.content === "string" ? message.content : message.content.filter((segment) => segment.type === "text").map((segment) => segment.text).join("\n");
24258
- const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
24259
- const seenOrder = /* @__PURE__ */ new Map();
24260
- citationOrder.forEach((idx) => {
24261
- if (!seenOrder.has(idx)) seenOrder.set(idx, seenOrder.size);
24262
- });
24263
- const cited = message.sources.filter((s) => seenOrder.has(s.index)).sort((a, b) => (seenOrder.get(a.index) ?? 0) - (seenOrder.get(b.index) ?? 0));
24264
- const uncited = message.sources.filter((s) => !seenOrder.has(s.index));
24265
- return /* @__PURE__ */ jsx97("div", { className: "flex-shrink-0 pb-2", children: /* @__PURE__ */ jsx97(
24266
- SourceChips,
24267
- {
24268
- cited,
24269
- uncited,
24270
- baseRoute: resolvedBaseRoute,
24271
- chipBasePlatform,
24272
- onClose: handleNavigationClose,
24273
- onDiscuss: discussRef
24274
- }
24275
- ) });
24276
- },
24277
- [chatLoading, messages.length, resolvedBaseRoute, chipBasePlatform, handleNavigationClose, discussRef]
24278
- );
23909
+ const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
23910
+ const lastSources = useMemo29(() => {
23911
+ if (chatLoading) return void 0;
23912
+ const sources = lastAssistantMsg?.sources;
23913
+ if (!sources || sources.length === 0) return void 0;
23914
+ const content = lastAssistantMsg?.content || "";
23915
+ const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
23916
+ const seenOrder = /* @__PURE__ */ new Map();
23917
+ citationOrder.forEach((idx) => {
23918
+ if (!seenOrder.has(idx)) seenOrder.set(idx, seenOrder.size);
23919
+ });
23920
+ const cited = sources.filter((s) => seenOrder.has(s.index)).sort((a, b) => (seenOrder.get(a.index) ?? 0) - (seenOrder.get(b.index) ?? 0));
23921
+ const uncited = sources.filter((s) => !seenOrder.has(s.index));
23922
+ return { cited, uncited };
23923
+ }, [lastAssistantMsg, chatLoading]);
24279
23924
  const [portalHost, setPortalHost] = useState45(null);
24280
23925
  const [panelBoundary, setPanelBoundary] = useState45(null);
24281
23926
  const [panelWidth, setPanelWidth] = useState45(0);
@@ -24431,7 +24076,7 @@ function EmbeddableChatInner({
24431
24076
  // renders in the rail below); the chat block is untouched.
24432
24077
  // Back is a full-height leading cell, matching the other
24433
24078
  // header cells (not a small inline chevron).
24434
- /* @__PURE__ */ jsxs75(Fragment35, { children: [
24079
+ /* @__PURE__ */ jsxs75(Fragment34, { children: [
24435
24080
  /* @__PURE__ */ jsx97(ChatHeaderIconButton, { divider: "right", onClick: closeArchive, "aria-label": "Back to chats", children: /* @__PURE__ */ jsx97(Chevron02LeftIcon, { size: 24 }) }),
24436
24081
  /* @__PURE__ */ jsx97("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx97("span", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h3", children: "Chat Archive" }) })
24437
24082
  ] })
@@ -24440,7 +24085,7 @@ function EmbeddableChatInner({
24440
24085
  // search + archive controls. When search is open the
24441
24086
  // inline field takes over the title area in place
24442
24087
  // (Figma 116:51217) and the magnifier toggle is hidden.
24443
- /* @__PURE__ */ jsxs75(Fragment35, { children: [
24088
+ /* @__PURE__ */ jsxs75(Fragment34, { children: [
24444
24089
  railSearchOpen && mingoCaps.onSearchChange ? /* @__PURE__ */ jsx97(
24445
24090
  ChatHeaderSearchField,
24446
24091
  {
@@ -24448,7 +24093,7 @@ function EmbeddableChatInner({
24448
24093
  onSearchChange: mingoCaps.onSearchChange,
24449
24094
  onCollapse: () => setRailSearchOpen(false)
24450
24095
  }
24451
- ) : /* @__PURE__ */ jsxs75(Fragment35, { children: [
24096
+ ) : /* @__PURE__ */ jsxs75(Fragment34, { children: [
24452
24097
  /* @__PURE__ */ jsx97("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx97("span", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h3", children: "Current Chats" }) }),
24453
24098
  mingoCaps.onSearchChange && /* @__PURE__ */ jsx97(
24454
24099
  ChatHeaderIconButton,
@@ -24587,49 +24232,61 @@ function EmbeddableChatInner({
24587
24232
  onRetry: reloadDialogs
24588
24233
  }
24589
24234
  )
24590
- ) : /* @__PURE__ */ jsxs75(Fragment35, { children: [
24235
+ ) : /* @__PURE__ */ jsxs75(Fragment34, { children: [
24591
24236
  /* @__PURE__ */ jsx97("div", { ref: galleryPanelRef, className: "flex min-h-0 flex-1 flex-col p-[var(--spacing-system-m)]", children: /* @__PURE__ */ jsx97(
24592
24237
  "div",
24593
24238
  {
24594
24239
  className: "flex min-h-0 flex-1 flex-col duration-200 animate-in fade-in-0",
24595
- children: hasConversation ? /* @__PURE__ */ jsx97("div", { className: "flex min-h-0 flex-1 flex-col", children: messagesInitialLoading ? (
24596
- // Match the real list's `fullWidth` layout so swapping
24597
- // skeleton → bubbles doesn't shift the column. The panel
24598
- // wrapper above already pads (`p-[var(--spacing-system-m)]`),
24599
- // so the skeleton sits flush (no inner px/pb).
24600
- //
24601
- // In `previewMode` the chat lives in a fixed-height host box
24602
- // (e.g. the Mingo hero demo). The default bottom-anchored
24603
- // skeleton overflows a short panel and grows its OWN
24604
- // scrollbar — ugly. `fill` top-anchors + clips overflow so
24605
- // it reads as "the whole panel is loading" and never scrolls.
24606
- /* @__PURE__ */ jsx97(ChatMessageListSkeleton, { fullWidth: true, fill: previewMode, className: "flex-1" })
24607
- ) : /* @__PURE__ */ jsx97(
24608
- ChatMessageList,
24609
- {
24610
- messages,
24611
- isTyping: chatLoading,
24612
- pendingApprovals,
24613
- autoScroll: !previewMode,
24614
- pinBottom: previewMode,
24615
- overscrollContain: !previewMode,
24616
- assistantType: "mingo",
24617
- assistantIcon: mingoAssistantIcon,
24618
- renderEntityCard,
24619
- resolveContextIcon,
24620
- renderContextItem,
24621
- renderMention,
24622
- renderAfterMessage: renderSourcesAfterMessage,
24623
- onAskSelect: chatLoading || previewMode ? void 0 : handleAskSelect,
24624
- NavLinkAnchor: NavLinkAnchorViaRuntime,
24625
- className: previewMode ? "pointer-events-auto flex-1" : "flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
24626
- contentClassName: "max-w-none pb-0",
24627
- fullWidth: true,
24628
- hasNextPage: hasMoreMessages,
24629
- isFetchingNextPage: isMessagesLoading,
24630
- onLoadMore: loadMoreMessages
24631
- }
24632
- ) }) : activeMode === "mingo" ? (
24240
+ children: hasConversation ? /* @__PURE__ */ jsxs75("div", { className: "flex min-h-0 flex-1 flex-col", children: [
24241
+ messagesInitialLoading ? (
24242
+ // Match the real list's `fullWidth` layout so swapping
24243
+ // skeleton → bubbles doesn't shift the column. The panel
24244
+ // wrapper above already pads (`p-[var(--spacing-system-m)]`),
24245
+ // so the skeleton sits flush (no inner px/pb).
24246
+ //
24247
+ // In `previewMode` the chat lives in a fixed-height host box
24248
+ // (e.g. the Mingo hero demo). The default bottom-anchored
24249
+ // skeleton overflows a short panel and grows its OWN
24250
+ // scrollbar — ugly. `fill` top-anchors + clips overflow so
24251
+ // it reads as "the whole panel is loading" and never scrolls.
24252
+ /* @__PURE__ */ jsx97(ChatMessageListSkeleton, { fullWidth: true, fill: previewMode, className: "flex-1" })
24253
+ ) : /* @__PURE__ */ jsx97(
24254
+ ChatMessageList,
24255
+ {
24256
+ messages,
24257
+ isTyping: chatLoading,
24258
+ pendingApprovals,
24259
+ autoScroll: !previewMode,
24260
+ pinBottom: previewMode,
24261
+ overscrollContain: !previewMode,
24262
+ assistantType: "mingo",
24263
+ assistantIcon: mingoAssistantIcon,
24264
+ renderEntityCard,
24265
+ resolveContextIcon,
24266
+ renderContextItem,
24267
+ renderMention,
24268
+ onAskSelect: chatLoading || previewMode ? void 0 : handleAskSelect,
24269
+ NavLinkAnchor: NavLinkAnchorViaRuntime,
24270
+ className: previewMode ? "pointer-events-auto flex-1" : "flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
24271
+ contentClassName: "max-w-none pb-0",
24272
+ fullWidth: true,
24273
+ hasNextPage: hasMoreMessages,
24274
+ isFetchingNextPage: isMessagesLoading,
24275
+ onLoadMore: loadMoreMessages
24276
+ }
24277
+ ),
24278
+ lastSources && (lastSources.cited.length > 0 || lastSources.uncited.length > 0) && !chatLoading && /* @__PURE__ */ jsx97("div", { className: "flex-shrink-0 pb-2", children: /* @__PURE__ */ jsx97(
24279
+ SourceChips,
24280
+ {
24281
+ cited: lastSources.cited,
24282
+ uncited: lastSources.uncited,
24283
+ baseRoute: resolvedBaseRoute,
24284
+ chipBasePlatform,
24285
+ onClose: handleNavigationClose,
24286
+ onDiscuss: discussRef
24287
+ }
24288
+ ) })
24289
+ ] }) : activeMode === "mingo" ? (
24633
24290
  /* Figma node 7532:222444 — default (Mingo-mode) empty state:
24634
24291
  centred greeting + capability grid + Guide-chat promo +
24635
24292
  quick-action chips. Guide mode keeps the slash-command
@@ -24802,7 +24459,7 @@ function EmbeddableChatInner({
24802
24459
  ]
24803
24460
  }
24804
24461
  ) }) });
24805
- return /* @__PURE__ */ jsxs75(Fragment35, { children: [
24462
+ return /* @__PURE__ */ jsxs75(Fragment34, { children: [
24806
24463
  showInternalTrigger && !shellLess && /* @__PURE__ */ jsx97(
24807
24464
  "div",
24808
24465
  {
@@ -25191,4 +24848,4 @@ export {
25191
24848
  buildStreamFrames,
25192
24849
  EmbeddableChat
25193
24850
  };
25194
- //# sourceMappingURL=chunk-KSC5LNSY.js.map
24851
+ //# sourceMappingURL=chunk-XWBND4G5.js.map