@flamingo-stack/openframe-frontend-core 0.0.579-1952.5335.1 → 0.0.579

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 (236) hide show
  1. package/dist/chat-protocol/decode.d.ts.map +1 -1
  2. package/dist/chat-protocol/events.d.ts +47 -1
  3. package/dist/chat-protocol/events.d.ts.map +1 -1
  4. package/dist/chat-protocol/index.cjs +51 -0
  5. package/dist/chat-protocol/index.cjs.map +1 -1
  6. package/dist/chat-protocol/index.js +48 -1
  7. package/dist/chat-protocol/index.js.map +1 -1
  8. package/dist/chat-protocol/leading-frames.d.ts +9 -3
  9. package/dist/chat-protocol/leading-frames.d.ts.map +1 -1
  10. package/dist/chat-protocol/nats-decoder.d.ts +41 -0
  11. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  12. package/dist/{chunk-3B42TFEE.cjs → chunk-36TJYCF3.cjs} +27 -27
  13. package/dist/{chunk-3B42TFEE.cjs.map → chunk-36TJYCF3.cjs.map} +1 -1
  14. package/dist/{chunk-YYEVFC3K.cjs → chunk-37XJYOAY.cjs} +17 -17
  15. package/dist/{chunk-YYEVFC3K.cjs.map → chunk-37XJYOAY.cjs.map} +1 -1
  16. package/dist/{chunk-DBP7S75Q.js → chunk-3AX3ZEY3.js} +1481 -1318
  17. package/dist/chunk-3AX3ZEY3.js.map +1 -0
  18. package/dist/{chunk-DGB2FLFH.cjs → chunk-4FJSN2XW.cjs} +10 -10
  19. package/dist/{chunk-DGB2FLFH.cjs.map → chunk-4FJSN2XW.cjs.map} +1 -1
  20. package/dist/{chunk-WHSSI3S7.cjs → chunk-4HGRXFQP.cjs} +3 -3
  21. package/dist/{chunk-WHSSI3S7.cjs.map → chunk-4HGRXFQP.cjs.map} +1 -1
  22. package/dist/{chunk-SY5HCZZO.cjs → chunk-4LZ7B5H5.cjs} +5 -5
  23. package/dist/{chunk-SY5HCZZO.cjs.map → chunk-4LZ7B5H5.cjs.map} +1 -1
  24. package/dist/{chunk-XJ45MHWI.js → chunk-4WSKSNXL.js} +9 -9
  25. package/dist/{chunk-ZCEQLHU3.js → chunk-5Y6TPFW7.js} +5 -5
  26. package/dist/{chunk-EVTRRDIH.cjs → chunk-A6C5HOD7.cjs} +23 -23
  27. package/dist/{chunk-EVTRRDIH.cjs.map → chunk-A6C5HOD7.cjs.map} +1 -1
  28. package/dist/{chunk-RXZWUJEB.js → chunk-AKPLEWMH.js} +2 -2
  29. package/dist/{chunk-7WKFLOC7.cjs → chunk-BCJQ7CJE.cjs} +11 -11
  30. package/dist/{chunk-7WKFLOC7.cjs.map → chunk-BCJQ7CJE.cjs.map} +1 -1
  31. package/dist/{chunk-C4KL7OQI.js → chunk-BW4WDUSI.js} +3 -3
  32. package/dist/{chunk-L66XBQM6.js → chunk-CP5EYMNL.js} +276 -160
  33. package/dist/chunk-CP5EYMNL.js.map +1 -0
  34. package/dist/{chunk-QOPQ6BCA.js → chunk-D44S2QLI.js} +3 -3
  35. package/dist/{chunk-CGVPUA4X.js → chunk-DB3TV4CW.js} +6 -6
  36. package/dist/{chunk-PITZMTGE.cjs → chunk-FEVLXRTC.cjs} +506 -390
  37. package/dist/chunk-FEVLXRTC.cjs.map +1 -0
  38. package/dist/{chunk-TYJITV3H.js → chunk-H4BPHGU5.js} +3 -3
  39. package/dist/{chunk-C7Q2PVHD.cjs → chunk-H54EPP3P.cjs} +7 -7
  40. package/dist/{chunk-C7Q2PVHD.cjs.map → chunk-H54EPP3P.cjs.map} +1 -1
  41. package/dist/{chunk-NWAUHBYH.js → chunk-HGA74X35.js} +4 -4
  42. package/dist/{chunk-4C3MS2G6.cjs → chunk-HHJVIHVR.cjs} +81 -81
  43. package/dist/{chunk-4C3MS2G6.cjs.map → chunk-HHJVIHVR.cjs.map} +1 -1
  44. package/dist/{chunk-3XFMM34I.cjs → chunk-IFYQ7DHV.cjs} +48 -48
  45. package/dist/{chunk-3XFMM34I.cjs.map → chunk-IFYQ7DHV.cjs.map} +1 -1
  46. package/dist/{chunk-QYQXAXVR.cjs → chunk-IKDC3R7V.cjs} +4 -3
  47. package/dist/chunk-IKDC3R7V.cjs.map +1 -0
  48. package/dist/{chunk-W6JA6SFD.js → chunk-JRYS4VMV.js} +45 -45
  49. package/dist/chunk-JRYS4VMV.js.map +1 -0
  50. package/dist/{chunk-AT4WAFJO.js → chunk-L2CF2QZW.js} +7 -7
  51. package/dist/{chunk-2BFZHTSD.cjs → chunk-LEISUAHF.cjs} +18 -8
  52. package/dist/chunk-LEISUAHF.cjs.map +1 -0
  53. package/dist/{chunk-AAHKPPGQ.cjs → chunk-M5GWCMYE.cjs} +42 -42
  54. package/dist/{chunk-AAHKPPGQ.cjs.map → chunk-M5GWCMYE.cjs.map} +1 -1
  55. package/dist/{chunk-PQETCTJ4.js → chunk-MXOSTJAG.js} +4 -3
  56. package/dist/chunk-MXOSTJAG.js.map +1 -0
  57. package/dist/{chunk-653A7FPP.cjs → chunk-NPVDKOGD.cjs} +22 -22
  58. package/dist/{chunk-653A7FPP.cjs.map → chunk-NPVDKOGD.cjs.map} +1 -1
  59. package/dist/{chunk-2ML5QEDH.js → chunk-O2FTVZOD.js} +5 -5
  60. package/dist/{chunk-OCSAB6NT.cjs → chunk-OGZAFM6M.cjs} +5 -5
  61. package/dist/{chunk-OCSAB6NT.cjs.map → chunk-OGZAFM6M.cjs.map} +1 -1
  62. package/dist/{chunk-CSBNQJSI.js → chunk-PMENIZXI.js} +6 -6
  63. package/dist/{chunk-PFTEG6L7.js → chunk-PWOYEUIQ.js} +7 -7
  64. package/dist/{chunk-KXLJT5U5.js → chunk-QCP2KV7P.js} +5 -5
  65. package/dist/{chunk-6QDW4CDG.js → chunk-QGJYWLF4.js} +2 -2
  66. package/dist/{chunk-VLRXLTR4.cjs → chunk-RKGOVTXZ.cjs} +377 -214
  67. package/dist/chunk-RKGOVTXZ.cjs.map +1 -0
  68. package/dist/{chunk-HM2R5MDR.js → chunk-T5HDPHN6.js} +13 -3
  69. package/dist/chunk-T5HDPHN6.js.map +1 -0
  70. package/dist/{chunk-GP2QLZIN.cjs → chunk-YW4WBNYV.cjs} +37 -37
  71. package/dist/{chunk-GP2QLZIN.cjs.map → chunk-YW4WBNYV.cjs.map} +1 -1
  72. package/dist/{chunk-36NFJULV.cjs → chunk-ZI27ALYX.cjs} +41 -41
  73. package/dist/chunk-ZI27ALYX.cjs.map +1 -0
  74. package/dist/components/case-studies/index.cjs +12 -12
  75. package/dist/components/case-studies/index.js +6 -6
  76. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  77. package/dist/components/chat/guide-display.d.ts +14 -0
  78. package/dist/components/chat/guide-display.d.ts.map +1 -0
  79. package/dist/components/chat/index.cjs +11 -3
  80. package/dist/components/chat/index.cjs.map +1 -1
  81. package/dist/components/chat/index.d.ts +1 -0
  82. package/dist/components/chat/index.d.ts.map +1 -1
  83. package/dist/components/chat/index.js +10 -2
  84. package/dist/components/chat/stream/chat-stream-reducer.d.ts +9 -0
  85. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  86. package/dist/components/chat/stream/delta-batcher.d.ts +3 -3
  87. package/dist/components/chat/stream/delta-batcher.d.ts.map +1 -1
  88. package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
  89. package/dist/components/chat/types/component.types.d.ts +6 -0
  90. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  91. package/dist/components/chat/types/message.types.d.ts +30 -2
  92. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  93. package/dist/components/chat/types/network.types.d.ts +3 -1
  94. package/dist/components/chat/types/network.types.d.ts.map +1 -1
  95. package/dist/components/chat/types/processing.types.d.ts +4 -1
  96. package/dist/components/chat/types/processing.types.d.ts.map +1 -1
  97. package/dist/components/chat/utils/approval-display.d.ts +36 -8
  98. package/dist/components/chat/utils/approval-display.d.ts.map +1 -1
  99. package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
  100. package/dist/components/chat/utils/index.d.ts +1 -1
  101. package/dist/components/chat/utils/index.d.ts.map +1 -1
  102. package/dist/components/chat/utils/message-segment-accumulator.d.ts +16 -4
  103. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  104. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  105. package/dist/components/chat/utils/resolve-fetched-card-href.d.ts +1 -1
  106. package/dist/components/contact/index.cjs +7 -7
  107. package/dist/components/contact/index.js +6 -6
  108. package/dist/components/docs/index.cjs +10 -10
  109. package/dist/components/docs/index.js +9 -9
  110. package/dist/components/embeds/index.cjs +7 -7
  111. package/dist/components/embeds/index.js +6 -6
  112. package/dist/components/faq/index.cjs +7 -7
  113. package/dist/components/faq/index.js +6 -6
  114. package/dist/components/features/board/board.d.ts.map +1 -1
  115. package/dist/components/features/index.cjs +8 -6
  116. package/dist/components/features/index.cjs.map +1 -1
  117. package/dist/components/features/index.js +7 -5
  118. package/dist/components/features/sortable-list/index.d.ts +2 -1
  119. package/dist/components/features/sortable-list/index.d.ts.map +1 -1
  120. package/dist/components/features/sortable-list/sortable-list.d.ts +8 -1
  121. package/dist/components/features/sortable-list/sortable-list.d.ts.map +1 -1
  122. package/dist/components/features/sortable-list/sortable-move-buttons.d.ts +24 -0
  123. package/dist/components/features/sortable-list/sortable-move-buttons.d.ts.map +1 -0
  124. package/dist/components/features/sortable-list/use-sortable-item.d.ts +12 -4
  125. package/dist/components/features/sortable-list/use-sortable-item.d.ts.map +1 -1
  126. package/dist/components/features/ticket-status-config-list/ticket-status-config-list.d.ts +21 -5
  127. package/dist/components/features/ticket-status-config-list/ticket-status-config-list.d.ts.map +1 -1
  128. package/dist/components/help-center-pages/index.cjs +26 -26
  129. package/dist/components/help-center-pages/index.js +17 -17
  130. package/dist/components/index.cjs +139 -129
  131. package/dist/components/index.cjs.map +1 -1
  132. package/dist/components/index.js +26 -16
  133. package/dist/components/index.js.map +1 -1
  134. package/dist/components/meeting-scheduler/index.cjs +37 -37
  135. package/dist/components/meeting-scheduler/index.js +5 -5
  136. package/dist/components/navigation/index.cjs +9 -9
  137. package/dist/components/navigation/index.js +8 -8
  138. package/dist/components/onboarding-guides/index.cjs +9 -9
  139. package/dist/components/onboarding-guides/index.js +8 -8
  140. package/dist/components/tickets/index.cjs +10 -10
  141. package/dist/components/tickets/index.js +9 -9
  142. package/dist/components/ui/file-manager/index.cjs +4 -4
  143. package/dist/components/ui/file-manager/index.js +1 -1
  144. package/dist/components/ui/index.cjs +14 -6
  145. package/dist/components/ui/index.cjs.map +1 -1
  146. package/dist/components/ui/index.js +13 -5
  147. package/dist/components/ui/input.d.ts +2 -0
  148. package/dist/components/ui/input.d.ts.map +1 -1
  149. package/dist/components/ui/textarea.d.ts +2 -0
  150. package/dist/components/ui/textarea.d.ts.map +1 -1
  151. package/dist/components/ui/ticket-status-config-row.d.ts +10 -4
  152. package/dist/components/ui/ticket-status-config-row.d.ts.map +1 -1
  153. package/dist/hooks/index.cjs +7 -3
  154. package/dist/hooks/index.cjs.map +1 -1
  155. package/dist/hooks/index.js +6 -2
  156. package/dist/hooks/ui/index.d.ts +1 -0
  157. package/dist/hooks/ui/index.d.ts.map +1 -1
  158. package/dist/hooks/ui/use-drag-and-drop-enabled.d.ts +31 -0
  159. package/dist/hooks/ui/use-drag-and-drop-enabled.d.ts.map +1 -0
  160. package/dist/hooks/ui/use-media-query.d.ts.map +1 -1
  161. package/dist/index.cjs +25 -11
  162. package/dist/index.cjs.map +1 -1
  163. package/dist/index.js +23 -9
  164. package/dist/index.js.map +1 -1
  165. package/dist/utils/index.cjs.map +1 -1
  166. package/dist/utils/index.js.map +1 -1
  167. package/package.json +1 -4
  168. package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +80 -0
  169. package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +118 -1
  170. package/src/chat-protocol/decode.ts +4 -3
  171. package/src/chat-protocol/events.ts +51 -0
  172. package/src/chat-protocol/leading-frames.ts +9 -3
  173. package/src/chat-protocol/nats-decoder.ts +110 -1
  174. package/src/components/chat/__tests__/chat-pending-turn.test.tsx +19 -0
  175. package/src/components/chat/chat-message-enhanced.tsx +13 -1
  176. package/src/components/chat/guide-display.tsx +42 -0
  177. package/src/components/chat/index.ts +1 -0
  178. package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +90 -0
  179. package/src/components/chat/stream/chat-dialog-store.ts +1 -1
  180. package/src/components/chat/stream/chat-stream-reducer.ts +49 -11
  181. package/src/components/chat/stream/delta-batcher.ts +9 -4
  182. package/src/components/chat/stream/message-mutations.ts +2 -0
  183. package/src/components/chat/types/component.types.ts +9 -0
  184. package/src/components/chat/types/message.types.ts +32 -0
  185. package/src/components/chat/types/network.types.ts +3 -1
  186. package/src/components/chat/types/processing.types.ts +4 -1
  187. package/src/components/chat/utils/__tests__/process-historical-messages-approvals.test.ts +93 -0
  188. package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +78 -1
  189. package/src/components/chat/utils/approval-display.ts +53 -8
  190. package/src/components/chat/utils/extract-incomplete-message-state.ts +1 -0
  191. package/src/components/chat/utils/index.ts +6 -1
  192. package/src/components/chat/utils/message-segment-accumulator.ts +37 -3
  193. package/src/components/chat/utils/process-historical-messages.ts +44 -7
  194. package/src/components/chat/utils/resolve-fetched-card-href.ts +1 -1
  195. package/src/components/features/board/.board.md +1 -0
  196. package/src/components/features/board/board.tsx +11 -1
  197. package/src/components/features/sortable-list/.sortable-list.md +23 -12
  198. package/src/components/features/sortable-list/index.ts +2 -1
  199. package/src/components/features/sortable-list/sortable-list.tsx +16 -5
  200. package/src/components/features/sortable-list/sortable-move-buttons.tsx +81 -0
  201. package/src/components/features/sortable-list/use-sortable-item.ts +25 -13
  202. package/src/components/features/ticket-status-config-list/ticket-status-config-list.tsx +55 -62
  203. package/src/components/ui/.ticket-status-config-row.md +11 -9
  204. package/src/components/ui/input.tsx +5 -2
  205. package/src/components/ui/textarea.tsx +5 -2
  206. package/src/components/ui/ticket-status-config-row.tsx +162 -70
  207. package/src/hooks/ui/.index.md +1 -0
  208. package/src/hooks/ui/.use-drag-and-drop-enabled.md +32 -0
  209. package/src/hooks/ui/index.ts +1 -0
  210. package/src/hooks/ui/use-drag-and-drop-enabled.ts +37 -0
  211. package/src/hooks/ui/use-media-query.ts +3 -2
  212. package/src/stories/ChatMessageEnhanced.stories.tsx +7 -3
  213. package/dist/chunk-2BFZHTSD.cjs.map +0 -1
  214. package/dist/chunk-36NFJULV.cjs.map +0 -1
  215. package/dist/chunk-DBP7S75Q.js.map +0 -1
  216. package/dist/chunk-HM2R5MDR.js.map +0 -1
  217. package/dist/chunk-L66XBQM6.js.map +0 -1
  218. package/dist/chunk-PITZMTGE.cjs.map +0 -1
  219. package/dist/chunk-PQETCTJ4.js.map +0 -1
  220. package/dist/chunk-QYQXAXVR.cjs.map +0 -1
  221. package/dist/chunk-VLRXLTR4.cjs.map +0 -1
  222. package/dist/chunk-W6JA6SFD.js.map +0 -1
  223. /package/dist/{chunk-XJ45MHWI.js.map → chunk-4WSKSNXL.js.map} +0 -0
  224. /package/dist/{chunk-ZCEQLHU3.js.map → chunk-5Y6TPFW7.js.map} +0 -0
  225. /package/dist/{chunk-RXZWUJEB.js.map → chunk-AKPLEWMH.js.map} +0 -0
  226. /package/dist/{chunk-C4KL7OQI.js.map → chunk-BW4WDUSI.js.map} +0 -0
  227. /package/dist/{chunk-QOPQ6BCA.js.map → chunk-D44S2QLI.js.map} +0 -0
  228. /package/dist/{chunk-CGVPUA4X.js.map → chunk-DB3TV4CW.js.map} +0 -0
  229. /package/dist/{chunk-TYJITV3H.js.map → chunk-H4BPHGU5.js.map} +0 -0
  230. /package/dist/{chunk-NWAUHBYH.js.map → chunk-HGA74X35.js.map} +0 -0
  231. /package/dist/{chunk-AT4WAFJO.js.map → chunk-L2CF2QZW.js.map} +0 -0
  232. /package/dist/{chunk-2ML5QEDH.js.map → chunk-O2FTVZOD.js.map} +0 -0
  233. /package/dist/{chunk-CSBNQJSI.js.map → chunk-PMENIZXI.js.map} +0 -0
  234. /package/dist/{chunk-PFTEG6L7.js.map → chunk-PWOYEUIQ.js.map} +0 -0
  235. /package/dist/{chunk-KXLJT5U5.js.map → chunk-QCP2KV7P.js.map} +0 -0
  236. /package/dist/{chunk-6QDW4CDG.js.map → chunk-QGJYWLF4.js.map} +0 -0
@@ -21,7 +21,7 @@
21
21
 
22
22
 
23
23
 
24
- var _chunk36NFJULVcjs = require('./chunk-36NFJULV.cjs');
24
+ var _chunkZI27ALYXcjs = require('./chunk-ZI27ALYX.cjs');
25
25
 
26
26
 
27
27
  var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
@@ -453,7 +453,7 @@ var disabledTagClasses = [
453
453
  ];
454
454
  function TagLabel({ label, labelClassName }) {
455
455
  const isString = typeof label === "string";
456
- const { ref, isTruncated } = _chunk36NFJULVcjs.useIsTruncated.call(void 0, isString ? label : null);
456
+ const { ref, isTruncated } = _chunkZI27ALYXcjs.useIsTruncated.call(void 0, isString ? label : null);
457
457
  if (!isString) {
458
458
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkPRPZBXWZcjs.cn.call(void 0, "truncate", labelClassName), children: label });
459
459
  }
@@ -753,7 +753,7 @@ function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExe
753
753
  onClick: onToggle,
754
754
  className: "flex w-full cursor-pointer items-start gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-sf)] text-left",
755
755
  children: [
756
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36NFJULVcjs.ToolIcon, { toolType, size: 16 }) }),
756
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZI27ALYXcjs.ToolIcon, { toolType, size: 16 }) }),
757
757
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
758
758
  "div",
759
759
  {
@@ -1156,6 +1156,7 @@ TicketEscalatedMessage.displayName = "TicketEscalatedMessage";
1156
1156
  var MESSAGE_TYPE = {
1157
1157
  TEXT: "TEXT",
1158
1158
  THINKING: "THINKING",
1159
+ GUIDE: "GUIDE",
1159
1160
  ASK: "ASK",
1160
1161
  EXECUTING_TOOL: "EXECUTING_TOOL",
1161
1162
  EXECUTED_TOOL: "EXECUTED_TOOL",
@@ -1287,14 +1288,14 @@ function buildHeadingIdMap(content, sectionIds) {
1287
1288
  for (const section of sectionIds) {
1288
1289
  sectionIdMap.set(section.title, section.id);
1289
1290
  sectionIdMap.set(section.title.toLowerCase(), section.id);
1290
- sectionIdMap.set(_chunk36NFJULVcjs.stripHeadingEmojis.call(void 0, section.title).toLowerCase(), section.id);
1291
+ sectionIdMap.set(_chunkZI27ALYXcjs.stripHeadingEmojis.call(void 0, section.title).toLowerCase(), section.id);
1291
1292
  }
1292
1293
  }
1293
- const dedupe = _chunk36NFJULVcjs.createHeadingIdDeduper.call(void 0, );
1294
+ const dedupe = _chunkZI27ALYXcjs.createHeadingIdDeduper.call(void 0, );
1294
1295
  const map = /* @__PURE__ */ new Map();
1295
1296
  let sectionOrdinal = 0;
1296
1297
  let headingOrdinal = 0;
1297
- for (const { line, level, text: rawText } of _chunk36NFJULVcjs.scanHeadings.call(void 0, content)) {
1298
+ for (const { line, level, text: rawText } of _chunkZI27ALYXcjs.scanHeadings.call(void 0, content)) {
1298
1299
  const text = stripInlineMarkdown(rawText).trim();
1299
1300
  headingOrdinal++;
1300
1301
  if (level <= EXTRACTOR_MAX_LEVEL) sectionOrdinal++;
@@ -1303,8 +1304,8 @@ function buildHeadingIdMap(content, sectionIds) {
1303
1304
  for (const variation of [
1304
1305
  text,
1305
1306
  text.toLowerCase(),
1306
- _chunk36NFJULVcjs.stripHeadingEmojis.call(void 0, text),
1307
- _chunk36NFJULVcjs.stripHeadingEmojis.call(void 0, text).toLowerCase()
1307
+ _chunkZI27ALYXcjs.stripHeadingEmojis.call(void 0, text),
1308
+ _chunkZI27ALYXcjs.stripHeadingEmojis.call(void 0, text).toLowerCase()
1308
1309
  ]) {
1309
1310
  const id = sectionIdMap.get(variation);
1310
1311
  if (id) {
@@ -1314,7 +1315,7 @@ function buildHeadingIdMap(content, sectionIds) {
1314
1315
  }
1315
1316
  }
1316
1317
  if (assigned === void 0) {
1317
- const baseId = _chunk36NFJULVcjs.slugifyHeadingText.call(void 0, text);
1318
+ const baseId = _chunkZI27ALYXcjs.slugifyHeadingText.call(void 0, text);
1318
1319
  assigned = dedupe(
1319
1320
  baseId || (level <= EXTRACTOR_MAX_LEVEL ? `section-${sectionOrdinal}` : `heading-${headingOrdinal}`)
1320
1321
  );
@@ -1650,7 +1651,7 @@ function buildBaseComponents({
1650
1651
  const mapped = useHeadingId(node);
1651
1652
  const taken = useAssignedHeadingIds();
1652
1653
  const explicit = typeof _optionalChain([node, 'optionalAccess', _35 => _35.properties, 'optionalAccess', _36 => _36.id]) === "string" && node.properties.id !== "" ? node.properties.id : void 0;
1653
- const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(_chunk36NFJULVcjs.slugifyHeadingText.call(void 0, extractText(children)), taken)));
1654
+ const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(_chunkZI27ALYXcjs.slugifyHeadingText.call(void 0, extractText(children)), taken)));
1654
1655
  const EffectiveTag = Tag2 === "h1" && demoteMarkdownH1ToH2 ? "h2" : Tag2;
1655
1656
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EffectiveTag, { id: id || void 0, className: headingClassName, children });
1656
1657
  }
@@ -1725,10 +1726,10 @@ function buildBaseComponents({
1725
1726
  const handleAnchorClick = (e) => {
1726
1727
  if (inPageAnchorId === null) return;
1727
1728
  if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
1728
- const target = _chunk36NFJULVcjs.getHashTargetElement.call(void 0, inPageAnchorId);
1729
+ const target = _chunkZI27ALYXcjs.getHashTargetElement.call(void 0, inPageAnchorId);
1729
1730
  if (!_optionalChain([target, 'optionalAccess', _37 => _37.id])) return;
1730
1731
  e.preventDefault();
1731
- _chunk36NFJULVcjs.navigateSamePageHash.call(void 0, `#${target.id}`, { headerOffset: _chunk36NFJULVcjs.HUB_HEADER_OFFSET_PX });
1732
+ _chunkZI27ALYXcjs.navigateSamePageHash.call(void 0, `#${target.id}`, { headerOffset: _chunkZI27ALYXcjs.HUB_HEADER_OFFSET_PX });
1732
1733
  };
1733
1734
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1734
1735
  "a",
@@ -2247,7 +2248,7 @@ function findInlineCodeRanges(source) {
2247
2248
  while (pos <= len) {
2248
2249
  let end = source.indexOf("\n", pos);
2249
2250
  if (end === -1) end = len;
2250
- const blank = _chunk36NFJULVcjs.isBlankLine.call(void 0, source.slice(pos, end));
2251
+ const blank = _chunkZI27ALYXcjs.isBlankLine.call(void 0, source.slice(pos, end));
2251
2252
  if (blank && segStart !== -1) break;
2252
2253
  if (!blank) {
2253
2254
  if (segStart === -1) segStart = pos;
@@ -2329,7 +2330,7 @@ function toMaskLines(source) {
2329
2330
  return out;
2330
2331
  }
2331
2332
  function blankFencedRegions(masked, lines) {
2332
- const fences = _chunk36NFJULVcjs.createFenceTracker.call(void 0, );
2333
+ const fences = _chunkZI27ALYXcjs.createFenceTracker.call(void 0, );
2333
2334
  const ranges = [];
2334
2335
  let openStart = null;
2335
2336
  let lastEnd = 0;
@@ -2368,7 +2369,7 @@ function blankIndentedCode(masked, lines) {
2368
2369
  const listContentCols = [];
2369
2370
  const ranges = [];
2370
2371
  for (const line of lines) {
2371
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, line.content)) continue;
2372
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, line.content)) continue;
2372
2373
  const indent = leadingIndent(line.content);
2373
2374
  const top = listContentCols.length ? listContentCols[listContentCols.length - 1] : 0;
2374
2375
  if (indent >= top + 4) {
@@ -2459,7 +2460,7 @@ function contPrefixLen(c) {
2459
2460
  function findLabelClose(lines, i, from) {
2460
2461
  for (let j = i; j < lines.length; j++) {
2461
2462
  const c = stripCr(lines[j].content);
2462
- if (j > i && _chunk36NFJULVcjs.isBlankLine.call(void 0, c)) return { stoppedAt: j };
2463
+ if (j > i && _chunkZI27ALYXcjs.isBlankLine.call(void 0, c)) return { stoppedAt: j };
2463
2464
  for (let q = j === i ? from : contPrefixLen(c); q < c.length; q = skipEscaped(c, q)) {
2464
2465
  if (c[q] === "[") return { stoppedAt: j };
2465
2466
  if (c[q] !== "]") continue;
@@ -2477,7 +2478,7 @@ function blankLinkDefinitions(masked, lines) {
2477
2478
  let k = from;
2478
2479
  for (; k < lines.length; k++) {
2479
2480
  const c = stripCr(lines[k].content);
2480
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, c)) break;
2481
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, c)) break;
2481
2482
  blankLine(lines[k]);
2482
2483
  if (stop(c)) {
2483
2484
  k++;
@@ -2520,7 +2521,7 @@ function blankLinkDefinitions(masked, lines) {
2520
2521
  const k = j + 1;
2521
2522
  if (k >= lines.length) break;
2522
2523
  const c = stripCr(lines[k].content);
2523
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, c)) break;
2524
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, c)) break;
2524
2525
  const at = contPrefixLen(c);
2525
2526
  const next = tail.k === "needDest" ? parseDefTail(c, at) : parseTitleTail(c, skipSpaces(c, at));
2526
2527
  if (next.k === "decline") break;
@@ -2590,7 +2591,7 @@ function blankUnreferencedFootnotes(masked, lines, folded) {
2590
2591
  let sawBlank = false;
2591
2592
  for (let k = i + 1; k < lines.length; k++) {
2592
2593
  const c = text(lines[k]);
2593
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, c)) {
2594
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, c)) {
2594
2595
  sawBlank = true;
2595
2596
  continue;
2596
2597
  }
@@ -2690,7 +2691,7 @@ function paragraphEnd(s, from) {
2690
2691
  lineStart += 1;
2691
2692
  const next = s.indexOf("\n", lineStart);
2692
2693
  const line = s.slice(lineStart, next === -1 ? s.length : next);
2693
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, line)) return lineStart;
2694
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, line)) return lineStart;
2694
2695
  if (next === -1) break;
2695
2696
  lineStart = next;
2696
2697
  }
@@ -2844,7 +2845,7 @@ function blankListItemCode(masked, lines, depth = 0) {
2844
2845
  run = [];
2845
2846
  };
2846
2847
  for (const line of lines) {
2847
- if (_chunk36NFJULVcjs.isBlankLine.call(void 0, line.content)) {
2848
+ if (_chunkZI27ALYXcjs.isBlankLine.call(void 0, line.content)) {
2848
2849
  if (run.length > 0) run.push({ ...line, content: "" });
2849
2850
  continue;
2850
2851
  }
@@ -3069,7 +3070,7 @@ function htmlBlockStartKind(line, inParagraph) {
3069
3070
  function computeHtmlBlockRanges(text) {
3070
3071
  if (text.indexOf("<") === -1) return [];
3071
3072
  const ranges = [];
3072
- const fences = _chunk36NFJULVcjs.createFenceTracker.call(void 0, );
3073
+ const fences = _chunkZI27ALYXcjs.createFenceTracker.call(void 0, );
3073
3074
  let kind = null;
3074
3075
  let start = 0;
3075
3076
  let lastEnd = 0;
@@ -3084,9 +3085,9 @@ function computeHtmlBlockRanges(text) {
3084
3085
  const expanded = expandTabs(line);
3085
3086
  const norm = stripContainerPrefix(expanded, listContentCol);
3086
3087
  if (norm.openedListCol >= 0) listContentCol = norm.openedListCol;
3087
- else if (!_chunk36NFJULVcjs.isBlankLine.call(void 0, norm.text) && norm.text === expanded) listContentCol = 0;
3088
- const normBlank = _chunk36NFJULVcjs.isBlankLine.call(void 0, norm.text);
3089
- const blank = openPrefixLen > 0 ? _chunk36NFJULVcjs.isBlankLine.call(void 0, expanded.slice(openPrefixLen)) : _chunk36NFJULVcjs.isBlankLine.call(void 0, line);
3088
+ else if (!_chunkZI27ALYXcjs.isBlankLine.call(void 0, norm.text) && norm.text === expanded) listContentCol = 0;
3089
+ const normBlank = _chunkZI27ALYXcjs.isBlankLine.call(void 0, norm.text);
3090
+ const blank = openPrefixLen > 0 ? _chunkZI27ALYXcjs.isBlankLine.call(void 0, expanded.slice(openPrefixLen)) : _chunkZI27ALYXcjs.isBlankLine.call(void 0, line);
3090
3091
  if (kind !== null) {
3091
3092
  if (kind >= 6) {
3092
3093
  if (blank) {
@@ -3240,7 +3241,7 @@ var ScanState = class {
3240
3241
  * `FENCE_RE` plus its own open/close state machine, cross-referenced by a
3241
3242
  * comment) is precisely the drift that produced the `~~~` bug.
3242
3243
  */
3243
- this.fences = _chunk36NFJULVcjs.createFenceTracker.call(void 0, );
3244
+ this.fences = _chunkZI27ALYXcjs.createFenceTracker.call(void 0, );
3244
3245
  /** Depth of currently open raw HTML block containers. */
3245
3246
  this.htmlDepth = 0;
3246
3247
  /** Raw-block tag name of a start tag still waiting for its `>`, or null. */
@@ -3313,7 +3314,7 @@ function splitStreamingBlocks(content) {
3313
3314
  const isListOrQuote = (line) => /^\s{0,3}(?:[-+*]\s|\d{1,9}[.)]\s|>)/.test(line);
3314
3315
  const firstNonBlank = (arr) => {
3315
3316
  for (const line of arr) {
3316
- if (!_chunk36NFJULVcjs.isBlankLine.call(void 0, line)) return line;
3317
+ if (!_chunkZI27ALYXcjs.isBlankLine.call(void 0, line)) return line;
3317
3318
  }
3318
3319
  return void 0;
3319
3320
  };
@@ -3323,10 +3324,10 @@ function splitStreamingBlocks(content) {
3323
3324
  state.scanLine(line);
3324
3325
  if (state.htmlMark() !== markBefore || state.htmlLatched()) currentTouchedHtml = true;
3325
3326
  current.push(line);
3326
- const isBlank = _chunk36NFJULVcjs.isBlankLine.call(void 0, line);
3327
+ const isBlank = _chunkZI27ALYXcjs.isBlankLine.call(void 0, line);
3327
3328
  if (!isBlank || state.fences.openChar() !== null || state.htmlBlocksCut()) continue;
3328
3329
  let j = i + 1;
3329
- while (j < lines.length && _chunk36NFJULVcjs.isBlankLine.call(void 0, lines[j])) j++;
3330
+ while (j < lines.length && _chunkZI27ALYXcjs.isBlankLine.call(void 0, lines[j])) j++;
3330
3331
  if (j >= lines.length) continue;
3331
3332
  const next = lines[j];
3332
3333
  if (/^\s/.test(next)) continue;
@@ -3334,7 +3335,7 @@ function splitStreamingBlocks(content) {
3334
3335
  if (isListOrQuote(next) && unitOpener !== void 0 && isListOrQuote(unitOpener)) {
3335
3336
  continue;
3336
3337
  }
3337
- if (current.every(_chunk36NFJULVcjs.isBlankLine)) continue;
3338
+ if (current.every(_chunkZI27ALYXcjs.isBlankLine)) continue;
3338
3339
  units.push(current);
3339
3340
  unitTouchedHtml.push(currentTouchedHtml);
3340
3341
  current = [];
@@ -3653,6 +3654,32 @@ var ThinkingDisplay = _react.forwardRef.call(void 0,
3653
3654
  );
3654
3655
  ThinkingDisplay.displayName = "ThinkingDisplay";
3655
3656
 
3657
+ // src/components/chat/guide-display.tsx
3658
+
3659
+
3660
+ var GUIDE_LABEL = "OpenFrame Guide";
3661
+ var GuideDisplay = _react.forwardRef.call(void 0, ({ className, children, ...props }, ref) => {
3662
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3663
+ "div",
3664
+ {
3665
+ ref,
3666
+ className: _chunkPRPZBXWZcjs.cn.call(void 0,
3667
+ "flex flex-col gap-[var(--spacing-system-m)] rounded-md border border-ods-border bg-ods-card p-[var(--spacing-system-m)]",
3668
+ className
3669
+ ),
3670
+ ...props,
3671
+ children: [
3672
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
3673
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CompassIcon, { size: 16, className: "shrink-0 text-ods-open-yellow" }),
3674
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-open-yellow text-h5", children: GUIDE_LABEL })
3675
+ ] }),
3676
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full min-w-0 break-words text-ods-text-primary text-h4", children })
3677
+ ]
3678
+ }
3679
+ );
3680
+ });
3681
+ GuideDisplay.displayName = "GuideDisplay";
3682
+
3656
3683
  // src/components/chat/ask-display.tsx
3657
3684
 
3658
3685
 
@@ -6847,7 +6874,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
6847
6874
  return null;
6848
6875
  };
6849
6876
  const headerContent = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6850
- !isClient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36NFJULVcjs.ToolIcon, { toolType: integratedToolType, size: 16 }) }),
6877
+ !isClient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZI27ALYXcjs.ToolIcon, { toolType: integratedToolType, size: 16 }) }),
6851
6878
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6852
6879
  "div",
6853
6880
  {
@@ -7010,7 +7037,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
7010
7037
  const cache = renderedCardNodeCache.current;
7011
7038
  const emittedBlockKeys = /* @__PURE__ */ new Set();
7012
7039
  segments.forEach((segment, segIdx) => {
7013
- if (segment.type !== "text") return;
7040
+ if (segment.type !== "text" && segment.type !== "guide") return;
7014
7041
  const text = segment.text;
7015
7042
  const parts = [];
7016
7043
  let cursor = 0;
@@ -7204,6 +7231,8 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
7204
7231
  },
7205
7232
  index
7206
7233
  );
7234
+ } else if (segment.type === "guide") {
7235
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GuideDisplay, { children: renderSegmentBody(index, segment.text, segmentIsStreaming) }, index);
7207
7236
  } else if (segment.type === "ask") {
7208
7237
  const run = askRuns.get(index);
7209
7238
  if (!run) return null;
@@ -8323,7 +8352,7 @@ function MarqueeWallFades({
8323
8352
  }) });
8324
8353
  }
8325
8354
  function CloneCopy({ className, style, children }) {
8326
- const ref = _chunk36NFJULVcjs.useSuppressCloneFocus.call(void 0, true);
8355
+ const ref = _chunkZI27ALYXcjs.useSuppressCloneFocus.call(void 0, true);
8327
8356
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, "aria-hidden": true, "data-marquee-copy": "clone", className, style, children });
8328
8357
  }
8329
8358
  function MarqueeWall({
@@ -8350,7 +8379,7 @@ function MarqueeWall({
8350
8379
  const containerRef = _react.useRef.call(void 0, null);
8351
8380
  const trackRef = _react.useRef.call(void 0, null);
8352
8381
  const copyRef = _react.useRef.call(void 0, null);
8353
- const reducedMotion = _nullishCoalesce(_chunk36NFJULVcjs.useMediaQuery.call(void 0, "(prefers-reduced-motion: reduce)"), () => ( false));
8382
+ const reducedMotion = _nullishCoalesce(_chunkZI27ALYXcjs.useMediaQuery.call(void 0, "(prefers-reduced-motion: reduce)"), () => ( false));
8354
8383
  const [overflows, setOverflows] = _react.useState.call(void 0, false);
8355
8384
  const copySizeRef = _react.useRef.call(void 0, 0);
8356
8385
  const wrapSizeRef = _react.useRef.call(void 0, 0);
@@ -8382,7 +8411,7 @@ function MarqueeWall({
8382
8411
  const el = containerRef.current;
8383
8412
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
8384
8413
  const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _154 => _154[0], 'optionalAccess', _155 => _155.isIntersecting]), () => ( true))), {
8385
- rootMargin: _chunk36NFJULVcjs.NEAR_VIEWPORT_ROOT_MARGIN
8414
+ rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN
8386
8415
  });
8387
8416
  io.observe(el);
8388
8417
  return () => io.disconnect();
@@ -8399,7 +8428,7 @@ function MarqueeWall({
8399
8428
  if (e.pointerType === "touch") return;
8400
8429
  pointerInsideRef.current = false;
8401
8430
  }, []);
8402
- _chunk36NFJULVcjs.useResetOnPageHidden.call(void 0, clearPointerInside);
8431
+ _chunkZI27ALYXcjs.useResetOnPageHidden.call(void 0, clearPointerInside);
8403
8432
  const draggingRef = _react.useRef.call(void 0, false);
8404
8433
  const dragSuppressUntilRef = _react.useRef.call(void 0, 0);
8405
8434
  const applyTransform = _react.useCallback.call(void 0,
@@ -8452,7 +8481,7 @@ function MarqueeWall({
8452
8481
  if (!sync) return void 0;
8453
8482
  return sync.register(member);
8454
8483
  }, [sync, member]);
8455
- const { posRef, wrap } = _chunk36NFJULVcjs.useMarqueeEngine.call(void 0, {
8484
+ const { posRef, wrap } = _chunkZI27ALYXcjs.useMarqueeEngine.call(void 0, {
8456
8485
  active: marqueeActive && nearViewport && isDriver,
8457
8486
  speed,
8458
8487
  isPaused: (now) => pauseOnHover && pointerInsideRef.current || draggingRef.current || now < dragSuppressUntilRef.current || document.visibilityState === "hidden",
@@ -10190,7 +10219,7 @@ function ChatHeaderSearchField({
10190
10219
  className
10191
10220
  }) {
10192
10221
  const [value, setValue] = _react.useState.call(void 0, _nullishCoalesce(initialValue, () => ( "")));
10193
- const debounced = _chunk36NFJULVcjs.useDebounce.call(void 0, value, 300);
10222
+ const debounced = _chunkZI27ALYXcjs.useDebounce.call(void 0, value, 300);
10194
10223
  const lastEmitted = _react.useRef.call(void 0, _nullishCoalesce(initialValue, () => ( "")));
10195
10224
  const [exiting, setExiting] = _react.useState.call(void 0, false);
10196
10225
  const collapsedRef = _react.useRef.call(void 0, false);
@@ -11401,7 +11430,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
11401
11430
  return;
11402
11431
  }
11403
11432
  const target = isForeignOriginHref(href) ? href : stripSameOriginToPath(href);
11404
- if (target.includes("#") && _chunk36NFJULVcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunk36NFJULVcjs.STICKY_HEADER_OFFSET_PX })) {
11433
+ if (target.includes("#") && _chunkZI27ALYXcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkZI27ALYXcjs.STICKY_HEADER_OFFSET_PX })) {
11405
11434
  return;
11406
11435
  }
11407
11436
  const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _205 => _205.navigation, 'access', _206 => _206.navigate, 'optionalCall', _207 => _207({ href, path, targetPlatform })]), () => ( false));
@@ -11745,7 +11774,7 @@ function useVideoWarmup({
11745
11774
  const runtime = _chunkRDTOMWDNcjs.useChatRuntime.call(void 0, );
11746
11775
  const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _221 => _221.endpoints, 'access', _222 => _222.supabaseStorageOrigin])));
11747
11776
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
11748
- const { ref, isNear } = _chunk36NFJULVcjs.useNearViewport.call(void 0, nearMargin);
11777
+ const { ref, isNear } = _chunkZI27ALYXcjs.useNearViewport.call(void 0, nearMargin);
11749
11778
  _react.useEffect.call(void 0, () => {
11750
11779
  if (!isNear || !videoUrl || !resolvedOrigin) return void 0;
11751
11780
  if (saveDataEnabled()) return void 0;
@@ -12651,7 +12680,7 @@ function ManagedCell({
12651
12680
  }) {
12652
12681
  const hintedWidth = _react2.default.isValidElement(item) ? item.props["data-strip-cell-width"] : void 0;
12653
12682
  const desktopWidth = typeof hintedWidth === "number" ? hintedWidth : cardWidthDesktop;
12654
- const cloneRef = _chunk36NFJULVcjs.useSuppressCloneFocus.call(void 0, ctx.isClone);
12683
+ const cloneRef = _chunkZI27ALYXcjs.useSuppressCloneFocus.call(void 0, ctx.isClone);
12655
12684
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12656
12685
  "div",
12657
12686
  {
@@ -12812,7 +12841,7 @@ function CardsStrip(props) {
12812
12841
  const current = activeKeyRef.current;
12813
12842
  if (current !== null) deactivate(current);
12814
12843
  }, [deactivate]);
12815
- _chunk36NFJULVcjs.useResetOnPageHidden.call(void 0, clearHover);
12844
+ _chunkZI27ALYXcjs.useResetOnPageHidden.call(void 0, clearHover);
12816
12845
  const syncHoverIfScrolled = _react.useCallback.call(void 0, () => {
12817
12846
  const scroller = scrollerRef.current;
12818
12847
  if (!scroller) return;
@@ -12825,7 +12854,7 @@ function CardsStrip(props) {
12825
12854
  const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _311 => _311.current, 'optionalAccess', _312 => _312.clientWidth]), () => ( 0));
12826
12855
  return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
12827
12856
  }, []);
12828
- const { posRef: marqueePosRef, glideBy } = _chunk36NFJULVcjs.useMarqueeEngine.call(void 0, {
12857
+ const { posRef: marqueePosRef, glideBy } = _chunkZI27ALYXcjs.useMarqueeEngine.call(void 0, {
12829
12858
  // Viewport gates `active` (the rAF fully stops off-screen — a paused
12830
12859
  // engine would keep scheduling frames forever), same treatment as
12831
12860
  // <MarqueeWall>; the envelope persists, so re-entry resumes at cruise.
@@ -12867,7 +12896,7 @@ function CardsStrip(props) {
12867
12896
  return next;
12868
12897
  });
12869
12898
  },
12870
- { rootMargin: _chunk36NFJULVcjs.NEAR_VIEWPORT_ROOT_MARGIN }
12899
+ { rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN }
12871
12900
  );
12872
12901
  cardObserverRef.current = io;
12873
12902
  cardElIdxRef.current.forEach((_idx, el) => {
@@ -13079,7 +13108,7 @@ function VideoHoverPreviewSurface({
13079
13108
  const el = rootElRef.current;
13080
13109
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
13081
13110
  const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.isIntersecting]), () => ( false))), {
13082
- rootMargin: _chunk36NFJULVcjs.NEAR_VIEWPORT_ROOT_MARGIN
13111
+ rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN
13083
13112
  });
13084
13113
  io.observe(el);
13085
13114
  return () => io.disconnect();
@@ -13293,7 +13322,7 @@ function VideoBiteCard({
13293
13322
  const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _327 => _327(key)]) : setSelfActive(true);
13294
13323
  const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _328 => _328(key)]) : setSelfActive(false);
13295
13324
  const titleInputRef = _react.useRef.call(void 0, null);
13296
- _chunk36NFJULVcjs.useIsomorphicLayoutEffect.call(void 0, () => {
13325
+ _chunkZI27ALYXcjs.useIsomorphicLayoutEffect.call(void 0, () => {
13297
13326
  const el = titleInputRef.current;
13298
13327
  if (!el) return;
13299
13328
  el.style.height = "auto";
@@ -17699,6 +17728,10 @@ function createSseFrameDecoder() {
17699
17728
  }
17700
17729
 
17701
17730
  // src/chat-protocol/events.ts
17731
+ var GUIDE_ORIGIN = "guide";
17732
+ function isGuideOrigin(source) {
17733
+ return _optionalChain([source, 'optionalAccess', _556 => _556.origin]) === GUIDE_ORIGIN;
17734
+ }
17702
17735
  var ESCALATION_STATE = {
17703
17736
  PENDING: "PENDING",
17704
17737
  APPROVED: "APPROVED",
@@ -17734,9 +17767,20 @@ function errorDetailsMessage(details) {
17734
17767
  var CHAT_OWNER_ADMIN = "ADMIN";
17735
17768
 
17736
17769
  // src/components/chat/utils/approval-display.ts
17737
- function approvalDisplaysInline(approvalType, displayApprovalTypes) {
17770
+ function isGuideApproval(source) {
17771
+ return isGuideOrigin(source);
17772
+ }
17773
+ function guideApprovalOrigin(source) {
17774
+ return isGuideApproval(source) ? GUIDE_ORIGIN : void 0;
17775
+ }
17776
+ function approvalDisplaysInline(source, approvalType, displayApprovalTypes) {
17777
+ if (isGuideApproval(source)) return true;
17738
17778
  return !displayApprovalTypes || displayApprovalTypes.includes(approvalType);
17739
17779
  }
17780
+ function isGuideApprovalSegment(segment) {
17781
+ if (segment.type !== "approval_request" && segment.type !== "approval_batch") return false;
17782
+ return isGuideApproval(segment.data);
17783
+ }
17740
17784
 
17741
17785
  // src/components/chat/stream/message-mutations.ts
17742
17786
  function nextId(role) {
@@ -17792,10 +17836,12 @@ function appendToTrailingAssistant(prev, segments) {
17792
17836
  for (const seg of segments) {
17793
17837
  const tail = merged[merged.length - 1];
17794
17838
  const key = upsertKey(seg);
17795
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _556 => _556.type]) === "text") {
17839
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _557 => _557.type]) === "text") {
17796
17840
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
17797
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _557 => _557.type]) === "thinking") {
17841
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _558 => _558.type]) === "thinking") {
17798
17842
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
17843
+ } else if (seg.type === "guide" && _optionalChain([tail, 'optionalAccess', _559 => _559.type]) === "guide") {
17844
+ merged[merged.length - 1] = { type: "guide", text: tail.text + seg.text };
17799
17845
  } else if (key) {
17800
17846
  const idx = merged.findIndex((m) => upsertKey(m) === key);
17801
17847
  if (idx !== -1) merged[idx] = seg;
@@ -17834,7 +17880,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
17834
17880
  }
17835
17881
  if (s.type !== "approval_batch") return s;
17836
17882
  const isAnchor = s.data.approvalRequestId === requestId;
17837
- const hasRow = _optionalChain([s, 'access', _558 => _558.data, 'access', _559 => _559.toolCalls, 'optionalAccess', _560 => _560.some, 'call', _561 => _561((c) => c.toolExecutionRequestId === requestId)]);
17883
+ const hasRow = _optionalChain([s, 'access', _560 => _560.data, 'access', _561 => _561.toolCalls, 'optionalAccess', _562 => _562.some, 'call', _563 => _563((c) => c.toolExecutionRequestId === requestId)]);
17838
17884
  if (!isAnchor && !hasRow) return s;
17839
17885
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
17840
17886
  const nextExecutions = hasRow ? {
@@ -17856,8 +17902,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
17856
17902
  };
17857
17903
  }
17858
17904
  function nextBatchExecution(prevExec, toolData) {
17859
- if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _562 => _562.status]) === "done") return null;
17860
- return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _563 => _563.result]), success: _optionalChain([prevExec, 'optionalAccess', _564 => _564.success]) };
17905
+ if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _564 => _564.status]) === "done") return null;
17906
+ return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _565 => _565.result]), success: _optionalChain([prevExec, 'optionalAccess', _566 => _566.success]) };
17861
17907
  }
17862
17908
  function withBatchExecution(seg, execId, state) {
17863
17909
  return {
@@ -17874,11 +17920,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
17874
17920
  }
17875
17921
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
17876
17922
  return mapSegments(prev, (s) => {
17877
- if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _565 => _565.data, 'access', _566 => _566.toolCalls, 'optionalAccess', _567 => _567.some, 'call', _568 => _568((c) => c.toolExecutionRequestId === rowRequestId)])) {
17923
+ if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _567 => _567.data, 'access', _568 => _568.toolCalls, 'optionalAccess', _569 => _569.some, 'call', _570 => _570((c) => c.toolExecutionRequestId === rowRequestId)])) {
17878
17924
  return s;
17879
17925
  }
17880
- const existing = _optionalChain([s, 'access', _569 => _569.data, 'access', _570 => _570.executions, 'optionalAccess', _571 => _571[rowRequestId]]);
17881
- if (_optionalChain([existing, 'optionalAccess', _572 => _572.status]) === "done") return s;
17926
+ const existing = _optionalChain([s, 'access', _571 => _571.data, 'access', _572 => _572.executions, 'optionalAccess', _573 => _573[rowRequestId]]);
17927
+ if (_optionalChain([existing, 'optionalAccess', _574 => _574.status]) === "done") return s;
17882
17928
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
17883
17929
  });
17884
17930
  }
@@ -17914,7 +17960,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
17914
17960
  for (let j = message.segments.length - 1; j >= 0; j--) {
17915
17961
  const seg = message.segments[j];
17916
17962
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
17917
- const prevExec = _optionalChain([seg, 'access', _573 => _573.data, 'access', _574 => _574.executions, 'optionalAccess', _575 => _575[execId]]);
17963
+ const prevExec = _optionalChain([seg, 'access', _575 => _575.data, 'access', _576 => _576.executions, 'optionalAccess', _577 => _577[execId]]);
17918
17964
  const nextExec = nextBatchExecution(prevExec, toolData);
17919
17965
  if (nextExec === null) return prev;
17920
17966
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -18038,6 +18084,19 @@ var MessageSegmentAccumulator = class {
18038
18084
  }
18039
18085
  return this.getSegments();
18040
18086
  }
18087
+ /**
18088
+ * Append guide text to the current message.
18089
+ * If the last segment is guide, append to it; otherwise start a new guide segment.
18090
+ */
18091
+ appendGuide(text) {
18092
+ const lastSegment = this.segments[this.segments.length - 1];
18093
+ if (lastSegment && lastSegment.type === "guide") {
18094
+ this.segments[this.segments.length - 1] = { type: "guide", text: lastSegment.text + text };
18095
+ } else {
18096
+ this.segments.push({ type: "guide", text });
18097
+ }
18098
+ return this.getSegments();
18099
+ }
18041
18100
  /**
18042
18101
  * Add a clarification (ask) card. Unlike the three delta streams an ask
18043
18102
  * arrives whole in one chunk, so it is always a NEW segment — never merged
@@ -18087,9 +18146,9 @@ var MessageSegmentAccumulator = class {
18087
18146
  type: "tool_execution",
18088
18147
  data: {
18089
18148
  ...toolData,
18090
- toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _576 => _576.data, 'access', _577 => _577.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _578 => _578.toolTitle]))),
18091
- toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _579 => _579.data, 'access', _580 => _580.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _581 => _581.toolExplanation]))),
18092
- parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _582 => _582.parameters])
18149
+ toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _578 => _578.data, 'access', _579 => _579.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _580 => _580.toolTitle]))),
18150
+ toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _581 => _581.data, 'access', _582 => _582.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _583 => _583.toolExplanation]))),
18151
+ parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _584 => _584.parameters])
18093
18152
  }
18094
18153
  };
18095
18154
  if (existingIndex !== -1) {
@@ -18113,7 +18172,7 @@ var MessageSegmentAccumulator = class {
18113
18172
  if (seg.type !== "approval_batch") return seg;
18114
18173
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
18115
18174
  if (!hasCall) return seg;
18116
- const prev = _optionalChain([seg, 'access', _583 => _583.data, 'access', _584 => _584.executions, 'optionalAccess', _585 => _585[execId]]);
18175
+ const prev = _optionalChain([seg, 'access', _585 => _585.data, 'access', _586 => _586.executions, 'optionalAccess', _587 => _587[execId]]);
18117
18176
  const next = nextBatchExecution(prev, toolData);
18118
18177
  matched = true;
18119
18178
  if (next === null) return seg;
@@ -18154,9 +18213,9 @@ var MessageSegmentAccumulator = class {
18154
18213
  /**
18155
18214
  * Add an approval request segment directly (for CLIENT approvals)
18156
18215
  */
18157
- addApprovalRequest(requestId, command, explanation, approvalType, status = "pending", fields) {
18216
+ addApprovalRequest(requestId, command, explanation, approvalType, status = "pending", fields, origin) {
18158
18217
  this.segments.push(
18159
- this.buildApprovalRequestSegment(requestId, { command, explanation, approvalType, fields }, status)
18218
+ this.buildApprovalRequestSegment(requestId, { command, explanation, approvalType, fields, origin }, status)
18160
18219
  );
18161
18220
  return this.getSegments();
18162
18221
  }
@@ -18166,7 +18225,7 @@ var MessageSegmentAccumulator = class {
18166
18225
  * Three paths produce these: `addApprovalRequest` (live stream and replay),
18167
18226
  * `flushPendingApprovals` (tracked-but-unresolved after a history replay) and
18168
18227
  * `processApprovalResult` (a result arriving for a tracked request). They used
18169
- * to hand-write the object each, which is how `fields` reached
18228
+ * to hand-write the object each, which is how `fields` and `origin` reached
18170
18229
  * the card down one path and not the others — the same proposal rendering as a
18171
18230
  * bare title, or losing the marker that routes its buttons to the hub.
18172
18231
  */
@@ -18178,7 +18237,8 @@ var MessageSegmentAccumulator = class {
18178
18237
  explanation: approval.explanation,
18179
18238
  requestId,
18180
18239
  approvalType: approval.approvalType,
18181
- ...approval.fields && approval.fields.length > 0 ? { fields: approval.fields } : {}
18240
+ ...approval.fields && approval.fields.length > 0 ? { fields: approval.fields } : {},
18241
+ ...approval.origin ? { origin: approval.origin } : {}
18182
18242
  },
18183
18243
  status,
18184
18244
  onApprove: this.callbacks.onApprove,
@@ -18198,20 +18258,22 @@ var MessageSegmentAccumulator = class {
18198
18258
  * `executions` is forwarded as-is. On upsert, a new `executions` object
18199
18259
  * overrides the existing one (so the latest replay wins).
18200
18260
  */
18201
- addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions, resolvedByName) {
18261
+ addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions, resolvedByName, origin) {
18202
18262
  const existingIndex = this.segments.findIndex(
18203
18263
  (s) => s.type === "approval_batch" && s.data.approvalRequestId === approvalRequestId
18204
18264
  );
18205
18265
  if (existingIndex !== -1) {
18206
18266
  const existing = this.segments[existingIndex];
18207
18267
  const mergedExecutions = _nullishCoalesce(executions, () => ( existing.data.executions));
18268
+ const mergedOrigin = _nullishCoalesce(origin, () => ( existing.data.origin));
18208
18269
  this.segments[existingIndex] = {
18209
18270
  ...existing,
18210
18271
  data: {
18211
18272
  approvalRequestId,
18212
18273
  approvalType,
18213
18274
  toolCalls,
18214
- ...mergedExecutions ? { executions: mergedExecutions } : {}
18275
+ ...mergedExecutions ? { executions: mergedExecutions } : {},
18276
+ ...mergedOrigin ? { origin: mergedOrigin } : {}
18215
18277
  },
18216
18278
  status,
18217
18279
  resolvedByName: _nullishCoalesce(resolvedByName, () => ( existing.resolvedByName)),
@@ -18226,7 +18288,8 @@ var MessageSegmentAccumulator = class {
18226
18288
  approvalRequestId,
18227
18289
  approvalType,
18228
18290
  toolCalls,
18229
- ...executions ? { executions } : {}
18291
+ ...executions ? { executions } : {},
18292
+ ...origin ? { origin } : {}
18230
18293
  },
18231
18294
  status,
18232
18295
  resolvedByName,
@@ -18247,8 +18310,8 @@ var MessageSegmentAccumulator = class {
18247
18310
  requestId,
18248
18311
  {
18249
18312
  ...pendingApproval,
18250
- command: _optionalChain([pendingApproval, 'optionalAccess', _586 => _586.command]) || "",
18251
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _587 => _587.approvalType]) || approvalType
18313
+ command: _optionalChain([pendingApproval, 'optionalAccess', _588 => _588.command]) || "",
18314
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _589 => _589.approvalType]) || approvalType
18252
18315
  },
18253
18316
  status
18254
18317
  );
@@ -18273,9 +18336,9 @@ var MessageSegmentAccumulator = class {
18273
18336
  type: "escalation_offer",
18274
18337
  // The resolved chunk carries no text/origin — a redelivered offer must
18275
18338
  // not blank the card the PENDING chunk already painted.
18276
- data: { offerId, text: text || _optionalChain([existing, 'optionalAccess', _588 => _588.data, 'access', _589 => _589.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _590 => _590.data, 'access', _591 => _591.origin]))) },
18339
+ data: { offerId, text: text || _optionalChain([existing, 'optionalAccess', _590 => _590.data, 'access', _591 => _591.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _592 => _592.data, 'access', _593 => _593.origin]))) },
18277
18340
  status,
18278
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _592 => _592.resolvedByName]))),
18341
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _594 => _594.resolvedByName]))),
18279
18342
  onApprove: this.callbacks.onEscalationApprove,
18280
18343
  onReject: this.callbacks.onEscalationReject
18281
18344
  };
@@ -18423,6 +18486,9 @@ var MessageSegmentAccumulator = class {
18423
18486
  case "thinking":
18424
18487
  if (segment.text) this.appendThinking(segment.text);
18425
18488
  break;
18489
+ case "guide":
18490
+ if (segment.text) this.appendGuide(segment.text);
18491
+ break;
18426
18492
  case "ask":
18427
18493
  this.addAsk(segment.question, segment.options);
18428
18494
  break;
@@ -18437,7 +18503,8 @@ var MessageSegmentAccumulator = class {
18437
18503
  data.explanation,
18438
18504
  data.approvalType || "",
18439
18505
  status,
18440
- data.fields
18506
+ data.fields,
18507
+ data.origin
18441
18508
  );
18442
18509
  break;
18443
18510
  }
@@ -18449,7 +18516,8 @@ var MessageSegmentAccumulator = class {
18449
18516
  data.toolCalls,
18450
18517
  status,
18451
18518
  data.executions,
18452
- resolvedByName
18519
+ resolvedByName,
18520
+ data.origin
18453
18521
  );
18454
18522
  break;
18455
18523
  }
@@ -18551,6 +18619,7 @@ function createChatStreamReducer(options = {}) {
18551
18619
  let streamingPhase = "idle";
18552
18620
  let dialogTokenUsage = null;
18553
18621
  let liveModel = null;
18622
+ let guideConversationId = null;
18554
18623
  let approvalStatuses = {
18555
18624
  ..._nullishCoalesce(options.approvalStatuses, () => ( {}))
18556
18625
  };
@@ -18600,7 +18669,7 @@ function createChatStreamReducer(options = {}) {
18600
18669
  let stateCache = null;
18601
18670
  function invalidate() {
18602
18671
  stateCache = null;
18603
- _optionalChain([onChange, 'optionalCall', _593 => _593()]);
18672
+ _optionalChain([onChange, 'optionalCall', _595 => _595()]);
18604
18673
  }
18605
18674
  function getState() {
18606
18675
  if (!stateCache) {
@@ -18610,13 +18679,14 @@ function createChatStreamReducer(options = {}) {
18610
18679
  turnMeta: { meta: metaMap, sources: sourcesMap, sendCount },
18611
18680
  dialogTokenUsage,
18612
18681
  liveModel,
18613
- approvalStatuses
18682
+ approvalStatuses,
18683
+ guideConversationId
18614
18684
  };
18615
18685
  }
18616
18686
  return stateCache;
18617
18687
  }
18618
18688
  function emit(name, ...args) {
18619
- _optionalChain([onEffect, 'optionalCall', _594 => _594({ name, args })]);
18689
+ _optionalChain([onEffect, 'optionalCall', _596 => _596({ name, args })]);
18620
18690
  }
18621
18691
  function setMessagesInternal(next) {
18622
18692
  if (next !== messages) {
@@ -18647,12 +18717,12 @@ function createChatStreamReducer(options = {}) {
18647
18717
  return [...next.slice(0, -1), { ...last, streamSeq: seq }];
18648
18718
  }
18649
18719
  function applySegmentsToState(segments, meta) {
18650
- const seq = _optionalChain([meta, 'optionalAccess', _595 => _595.streamSeq]);
18651
- if (_optionalChain([meta, 'optionalAccess', _596 => _596.append]) && meta.isCompacting) {
18720
+ const seq = _optionalChain([meta, 'optionalAccess', _597 => _597.streamSeq]);
18721
+ if (_optionalChain([meta, 'optionalAccess', _598 => _598.append]) && meta.isCompacting) {
18652
18722
  setMessagesInternal(stampTrailingAssistantSeq(upsertTrailingCompaction(messages, segments), seq));
18653
18723
  return;
18654
18724
  }
18655
- if (_optionalChain([meta, 'optionalAccess', _597 => _597.append])) {
18725
+ if (_optionalChain([meta, 'optionalAccess', _599 => _599.append])) {
18656
18726
  setMessagesInternal(stampTrailingAssistantSeq(appendToTrailingAssistant(messages, segments), seq));
18657
18727
  return;
18658
18728
  }
@@ -18664,7 +18734,7 @@ function createChatStreamReducer(options = {}) {
18664
18734
  adoptTrailingAssistant = false;
18665
18735
  const last = messages[messages.length - 1];
18666
18736
  if (!last || last.role !== "assistant" || adoptTail) return;
18667
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _598 => _598.segments, 'optionalAccess', _599 => _599.length]), () => ( 0))) > 0 || last.content !== "";
18737
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _600 => _600.segments, 'optionalAccess', _601 => _601.length]), () => ( 0))) > 0 || last.content !== "";
18668
18738
  if (!hasContent) return;
18669
18739
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
18670
18740
  }
@@ -18793,6 +18863,13 @@ function createChatStreamReducer(options = {}) {
18793
18863
  break;
18794
18864
  }
18795
18865
  case "metadata": {
18866
+ if (isGuideOrigin(event)) {
18867
+ if (typeof event.conversationId === "string" && event.conversationId) {
18868
+ guideConversationId = event.conversationId;
18869
+ invalidate();
18870
+ }
18871
+ break;
18872
+ }
18796
18873
  emit("onMetadata", {
18797
18874
  action: "metadata",
18798
18875
  modelDisplayName: _nullishCoalesce(event.modelLabel, () => ( void 0)),
@@ -18808,13 +18885,16 @@ function createChatStreamReducer(options = {}) {
18808
18885
  invalidate();
18809
18886
  break;
18810
18887
  }
18811
- // Both APPEND-ONLY body streams share one shape: accumulate the verbatim
18812
- // slice into the trailing segment of the matching kind (the accumulator
18813
- // coalesces), then emit.
18888
+ // The three APPEND-ONLY body streams share one shape: accumulate the
18889
+ // verbatim slice into the trailing segment of the matching kind (the
18890
+ // accumulator coalesces), then emit. `guide-delta` is NATS-only today
18891
+ // but rides the identical path so a guide body streams, coalesces and
18892
+ // continues post-MESSAGE_END exactly like answer text.
18814
18893
  case "text-delta":
18815
- case "thinking-delta": {
18816
- const kind = event.type === "text-delta" ? "text" : "thinking";
18817
- const segments = kind === "text" ? accumulator.appendText(event.text) : accumulator.appendThinking(event.text);
18894
+ case "thinking-delta":
18895
+ case "guide-delta": {
18896
+ const kind = event.type === "text-delta" ? "text" : event.type === "thinking-delta" ? "thinking" : "guide";
18897
+ const segments = kind === "text" ? accumulator.appendText(event.text) : kind === "thinking" ? accumulator.appendThinking(event.text) : accumulator.appendGuide(event.text);
18818
18898
  if (isInStream || !hasEverStreamed) {
18819
18899
  emitSegments(segments);
18820
18900
  applySegmentsToState(segments, withSeqMeta(void 0));
@@ -18866,7 +18946,8 @@ function createChatStreamReducer(options = {}) {
18866
18946
  const requestId = event.requestId;
18867
18947
  const approvalType = _nullishCoalesce(event.approvalType, () => ( "USER"));
18868
18948
  const toolCalls = event.toolCalls;
18869
- const displayInline = (type) => approvalDisplaysInline(type, displayApprovalTypes);
18949
+ const guideOrigin = guideApprovalOrigin(event);
18950
+ const displayInline = (type) => approvalDisplaysInline(event, type, displayApprovalTypes);
18870
18951
  if (toolCalls && toolCalls.length > 0) {
18871
18952
  const status = approvalStatuses[requestId] || "pending";
18872
18953
  if (!displayInline(approvalType)) {
@@ -18874,13 +18955,13 @@ function createChatStreamReducer(options = {}) {
18874
18955
  const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
18875
18956
  pendingEscalated.set(requestId, {
18876
18957
  command: summary,
18877
- explanation: _optionalChain([required, 'optionalAccess', _600 => _600.toolExplanation]),
18958
+ explanation: _optionalChain([required, 'optionalAccess', _602 => _602.toolExplanation]),
18878
18959
  approvalType,
18879
18960
  toolCalls
18880
18961
  });
18881
18962
  emit("onEscalatedApproval", requestId, {
18882
18963
  command: summary,
18883
- explanation: _optionalChain([required, 'optionalAccess', _601 => _601.toolExplanation]),
18964
+ explanation: _optionalChain([required, 'optionalAccess', _603 => _603.toolExplanation]),
18884
18965
  approvalType
18885
18966
  });
18886
18967
  break;
@@ -18893,7 +18974,8 @@ function createChatStreamReducer(options = {}) {
18893
18974
  toolCalls,
18894
18975
  status,
18895
18976
  void 0,
18896
- void 0
18977
+ void 0,
18978
+ guideOrigin
18897
18979
  );
18898
18980
  applyAccumulated(before2, segments2);
18899
18981
  break;
@@ -18908,7 +18990,8 @@ function createChatStreamReducer(options = {}) {
18908
18990
  call.toolExplanation,
18909
18991
  approvalType,
18910
18992
  status,
18911
- void 0
18993
+ void 0,
18994
+ guideOrigin
18912
18995
  );
18913
18996
  }
18914
18997
  applyAccumulated(before, segments);
@@ -18925,8 +19008,10 @@ function createChatStreamReducer(options = {}) {
18925
19008
  explanation,
18926
19009
  approvalType,
18927
19010
  status,
18928
- // SSE-shaped cards carry their body as structured rows rather than prose.
18929
- event.fields
19011
+ // SSE-shaped cards (a re-streamed Product Guide proposal) carry
19012
+ // their body as structured rows rather than prose.
19013
+ event.fields,
19014
+ guideOrigin
18930
19015
  );
18931
19016
  applyAccumulated(before, segments);
18932
19017
  } else {
@@ -19264,7 +19349,7 @@ function createChatStreamReducer(options = {}) {
19264
19349
  const resolveBatch = (status, confirm) => async () => {
19265
19350
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
19266
19351
  for (const id of ids) {
19267
- const ok = await _optionalChain([confirm, 'optionalCall', _602 => _602(id)]);
19352
+ const ok = await _optionalChain([confirm, 'optionalCall', _604 => _604(id)]);
19268
19353
  if (ok === false) {
19269
19354
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
19270
19355
  }
@@ -19315,6 +19400,7 @@ function createChatStreamReducer(options = {}) {
19315
19400
  streamingPhase = "idle";
19316
19401
  dialogTokenUsage = null;
19317
19402
  liveModel = null;
19403
+ guideConversationId = null;
19318
19404
  approvalStatuses = {};
19319
19405
  accumulator.reset();
19320
19406
  pendingEscalated.clear();
@@ -19337,6 +19423,7 @@ function createChatStreamReducer(options = {}) {
19337
19423
  streamingPhase = "idle";
19338
19424
  dialogTokenUsage = null;
19339
19425
  liveModel = null;
19426
+ guideConversationId = null;
19340
19427
  accumulator.reset();
19341
19428
  pendingEscalated.clear();
19342
19429
  isInStream = false;
@@ -19400,8 +19487,8 @@ function createChatStreamReducer(options = {}) {
19400
19487
  }
19401
19488
  }
19402
19489
  }
19403
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _603 => _603.resumed]), () => ( messages.length > 0)));
19404
- if (_optionalChain([extras, 'optionalAccess', _604 => _604.agentBusy])) agentBusyState();
19490
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _605 => _605.resumed]), () => ( messages.length > 0)));
19491
+ if (_optionalChain([extras, 'optionalAccess', _606 => _606.agentBusy])) agentBusyState();
19405
19492
  invalidate();
19406
19493
  }
19407
19494
  return {
@@ -19486,7 +19573,7 @@ function createChatStreamReducer(options = {}) {
19486
19573
  },
19487
19574
  endSseTurn() {
19488
19575
  const last = messages[messages.length - 1];
19489
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _605 => _605.segments, 'optionalAccess', _606 => _606.length]), () => ( 0))) === 0 && last.content === "") {
19576
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _607 => _607.segments, 'optionalAccess', _608 => _608.length]), () => ( 0))) === 0 && last.content === "") {
19490
19577
  messages = messages.slice(0, -1);
19491
19578
  }
19492
19579
  sseCurrentText = "";
@@ -19639,10 +19726,10 @@ function createChatDialogStore(options = {}) {
19639
19726
  if (onEvict) {
19640
19727
  const sep = key.indexOf(KEY_SEP);
19641
19728
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
19642
- messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _607 => _607.state, 'access', _608 => _608.messages]), () => ( EMPTY_STATE.messages)),
19643
- approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _609 => _609.state, 'access', _610 => _610.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
19644
- lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _611 => _611.getLastAppliedSeq, 'call', _612 => _612()]), () => ( Number.NEGATIVE_INFINITY)),
19645
- pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _613 => _613.getPendingEchoes, 'call', _614 => _614()]), () => ( EMPTY_PENDING_ECHOES))
19729
+ messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _609 => _609.state, 'access', _610 => _610.messages]), () => ( EMPTY_STATE.messages)),
19730
+ approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _611 => _611.state, 'access', _612 => _612.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
19731
+ lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _613 => _613.getLastAppliedSeq, 'call', _614 => _614()]), () => ( Number.NEGATIVE_INFINITY)),
19732
+ pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _615 => _615.getPendingEchoes, 'call', _616 => _616()]), () => ( EMPTY_PENDING_ECHOES))
19646
19733
  });
19647
19734
  }
19648
19735
  }
@@ -19652,12 +19739,12 @@ function createChatDialogStore(options = {}) {
19652
19739
  const key = keyOf(dialogId, side);
19653
19740
  let reducer = reducers.get(key);
19654
19741
  if (!reducer) {
19655
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _615 => _615(dialogId, side)]), () => ( {}));
19742
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _617 => _617(dialogId, side)]), () => ( {}));
19656
19743
  const userOnChange = base.onChange;
19657
19744
  reducer = createChatStreamReducer({
19658
19745
  ...base,
19659
19746
  onChange: () => {
19660
- _optionalChain([userOnChange, 'optionalCall', _616 => _616()]);
19747
+ _optionalChain([userOnChange, 'optionalCall', _618 => _618()]);
19661
19748
  notify();
19662
19749
  }
19663
19750
  });
@@ -19702,7 +19789,7 @@ function createChatDialogStore(options = {}) {
19702
19789
  };
19703
19790
  }
19704
19791
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
19705
- return _nullishCoalesce(_optionalChain([reducers, 'access', _617 => _617.get, 'call', _618 => _618(keyOf(dialogId, side)), 'optionalAccess', _619 => _619.state]), () => ( EMPTY_STATE));
19792
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _619 => _619.get, 'call', _620 => _620(keyOf(dialogId, side)), 'optionalAccess', _621 => _621.state]), () => ( EMPTY_STATE));
19706
19793
  }
19707
19794
  function getServerSnapshot2() {
19708
19795
  return EMPTY_STATE;
@@ -19765,7 +19852,7 @@ function createChatDialogStore(options = {}) {
19765
19852
  // src/components/chat/stream/delta-batcher.ts
19766
19853
  var DELTA_FLUSH_FALLBACK_MS = 50;
19767
19854
  function isDeltaEvent(event) {
19768
- return event.type === "text-delta" || event.type === "thinking-delta";
19855
+ return event.type === "text-delta" || event.type === "thinking-delta" || event.type === "guide-delta";
19769
19856
  }
19770
19857
  function createDeltaBatcher({
19771
19858
  applyOne,
@@ -19794,7 +19881,7 @@ function createDeltaBatcher({
19794
19881
  pending = [];
19795
19882
  const key = pendingKey;
19796
19883
  for (const delta of batch) applyOne(delta, key);
19797
- _optionalChain([onFlushed, 'optionalCall', _620 => _620(batch.length)]);
19884
+ _optionalChain([onFlushed, 'optionalCall', _622 => _622(batch.length)]);
19798
19885
  }
19799
19886
  function schedule() {
19800
19887
  if (raf !== null || timer !== null) return;
@@ -19818,7 +19905,7 @@ function createDeltaBatcher({
19818
19905
  }
19819
19906
  if (!isDeltaEvent(event)) return false;
19820
19907
  const tail = pending[pending.length - 1];
19821
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _621 => _621.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
19908
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _623 => _623.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
19822
19909
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
19823
19910
  pending[pending.length - 1] = {
19824
19911
  ...tail,
@@ -19849,7 +19936,7 @@ function useChatStreamReducer({
19849
19936
  side = DEFAULT_DIALOG_SIDE,
19850
19937
  createReducerOptions
19851
19938
  }) {
19852
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _622 => _622()]), () => ( {})));
19939
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _624 => _624()]), () => ( {})));
19853
19940
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
19854
19941
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
19855
19942
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -19888,7 +19975,7 @@ var STORAGE_KEY = "conversation";
19888
19975
  var namespaceFor = (source) => {
19889
19976
  const base = `mingo-chat-${source}`;
19890
19977
  const auth = _chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, );
19891
- return _optionalChain([auth, 'optionalAccess', _623 => _623.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
19978
+ return _optionalChain([auth, 'optionalAccess', _625 => _625.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
19892
19979
  };
19893
19980
  function createChatConversationStorage(source) {
19894
19981
  return _chunkCP6TIRONcjs.createLocalStorageAdapter.call(void 0, {
@@ -19952,7 +20039,7 @@ function formatSingularLookupInvocation(cmdId, value) {
19952
20039
  return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
19953
20040
  }
19954
20041
  function extractEntityIdFilter(override, expectedTableId) {
19955
- const f = _optionalChain([override, 'optionalAccess', _624 => _624.entityIdFilter]);
20042
+ const f = _optionalChain([override, 'optionalAccess', _626 => _626.entityIdFilter]);
19956
20043
  if (!f) return null;
19957
20044
  const tableId = typeof f.tableId === "string" ? f.tableId : "";
19958
20045
  const id = typeof f.id === "string" ? f.id : "";
@@ -19991,7 +20078,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
19991
20078
  function buildAutoContinuationDirective(toolName, opts = {}) {
19992
20079
  const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
19993
20080
  const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
19994
- const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _625 => _625.status, 'optionalAccess', _626 => _626.toUpperCase, 'call', _627 => _627()]) === "CLOSED";
20081
+ const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _627 => _627.status, 'optionalAccess', _628 => _628.toUpperCase, 'call', _629 => _629()]) === "CLOSED";
19995
20082
  if (toolName === "create_ticket") {
19996
20083
  return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
19997
20084
  }
@@ -20114,7 +20201,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20114
20201
  const { active = true } = runtimeOptions;
20115
20202
  const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
20116
20203
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
20117
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _628 => _628.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
20204
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _630 => _630.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
20118
20205
  const sendMessageRef = _react.useRef.call(void 0,
20119
20206
  () => Promise.resolve(true)
20120
20207
  );
@@ -20151,7 +20238,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20151
20238
  if (!restoredConversationRef.current) {
20152
20239
  restoredConversationRef.current = true;
20153
20240
  pruneStaleChatConversationStorage(source);
20154
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _629 => _629.load, 'call', _630 => _630(), 'optionalAccess', _631 => _631.conversationId]), () => ( null));
20241
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _631 => _631.load, 'call', _632 => _632(), 'optionalAccess', _633 => _633.conversationId]), () => ( null));
20155
20242
  }
20156
20243
  const commandsUrl = runtime.endpoints.commandsUrl;
20157
20244
  const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
@@ -20256,7 +20343,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20256
20343
  const serverMessage = await readServerErrorMessage(response);
20257
20344
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
20258
20345
  }
20259
- const reader = _optionalChain([response, 'access', _632 => _632.body, 'optionalAccess', _633 => _633.getReader, 'call', _634 => _634()]);
20346
+ const reader = _optionalChain([response, 'access', _634 => _634.body, 'optionalAccess', _635 => _635.getReader, 'call', _636 => _636()]);
20260
20347
  if (!reader) throw new Error("No response body");
20261
20348
  const frameDecoder = createSseFrameDecoder();
20262
20349
  let finished = false;
@@ -20279,7 +20366,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20279
20366
  }
20280
20367
  return true;
20281
20368
  } catch (err) {
20282
- if (_optionalChain([err, 'optionalAccess', _635 => _635.name]) === "AbortError" || ctrl.signal.aborted) {
20369
+ if (_optionalChain([err, 'optionalAccess', _637 => _637.name]) === "AbortError" || ctrl.signal.aborted) {
20283
20370
  return true;
20284
20371
  }
20285
20372
  flushDeltas();
@@ -20299,7 +20386,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20299
20386
  );
20300
20387
  sendMessageRef.current = sendMessage;
20301
20388
  const stopMessage = _react.useCallback.call(void 0, () => {
20302
- _optionalChain([abortControllerRef, 'access', _636 => _636.current, 'optionalAccess', _637 => _637.abort, 'call', _638 => _638()]);
20389
+ _optionalChain([abortControllerRef, 'access', _638 => _638.current, 'optionalAccess', _639 => _639.abort, 'call', _640 => _640()]);
20303
20390
  flushDeltas();
20304
20391
  mutate((r) => r.setPhase("idle"));
20305
20392
  }, [mutate, flushDeltas]);
@@ -20315,7 +20402,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20315
20402
  let sendIdx = -1;
20316
20403
  return state.messages.map((m) => {
20317
20404
  const segments = m.segments;
20318
- const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _639 => _639.filter, 'call', _640 => _640((s) => s.type === "text"), 'access', _641 => _641.map, 'call', _642 => _642((s) => s.text), 'access', _643 => _643.join, 'call', _644 => _644("")]), () => ( ""));
20405
+ const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _641 => _641.filter, 'call', _642 => _642((s) => s.type === "text"), 'access', _643 => _643.map, 'call', _644 => _644((s) => s.text), 'access', _645 => _645.join, 'call', _646 => _646("")]), () => ( ""));
20319
20406
  let sources;
20320
20407
  let scrollAnchor;
20321
20408
  if (m.role === "user" && !m.hidden) {
@@ -20324,7 +20411,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20324
20411
  if (m.role === "assistant") {
20325
20412
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
20326
20413
  sources = sourcesMap.get(lookupIdx);
20327
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _645 => _645.get, 'call', _646 => _646(lookupIdx), 'optionalAccess', _647 => _647.scrollAnchor]), () => ( void 0));
20414
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _647 => _647.get, 'call', _648 => _648(lookupIdx), 'optionalAccess', _649 => _649.scrollAnchor]), () => ( void 0));
20328
20415
  }
20329
20416
  return {
20330
20417
  id: m.id,
@@ -20351,7 +20438,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20351
20438
  );
20352
20439
  return;
20353
20440
  }
20354
- const refSlug = typeof _optionalChain([reference, 'access', _648 => _648.metadata, 'optionalAccess', _649 => _649.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
20441
+ const refSlug = typeof _optionalChain([reference, 'access', _650 => _650.metadata, 'optionalAccess', _651 => _651.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
20355
20442
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
20356
20443
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
20357
20444
  const text = `/${cmdId} display "${escaped}"`;
@@ -20397,18 +20484,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20397
20484
  /** True while the mount-time rebuild from the server transcript runs. */
20398
20485
  isHydratingHistory,
20399
20486
  /** Provider key for the lib's `<ModelDisplay>` icon. */
20400
- currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _650 => _650.provider]), () => ( null)),
20401
- currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _651 => _651.modelLabel]), () => ( null)),
20402
- currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _652 => _652.contextWindowMaxTokens]), () => ( null)),
20487
+ currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _652 => _652.provider]), () => ( null)),
20488
+ currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _653 => _653.modelLabel]), () => ( null)),
20489
+ currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _654 => _654.contextWindowMaxTokens]), () => ( null)),
20403
20490
  /** Input tokens (known after server's message_start frame; null until). */
20404
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _653 => _653.inputTokens]), () => ( null)),
20491
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _655 => _655.inputTokens]), () => ( null)),
20405
20492
  /** Output tokens (known only after server's trailing usage frame). */
20406
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _654 => _654.outputTokens]), () => ( null)),
20493
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _656 => _656.outputTokens]), () => ( null)),
20407
20494
  /** Cache hit % (read / total-input × 100). null during streaming. */
20408
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _655 => _655.cacheHitRatePct]), () => ( null)),
20495
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _657 => _657.cacheHitRatePct]), () => ( null)),
20409
20496
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
20410
20497
  * token counts). null until the trailing usage frame lands. */
20411
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _656 => _656.breakdown]), () => ( null)),
20498
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _658 => _658.breakdown]), () => ( null)),
20412
20499
  // ─── Dialog management — stubs for v1 ────────────────────────────────
20413
20500
  // Guide mode keeps ONE server-side conversation per stored id
20414
20501
  // (`chat_conversations`, hydrated on mount). Surfacing multiple threads
@@ -20475,6 +20562,34 @@ function normalizeAskOptions(raw) {
20475
20562
  description: typeof item.description === "string" ? item.description : void 0
20476
20563
  })).filter((option) => option.label.length > 0);
20477
20564
  }
20565
+ var AGENT_OWNED_EVENTS = /* @__PURE__ */ new Set([
20566
+ "usage",
20567
+ "token-usage",
20568
+ "status",
20569
+ "compaction",
20570
+ "participant",
20571
+ "dialog-closed"
20572
+ ]);
20573
+ var ORIGIN_BEARING_EVENTS = /* @__PURE__ */ new Set(["approval-request", "approval-resolved"]);
20574
+ function guideEventForNats(event) {
20575
+ switch (event.type) {
20576
+ case "text-delta":
20577
+ return { type: "guide-delta", text: event.text };
20578
+ case "thinking-delta":
20579
+ return { type: "thinking-delta", text: escapeThinkingTags(event.text) };
20580
+ case "metadata":
20581
+ return typeof event.conversationId === "string" && event.conversationId ? { type: "metadata", conversationId: event.conversationId, origin: GUIDE_ORIGIN } : null;
20582
+ default:
20583
+ if (AGENT_OWNED_EVENTS.has(event.type)) return null;
20584
+ return ORIGIN_BEARING_EVENTS.has(event.type) ? { ...event, origin: GUIDE_ORIGIN } : event;
20585
+ }
20586
+ }
20587
+ function guideFrameEvent(frame) {
20588
+ const events = [];
20589
+ mapLeadingFrame(frame, events);
20590
+ const event = events[0];
20591
+ return event ? guideEventForNats(event) : null;
20592
+ }
20478
20593
  function decodeNatsChunk(chunk) {
20479
20594
  if (!chunk || typeof chunk !== "object") return null;
20480
20595
  const data = chunk;
@@ -20509,6 +20624,20 @@ function decodeNatsChunk(chunk) {
20509
20624
  return { type: "thinking-delta", text: data.text, ...seq };
20510
20625
  }
20511
20626
  return null;
20627
+ // Two shapes share this chunk type. `text` is the answer body the agent
20628
+ // streams (and persists). `payload` is a Product Guide frame re-streamed
20629
+ // verbatim from the hub — decoded through the shared frame table, with the
20630
+ // narrowing `guideFrameEvent` documents.
20631
+ case MESSAGE_TYPE.GUIDE: {
20632
+ if (typeof data.text === "string") {
20633
+ return { type: "guide-delta", text: data.text, ...seq };
20634
+ }
20635
+ const frame = data.payload;
20636
+ if (!frame || typeof frame !== "object" || Array.isArray(frame)) return null;
20637
+ const event = guideFrameEvent(frame);
20638
+ if (!event) return null;
20639
+ return { ...event, ...seq };
20640
+ }
20512
20641
  // An ask card is only an ask card with something to pick: a question and at
20513
20642
  // least one option. Anything less is dropped rather than rendered as an
20514
20643
  // empty card the user can't answer — the backend already falls back to a
@@ -20653,7 +20782,7 @@ function decodeNatsChunk(chunk) {
20653
20782
  userId: typeof data.userId === "string" ? data.userId : void 0,
20654
20783
  // Wire shape carries no label; fall back to the id (parity with
20655
20784
  // the history path in `process-historical-messages.ts`).
20656
- contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _657 => _657.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _658 => _658.id]) === "string").map((it) => ({
20785
+ contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _659 => _659.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _660 => _660.id]) === "string").map((it) => ({
20657
20786
  type: it.type,
20658
20787
  id: it.id,
20659
20788
  label: it.id
@@ -20744,7 +20873,7 @@ function extractIncompleteMessageState(lastMessage) {
20744
20873
  }
20745
20874
  break;
20746
20875
  case "approval_batch": {
20747
- const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _659 => _659.data, 'access', _660 => _660.executions, 'optionalAccess', _661 => _661[c.toolExecutionRequestId], 'optionalAccess', _662 => _662.status]) === "done");
20876
+ const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _661 => _661.data, 'access', _662 => _662.executions, 'optionalAccess', _663 => _663[c.toolExecutionRequestId], 'optionalAccess', _664 => _664.status]) === "done");
20748
20877
  if (segment.status !== "rejected" && !allDone) {
20749
20878
  hasIncompleteState = true;
20750
20879
  }
@@ -20781,6 +20910,7 @@ function extractIncompleteMessageState(lastMessage) {
20781
20910
  // backend has already abandoned.
20782
20911
  case "text":
20783
20912
  case "thinking":
20913
+ case "guide":
20784
20914
  case "ask":
20785
20915
  case "ticket_escalated":
20786
20916
  case "ticket_event":
@@ -20806,11 +20936,11 @@ function extractIncompleteMessageState(lastMessage) {
20806
20936
  function extractIncompleteTailState(messages) {
20807
20937
  if (!messages || messages.length === 0) return void 0;
20808
20938
  let start = messages.length;
20809
- while (start > 0 && _optionalChain([messages, 'access', _663 => _663[start - 1], 'optionalAccess', _664 => _664.role]) === "assistant") start -= 1;
20939
+ while (start > 0 && _optionalChain([messages, 'access', _665 => _665[start - 1], 'optionalAccess', _666 => _666.role]) === "assistant") start -= 1;
20810
20940
  if (start === messages.length) return void 0;
20811
20941
  const segments = [];
20812
20942
  for (let i = start; i < messages.length; i += 1) {
20813
- const content = _optionalChain([messages, 'access', _665 => _665[i], 'optionalAccess', _666 => _666.content]);
20943
+ const content = _optionalChain([messages, 'access', _667 => _667[i], 'optionalAccess', _668 => _668.content]);
20814
20944
  if (Array.isArray(content)) segments.push(...content);
20815
20945
  }
20816
20946
  if (segments.length === 0) return void 0;
@@ -20823,15 +20953,15 @@ function extractIncompleteTailState(messages) {
20823
20953
 
20824
20954
  // src/components/chat/utils/process-historical-messages.ts
20825
20955
  function getOwnerDisplayName(owner) {
20826
- if (_optionalChain([owner, 'optionalAccess', _667 => _667.type]) === OWNER_TYPE.ADMIN && owner.user) {
20956
+ if (_optionalChain([owner, 'optionalAccess', _669 => _669.type]) === OWNER_TYPE.ADMIN && owner.user) {
20827
20957
  const { firstName, lastName } = owner.user;
20828
20958
  const name = [firstName, lastName].filter(Boolean).join(" ");
20829
20959
  if (name) return name;
20830
20960
  }
20831
- return _optionalChain([owner, 'optionalAccess', _668 => _668.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
20961
+ return _optionalChain([owner, 'optionalAccess', _670 => _670.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
20832
20962
  }
20833
20963
  function getOwnerAvatar(owner) {
20834
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _669 => _669.user, 'optionalAccess', _670 => _670.image, 'optionalAccess', _671 => _671.imageUrl]), () => ( void 0));
20964
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _671 => _671.user, 'optionalAccess', _672 => _672.image, 'optionalAccess', _673 => _673.imageUrl]), () => ( void 0));
20835
20965
  }
20836
20966
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
20837
20967
  messageDataArray.forEach((data) => {
@@ -20860,6 +20990,21 @@ function decodeHistoricalMessageData(data) {
20860
20990
  return { type: "thinking-delta", text: data.text };
20861
20991
  }
20862
20992
  return null;
20993
+ // Two persisted shapes, mirroring the live `GUIDE` chunk: the answer body
20994
+ // (`text`) and a Product Guide frame the agent re-streamed (`payload`,
20995
+ // persisted so a card survives a reload). Decoded through the SAME
20996
+ // `guideFrameEvent` the live path uses — a second mapping here would let
20997
+ // history and realtime disagree about the same bytes.
20998
+ case MESSAGE_TYPE.GUIDE: {
20999
+ if ("text" in data && data.text) {
21000
+ return { type: "guide-delta", text: data.text };
21001
+ }
21002
+ const payload = "payload" in data ? data.payload : void 0;
21003
+ if (payload && typeof payload === "object" && !Array.isArray(payload)) {
21004
+ return guideFrameEvent(payload);
21005
+ }
21006
+ return null;
21007
+ }
20863
21008
  // Same completeness gate as the live decoder (`decodeNatsChunk`): a
20864
21009
  // persisted row without a question or without options is not a card the
20865
21010
  // user can answer, so it replays as nothing rather than as empty chrome.
@@ -21015,7 +21160,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21015
21160
  event.offerId,
21016
21161
  event.text,
21017
21162
  event.origin,
21018
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _672 => _672[event.offerId]]), () => ( "pending"))
21163
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _674 => _674[event.offerId]]), () => ( "pending"))
21019
21164
  );
21020
21165
  break;
21021
21166
  case "ticket-escalated":
@@ -21045,7 +21190,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21045
21190
  );
21046
21191
  break;
21047
21192
  case "escalation-offer-resolved":
21048
- _optionalChain([offerResolutions, 'optionalAccess', _673 => _673.set, 'call', _674 => _674(event.offerId, {
21193
+ _optionalChain([offerResolutions, 'optionalAccess', _675 => _675.set, 'call', _676 => _676(event.offerId, {
21049
21194
  status: event.status,
21050
21195
  resolvedByName: event.resolvedByName
21051
21196
  })]);
@@ -21056,6 +21201,9 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21056
21201
  case "thinking-delta":
21057
21202
  accumulator.appendThinking(event.text);
21058
21203
  break;
21204
+ case "guide-delta":
21205
+ accumulator.appendGuide(event.text);
21206
+ break;
21059
21207
  // Mirror of the live path: the intro sentence replays as answer text in
21060
21208
  // front of the card, so a reloaded thread reads exactly like the stream did.
21061
21209
  case "ask":
@@ -21069,11 +21217,20 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21069
21217
  const approvalType = event.approvalType || "CLIENT";
21070
21218
  const toolCalls = event.toolCalls;
21071
21219
  const isBatch = !!toolCalls && toolCalls.length > 0;
21072
- if (approvalDisplaysInline(approvalType, displayApprovalTypes)) {
21220
+ const guideOrigin = guideApprovalOrigin(event);
21221
+ if (approvalDisplaysInline(event, approvalType, displayApprovalTypes)) {
21073
21222
  if (isBatch) {
21074
21223
  const status = approvalStatuses[event.requestId] || "pending";
21075
21224
  if (batchApprovalsEnabled) {
21076
- accumulator.addApprovalBatch(event.requestId, approvalType, toolCalls, status, void 0, void 0);
21225
+ accumulator.addApprovalBatch(
21226
+ event.requestId,
21227
+ approvalType,
21228
+ toolCalls,
21229
+ status,
21230
+ void 0,
21231
+ void 0,
21232
+ guideOrigin
21233
+ );
21077
21234
  } else {
21078
21235
  for (const call of toolCalls) {
21079
21236
  if (!call.requiresApproval) continue;
@@ -21083,21 +21240,23 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21083
21240
  call.toolExplanation,
21084
21241
  approvalType,
21085
21242
  status,
21086
- void 0
21243
+ void 0,
21244
+ guideOrigin
21087
21245
  );
21088
21246
  }
21089
21247
  }
21090
21248
  } else {
21091
21249
  const resolvedStatus = approvalStatuses[event.requestId];
21092
21250
  const isResolved = resolvedStatus === "approved" || resolvedStatus === "rejected";
21093
- if (isResolved) {
21251
+ if (guideOrigin || isResolved) {
21094
21252
  accumulator.addApprovalRequest(
21095
21253
  event.requestId,
21096
21254
  event.command || "",
21097
21255
  event.explanation,
21098
21256
  approvalType,
21099
21257
  _nullishCoalesce(resolvedStatus, () => ( "pending")),
21100
- event.fields
21258
+ event.fields,
21259
+ guideOrigin
21101
21260
  );
21102
21261
  } else {
21103
21262
  accumulator.trackApprovalRequest(event.requestId, {
@@ -21109,7 +21268,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21109
21268
  }
21110
21269
  }
21111
21270
  } else {
21112
- _optionalChain([escalatedApprovals, 'optionalAccess', _675 => _675.set, 'call', _676 => _676(event.requestId, {
21271
+ _optionalChain([escalatedApprovals, 'optionalAccess', _677 => _677.set, 'call', _678 => _678(event.requestId, {
21113
21272
  command: event.command || "",
21114
21273
  explanation: event.explanation,
21115
21274
  approvalType,
@@ -21124,8 +21283,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21124
21283
  const existingStatus = approvalStatuses[requestId];
21125
21284
  const status = existingStatus || event.status;
21126
21285
  const resolvedByName = event.resolvedByName;
21127
- const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _677 => _677.get, 'call', _678 => _678(requestId)]);
21128
- if (_optionalChain([escalatedData, 'optionalAccess', _679 => _679.toolCalls]) && escalatedData.toolCalls.length > 0) {
21286
+ const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _679 => _679.get, 'call', _680 => _680(requestId)]);
21287
+ if (_optionalChain([escalatedData, 'optionalAccess', _681 => _681.toolCalls]) && escalatedData.toolCalls.length > 0) {
21129
21288
  if (batchApprovalsEnabled) {
21130
21289
  accumulator.addApprovalBatch(
21131
21290
  requestId,
@@ -21147,7 +21306,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21147
21306
  );
21148
21307
  }
21149
21308
  }
21150
- _optionalChain([escalatedApprovals, 'optionalAccess', _680 => _680.delete, 'call', _681 => _681(requestId)]);
21309
+ _optionalChain([escalatedApprovals, 'optionalAccess', _682 => _682.delete, 'call', _683 => _683(requestId)]);
21151
21310
  break;
21152
21311
  }
21153
21312
  if (escalatedData) {
@@ -21156,7 +21315,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21156
21315
  explanation: escalatedData.explanation,
21157
21316
  approvalType: escalatedData.approvalType
21158
21317
  });
21159
- _optionalChain([escalatedApprovals, 'optionalAccess', _682 => _682.delete, 'call', _683 => _683(requestId)]);
21318
+ _optionalChain([escalatedApprovals, 'optionalAccess', _684 => _684.delete, 'call', _685 => _685(requestId)]);
21160
21319
  }
21161
21320
  const before = accumulator.getSegments();
21162
21321
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -21245,14 +21404,14 @@ function processHistoricalMessages(messages, options = {}) {
21245
21404
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
21246
21405
  return;
21247
21406
  }
21248
- const isUserMessage = _optionalChain([msg, 'access', _684 => _684.owner, 'optionalAccess', _685 => _685.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _686 => _686.owner, 'optionalAccess', _687 => _687.type]) === OWNER_TYPE.ADMIN;
21407
+ const isUserMessage = _optionalChain([msg, 'access', _686 => _686.owner, 'optionalAccess', _687 => _687.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _688 => _688.owner, 'optionalAccess', _689 => _689.type]) === OWNER_TYPE.ADMIN;
21249
21408
  if (isUserMessage) {
21250
21409
  flushAssistantMessage();
21251
- const userAuthorType = _optionalChain([msg, 'access', _688 => _688.owner, 'optionalAccess', _689 => _689.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
21410
+ const userAuthorType = _optionalChain([msg, 'access', _690 => _690.owner, 'optionalAccess', _691 => _691.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
21252
21411
  messageDataArray.forEach((data) => {
21253
21412
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
21254
21413
  const rawContext = data.contextItems;
21255
- const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _690 => _690.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _691 => _691.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
21414
+ const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _692 => _692.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _693 => _693.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
21256
21415
  processedMessages.push({
21257
21416
  id: msg.id,
21258
21417
  role: "user",
@@ -21290,7 +21449,7 @@ function processHistoricalMessages(messages, options = {}) {
21290
21449
  });
21291
21450
  const nextMsg = messages[index + 1];
21292
21451
  const isLastMessage = index === messages.length - 1;
21293
- const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _692 => _692.owner, 'optionalAccess', _693 => _693.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _694 => _694.owner, 'optionalAccess', _695 => _695.type]) === OWNER_TYPE.ADMIN);
21452
+ const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _694 => _694.owner, 'optionalAccess', _695 => _695.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _696 => _696.owner, 'optionalAccess', _697 => _697.type]) === OWNER_TYPE.ADMIN);
21294
21453
  if (isLastMessage || nextIsFromUser) {
21295
21454
  flushAssistantMessage();
21296
21455
  }
@@ -21688,7 +21847,7 @@ function useNatsChatAdapter(config, options = {}) {
21688
21847
  }, [active, fetchDialogs, loadDialogsPage]);
21689
21848
  const sendMessage = _react.useCallback.call(void 0,
21690
21849
  async (text, sendOptions) => {
21691
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _696 => _696.hidden]), () => ( false));
21850
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _698 => _698.hidden]), () => ( false));
21692
21851
  mutate((r) => r.pushOptimisticSend(text, hidden));
21693
21852
  await publishUserMessage(text, { hidden, dialogId });
21694
21853
  },
@@ -21834,11 +21993,11 @@ function useNatsChatAdapter(config, options = {}) {
21834
21993
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
21835
21994
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
21836
21995
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
21837
- currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _697 => _697.provider]), () => ( modelProvider)), () => ( null)),
21838
- currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _698 => _698.modelLabel]), () => ( modelLabel)), () => ( null)),
21839
- currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _699 => _699.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _700 => _700.contextWindowMaxTokens]))), () => ( null)),
21840
- currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _701 => _701.inputTokensSize]), () => ( null)),
21841
- currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _702 => _702.outputTokensSize]), () => ( null)),
21996
+ currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _699 => _699.provider]), () => ( modelProvider)), () => ( null)),
21997
+ currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _700 => _700.modelLabel]), () => ( modelLabel)), () => ( null)),
21998
+ currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _701 => _701.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _702 => _702.contextWindowMaxTokens]))), () => ( null)),
21999
+ currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _703 => _703.inputTokensSize]), () => ( null)),
22000
+ currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _704 => _704.outputTokensSize]), () => ( null)),
21842
22001
  currentCacheHitRatePct: null,
21843
22002
  currentUsageBreakdown: null,
21844
22003
  // Dialog management
@@ -21939,7 +22098,7 @@ function useUnifiedChat(options) {
21939
22098
  []
21940
22099
  );
21941
22100
  const displayRefForward = _react.useCallback.call(void 0,
21942
- (ref) => _optionalChain([activeStateRef, 'access', _703 => _703.current, 'access', _704 => _704.displayRef, 'optionalCall', _705 => _705(ref)]),
22101
+ (ref) => _optionalChain([activeStateRef, 'access', _705 => _705.current, 'access', _706 => _706.displayRef, 'optionalCall', _707 => _707(ref)]),
21943
22102
  []
21944
22103
  );
21945
22104
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -21949,7 +22108,7 @@ function useUnifiedChat(options) {
21949
22108
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
21950
22109
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
21951
22110
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
21952
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _706 => _706.current, 'access', _707 => _707.setDialogScope, 'optionalCall', _708 => _708(scope)]), []);
22111
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _708 => _708.current, 'access', _709 => _709.setDialogScope, 'optionalCall', _710 => _710(scope)]), []);
21953
22112
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
21954
22113
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
21955
22114
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
@@ -22042,19 +22201,19 @@ function turnRequestKeys(content) {
22042
22201
  if (!Array.isArray(content)) return keys;
22043
22202
  for (const seg of content) {
22044
22203
  if (seg.type === "tool_execution") {
22045
- const id = _optionalChain([seg, 'access', _709 => _709.data, 'optionalAccess', _710 => _710.toolExecutionRequestId]);
22204
+ const id = _optionalChain([seg, 'access', _711 => _711.data, 'optionalAccess', _712 => _712.toolExecutionRequestId]);
22046
22205
  if (id) keys.add(id);
22047
22206
  } else if (seg.type === "approval_request") {
22048
- const id = _optionalChain([seg, 'access', _711 => _711.data, 'optionalAccess', _712 => _712.requestId]);
22207
+ const id = _optionalChain([seg, 'access', _713 => _713.data, 'optionalAccess', _714 => _714.requestId]);
22049
22208
  if (id) keys.add(id);
22050
22209
  } else if (seg.type === "escalation_offer") {
22051
- const id = _optionalChain([seg, 'access', _713 => _713.data, 'optionalAccess', _714 => _714.offerId]);
22210
+ const id = _optionalChain([seg, 'access', _715 => _715.data, 'optionalAccess', _716 => _716.offerId]);
22052
22211
  if (id) keys.add(id);
22053
22212
  } else if (seg.type === "approval_batch") {
22054
22213
  const data = seg.data;
22055
- if (_optionalChain([data, 'optionalAccess', _715 => _715.approvalRequestId])) keys.add(data.approvalRequestId);
22056
- for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _716 => _716.toolCalls]), () => ( []))) {
22057
- if (_optionalChain([call, 'optionalAccess', _717 => _717.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
22214
+ if (_optionalChain([data, 'optionalAccess', _717 => _717.approvalRequestId])) keys.add(data.approvalRequestId);
22215
+ for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _718 => _718.toolCalls]), () => ( []))) {
22216
+ if (_optionalChain([call, 'optionalAccess', _719 => _719.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
22058
22217
  }
22059
22218
  }
22060
22219
  }
@@ -22106,18 +22265,18 @@ function mergeHistoryWithRealtime(input) {
22106
22265
  }
22107
22266
  }
22108
22267
  const trailing = processedHistory[processedHistory.length - 1];
22109
- const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _718 => _718.role]) === "assistant" ? trailing : null;
22110
- const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _719 => _719.content, 'access', _720 => _720.find, 'call', _721 => _721((s) => s.type === "approval_batch"), 'optionalAccess', _722 => _722.data, 'optionalAccess', _723 => _723.approvalRequestId]), () => ( null)) : null;
22268
+ const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _720 => _720.role]) === "assistant" ? trailing : null;
22269
+ const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _721 => _721.content, 'access', _722 => _722.find, 'call', _723 => _723((s) => s.type === "approval_batch"), 'optionalAccess', _724 => _724.data, 'optionalAccess', _725 => _725.approvalRequestId]), () => ( null)) : null;
22111
22270
  let processedToUse = processedHistory;
22112
22271
  const pinnedSyntheticIds = /* @__PURE__ */ new Set();
22113
22272
  const droppedSyntheticIds = /* @__PURE__ */ new Set();
22114
22273
  if (historyBatchId) {
22115
22274
  const batchTwins = existingMessages.filter(
22116
- (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _724 => _724.data, 'optionalAccess', _725 => _725.approvalRequestId]) === historyBatchId)
22275
+ (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _726 => _726.data, 'optionalAccess', _727 => _727.approvalRequestId]) === historyBatchId)
22117
22276
  );
22118
22277
  const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
22119
22278
  if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
22120
- const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _726 => _726.content])) ? historyTrailingAssistant.content.length : 0;
22279
+ const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _728 => _728.content])) ? historyTrailingAssistant.content.length : 0;
22121
22280
  const realtimeSize = existingWithSameBatch.content.length;
22122
22281
  if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
22123
22282
  processedToUse = processedHistory.slice(0, -1);
@@ -22159,9 +22318,9 @@ function mergeHistoryWithRealtime(input) {
22159
22318
  if (pinnedSyntheticIds.has(m.id)) return true;
22160
22319
  if (droppedSyntheticIds.has(m.id)) return false;
22161
22320
  if (processedIds.has(m.id)) return false;
22162
- if (_optionalChain([rawHistoryIds, 'optionalAccess', _727 => _727.has, 'call', _728 => _728(m.id)])) return false;
22321
+ if (_optionalChain([rawHistoryIds, 'optionalAccess', _729 => _729.has, 'call', _730 => _730(m.id)])) return false;
22163
22322
  if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
22164
- const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _729 => _729.timestamp, 'optionalAccess', _730 => _730.getTime, 'call', _731 => _731()]), () => ( 0))) <= historyFetchedAt;
22323
+ const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _731 => _731.timestamp, 'optionalAccess', _732 => _732.getTime, 'call', _733 => _733()]), () => ( 0))) <= historyFetchedAt;
22165
22324
  return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
22166
22325
  }
22167
22326
  if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
@@ -22185,7 +22344,7 @@ function mergeHistoryWithRealtime(input) {
22185
22344
  } else if (typeof m.streamSeq === "number") {
22186
22345
  covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
22187
22346
  } else {
22188
- covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _732 => _732.timestamp, 'optionalAccess', _733 => _733.getTime, 'call', _734 => _734()]), () => ( 0))) <= historyFetchedAt;
22347
+ covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _734 => _734.timestamp, 'optionalAccess', _735 => _735.getTime, 'call', _736 => _736()]), () => ( 0))) <= historyFetchedAt;
22189
22348
  }
22190
22349
  if (covered) return false;
22191
22350
  }
@@ -22255,7 +22414,7 @@ function normalizeHistoricalMessageData(md) {
22255
22414
  function isHistoricalUserTurn(m) {
22256
22415
  return !!m.owner;
22257
22416
  }
22258
- var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _735 => _735.type]) === "TEXT" && typeof d.text === "string";
22417
+ var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _737 => _737.type]) === "TEXT" && typeof d.text === "string";
22259
22418
  var THINK_MS = 550;
22260
22419
  var TOKEN_MS = 55;
22261
22420
  var USER_MS = 480;
@@ -22567,7 +22726,7 @@ var DrawerContent = _react.forwardRef.call(void 0,
22567
22726
  const resolvedSide = _nullishCoalesce(side, () => ( "right"));
22568
22727
  const isHorizontal = HORIZONTAL_SIDES.has(resolvedSide);
22569
22728
  const initialSize = _nullishCoalesce(defaultSize, () => ( (isHorizontal ? 560 : 480)));
22570
- const headerHeight = _chunk36NFJULVcjs.useHeaderHeight.call(void 0, );
22729
+ const headerHeight = _chunkZI27ALYXcjs.useHeaderHeight.call(void 0, );
22571
22730
  const [isMobile, setIsMobile] = _react.useState.call(void 0, false);
22572
22731
  _react.useEffect.call(void 0, () => {
22573
22732
  if (typeof window === "undefined") return void 0;
@@ -22676,7 +22835,7 @@ function HoverDropdown({
22676
22835
  const timeoutRef = _react.useRef.call(void 0, void 0);
22677
22836
  const containerRef = _react.useRef.call(void 0, null);
22678
22837
  const panelRef = _react.useRef.call(void 0, null);
22679
- _chunk36NFJULVcjs.useIsomorphicLayoutEffect.call(void 0, () => {
22838
+ _chunkZI27ALYXcjs.useIsomorphicLayoutEffect.call(void 0, () => {
22680
22839
  const el = panelRef.current;
22681
22840
  const container = containerRef.current;
22682
22841
  if (!el || !container) return;
@@ -22879,7 +23038,7 @@ function useChatDialogManager({
22879
23038
  const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
22880
23039
  if (restoreTarget) {
22881
23040
  try {
22882
- await _optionalChain([unarchiveDialog, 'optionalCall', _736 => _736(restoreTarget.id)]);
23041
+ await _optionalChain([unarchiveDialog, 'optionalCall', _738 => _738(restoreTarget.id)]);
22883
23042
  } catch (err) {
22884
23043
  console.error("[useChatDialogManager] unarchive failed:", err);
22885
23044
  return;
@@ -23359,7 +23518,7 @@ function EmbeddableChatInner({
23359
23518
  }),
23360
23519
  [commandsUrl]
23361
23520
  );
23362
- const headerUserName = _optionalChain([identityUser, 'optionalAccess', _737 => _737.name, 'optionalAccess', _738 => _738.trim, 'call', _739 => _739()]) || [_optionalChain([identityUser, 'optionalAccess', _740 => _740.firstName]), _optionalChain([identityUser, 'optionalAccess', _741 => _741.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _742 => _742.trim, 'call', _743 => _743()]) || void 0;
23521
+ const headerUserName = _optionalChain([identityUser, 'optionalAccess', _739 => _739.name, 'optionalAccess', _740 => _740.trim, 'call', _741 => _741()]) || [_optionalChain([identityUser, 'optionalAccess', _742 => _742.firstName]), _optionalChain([identityUser, 'optionalAccess', _743 => _743.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _744 => _744.trim, 'call', _745 => _745()]) || void 0;
23363
23522
  const effectiveModes = _react.useMemo.call(void 0, () => {
23364
23523
  if (modes) return modes;
23365
23524
  const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
@@ -23368,20 +23527,20 @@ function EmbeddableChatInner({
23368
23527
  const mingoCaps = _react.useMemo.call(void 0, () => {
23369
23528
  if (mingoState) {
23370
23529
  return {
23371
- canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _744 => _744.canRename]), () => ( false)),
23372
- canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _745 => _745.canArchive]), () => ( false)),
23373
- fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _746 => _746.fetchArchivedDialogs]),
23374
- unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _747 => _747.unarchiveDialog]),
23375
- searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _748 => _748.searchQuery]),
23376
- onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _749 => _749.onSearchChange]),
23377
- onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _750 => _750.onCopyLink])
23530
+ canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _746 => _746.canRename]), () => ( false)),
23531
+ canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _747 => _747.canArchive]), () => ( false)),
23532
+ fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _748 => _748.fetchArchivedDialogs]),
23533
+ unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _749 => _749.unarchiveDialog]),
23534
+ searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _750 => _750.searchQuery]),
23535
+ onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _751 => _751.onSearchChange]),
23536
+ onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _752 => _752.onCopyLink])
23378
23537
  };
23379
23538
  }
23380
23539
  return {
23381
- canRename: !!_optionalChain([effectiveModes, 'access', _751 => _751.mingo, 'optionalAccess', _752 => _752.renameDialog]),
23382
- canArchive: !!_optionalChain([effectiveModes, 'access', _753 => _753.mingo, 'optionalAccess', _754 => _754.archiveDialog]),
23383
- fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _755 => _755.mingo, 'optionalAccess', _756 => _756.fetchArchivedDialogs]),
23384
- unarchiveDialog: _optionalChain([effectiveModes, 'access', _757 => _757.mingo, 'optionalAccess', _758 => _758.unarchiveDialog]),
23540
+ canRename: !!_optionalChain([effectiveModes, 'access', _753 => _753.mingo, 'optionalAccess', _754 => _754.renameDialog]),
23541
+ canArchive: !!_optionalChain([effectiveModes, 'access', _755 => _755.mingo, 'optionalAccess', _756 => _756.archiveDialog]),
23542
+ fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _757 => _757.mingo, 'optionalAccess', _758 => _758.fetchArchivedDialogs]),
23543
+ unarchiveDialog: _optionalChain([effectiveModes, 'access', _759 => _759.mingo, 'optionalAccess', _760 => _760.unarchiveDialog]),
23385
23544
  searchQuery: void 0,
23386
23545
  onSearchChange: void 0,
23387
23546
  onCopyLink: void 0
@@ -23396,7 +23555,7 @@ function EmbeddableChatInner({
23396
23555
  if (controlledActiveMode === void 0) {
23397
23556
  setUncontrolledActiveMode(next);
23398
23557
  }
23399
- _optionalChain([onActiveModeChange, 'optionalCall', _759 => _759(next)]);
23558
+ _optionalChain([onActiveModeChange, 'optionalCall', _761 => _761(next)]);
23400
23559
  },
23401
23560
  [controlledActiveMode, onActiveModeChange]
23402
23561
  );
@@ -23423,7 +23582,7 @@ function EmbeddableChatInner({
23423
23582
  );
23424
23583
  const effectiveAssistantName = emptyStateConfig.name;
23425
23584
  const effectiveAssistantIcon = emptyStateConfig.icon;
23426
- const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _760 => _760.title]) === "string" ? guideWelcome.title : null)));
23585
+ const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _762 => _762.title]) === "string" ? guideWelcome.title : null)));
23427
23586
  const {
23428
23587
  messages: rawMessages,
23429
23588
  isLoading: chatLoading,
@@ -23467,7 +23626,7 @@ function EmbeddableChatInner({
23467
23626
  void sendMessage(guidePendingPrompt).catch((err) => {
23468
23627
  console.error("[EmbeddableChat] guide launcher prompt failed:", err);
23469
23628
  });
23470
- _optionalChain([onGuidePromptConsumed, 'optionalCall', _761 => _761()]);
23629
+ _optionalChain([onGuidePromptConsumed, 'optionalCall', _763 => _763()]);
23471
23630
  }, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
23472
23631
  const {
23473
23632
  attachments: stagedAttachments,
@@ -23478,7 +23637,7 @@ function EmbeddableChatInner({
23478
23637
  clear: clearAttachments
23479
23638
  } = useChatAttachments();
23480
23639
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
23481
- const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _762 => _762.maxItems]), () => ( 10));
23640
+ const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _764 => _764.maxItems]), () => ( 10));
23482
23641
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
23483
23642
  const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
23484
23643
  const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
@@ -23499,10 +23658,10 @@ function EmbeddableChatInner({
23499
23658
  }, [activeDialogId, activeMode]);
23500
23659
  const mentionMarkerByType = _react.useMemo.call(void 0, () => {
23501
23660
  const m = /* @__PURE__ */ new Map();
23502
- for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _763 => _763.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
23661
+ for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _765 => _765.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
23503
23662
  return m;
23504
- }, [_optionalChain([contextPicker, 'optionalAccess', _764 => _764.entityTypes])]);
23505
- const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _765 => _765.entityTypes]);
23663
+ }, [_optionalChain([contextPicker, 'optionalAccess', _766 => _766.entityTypes])]);
23664
+ const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _767 => _767.entityTypes]);
23506
23665
  const resolveContextIcon = _react.useMemo.call(void 0, () => {
23507
23666
  const byType = /* @__PURE__ */ new Map();
23508
23667
  for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
@@ -23514,7 +23673,7 @@ function EmbeddableChatInner({
23514
23673
  if (mentionActiveRef.current) {
23515
23674
  if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
23516
23675
  if (contextItems.length >= contextMaxItems) return;
23517
- _optionalChain([chatInputRef, 'access', _766 => _766.current, 'optionalAccess', _767 => _767.commitMention, 'call', _768 => _768(mentionTokenOf(key, mentionMarkerByType), {
23676
+ _optionalChain([chatInputRef, 'access', _768 => _768.current, 'optionalAccess', _769 => _769.commitMention, 'call', _770 => _770(mentionTokenOf(key, mentionMarkerByType), {
23518
23677
  label: item.label,
23519
23678
  icon: resolveContextIcon(item)
23520
23679
  })]);
@@ -23537,9 +23696,9 @@ function EmbeddableChatInner({
23537
23696
  setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
23538
23697
  if (mentionKeysRef.current.has(key)) {
23539
23698
  mentionKeysRef.current.delete(key);
23540
- const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _769 => _769.current, 'optionalAccess', _770 => _770.getValue, 'call', _771 => _771()]), () => ( ""));
23699
+ const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _771 => _771.current, 'optionalAccess', _772 => _772.getValue, 'call', _773 => _773()]), () => ( ""));
23541
23700
  const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
23542
- _optionalChain([chatInputRef, 'access', _772 => _772.current, 'optionalAccess', _773 => _773.setValue, 'call', _774 => _774(next)]);
23701
+ _optionalChain([chatInputRef, 'access', _774 => _774.current, 'optionalAccess', _775 => _775.setValue, 'call', _776 => _776(next)]);
23543
23702
  }
23544
23703
  },
23545
23704
  [mentionMarkerByType]
@@ -23561,7 +23720,7 @@ function EmbeddableChatInner({
23561
23720
  }, []);
23562
23721
  const closeContextPicker = _react.useCallback.call(void 0, () => {
23563
23722
  if (mentionActiveRef.current) {
23564
- _optionalChain([chatInputRef, 'access', _775 => _775.current, 'optionalAccess', _776 => _776.removeMentionTrigger, 'call', _777 => _777()]);
23723
+ _optionalChain([chatInputRef, 'access', _777 => _777.current, 'optionalAccess', _778 => _778.removeMentionTrigger, 'call', _779 => _779()]);
23565
23724
  }
23566
23725
  setContextPickerOpen(false);
23567
23726
  setMentionQuery(null);
@@ -23595,8 +23754,8 @@ function EmbeddableChatInner({
23595
23754
  [effectiveAssistantIcon]
23596
23755
  );
23597
23756
  const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
23598
- const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _778 => _778.firstName]), _optionalChain([identityUser, 'optionalAccess', _779 => _779.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _780 => _780.name, 'optionalAccess', _781 => _781.trim, 'call', _782 => _782()]) || void 0 : void 0;
23599
- const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _783 => _783.avatarUrl, 'optionalAccess', _784 => _784.trim, 'call', _785 => _785()]) || void 0 : void 0;
23757
+ const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _780 => _780.firstName]), _optionalChain([identityUser, 'optionalAccess', _781 => _781.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _782 => _782.name, 'optionalAccess', _783 => _783.trim, 'call', _784 => _784()]) || void 0 : void 0;
23758
+ const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _785 => _785.avatarUrl, 'optionalAccess', _786 => _786.trim, 'call', _787 => _787()]) || void 0 : void 0;
23600
23759
  const messages = _react.useMemo.call(void 0, () => {
23601
23760
  const cache = timestampCache;
23602
23761
  const seenIds = /* @__PURE__ */ new Set();
@@ -23785,9 +23944,9 @@ function EmbeddableChatInner({
23785
23944
  const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
23786
23945
  const lastSources = _react.useMemo.call(void 0, () => {
23787
23946
  if (chatLoading) return void 0;
23788
- const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _786 => _786.sources]);
23947
+ const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _788 => _788.sources]);
23789
23948
  if (!sources || sources.length === 0) return void 0;
23790
- const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _787 => _787.content]) || "";
23949
+ const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _789 => _789.content]) || "";
23791
23950
  const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
23792
23951
  const seenOrder = /* @__PURE__ */ new Map();
23793
23952
  citationOrder.forEach((idx) => {
@@ -23805,7 +23964,7 @@ function EmbeddableChatInner({
23805
23964
  const el = panelMeasureRef.current;
23806
23965
  if (!el || typeof ResizeObserver === "undefined") return void 0;
23807
23966
  const ro = new ResizeObserver((entries) => {
23808
- const w = _optionalChain([entries, 'access', _788 => _788[0], 'optionalAccess', _789 => _789.contentRect, 'optionalAccess', _790 => _790.width]);
23967
+ const w = _optionalChain([entries, 'access', _790 => _790[0], 'optionalAccess', _791 => _791.contentRect, 'optionalAccess', _792 => _792.width]);
23809
23968
  if (typeof w === "number") setPanelWidth(w);
23810
23969
  });
23811
23970
  ro.observe(el);
@@ -23848,17 +24007,17 @@ function EmbeddableChatInner({
23848
24007
  const isMingoMode = activeMode === "mingo";
23849
24008
  const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen;
23850
24009
  const headerShowBack = hasConversation || guideCanReturnToMingo;
23851
- const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _791 => _791.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
24010
+ const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _793 => _793.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
23852
24011
  const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
23853
24012
  const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
23854
24013
  const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
23855
24014
  const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
23856
24015
  const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
23857
- const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _792 => _792.onCopyLink, 'optionalCall', _793 => _793(activeDialog)]) : void 0;
24016
+ const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _794 => _794.onCopyLink, 'optionalCall', _795 => _795(activeDialog)]) : void 0;
23858
24017
  const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
23859
- const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _794 => _794.owner]) : void 0;
23860
- const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _795 => _795.name, 'optionalAccess', _796 => _796.trim, 'call', _797 => _797()]) || headerUserName;
23861
- const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _798 => _798.avatarUrl, 'optionalAccess', _799 => _799.trim, 'call', _800 => _800()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _801 => _801.avatarUrl, 'optionalAccess', _802 => _802.trim, 'call', _803 => _803()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _804 => _804.trim, 'call', _805 => _805()]) || void 0;
24018
+ const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _796 => _796.owner]) : void 0;
24019
+ const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _797 => _797.name, 'optionalAccess', _798 => _798.trim, 'call', _799 => _799()]) || headerUserName;
24020
+ const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _800 => _800.avatarUrl, 'optionalAccess', _801 => _801.trim, 'call', _802 => _802()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _803 => _803.avatarUrl, 'optionalAccess', _804 => _804.trim, 'call', _805 => _805()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _806 => _806.trim, 'call', _807 => _807()]) || void 0;
23862
24021
  const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
23863
24022
  const handleNewChat = _react.useCallback.call(void 0, () => {
23864
24023
  resetToNewChat();
@@ -24188,9 +24347,9 @@ function EmbeddableChatInner({
24188
24347
  subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
24189
24348
  subtitleLoading: emptyStateLoading,
24190
24349
  ...guideWelcome,
24191
- title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _806 => _806.title]))),
24192
- icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _807 => _807.icon]))),
24193
- quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _808 => _808.quickActions]), () => ( guideSuggestedActions)),
24350
+ title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _808 => _808.title]))),
24351
+ icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _809 => _809.icon]))),
24352
+ quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _810 => _810.quickActions]), () => ( guideSuggestedActions)),
24194
24353
  onQuickAction: (action) => {
24195
24354
  setQuickActionPreview(null);
24196
24355
  handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
@@ -24264,8 +24423,8 @@ function EmbeddableChatInner({
24264
24423
  selectedContextItems: contextItems,
24265
24424
  onToggleContextItem: toggleContextItem,
24266
24425
  onRemoveContextItem: removeContextItem,
24267
- contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _809 => _809.items]),
24268
- onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _810 => _810.onRemove]),
24426
+ contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _811 => _811.items]),
24427
+ onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _812 => _812.onRemove]),
24269
24428
  contextPickerOpen,
24270
24429
  onOpenContextPicker: openContextPicker,
24271
24430
  onCloseContextPicker: closeContextPicker,
@@ -24722,5 +24881,9 @@ function EmbeddableChatInner({
24722
24881
 
24723
24882
 
24724
24883
 
24725
- 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.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; 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 = 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;
24726
- //# sourceMappingURL=chunk-VLRXLTR4.cjs.map
24884
+
24885
+
24886
+
24887
+
24888
+ 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.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; 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 = 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.GuideDisplay = GuideDisplay; 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.isGuideApproval = isGuideApproval; exports.guideApprovalOrigin = guideApprovalOrigin; exports.approvalDisplaysInline = approvalDisplaysInline; exports.isGuideApprovalSegment = isGuideApprovalSegment; 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;
24889
+ //# sourceMappingURL=chunk-RKGOVTXZ.cjs.map