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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/chat-protocol/decode.d.ts.map +1 -1
  2. package/dist/chat-protocol/events.d.ts +1 -47
  3. package/dist/chat-protocol/events.d.ts.map +1 -1
  4. package/dist/chat-protocol/index.cjs +0 -51
  5. package/dist/chat-protocol/index.cjs.map +1 -1
  6. package/dist/chat-protocol/index.js +1 -48
  7. package/dist/chat-protocol/index.js.map +1 -1
  8. package/dist/chat-protocol/leading-frames.d.ts +3 -9
  9. package/dist/chat-protocol/leading-frames.d.ts.map +1 -1
  10. package/dist/chat-protocol/nats-decoder.d.ts +0 -41
  11. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  12. package/dist/{chunk-IBSOYTGZ.js → chunk-2ML5QEDH.js} +3 -3
  13. package/dist/{chunk-NPNYQSCG.cjs → chunk-3B42TFEE.cjs} +21 -21
  14. package/dist/{chunk-NPNYQSCG.cjs.map → chunk-3B42TFEE.cjs.map} +1 -1
  15. package/dist/{chunk-POB6GNIR.cjs → chunk-3XFMM34I.cjs} +43 -43
  16. package/dist/{chunk-POB6GNIR.cjs.map → chunk-3XFMM34I.cjs.map} +1 -1
  17. package/dist/{chunk-R7OJZCE6.cjs → chunk-4C3MS2G6.cjs} +69 -69
  18. package/dist/{chunk-R7OJZCE6.cjs.map → chunk-4C3MS2G6.cjs.map} +1 -1
  19. package/dist/{chunk-G3AJXLKH.cjs → chunk-653A7FPP.cjs} +22 -22
  20. package/dist/{chunk-G3AJXLKH.cjs.map → chunk-653A7FPP.cjs.map} +1 -1
  21. package/dist/{chunk-KPE277X2.js → chunk-6QDW4CDG.js} +2 -2
  22. package/dist/{chunk-E5QAU63Y.cjs → chunk-7WKFLOC7.cjs} +9 -9
  23. package/dist/{chunk-E5QAU63Y.cjs.map → chunk-7WKFLOC7.cjs.map} +1 -1
  24. package/dist/{chunk-ABWA3W3M.cjs → chunk-AAHKPPGQ.cjs} +32 -32
  25. package/dist/{chunk-ABWA3W3M.cjs.map → chunk-AAHKPPGQ.cjs.map} +1 -1
  26. package/dist/{chunk-JJH4H4CJ.js → chunk-AT4WAFJO.js} +5 -5
  27. package/dist/{chunk-5IAGT5LB.js → chunk-C4KL7OQI.js} +2 -2
  28. package/dist/{chunk-SETRICAM.cjs → chunk-C7Q2PVHD.cjs} +4 -4
  29. package/dist/{chunk-SETRICAM.cjs.map → chunk-C7Q2PVHD.cjs.map} +1 -1
  30. package/dist/{chunk-AJ67T7LI.js → chunk-CGVPUA4X.js} +3 -3
  31. package/dist/{chunk-BFJBE4PQ.js → chunk-CSBNQJSI.js} +4 -4
  32. package/dist/{chunk-LPFA56WY.js → chunk-DBP7S75Q.js} +1317 -1480
  33. package/dist/chunk-DBP7S75Q.js.map +1 -0
  34. package/dist/{chunk-KQBYQBQN.cjs → chunk-DGB2FLFH.cjs} +10 -10
  35. package/dist/{chunk-KQBYQBQN.cjs.map → chunk-DGB2FLFH.cjs.map} +1 -1
  36. package/dist/{chunk-GOEBT72V.cjs → chunk-EVTRRDIH.cjs} +15 -15
  37. package/dist/{chunk-GOEBT72V.cjs.map → chunk-EVTRRDIH.cjs.map} +1 -1
  38. package/dist/{chunk-UQPA2XT7.cjs → chunk-GP2QLZIN.cjs} +24 -24
  39. package/dist/{chunk-UQPA2XT7.cjs.map → chunk-GP2QLZIN.cjs.map} +1 -1
  40. package/dist/{chunk-KLG3MGRP.js → chunk-KXLJT5U5.js} +3 -3
  41. package/dist/{chunk-SNZZ6Q6G.js → chunk-L66XBQM6.js} +2 -2
  42. package/dist/{chunk-SHJXC7A4.js → chunk-NWAUHBYH.js} +3 -3
  43. package/dist/{chunk-YOYHJQX3.cjs → chunk-OCSAB6NT.cjs} +5 -5
  44. package/dist/{chunk-YOYHJQX3.cjs.map → chunk-OCSAB6NT.cjs.map} +1 -1
  45. package/dist/{chunk-5NG2P2KI.js → chunk-PFTEG6L7.js} +5 -5
  46. package/dist/{chunk-BLPGMX2L.cjs → chunk-PITZMTGE.cjs} +159 -159
  47. package/dist/{chunk-BLPGMX2L.cjs.map → chunk-PITZMTGE.cjs.map} +1 -1
  48. package/dist/{chunk-ZBVMPVJF.js → chunk-QOPQ6BCA.js} +3 -3
  49. package/dist/{chunk-IWK2NFVR.js → chunk-RXZWUJEB.js} +2 -2
  50. package/dist/{chunk-OIJWSYKP.cjs → chunk-SY5HCZZO.cjs} +3 -3
  51. package/dist/{chunk-OIJWSYKP.cjs.map → chunk-SY5HCZZO.cjs.map} +1 -1
  52. package/dist/{chunk-ESXUEMPA.js → chunk-TYJITV3H.js} +2 -2
  53. package/dist/{chunk-M7FNT5AC.cjs → chunk-VLRXLTR4.cjs} +167 -330
  54. package/dist/chunk-VLRXLTR4.cjs.map +1 -0
  55. package/dist/{chunk-WUZQYZXI.cjs → chunk-WHSSI3S7.cjs} +3 -3
  56. package/dist/{chunk-WUZQYZXI.cjs.map → chunk-WHSSI3S7.cjs.map} +1 -1
  57. package/dist/{chunk-LEUJNBWU.js → chunk-XJ45MHWI.js} +6 -6
  58. package/dist/{chunk-NJDL7F7K.cjs → chunk-YYEVFC3K.cjs} +10 -10
  59. package/dist/{chunk-NJDL7F7K.cjs.map → chunk-YYEVFC3K.cjs.map} +1 -1
  60. package/dist/{chunk-QHGARH6P.js → chunk-ZCEQLHU3.js} +5 -5
  61. package/dist/components/case-studies/index.cjs +9 -9
  62. package/dist/components/case-studies/index.js +3 -3
  63. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  64. package/dist/components/chat/index.cjs +2 -10
  65. package/dist/components/chat/index.cjs.map +1 -1
  66. package/dist/components/chat/index.d.ts +0 -1
  67. package/dist/components/chat/index.d.ts.map +1 -1
  68. package/dist/components/chat/index.js +1 -9
  69. package/dist/components/chat/stream/chat-stream-reducer.d.ts +0 -9
  70. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  71. package/dist/components/chat/stream/delta-batcher.d.ts +3 -3
  72. package/dist/components/chat/stream/delta-batcher.d.ts.map +1 -1
  73. package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
  74. package/dist/components/chat/types/component.types.d.ts +0 -6
  75. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  76. package/dist/components/chat/types/message.types.d.ts +2 -30
  77. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  78. package/dist/components/chat/types/network.types.d.ts +1 -3
  79. package/dist/components/chat/types/network.types.d.ts.map +1 -1
  80. package/dist/components/chat/types/processing.types.d.ts +1 -4
  81. package/dist/components/chat/types/processing.types.d.ts.map +1 -1
  82. package/dist/components/chat/utils/approval-display.d.ts +8 -36
  83. package/dist/components/chat/utils/approval-display.d.ts.map +1 -1
  84. package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
  85. package/dist/components/chat/utils/index.d.ts +1 -1
  86. package/dist/components/chat/utils/index.d.ts.map +1 -1
  87. package/dist/components/chat/utils/message-segment-accumulator.d.ts +4 -16
  88. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  89. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  90. package/dist/components/chat/utils/resolve-fetched-card-href.d.ts +1 -1
  91. package/dist/components/contact/index.cjs +4 -4
  92. package/dist/components/contact/index.js +3 -3
  93. package/dist/components/docs/index.cjs +7 -7
  94. package/dist/components/docs/index.js +6 -6
  95. package/dist/components/embeds/index.cjs +4 -4
  96. package/dist/components/embeds/index.js +3 -3
  97. package/dist/components/faq/index.cjs +4 -4
  98. package/dist/components/faq/index.js +3 -3
  99. package/dist/components/features/index.cjs +3 -3
  100. package/dist/components/features/index.js +2 -2
  101. package/dist/components/help-center-pages/index.cjs +23 -23
  102. package/dist/components/help-center-pages/index.js +14 -14
  103. package/dist/components/index.cjs +121 -129
  104. package/dist/components/index.cjs.map +1 -1
  105. package/dist/components/index.js +13 -21
  106. package/dist/components/index.js.map +1 -1
  107. package/dist/components/meeting-scheduler/index.cjs +21 -21
  108. package/dist/components/meeting-scheduler/index.js +2 -2
  109. package/dist/components/navigation/index.cjs +6 -6
  110. package/dist/components/navigation/index.js +5 -5
  111. package/dist/components/onboarding-guides/index.cjs +6 -6
  112. package/dist/components/onboarding-guides/index.js +5 -5
  113. package/dist/components/tickets/index.cjs +7 -7
  114. package/dist/components/tickets/index.js +6 -6
  115. package/dist/components/ui/index.cjs +3 -11
  116. package/dist/components/ui/index.cjs.map +1 -1
  117. package/dist/components/ui/index.js +2 -10
  118. package/dist/index.cjs +7 -15
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.js +6 -14
  121. package/dist/index.js.map +1 -1
  122. package/dist/schemas/meeting-booking-schema.d.ts +2 -2
  123. package/dist/utils/index.cjs.map +1 -1
  124. package/dist/utils/index.js.map +1 -1
  125. package/package.json +1 -1
  126. package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +0 -80
  127. package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +1 -118
  128. package/src/chat-protocol/decode.ts +3 -4
  129. package/src/chat-protocol/events.ts +0 -51
  130. package/src/chat-protocol/leading-frames.ts +3 -9
  131. package/src/chat-protocol/nats-decoder.ts +1 -110
  132. package/src/components/chat/__tests__/chat-pending-turn.test.tsx +0 -19
  133. package/src/components/chat/chat-message-enhanced.tsx +1 -13
  134. package/src/components/chat/index.ts +0 -1
  135. package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -90
  136. package/src/components/chat/stream/chat-dialog-store.ts +1 -1
  137. package/src/components/chat/stream/chat-stream-reducer.ts +11 -49
  138. package/src/components/chat/stream/delta-batcher.ts +4 -9
  139. package/src/components/chat/stream/message-mutations.ts +0 -2
  140. package/src/components/chat/types/component.types.ts +0 -9
  141. package/src/components/chat/types/message.types.ts +0 -32
  142. package/src/components/chat/types/network.types.ts +1 -3
  143. package/src/components/chat/types/processing.types.ts +1 -4
  144. package/src/components/chat/utils/__tests__/process-historical-messages-approvals.test.ts +0 -93
  145. package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +1 -78
  146. package/src/components/chat/utils/approval-display.ts +8 -53
  147. package/src/components/chat/utils/extract-incomplete-message-state.ts +0 -1
  148. package/src/components/chat/utils/index.ts +1 -6
  149. package/src/components/chat/utils/message-segment-accumulator.ts +3 -37
  150. package/src/components/chat/utils/process-historical-messages.ts +7 -44
  151. package/src/components/chat/utils/resolve-fetched-card-href.ts +1 -1
  152. package/src/stories/ChatMessageEnhanced.stories.tsx +3 -7
  153. package/dist/chunk-LPFA56WY.js.map +0 -1
  154. package/dist/chunk-M7FNT5AC.cjs.map +0 -1
  155. package/dist/components/chat/guide-display.d.ts +0 -14
  156. package/dist/components/chat/guide-display.d.ts.map +0 -1
  157. package/src/components/chat/guide-display.tsx +0 -42
  158. /package/dist/{chunk-IBSOYTGZ.js.map → chunk-2ML5QEDH.js.map} +0 -0
  159. /package/dist/{chunk-KPE277X2.js.map → chunk-6QDW4CDG.js.map} +0 -0
  160. /package/dist/{chunk-JJH4H4CJ.js.map → chunk-AT4WAFJO.js.map} +0 -0
  161. /package/dist/{chunk-5IAGT5LB.js.map → chunk-C4KL7OQI.js.map} +0 -0
  162. /package/dist/{chunk-AJ67T7LI.js.map → chunk-CGVPUA4X.js.map} +0 -0
  163. /package/dist/{chunk-BFJBE4PQ.js.map → chunk-CSBNQJSI.js.map} +0 -0
  164. /package/dist/{chunk-KLG3MGRP.js.map → chunk-KXLJT5U5.js.map} +0 -0
  165. /package/dist/{chunk-SNZZ6Q6G.js.map → chunk-L66XBQM6.js.map} +0 -0
  166. /package/dist/{chunk-SHJXC7A4.js.map → chunk-NWAUHBYH.js.map} +0 -0
  167. /package/dist/{chunk-5NG2P2KI.js.map → chunk-PFTEG6L7.js.map} +0 -0
  168. /package/dist/{chunk-ZBVMPVJF.js.map → chunk-QOPQ6BCA.js.map} +0 -0
  169. /package/dist/{chunk-IWK2NFVR.js.map → chunk-RXZWUJEB.js.map} +0 -0
  170. /package/dist/{chunk-ESXUEMPA.js.map → chunk-TYJITV3H.js.map} +0 -0
  171. /package/dist/{chunk-LEUJNBWU.js.map → chunk-XJ45MHWI.js.map} +0 -0
  172. /package/dist/{chunk-QHGARH6P.js.map → chunk-ZCEQLHU3.js.map} +0 -0
@@ -1156,7 +1156,6 @@ TicketEscalatedMessage.displayName = "TicketEscalatedMessage";
1156
1156
  var MESSAGE_TYPE = {
1157
1157
  TEXT: "TEXT",
1158
1158
  THINKING: "THINKING",
1159
- GUIDE: "GUIDE",
1160
1159
  ASK: "ASK",
1161
1160
  EXECUTING_TOOL: "EXECUTING_TOOL",
1162
1161
  EXECUTED_TOOL: "EXECUTED_TOOL",
@@ -3654,32 +3653,6 @@ var ThinkingDisplay = _react.forwardRef.call(void 0,
3654
3653
  );
3655
3654
  ThinkingDisplay.displayName = "ThinkingDisplay";
3656
3655
 
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
-
3683
3656
  // src/components/chat/ask-display.tsx
3684
3657
 
3685
3658
 
@@ -7037,7 +7010,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
7037
7010
  const cache = renderedCardNodeCache.current;
7038
7011
  const emittedBlockKeys = /* @__PURE__ */ new Set();
7039
7012
  segments.forEach((segment, segIdx) => {
7040
- if (segment.type !== "text" && segment.type !== "guide") return;
7013
+ if (segment.type !== "text") return;
7041
7014
  const text = segment.text;
7042
7015
  const parts = [];
7043
7016
  let cursor = 0;
@@ -7231,8 +7204,6 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
7231
7204
  },
7232
7205
  index
7233
7206
  );
7234
- } else if (segment.type === "guide") {
7235
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GuideDisplay, { children: renderSegmentBody(index, segment.text, segmentIsStreaming) }, index);
7236
7207
  } else if (segment.type === "ask") {
7237
7208
  const run = askRuns.get(index);
7238
7209
  if (!run) return null;
@@ -17728,10 +17699,6 @@ function createSseFrameDecoder() {
17728
17699
  }
17729
17700
 
17730
17701
  // 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
- }
17735
17702
  var ESCALATION_STATE = {
17736
17703
  PENDING: "PENDING",
17737
17704
  APPROVED: "APPROVED",
@@ -17767,20 +17734,9 @@ function errorDetailsMessage(details) {
17767
17734
  var CHAT_OWNER_ADMIN = "ADMIN";
17768
17735
 
17769
17736
  // src/components/chat/utils/approval-display.ts
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;
17737
+ function approvalDisplaysInline(approvalType, displayApprovalTypes) {
17778
17738
  return !displayApprovalTypes || displayApprovalTypes.includes(approvalType);
17779
17739
  }
17780
- function isGuideApprovalSegment(segment) {
17781
- if (segment.type !== "approval_request" && segment.type !== "approval_batch") return false;
17782
- return isGuideApproval(segment.data);
17783
- }
17784
17740
 
17785
17741
  // src/components/chat/stream/message-mutations.ts
17786
17742
  function nextId(role) {
@@ -17836,12 +17792,10 @@ function appendToTrailingAssistant(prev, segments) {
17836
17792
  for (const seg of segments) {
17837
17793
  const tail = merged[merged.length - 1];
17838
17794
  const key = upsertKey(seg);
17839
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _557 => _557.type]) === "text") {
17795
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _556 => _556.type]) === "text") {
17840
17796
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
17841
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _558 => _558.type]) === "thinking") {
17797
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _557 => _557.type]) === "thinking") {
17842
17798
  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 };
17845
17799
  } else if (key) {
17846
17800
  const idx = merged.findIndex((m) => upsertKey(m) === key);
17847
17801
  if (idx !== -1) merged[idx] = seg;
@@ -17880,7 +17834,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
17880
17834
  }
17881
17835
  if (s.type !== "approval_batch") return s;
17882
17836
  const isAnchor = s.data.approvalRequestId === 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)]);
17837
+ const hasRow = _optionalChain([s, 'access', _558 => _558.data, 'access', _559 => _559.toolCalls, 'optionalAccess', _560 => _560.some, 'call', _561 => _561((c) => c.toolExecutionRequestId === requestId)]);
17884
17838
  if (!isAnchor && !hasRow) return s;
17885
17839
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
17886
17840
  const nextExecutions = hasRow ? {
@@ -17902,8 +17856,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
17902
17856
  };
17903
17857
  }
17904
17858
  function nextBatchExecution(prevExec, toolData) {
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]) };
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]) };
17907
17861
  }
17908
17862
  function withBatchExecution(seg, execId, state) {
17909
17863
  return {
@@ -17920,11 +17874,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
17920
17874
  }
17921
17875
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
17922
17876
  return mapSegments(prev, (s) => {
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)])) {
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)])) {
17924
17878
  return s;
17925
17879
  }
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;
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;
17928
17882
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
17929
17883
  });
17930
17884
  }
@@ -17960,7 +17914,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
17960
17914
  for (let j = message.segments.length - 1; j >= 0; j--) {
17961
17915
  const seg = message.segments[j];
17962
17916
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
17963
- const prevExec = _optionalChain([seg, 'access', _575 => _575.data, 'access', _576 => _576.executions, 'optionalAccess', _577 => _577[execId]]);
17917
+ const prevExec = _optionalChain([seg, 'access', _573 => _573.data, 'access', _574 => _574.executions, 'optionalAccess', _575 => _575[execId]]);
17964
17918
  const nextExec = nextBatchExecution(prevExec, toolData);
17965
17919
  if (nextExec === null) return prev;
17966
17920
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -18084,19 +18038,6 @@ var MessageSegmentAccumulator = class {
18084
18038
  }
18085
18039
  return this.getSegments();
18086
18040
  }
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
- }
18100
18041
  /**
18101
18042
  * Add a clarification (ask) card. Unlike the three delta streams an ask
18102
18043
  * arrives whole in one chunk, so it is always a NEW segment — never merged
@@ -18146,9 +18087,9 @@ var MessageSegmentAccumulator = class {
18146
18087
  type: "tool_execution",
18147
18088
  data: {
18148
18089
  ...toolData,
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])
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])
18152
18093
  }
18153
18094
  };
18154
18095
  if (existingIndex !== -1) {
@@ -18172,7 +18113,7 @@ var MessageSegmentAccumulator = class {
18172
18113
  if (seg.type !== "approval_batch") return seg;
18173
18114
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
18174
18115
  if (!hasCall) return seg;
18175
- const prev = _optionalChain([seg, 'access', _585 => _585.data, 'access', _586 => _586.executions, 'optionalAccess', _587 => _587[execId]]);
18116
+ const prev = _optionalChain([seg, 'access', _583 => _583.data, 'access', _584 => _584.executions, 'optionalAccess', _585 => _585[execId]]);
18176
18117
  const next = nextBatchExecution(prev, toolData);
18177
18118
  matched = true;
18178
18119
  if (next === null) return seg;
@@ -18213,9 +18154,9 @@ var MessageSegmentAccumulator = class {
18213
18154
  /**
18214
18155
  * Add an approval request segment directly (for CLIENT approvals)
18215
18156
  */
18216
- addApprovalRequest(requestId, command, explanation, approvalType, status = "pending", fields, origin) {
18157
+ addApprovalRequest(requestId, command, explanation, approvalType, status = "pending", fields) {
18217
18158
  this.segments.push(
18218
- this.buildApprovalRequestSegment(requestId, { command, explanation, approvalType, fields, origin }, status)
18159
+ this.buildApprovalRequestSegment(requestId, { command, explanation, approvalType, fields }, status)
18219
18160
  );
18220
18161
  return this.getSegments();
18221
18162
  }
@@ -18225,7 +18166,7 @@ var MessageSegmentAccumulator = class {
18225
18166
  * Three paths produce these: `addApprovalRequest` (live stream and replay),
18226
18167
  * `flushPendingApprovals` (tracked-but-unresolved after a history replay) and
18227
18168
  * `processApprovalResult` (a result arriving for a tracked request). They used
18228
- * to hand-write the object each, which is how `fields` and `origin` reached
18169
+ * to hand-write the object each, which is how `fields` reached
18229
18170
  * the card down one path and not the others — the same proposal rendering as a
18230
18171
  * bare title, or losing the marker that routes its buttons to the hub.
18231
18172
  */
@@ -18237,8 +18178,7 @@ var MessageSegmentAccumulator = class {
18237
18178
  explanation: approval.explanation,
18238
18179
  requestId,
18239
18180
  approvalType: approval.approvalType,
18240
- ...approval.fields && approval.fields.length > 0 ? { fields: approval.fields } : {},
18241
- ...approval.origin ? { origin: approval.origin } : {}
18181
+ ...approval.fields && approval.fields.length > 0 ? { fields: approval.fields } : {}
18242
18182
  },
18243
18183
  status,
18244
18184
  onApprove: this.callbacks.onApprove,
@@ -18258,22 +18198,20 @@ var MessageSegmentAccumulator = class {
18258
18198
  * `executions` is forwarded as-is. On upsert, a new `executions` object
18259
18199
  * overrides the existing one (so the latest replay wins).
18260
18200
  */
18261
- addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions, resolvedByName, origin) {
18201
+ addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions, resolvedByName) {
18262
18202
  const existingIndex = this.segments.findIndex(
18263
18203
  (s) => s.type === "approval_batch" && s.data.approvalRequestId === approvalRequestId
18264
18204
  );
18265
18205
  if (existingIndex !== -1) {
18266
18206
  const existing = this.segments[existingIndex];
18267
18207
  const mergedExecutions = _nullishCoalesce(executions, () => ( existing.data.executions));
18268
- const mergedOrigin = _nullishCoalesce(origin, () => ( existing.data.origin));
18269
18208
  this.segments[existingIndex] = {
18270
18209
  ...existing,
18271
18210
  data: {
18272
18211
  approvalRequestId,
18273
18212
  approvalType,
18274
18213
  toolCalls,
18275
- ...mergedExecutions ? { executions: mergedExecutions } : {},
18276
- ...mergedOrigin ? { origin: mergedOrigin } : {}
18214
+ ...mergedExecutions ? { executions: mergedExecutions } : {}
18277
18215
  },
18278
18216
  status,
18279
18217
  resolvedByName: _nullishCoalesce(resolvedByName, () => ( existing.resolvedByName)),
@@ -18288,8 +18226,7 @@ var MessageSegmentAccumulator = class {
18288
18226
  approvalRequestId,
18289
18227
  approvalType,
18290
18228
  toolCalls,
18291
- ...executions ? { executions } : {},
18292
- ...origin ? { origin } : {}
18229
+ ...executions ? { executions } : {}
18293
18230
  },
18294
18231
  status,
18295
18232
  resolvedByName,
@@ -18310,8 +18247,8 @@ var MessageSegmentAccumulator = class {
18310
18247
  requestId,
18311
18248
  {
18312
18249
  ...pendingApproval,
18313
- command: _optionalChain([pendingApproval, 'optionalAccess', _588 => _588.command]) || "",
18314
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _589 => _589.approvalType]) || approvalType
18250
+ command: _optionalChain([pendingApproval, 'optionalAccess', _586 => _586.command]) || "",
18251
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _587 => _587.approvalType]) || approvalType
18315
18252
  },
18316
18253
  status
18317
18254
  );
@@ -18336,9 +18273,9 @@ var MessageSegmentAccumulator = class {
18336
18273
  type: "escalation_offer",
18337
18274
  // The resolved chunk carries no text/origin — a redelivered offer must
18338
18275
  // not blank the card the PENDING chunk already painted.
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]))) },
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]))) },
18340
18277
  status,
18341
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _594 => _594.resolvedByName]))),
18278
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _592 => _592.resolvedByName]))),
18342
18279
  onApprove: this.callbacks.onEscalationApprove,
18343
18280
  onReject: this.callbacks.onEscalationReject
18344
18281
  };
@@ -18486,9 +18423,6 @@ var MessageSegmentAccumulator = class {
18486
18423
  case "thinking":
18487
18424
  if (segment.text) this.appendThinking(segment.text);
18488
18425
  break;
18489
- case "guide":
18490
- if (segment.text) this.appendGuide(segment.text);
18491
- break;
18492
18426
  case "ask":
18493
18427
  this.addAsk(segment.question, segment.options);
18494
18428
  break;
@@ -18503,8 +18437,7 @@ var MessageSegmentAccumulator = class {
18503
18437
  data.explanation,
18504
18438
  data.approvalType || "",
18505
18439
  status,
18506
- data.fields,
18507
- data.origin
18440
+ data.fields
18508
18441
  );
18509
18442
  break;
18510
18443
  }
@@ -18516,8 +18449,7 @@ var MessageSegmentAccumulator = class {
18516
18449
  data.toolCalls,
18517
18450
  status,
18518
18451
  data.executions,
18519
- resolvedByName,
18520
- data.origin
18452
+ resolvedByName
18521
18453
  );
18522
18454
  break;
18523
18455
  }
@@ -18619,7 +18551,6 @@ function createChatStreamReducer(options = {}) {
18619
18551
  let streamingPhase = "idle";
18620
18552
  let dialogTokenUsage = null;
18621
18553
  let liveModel = null;
18622
- let guideConversationId = null;
18623
18554
  let approvalStatuses = {
18624
18555
  ..._nullishCoalesce(options.approvalStatuses, () => ( {}))
18625
18556
  };
@@ -18669,7 +18600,7 @@ function createChatStreamReducer(options = {}) {
18669
18600
  let stateCache = null;
18670
18601
  function invalidate() {
18671
18602
  stateCache = null;
18672
- _optionalChain([onChange, 'optionalCall', _595 => _595()]);
18603
+ _optionalChain([onChange, 'optionalCall', _593 => _593()]);
18673
18604
  }
18674
18605
  function getState() {
18675
18606
  if (!stateCache) {
@@ -18679,14 +18610,13 @@ function createChatStreamReducer(options = {}) {
18679
18610
  turnMeta: { meta: metaMap, sources: sourcesMap, sendCount },
18680
18611
  dialogTokenUsage,
18681
18612
  liveModel,
18682
- approvalStatuses,
18683
- guideConversationId
18613
+ approvalStatuses
18684
18614
  };
18685
18615
  }
18686
18616
  return stateCache;
18687
18617
  }
18688
18618
  function emit(name, ...args) {
18689
- _optionalChain([onEffect, 'optionalCall', _596 => _596({ name, args })]);
18619
+ _optionalChain([onEffect, 'optionalCall', _594 => _594({ name, args })]);
18690
18620
  }
18691
18621
  function setMessagesInternal(next) {
18692
18622
  if (next !== messages) {
@@ -18717,12 +18647,12 @@ function createChatStreamReducer(options = {}) {
18717
18647
  return [...next.slice(0, -1), { ...last, streamSeq: seq }];
18718
18648
  }
18719
18649
  function applySegmentsToState(segments, meta) {
18720
- const seq = _optionalChain([meta, 'optionalAccess', _597 => _597.streamSeq]);
18721
- if (_optionalChain([meta, 'optionalAccess', _598 => _598.append]) && meta.isCompacting) {
18650
+ const seq = _optionalChain([meta, 'optionalAccess', _595 => _595.streamSeq]);
18651
+ if (_optionalChain([meta, 'optionalAccess', _596 => _596.append]) && meta.isCompacting) {
18722
18652
  setMessagesInternal(stampTrailingAssistantSeq(upsertTrailingCompaction(messages, segments), seq));
18723
18653
  return;
18724
18654
  }
18725
- if (_optionalChain([meta, 'optionalAccess', _599 => _599.append])) {
18655
+ if (_optionalChain([meta, 'optionalAccess', _597 => _597.append])) {
18726
18656
  setMessagesInternal(stampTrailingAssistantSeq(appendToTrailingAssistant(messages, segments), seq));
18727
18657
  return;
18728
18658
  }
@@ -18734,7 +18664,7 @@ function createChatStreamReducer(options = {}) {
18734
18664
  adoptTrailingAssistant = false;
18735
18665
  const last = messages[messages.length - 1];
18736
18666
  if (!last || last.role !== "assistant" || adoptTail) return;
18737
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _600 => _600.segments, 'optionalAccess', _601 => _601.length]), () => ( 0))) > 0 || last.content !== "";
18667
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _598 => _598.segments, 'optionalAccess', _599 => _599.length]), () => ( 0))) > 0 || last.content !== "";
18738
18668
  if (!hasContent) return;
18739
18669
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
18740
18670
  }
@@ -18863,13 +18793,6 @@ function createChatStreamReducer(options = {}) {
18863
18793
  break;
18864
18794
  }
18865
18795
  case "metadata": {
18866
- if (isGuideOrigin(event)) {
18867
- if (typeof event.conversationId === "string" && event.conversationId) {
18868
- guideConversationId = event.conversationId;
18869
- invalidate();
18870
- }
18871
- break;
18872
- }
18873
18796
  emit("onMetadata", {
18874
18797
  action: "metadata",
18875
18798
  modelDisplayName: _nullishCoalesce(event.modelLabel, () => ( void 0)),
@@ -18885,16 +18808,13 @@ function createChatStreamReducer(options = {}) {
18885
18808
  invalidate();
18886
18809
  break;
18887
18810
  }
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.
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.
18893
18814
  case "text-delta":
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);
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);
18898
18818
  if (isInStream || !hasEverStreamed) {
18899
18819
  emitSegments(segments);
18900
18820
  applySegmentsToState(segments, withSeqMeta(void 0));
@@ -18946,8 +18866,7 @@ function createChatStreamReducer(options = {}) {
18946
18866
  const requestId = event.requestId;
18947
18867
  const approvalType = _nullishCoalesce(event.approvalType, () => ( "USER"));
18948
18868
  const toolCalls = event.toolCalls;
18949
- const guideOrigin = guideApprovalOrigin(event);
18950
- const displayInline = (type) => approvalDisplaysInline(event, type, displayApprovalTypes);
18869
+ const displayInline = (type) => approvalDisplaysInline(type, displayApprovalTypes);
18951
18870
  if (toolCalls && toolCalls.length > 0) {
18952
18871
  const status = approvalStatuses[requestId] || "pending";
18953
18872
  if (!displayInline(approvalType)) {
@@ -18955,13 +18874,13 @@ function createChatStreamReducer(options = {}) {
18955
18874
  const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
18956
18875
  pendingEscalated.set(requestId, {
18957
18876
  command: summary,
18958
- explanation: _optionalChain([required, 'optionalAccess', _602 => _602.toolExplanation]),
18877
+ explanation: _optionalChain([required, 'optionalAccess', _600 => _600.toolExplanation]),
18959
18878
  approvalType,
18960
18879
  toolCalls
18961
18880
  });
18962
18881
  emit("onEscalatedApproval", requestId, {
18963
18882
  command: summary,
18964
- explanation: _optionalChain([required, 'optionalAccess', _603 => _603.toolExplanation]),
18883
+ explanation: _optionalChain([required, 'optionalAccess', _601 => _601.toolExplanation]),
18965
18884
  approvalType
18966
18885
  });
18967
18886
  break;
@@ -18974,8 +18893,7 @@ function createChatStreamReducer(options = {}) {
18974
18893
  toolCalls,
18975
18894
  status,
18976
18895
  void 0,
18977
- void 0,
18978
- guideOrigin
18896
+ void 0
18979
18897
  );
18980
18898
  applyAccumulated(before2, segments2);
18981
18899
  break;
@@ -18990,8 +18908,7 @@ function createChatStreamReducer(options = {}) {
18990
18908
  call.toolExplanation,
18991
18909
  approvalType,
18992
18910
  status,
18993
- void 0,
18994
- guideOrigin
18911
+ void 0
18995
18912
  );
18996
18913
  }
18997
18914
  applyAccumulated(before, segments);
@@ -19008,10 +18925,8 @@ function createChatStreamReducer(options = {}) {
19008
18925
  explanation,
19009
18926
  approvalType,
19010
18927
  status,
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
18928
+ // SSE-shaped cards carry their body as structured rows rather than prose.
18929
+ event.fields
19015
18930
  );
19016
18931
  applyAccumulated(before, segments);
19017
18932
  } else {
@@ -19349,7 +19264,7 @@ function createChatStreamReducer(options = {}) {
19349
19264
  const resolveBatch = (status, confirm) => async () => {
19350
19265
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
19351
19266
  for (const id of ids) {
19352
- const ok = await _optionalChain([confirm, 'optionalCall', _604 => _604(id)]);
19267
+ const ok = await _optionalChain([confirm, 'optionalCall', _602 => _602(id)]);
19353
19268
  if (ok === false) {
19354
19269
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
19355
19270
  }
@@ -19400,7 +19315,6 @@ function createChatStreamReducer(options = {}) {
19400
19315
  streamingPhase = "idle";
19401
19316
  dialogTokenUsage = null;
19402
19317
  liveModel = null;
19403
- guideConversationId = null;
19404
19318
  approvalStatuses = {};
19405
19319
  accumulator.reset();
19406
19320
  pendingEscalated.clear();
@@ -19423,7 +19337,6 @@ function createChatStreamReducer(options = {}) {
19423
19337
  streamingPhase = "idle";
19424
19338
  dialogTokenUsage = null;
19425
19339
  liveModel = null;
19426
- guideConversationId = null;
19427
19340
  accumulator.reset();
19428
19341
  pendingEscalated.clear();
19429
19342
  isInStream = false;
@@ -19487,8 +19400,8 @@ function createChatStreamReducer(options = {}) {
19487
19400
  }
19488
19401
  }
19489
19402
  }
19490
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _605 => _605.resumed]), () => ( messages.length > 0)));
19491
- if (_optionalChain([extras, 'optionalAccess', _606 => _606.agentBusy])) agentBusyState();
19403
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _603 => _603.resumed]), () => ( messages.length > 0)));
19404
+ if (_optionalChain([extras, 'optionalAccess', _604 => _604.agentBusy])) agentBusyState();
19492
19405
  invalidate();
19493
19406
  }
19494
19407
  return {
@@ -19573,7 +19486,7 @@ function createChatStreamReducer(options = {}) {
19573
19486
  },
19574
19487
  endSseTurn() {
19575
19488
  const last = messages[messages.length - 1];
19576
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _607 => _607.segments, 'optionalAccess', _608 => _608.length]), () => ( 0))) === 0 && last.content === "") {
19489
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _605 => _605.segments, 'optionalAccess', _606 => _606.length]), () => ( 0))) === 0 && last.content === "") {
19577
19490
  messages = messages.slice(0, -1);
19578
19491
  }
19579
19492
  sseCurrentText = "";
@@ -19726,10 +19639,10 @@ function createChatDialogStore(options = {}) {
19726
19639
  if (onEvict) {
19727
19640
  const sep = key.indexOf(KEY_SEP);
19728
19641
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
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))
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))
19733
19646
  });
19734
19647
  }
19735
19648
  }
@@ -19739,12 +19652,12 @@ function createChatDialogStore(options = {}) {
19739
19652
  const key = keyOf(dialogId, side);
19740
19653
  let reducer = reducers.get(key);
19741
19654
  if (!reducer) {
19742
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _617 => _617(dialogId, side)]), () => ( {}));
19655
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _615 => _615(dialogId, side)]), () => ( {}));
19743
19656
  const userOnChange = base.onChange;
19744
19657
  reducer = createChatStreamReducer({
19745
19658
  ...base,
19746
19659
  onChange: () => {
19747
- _optionalChain([userOnChange, 'optionalCall', _618 => _618()]);
19660
+ _optionalChain([userOnChange, 'optionalCall', _616 => _616()]);
19748
19661
  notify();
19749
19662
  }
19750
19663
  });
@@ -19789,7 +19702,7 @@ function createChatDialogStore(options = {}) {
19789
19702
  };
19790
19703
  }
19791
19704
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
19792
- return _nullishCoalesce(_optionalChain([reducers, 'access', _619 => _619.get, 'call', _620 => _620(keyOf(dialogId, side)), 'optionalAccess', _621 => _621.state]), () => ( EMPTY_STATE));
19705
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _617 => _617.get, 'call', _618 => _618(keyOf(dialogId, side)), 'optionalAccess', _619 => _619.state]), () => ( EMPTY_STATE));
19793
19706
  }
19794
19707
  function getServerSnapshot2() {
19795
19708
  return EMPTY_STATE;
@@ -19852,7 +19765,7 @@ function createChatDialogStore(options = {}) {
19852
19765
  // src/components/chat/stream/delta-batcher.ts
19853
19766
  var DELTA_FLUSH_FALLBACK_MS = 50;
19854
19767
  function isDeltaEvent(event) {
19855
- return event.type === "text-delta" || event.type === "thinking-delta" || event.type === "guide-delta";
19768
+ return event.type === "text-delta" || event.type === "thinking-delta";
19856
19769
  }
19857
19770
  function createDeltaBatcher({
19858
19771
  applyOne,
@@ -19881,7 +19794,7 @@ function createDeltaBatcher({
19881
19794
  pending = [];
19882
19795
  const key = pendingKey;
19883
19796
  for (const delta of batch) applyOne(delta, key);
19884
- _optionalChain([onFlushed, 'optionalCall', _622 => _622(batch.length)]);
19797
+ _optionalChain([onFlushed, 'optionalCall', _620 => _620(batch.length)]);
19885
19798
  }
19886
19799
  function schedule() {
19887
19800
  if (raf !== null || timer !== null) return;
@@ -19905,7 +19818,7 @@ function createDeltaBatcher({
19905
19818
  }
19906
19819
  if (!isDeltaEvent(event)) return false;
19907
19820
  const tail = pending[pending.length - 1];
19908
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _623 => _623.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
19821
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _621 => _621.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
19909
19822
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
19910
19823
  pending[pending.length - 1] = {
19911
19824
  ...tail,
@@ -19936,7 +19849,7 @@ function useChatStreamReducer({
19936
19849
  side = DEFAULT_DIALOG_SIDE,
19937
19850
  createReducerOptions
19938
19851
  }) {
19939
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _624 => _624()]), () => ( {})));
19852
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _622 => _622()]), () => ( {})));
19940
19853
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
19941
19854
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
19942
19855
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -19975,7 +19888,7 @@ var STORAGE_KEY = "conversation";
19975
19888
  var namespaceFor = (source) => {
19976
19889
  const base = `mingo-chat-${source}`;
19977
19890
  const auth = _chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, );
19978
- return _optionalChain([auth, 'optionalAccess', _625 => _625.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
19891
+ return _optionalChain([auth, 'optionalAccess', _623 => _623.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
19979
19892
  };
19980
19893
  function createChatConversationStorage(source) {
19981
19894
  return _chunkCP6TIRONcjs.createLocalStorageAdapter.call(void 0, {
@@ -20039,7 +19952,7 @@ function formatSingularLookupInvocation(cmdId, value) {
20039
19952
  return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
20040
19953
  }
20041
19954
  function extractEntityIdFilter(override, expectedTableId) {
20042
- const f = _optionalChain([override, 'optionalAccess', _626 => _626.entityIdFilter]);
19955
+ const f = _optionalChain([override, 'optionalAccess', _624 => _624.entityIdFilter]);
20043
19956
  if (!f) return null;
20044
19957
  const tableId = typeof f.tableId === "string" ? f.tableId : "";
20045
19958
  const id = typeof f.id === "string" ? f.id : "";
@@ -20078,7 +19991,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
20078
19991
  function buildAutoContinuationDirective(toolName, opts = {}) {
20079
19992
  const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
20080
19993
  const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
20081
- const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _627 => _627.status, 'optionalAccess', _628 => _628.toUpperCase, 'call', _629 => _629()]) === "CLOSED";
19994
+ const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _625 => _625.status, 'optionalAccess', _626 => _626.toUpperCase, 'call', _627 => _627()]) === "CLOSED";
20082
19995
  if (toolName === "create_ticket") {
20083
19996
  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.`;
20084
19997
  }
@@ -20201,7 +20114,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20201
20114
  const { active = true } = runtimeOptions;
20202
20115
  const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
20203
20116
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
20204
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _630 => _630.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
20117
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _628 => _628.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
20205
20118
  const sendMessageRef = _react.useRef.call(void 0,
20206
20119
  () => Promise.resolve(true)
20207
20120
  );
@@ -20238,7 +20151,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20238
20151
  if (!restoredConversationRef.current) {
20239
20152
  restoredConversationRef.current = true;
20240
20153
  pruneStaleChatConversationStorage(source);
20241
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _631 => _631.load, 'call', _632 => _632(), 'optionalAccess', _633 => _633.conversationId]), () => ( null));
20154
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _629 => _629.load, 'call', _630 => _630(), 'optionalAccess', _631 => _631.conversationId]), () => ( null));
20242
20155
  }
20243
20156
  const commandsUrl = runtime.endpoints.commandsUrl;
20244
20157
  const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
@@ -20343,7 +20256,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20343
20256
  const serverMessage = await readServerErrorMessage(response);
20344
20257
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
20345
20258
  }
20346
- const reader = _optionalChain([response, 'access', _634 => _634.body, 'optionalAccess', _635 => _635.getReader, 'call', _636 => _636()]);
20259
+ const reader = _optionalChain([response, 'access', _632 => _632.body, 'optionalAccess', _633 => _633.getReader, 'call', _634 => _634()]);
20347
20260
  if (!reader) throw new Error("No response body");
20348
20261
  const frameDecoder = createSseFrameDecoder();
20349
20262
  let finished = false;
@@ -20366,7 +20279,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20366
20279
  }
20367
20280
  return true;
20368
20281
  } catch (err) {
20369
- if (_optionalChain([err, 'optionalAccess', _637 => _637.name]) === "AbortError" || ctrl.signal.aborted) {
20282
+ if (_optionalChain([err, 'optionalAccess', _635 => _635.name]) === "AbortError" || ctrl.signal.aborted) {
20370
20283
  return true;
20371
20284
  }
20372
20285
  flushDeltas();
@@ -20386,7 +20299,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20386
20299
  );
20387
20300
  sendMessageRef.current = sendMessage;
20388
20301
  const stopMessage = _react.useCallback.call(void 0, () => {
20389
- _optionalChain([abortControllerRef, 'access', _638 => _638.current, 'optionalAccess', _639 => _639.abort, 'call', _640 => _640()]);
20302
+ _optionalChain([abortControllerRef, 'access', _636 => _636.current, 'optionalAccess', _637 => _637.abort, 'call', _638 => _638()]);
20390
20303
  flushDeltas();
20391
20304
  mutate((r) => r.setPhase("idle"));
20392
20305
  }, [mutate, flushDeltas]);
@@ -20402,7 +20315,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20402
20315
  let sendIdx = -1;
20403
20316
  return state.messages.map((m) => {
20404
20317
  const segments = m.segments;
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("")]), () => ( ""));
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("")]), () => ( ""));
20406
20319
  let sources;
20407
20320
  let scrollAnchor;
20408
20321
  if (m.role === "user" && !m.hidden) {
@@ -20411,7 +20324,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20411
20324
  if (m.role === "assistant") {
20412
20325
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
20413
20326
  sources = sourcesMap.get(lookupIdx);
20414
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _647 => _647.get, 'call', _648 => _648(lookupIdx), 'optionalAccess', _649 => _649.scrollAnchor]), () => ( void 0));
20327
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _645 => _645.get, 'call', _646 => _646(lookupIdx), 'optionalAccess', _647 => _647.scrollAnchor]), () => ( void 0));
20415
20328
  }
20416
20329
  return {
20417
20330
  id: m.id,
@@ -20438,7 +20351,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20438
20351
  );
20439
20352
  return;
20440
20353
  }
20441
- const refSlug = typeof _optionalChain([reference, 'access', _650 => _650.metadata, 'optionalAccess', _651 => _651.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
20354
+ const refSlug = typeof _optionalChain([reference, 'access', _648 => _648.metadata, 'optionalAccess', _649 => _649.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
20442
20355
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
20443
20356
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
20444
20357
  const text = `/${cmdId} display "${escaped}"`;
@@ -20484,18 +20397,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
20484
20397
  /** True while the mount-time rebuild from the server transcript runs. */
20485
20398
  isHydratingHistory,
20486
20399
  /** Provider key for the lib's `<ModelDisplay>` icon. */
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)),
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)),
20490
20403
  /** Input tokens (known after server's message_start frame; null until). */
20491
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _655 => _655.inputTokens]), () => ( null)),
20404
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _653 => _653.inputTokens]), () => ( null)),
20492
20405
  /** Output tokens (known only after server's trailing usage frame). */
20493
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _656 => _656.outputTokens]), () => ( null)),
20406
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _654 => _654.outputTokens]), () => ( null)),
20494
20407
  /** Cache hit % (read / total-input × 100). null during streaming. */
20495
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _657 => _657.cacheHitRatePct]), () => ( null)),
20408
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _655 => _655.cacheHitRatePct]), () => ( null)),
20496
20409
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
20497
20410
  * token counts). null until the trailing usage frame lands. */
20498
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _658 => _658.breakdown]), () => ( null)),
20411
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _656 => _656.breakdown]), () => ( null)),
20499
20412
  // ─── Dialog management — stubs for v1 ────────────────────────────────
20500
20413
  // Guide mode keeps ONE server-side conversation per stored id
20501
20414
  // (`chat_conversations`, hydrated on mount). Surfacing multiple threads
@@ -20562,34 +20475,6 @@ function normalizeAskOptions(raw) {
20562
20475
  description: typeof item.description === "string" ? item.description : void 0
20563
20476
  })).filter((option) => option.label.length > 0);
20564
20477
  }
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
- }
20593
20478
  function decodeNatsChunk(chunk) {
20594
20479
  if (!chunk || typeof chunk !== "object") return null;
20595
20480
  const data = chunk;
@@ -20624,20 +20509,6 @@ function decodeNatsChunk(chunk) {
20624
20509
  return { type: "thinking-delta", text: data.text, ...seq };
20625
20510
  }
20626
20511
  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
- }
20641
20512
  // An ask card is only an ask card with something to pick: a question and at
20642
20513
  // least one option. Anything less is dropped rather than rendered as an
20643
20514
  // empty card the user can't answer — the backend already falls back to a
@@ -20782,7 +20653,7 @@ function decodeNatsChunk(chunk) {
20782
20653
  userId: typeof data.userId === "string" ? data.userId : void 0,
20783
20654
  // Wire shape carries no label; fall back to the id (parity with
20784
20655
  // the history path in `process-historical-messages.ts`).
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) => ({
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) => ({
20786
20657
  type: it.type,
20787
20658
  id: it.id,
20788
20659
  label: it.id
@@ -20873,7 +20744,7 @@ function extractIncompleteMessageState(lastMessage) {
20873
20744
  }
20874
20745
  break;
20875
20746
  case "approval_batch": {
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");
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");
20877
20748
  if (segment.status !== "rejected" && !allDone) {
20878
20749
  hasIncompleteState = true;
20879
20750
  }
@@ -20910,7 +20781,6 @@ function extractIncompleteMessageState(lastMessage) {
20910
20781
  // backend has already abandoned.
20911
20782
  case "text":
20912
20783
  case "thinking":
20913
- case "guide":
20914
20784
  case "ask":
20915
20785
  case "ticket_escalated":
20916
20786
  case "ticket_event":
@@ -20936,11 +20806,11 @@ function extractIncompleteMessageState(lastMessage) {
20936
20806
  function extractIncompleteTailState(messages) {
20937
20807
  if (!messages || messages.length === 0) return void 0;
20938
20808
  let start = messages.length;
20939
- while (start > 0 && _optionalChain([messages, 'access', _665 => _665[start - 1], 'optionalAccess', _666 => _666.role]) === "assistant") start -= 1;
20809
+ while (start > 0 && _optionalChain([messages, 'access', _663 => _663[start - 1], 'optionalAccess', _664 => _664.role]) === "assistant") start -= 1;
20940
20810
  if (start === messages.length) return void 0;
20941
20811
  const segments = [];
20942
20812
  for (let i = start; i < messages.length; i += 1) {
20943
- const content = _optionalChain([messages, 'access', _667 => _667[i], 'optionalAccess', _668 => _668.content]);
20813
+ const content = _optionalChain([messages, 'access', _665 => _665[i], 'optionalAccess', _666 => _666.content]);
20944
20814
  if (Array.isArray(content)) segments.push(...content);
20945
20815
  }
20946
20816
  if (segments.length === 0) return void 0;
@@ -20953,15 +20823,15 @@ function extractIncompleteTailState(messages) {
20953
20823
 
20954
20824
  // src/components/chat/utils/process-historical-messages.ts
20955
20825
  function getOwnerDisplayName(owner) {
20956
- if (_optionalChain([owner, 'optionalAccess', _669 => _669.type]) === OWNER_TYPE.ADMIN && owner.user) {
20826
+ if (_optionalChain([owner, 'optionalAccess', _667 => _667.type]) === OWNER_TYPE.ADMIN && owner.user) {
20957
20827
  const { firstName, lastName } = owner.user;
20958
20828
  const name = [firstName, lastName].filter(Boolean).join(" ");
20959
20829
  if (name) return name;
20960
20830
  }
20961
- return _optionalChain([owner, 'optionalAccess', _670 => _670.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
20831
+ return _optionalChain([owner, 'optionalAccess', _668 => _668.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
20962
20832
  }
20963
20833
  function getOwnerAvatar(owner) {
20964
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _671 => _671.user, 'optionalAccess', _672 => _672.image, 'optionalAccess', _673 => _673.imageUrl]), () => ( void 0));
20834
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _669 => _669.user, 'optionalAccess', _670 => _670.image, 'optionalAccess', _671 => _671.imageUrl]), () => ( void 0));
20965
20835
  }
20966
20836
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
20967
20837
  messageDataArray.forEach((data) => {
@@ -20990,21 +20860,6 @@ function decodeHistoricalMessageData(data) {
20990
20860
  return { type: "thinking-delta", text: data.text };
20991
20861
  }
20992
20862
  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
- }
21008
20863
  // Same completeness gate as the live decoder (`decodeNatsChunk`): a
21009
20864
  // persisted row without a question or without options is not a card the
21010
20865
  // user can answer, so it replays as nothing rather than as empty chrome.
@@ -21160,7 +21015,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21160
21015
  event.offerId,
21161
21016
  event.text,
21162
21017
  event.origin,
21163
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _674 => _674[event.offerId]]), () => ( "pending"))
21018
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _672 => _672[event.offerId]]), () => ( "pending"))
21164
21019
  );
21165
21020
  break;
21166
21021
  case "ticket-escalated":
@@ -21190,7 +21045,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21190
21045
  );
21191
21046
  break;
21192
21047
  case "escalation-offer-resolved":
21193
- _optionalChain([offerResolutions, 'optionalAccess', _675 => _675.set, 'call', _676 => _676(event.offerId, {
21048
+ _optionalChain([offerResolutions, 'optionalAccess', _673 => _673.set, 'call', _674 => _674(event.offerId, {
21194
21049
  status: event.status,
21195
21050
  resolvedByName: event.resolvedByName
21196
21051
  })]);
@@ -21201,9 +21056,6 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21201
21056
  case "thinking-delta":
21202
21057
  accumulator.appendThinking(event.text);
21203
21058
  break;
21204
- case "guide-delta":
21205
- accumulator.appendGuide(event.text);
21206
- break;
21207
21059
  // Mirror of the live path: the intro sentence replays as answer text in
21208
21060
  // front of the card, so a reloaded thread reads exactly like the stream did.
21209
21061
  case "ask":
@@ -21217,20 +21069,11 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21217
21069
  const approvalType = event.approvalType || "CLIENT";
21218
21070
  const toolCalls = event.toolCalls;
21219
21071
  const isBatch = !!toolCalls && toolCalls.length > 0;
21220
- const guideOrigin = guideApprovalOrigin(event);
21221
- if (approvalDisplaysInline(event, approvalType, displayApprovalTypes)) {
21072
+ if (approvalDisplaysInline(approvalType, displayApprovalTypes)) {
21222
21073
  if (isBatch) {
21223
21074
  const status = approvalStatuses[event.requestId] || "pending";
21224
21075
  if (batchApprovalsEnabled) {
21225
- accumulator.addApprovalBatch(
21226
- event.requestId,
21227
- approvalType,
21228
- toolCalls,
21229
- status,
21230
- void 0,
21231
- void 0,
21232
- guideOrigin
21233
- );
21076
+ accumulator.addApprovalBatch(event.requestId, approvalType, toolCalls, status, void 0, void 0);
21234
21077
  } else {
21235
21078
  for (const call of toolCalls) {
21236
21079
  if (!call.requiresApproval) continue;
@@ -21240,23 +21083,21 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21240
21083
  call.toolExplanation,
21241
21084
  approvalType,
21242
21085
  status,
21243
- void 0,
21244
- guideOrigin
21086
+ void 0
21245
21087
  );
21246
21088
  }
21247
21089
  }
21248
21090
  } else {
21249
21091
  const resolvedStatus = approvalStatuses[event.requestId];
21250
21092
  const isResolved = resolvedStatus === "approved" || resolvedStatus === "rejected";
21251
- if (guideOrigin || isResolved) {
21093
+ if (isResolved) {
21252
21094
  accumulator.addApprovalRequest(
21253
21095
  event.requestId,
21254
21096
  event.command || "",
21255
21097
  event.explanation,
21256
21098
  approvalType,
21257
21099
  _nullishCoalesce(resolvedStatus, () => ( "pending")),
21258
- event.fields,
21259
- guideOrigin
21100
+ event.fields
21260
21101
  );
21261
21102
  } else {
21262
21103
  accumulator.trackApprovalRequest(event.requestId, {
@@ -21268,7 +21109,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21268
21109
  }
21269
21110
  }
21270
21111
  } else {
21271
- _optionalChain([escalatedApprovals, 'optionalAccess', _677 => _677.set, 'call', _678 => _678(event.requestId, {
21112
+ _optionalChain([escalatedApprovals, 'optionalAccess', _675 => _675.set, 'call', _676 => _676(event.requestId, {
21272
21113
  command: event.command || "",
21273
21114
  explanation: event.explanation,
21274
21115
  approvalType,
@@ -21283,8 +21124,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21283
21124
  const existingStatus = approvalStatuses[requestId];
21284
21125
  const status = existingStatus || event.status;
21285
21126
  const resolvedByName = event.resolvedByName;
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) {
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) {
21288
21129
  if (batchApprovalsEnabled) {
21289
21130
  accumulator.addApprovalBatch(
21290
21131
  requestId,
@@ -21306,7 +21147,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21306
21147
  );
21307
21148
  }
21308
21149
  }
21309
- _optionalChain([escalatedApprovals, 'optionalAccess', _682 => _682.delete, 'call', _683 => _683(requestId)]);
21150
+ _optionalChain([escalatedApprovals, 'optionalAccess', _680 => _680.delete, 'call', _681 => _681(requestId)]);
21310
21151
  break;
21311
21152
  }
21312
21153
  if (escalatedData) {
@@ -21315,7 +21156,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21315
21156
  explanation: escalatedData.explanation,
21316
21157
  approvalType: escalatedData.approvalType
21317
21158
  });
21318
- _optionalChain([escalatedApprovals, 'optionalAccess', _684 => _684.delete, 'call', _685 => _685(requestId)]);
21159
+ _optionalChain([escalatedApprovals, 'optionalAccess', _682 => _682.delete, 'call', _683 => _683(requestId)]);
21319
21160
  }
21320
21161
  const before = accumulator.getSegments();
21321
21162
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -21404,14 +21245,14 @@ function processHistoricalMessages(messages, options = {}) {
21404
21245
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
21405
21246
  return;
21406
21247
  }
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;
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;
21408
21249
  if (isUserMessage) {
21409
21250
  flushAssistantMessage();
21410
- const userAuthorType = _optionalChain([msg, 'access', _690 => _690.owner, 'optionalAccess', _691 => _691.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
21251
+ const userAuthorType = _optionalChain([msg, 'access', _688 => _688.owner, 'optionalAccess', _689 => _689.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
21411
21252
  messageDataArray.forEach((data) => {
21412
21253
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
21413
21254
  const rawContext = data.contextItems;
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;
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;
21415
21256
  processedMessages.push({
21416
21257
  id: msg.id,
21417
21258
  role: "user",
@@ -21449,7 +21290,7 @@ function processHistoricalMessages(messages, options = {}) {
21449
21290
  });
21450
21291
  const nextMsg = messages[index + 1];
21451
21292
  const isLastMessage = index === messages.length - 1;
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);
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);
21453
21294
  if (isLastMessage || nextIsFromUser) {
21454
21295
  flushAssistantMessage();
21455
21296
  }
@@ -21847,7 +21688,7 @@ function useNatsChatAdapter(config, options = {}) {
21847
21688
  }, [active, fetchDialogs, loadDialogsPage]);
21848
21689
  const sendMessage = _react.useCallback.call(void 0,
21849
21690
  async (text, sendOptions) => {
21850
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _698 => _698.hidden]), () => ( false));
21691
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _696 => _696.hidden]), () => ( false));
21851
21692
  mutate((r) => r.pushOptimisticSend(text, hidden));
21852
21693
  await publishUserMessage(text, { hidden, dialogId });
21853
21694
  },
@@ -21993,11 +21834,11 @@ function useNatsChatAdapter(config, options = {}) {
21993
21834
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
21994
21835
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
21995
21836
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → 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)),
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)),
22001
21842
  currentCacheHitRatePct: null,
22002
21843
  currentUsageBreakdown: null,
22003
21844
  // Dialog management
@@ -22098,7 +21939,7 @@ function useUnifiedChat(options) {
22098
21939
  []
22099
21940
  );
22100
21941
  const displayRefForward = _react.useCallback.call(void 0,
22101
- (ref) => _optionalChain([activeStateRef, 'access', _705 => _705.current, 'access', _706 => _706.displayRef, 'optionalCall', _707 => _707(ref)]),
21942
+ (ref) => _optionalChain([activeStateRef, 'access', _703 => _703.current, 'access', _704 => _704.displayRef, 'optionalCall', _705 => _705(ref)]),
22102
21943
  []
22103
21944
  );
22104
21945
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -22108,7 +21949,7 @@ function useUnifiedChat(options) {
22108
21949
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
22109
21950
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
22110
21951
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
22111
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _708 => _708.current, 'access', _709 => _709.setDialogScope, 'optionalCall', _710 => _710(scope)]), []);
21952
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _706 => _706.current, 'access', _707 => _707.setDialogScope, 'optionalCall', _708 => _708(scope)]), []);
22112
21953
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
22113
21954
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
22114
21955
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
@@ -22201,19 +22042,19 @@ function turnRequestKeys(content) {
22201
22042
  if (!Array.isArray(content)) return keys;
22202
22043
  for (const seg of content) {
22203
22044
  if (seg.type === "tool_execution") {
22204
- const id = _optionalChain([seg, 'access', _711 => _711.data, 'optionalAccess', _712 => _712.toolExecutionRequestId]);
22045
+ const id = _optionalChain([seg, 'access', _709 => _709.data, 'optionalAccess', _710 => _710.toolExecutionRequestId]);
22205
22046
  if (id) keys.add(id);
22206
22047
  } else if (seg.type === "approval_request") {
22207
- const id = _optionalChain([seg, 'access', _713 => _713.data, 'optionalAccess', _714 => _714.requestId]);
22048
+ const id = _optionalChain([seg, 'access', _711 => _711.data, 'optionalAccess', _712 => _712.requestId]);
22208
22049
  if (id) keys.add(id);
22209
22050
  } else if (seg.type === "escalation_offer") {
22210
- const id = _optionalChain([seg, 'access', _715 => _715.data, 'optionalAccess', _716 => _716.offerId]);
22051
+ const id = _optionalChain([seg, 'access', _713 => _713.data, 'optionalAccess', _714 => _714.offerId]);
22211
22052
  if (id) keys.add(id);
22212
22053
  } else if (seg.type === "approval_batch") {
22213
22054
  const data = seg.data;
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);
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);
22217
22058
  }
22218
22059
  }
22219
22060
  }
@@ -22265,18 +22106,18 @@ function mergeHistoryWithRealtime(input) {
22265
22106
  }
22266
22107
  }
22267
22108
  const trailing = processedHistory[processedHistory.length - 1];
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;
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;
22270
22111
  let processedToUse = processedHistory;
22271
22112
  const pinnedSyntheticIds = /* @__PURE__ */ new Set();
22272
22113
  const droppedSyntheticIds = /* @__PURE__ */ new Set();
22273
22114
  if (historyBatchId) {
22274
22115
  const batchTwins = existingMessages.filter(
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)
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)
22276
22117
  );
22277
22118
  const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
22278
22119
  if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
22279
- const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _728 => _728.content])) ? historyTrailingAssistant.content.length : 0;
22120
+ const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _726 => _726.content])) ? historyTrailingAssistant.content.length : 0;
22280
22121
  const realtimeSize = existingWithSameBatch.content.length;
22281
22122
  if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
22282
22123
  processedToUse = processedHistory.slice(0, -1);
@@ -22318,9 +22159,9 @@ function mergeHistoryWithRealtime(input) {
22318
22159
  if (pinnedSyntheticIds.has(m.id)) return true;
22319
22160
  if (droppedSyntheticIds.has(m.id)) return false;
22320
22161
  if (processedIds.has(m.id)) return false;
22321
- if (_optionalChain([rawHistoryIds, 'optionalAccess', _729 => _729.has, 'call', _730 => _730(m.id)])) return false;
22162
+ if (_optionalChain([rawHistoryIds, 'optionalAccess', _727 => _727.has, 'call', _728 => _728(m.id)])) return false;
22322
22163
  if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
22323
- const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _731 => _731.timestamp, 'optionalAccess', _732 => _732.getTime, 'call', _733 => _733()]), () => ( 0))) <= historyFetchedAt;
22164
+ const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _729 => _729.timestamp, 'optionalAccess', _730 => _730.getTime, 'call', _731 => _731()]), () => ( 0))) <= historyFetchedAt;
22324
22165
  return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
22325
22166
  }
22326
22167
  if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
@@ -22344,7 +22185,7 @@ function mergeHistoryWithRealtime(input) {
22344
22185
  } else if (typeof m.streamSeq === "number") {
22345
22186
  covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
22346
22187
  } else {
22347
- covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _734 => _734.timestamp, 'optionalAccess', _735 => _735.getTime, 'call', _736 => _736()]), () => ( 0))) <= historyFetchedAt;
22188
+ covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _732 => _732.timestamp, 'optionalAccess', _733 => _733.getTime, 'call', _734 => _734()]), () => ( 0))) <= historyFetchedAt;
22348
22189
  }
22349
22190
  if (covered) return false;
22350
22191
  }
@@ -22414,7 +22255,7 @@ function normalizeHistoricalMessageData(md) {
22414
22255
  function isHistoricalUserTurn(m) {
22415
22256
  return !!m.owner;
22416
22257
  }
22417
- var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _737 => _737.type]) === "TEXT" && typeof d.text === "string";
22258
+ var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _735 => _735.type]) === "TEXT" && typeof d.text === "string";
22418
22259
  var THINK_MS = 550;
22419
22260
  var TOKEN_MS = 55;
22420
22261
  var USER_MS = 480;
@@ -23038,7 +22879,7 @@ function useChatDialogManager({
23038
22879
  const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
23039
22880
  if (restoreTarget) {
23040
22881
  try {
23041
- await _optionalChain([unarchiveDialog, 'optionalCall', _738 => _738(restoreTarget.id)]);
22882
+ await _optionalChain([unarchiveDialog, 'optionalCall', _736 => _736(restoreTarget.id)]);
23042
22883
  } catch (err) {
23043
22884
  console.error("[useChatDialogManager] unarchive failed:", err);
23044
22885
  return;
@@ -23518,7 +23359,7 @@ function EmbeddableChatInner({
23518
23359
  }),
23519
23360
  [commandsUrl]
23520
23361
  );
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;
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;
23522
23363
  const effectiveModes = _react.useMemo.call(void 0, () => {
23523
23364
  if (modes) return modes;
23524
23365
  const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
@@ -23527,20 +23368,20 @@ function EmbeddableChatInner({
23527
23368
  const mingoCaps = _react.useMemo.call(void 0, () => {
23528
23369
  if (mingoState) {
23529
23370
  return {
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])
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])
23537
23378
  };
23538
23379
  }
23539
23380
  return {
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]),
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]),
23544
23385
  searchQuery: void 0,
23545
23386
  onSearchChange: void 0,
23546
23387
  onCopyLink: void 0
@@ -23555,7 +23396,7 @@ function EmbeddableChatInner({
23555
23396
  if (controlledActiveMode === void 0) {
23556
23397
  setUncontrolledActiveMode(next);
23557
23398
  }
23558
- _optionalChain([onActiveModeChange, 'optionalCall', _761 => _761(next)]);
23399
+ _optionalChain([onActiveModeChange, 'optionalCall', _759 => _759(next)]);
23559
23400
  },
23560
23401
  [controlledActiveMode, onActiveModeChange]
23561
23402
  );
@@ -23582,7 +23423,7 @@ function EmbeddableChatInner({
23582
23423
  );
23583
23424
  const effectiveAssistantName = emptyStateConfig.name;
23584
23425
  const effectiveAssistantIcon = emptyStateConfig.icon;
23585
- const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _762 => _762.title]) === "string" ? guideWelcome.title : null)));
23426
+ const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _760 => _760.title]) === "string" ? guideWelcome.title : null)));
23586
23427
  const {
23587
23428
  messages: rawMessages,
23588
23429
  isLoading: chatLoading,
@@ -23626,7 +23467,7 @@ function EmbeddableChatInner({
23626
23467
  void sendMessage(guidePendingPrompt).catch((err) => {
23627
23468
  console.error("[EmbeddableChat] guide launcher prompt failed:", err);
23628
23469
  });
23629
- _optionalChain([onGuidePromptConsumed, 'optionalCall', _763 => _763()]);
23470
+ _optionalChain([onGuidePromptConsumed, 'optionalCall', _761 => _761()]);
23630
23471
  }, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
23631
23472
  const {
23632
23473
  attachments: stagedAttachments,
@@ -23637,7 +23478,7 @@ function EmbeddableChatInner({
23637
23478
  clear: clearAttachments
23638
23479
  } = useChatAttachments();
23639
23480
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
23640
- const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _764 => _764.maxItems]), () => ( 10));
23481
+ const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _762 => _762.maxItems]), () => ( 10));
23641
23482
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
23642
23483
  const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
23643
23484
  const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
@@ -23658,10 +23499,10 @@ function EmbeddableChatInner({
23658
23499
  }, [activeDialogId, activeMode]);
23659
23500
  const mentionMarkerByType = _react.useMemo.call(void 0, () => {
23660
23501
  const m = /* @__PURE__ */ new Map();
23661
- for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _765 => _765.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
23502
+ for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _763 => _763.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
23662
23503
  return m;
23663
- }, [_optionalChain([contextPicker, 'optionalAccess', _766 => _766.entityTypes])]);
23664
- const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _767 => _767.entityTypes]);
23504
+ }, [_optionalChain([contextPicker, 'optionalAccess', _764 => _764.entityTypes])]);
23505
+ const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _765 => _765.entityTypes]);
23665
23506
  const resolveContextIcon = _react.useMemo.call(void 0, () => {
23666
23507
  const byType = /* @__PURE__ */ new Map();
23667
23508
  for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
@@ -23673,7 +23514,7 @@ function EmbeddableChatInner({
23673
23514
  if (mentionActiveRef.current) {
23674
23515
  if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
23675
23516
  if (contextItems.length >= contextMaxItems) return;
23676
- _optionalChain([chatInputRef, 'access', _768 => _768.current, 'optionalAccess', _769 => _769.commitMention, 'call', _770 => _770(mentionTokenOf(key, mentionMarkerByType), {
23517
+ _optionalChain([chatInputRef, 'access', _766 => _766.current, 'optionalAccess', _767 => _767.commitMention, 'call', _768 => _768(mentionTokenOf(key, mentionMarkerByType), {
23677
23518
  label: item.label,
23678
23519
  icon: resolveContextIcon(item)
23679
23520
  })]);
@@ -23696,9 +23537,9 @@ function EmbeddableChatInner({
23696
23537
  setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
23697
23538
  if (mentionKeysRef.current.has(key)) {
23698
23539
  mentionKeysRef.current.delete(key);
23699
- const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _771 => _771.current, 'optionalAccess', _772 => _772.getValue, 'call', _773 => _773()]), () => ( ""));
23540
+ const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _769 => _769.current, 'optionalAccess', _770 => _770.getValue, 'call', _771 => _771()]), () => ( ""));
23700
23541
  const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
23701
- _optionalChain([chatInputRef, 'access', _774 => _774.current, 'optionalAccess', _775 => _775.setValue, 'call', _776 => _776(next)]);
23542
+ _optionalChain([chatInputRef, 'access', _772 => _772.current, 'optionalAccess', _773 => _773.setValue, 'call', _774 => _774(next)]);
23702
23543
  }
23703
23544
  },
23704
23545
  [mentionMarkerByType]
@@ -23720,7 +23561,7 @@ function EmbeddableChatInner({
23720
23561
  }, []);
23721
23562
  const closeContextPicker = _react.useCallback.call(void 0, () => {
23722
23563
  if (mentionActiveRef.current) {
23723
- _optionalChain([chatInputRef, 'access', _777 => _777.current, 'optionalAccess', _778 => _778.removeMentionTrigger, 'call', _779 => _779()]);
23564
+ _optionalChain([chatInputRef, 'access', _775 => _775.current, 'optionalAccess', _776 => _776.removeMentionTrigger, 'call', _777 => _777()]);
23724
23565
  }
23725
23566
  setContextPickerOpen(false);
23726
23567
  setMentionQuery(null);
@@ -23754,8 +23595,8 @@ function EmbeddableChatInner({
23754
23595
  [effectiveAssistantIcon]
23755
23596
  );
23756
23597
  const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
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;
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;
23759
23600
  const messages = _react.useMemo.call(void 0, () => {
23760
23601
  const cache = timestampCache;
23761
23602
  const seenIds = /* @__PURE__ */ new Set();
@@ -23944,9 +23785,9 @@ function EmbeddableChatInner({
23944
23785
  const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
23945
23786
  const lastSources = _react.useMemo.call(void 0, () => {
23946
23787
  if (chatLoading) return void 0;
23947
- const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _788 => _788.sources]);
23788
+ const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _786 => _786.sources]);
23948
23789
  if (!sources || sources.length === 0) return void 0;
23949
- const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _789 => _789.content]) || "";
23790
+ const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _787 => _787.content]) || "";
23950
23791
  const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
23951
23792
  const seenOrder = /* @__PURE__ */ new Map();
23952
23793
  citationOrder.forEach((idx) => {
@@ -23964,7 +23805,7 @@ function EmbeddableChatInner({
23964
23805
  const el = panelMeasureRef.current;
23965
23806
  if (!el || typeof ResizeObserver === "undefined") return void 0;
23966
23807
  const ro = new ResizeObserver((entries) => {
23967
- const w = _optionalChain([entries, 'access', _790 => _790[0], 'optionalAccess', _791 => _791.contentRect, 'optionalAccess', _792 => _792.width]);
23808
+ const w = _optionalChain([entries, 'access', _788 => _788[0], 'optionalAccess', _789 => _789.contentRect, 'optionalAccess', _790 => _790.width]);
23968
23809
  if (typeof w === "number") setPanelWidth(w);
23969
23810
  });
23970
23811
  ro.observe(el);
@@ -24007,17 +23848,17 @@ function EmbeddableChatInner({
24007
23848
  const isMingoMode = activeMode === "mingo";
24008
23849
  const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen;
24009
23850
  const headerShowBack = hasConversation || guideCanReturnToMingo;
24010
- const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _793 => _793.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
23851
+ const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _791 => _791.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
24011
23852
  const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
24012
23853
  const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
24013
23854
  const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
24014
23855
  const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
24015
23856
  const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
24016
- const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _794 => _794.onCopyLink, 'optionalCall', _795 => _795(activeDialog)]) : void 0;
23857
+ const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _792 => _792.onCopyLink, 'optionalCall', _793 => _793(activeDialog)]) : void 0;
24017
23858
  const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : 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;
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;
24021
23862
  const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
24022
23863
  const handleNewChat = _react.useCallback.call(void 0, () => {
24023
23864
  resetToNewChat();
@@ -24347,9 +24188,9 @@ function EmbeddableChatInner({
24347
24188
  subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
24348
24189
  subtitleLoading: emptyStateLoading,
24349
24190
  ...guideWelcome,
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)),
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)),
24353
24194
  onQuickAction: (action) => {
24354
24195
  setQuickActionPreview(null);
24355
24196
  handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
@@ -24423,8 +24264,8 @@ function EmbeddableChatInner({
24423
24264
  selectedContextItems: contextItems,
24424
24265
  onToggleContextItem: toggleContextItem,
24425
24266
  onRemoveContextItem: removeContextItem,
24426
- contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _811 => _811.items]),
24427
- onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _812 => _812.onRemove]),
24267
+ contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _809 => _809.items]),
24268
+ onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _810 => _810.onRemove]),
24428
24269
  contextPickerOpen,
24429
24270
  onOpenContextPicker: openContextPicker,
24430
24271
  onCloseContextPicker: closeContextPicker,
@@ -24881,9 +24722,5 @@ function EmbeddableChatInner({
24881
24722
 
24882
24723
 
24883
24724
 
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-M7FNT5AC.cjs.map
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