@flamingo-stack/openframe-frontend-core 0.0.726 → 0.0.728

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 (101) hide show
  1. package/dist/{chunk-3UZET2G7.js → chunk-2F4DO7DS.js} +2 -2
  2. package/dist/{chunk-X2PG6XWF.cjs → chunk-32QAIKXR.cjs} +9 -9
  3. package/dist/{chunk-Q2G7NVFH.cjs → chunk-33QHEG7K.cjs} +289 -285
  4. package/dist/{chunk-VPABPC2M.cjs → chunk-4ICMFNCJ.cjs} +29 -56
  5. package/dist/{chunk-MZY6LBM5.cjs → chunk-5K3QUH7C.cjs} +3 -3
  6. package/dist/{chunk-AZKVHJA5.js → chunk-66XG5RFJ.js} +2 -2
  7. package/dist/{chunk-DXDLCYCM.cjs → chunk-7N6M77PI.cjs} +3 -3
  8. package/dist/{chunk-4ND65E2B.cjs → chunk-7VYBSCCL.cjs} +35 -35
  9. package/dist/{chunk-R3BOJNZI.cjs → chunk-APJCBQ7X.cjs} +16 -16
  10. package/dist/{chunk-RVSNXG6J.cjs → chunk-CELBOIKC.cjs} +488 -421
  11. package/dist/{chunk-MZ3TMXIX.cjs → chunk-CI7KWY6L.cjs} +3 -3
  12. package/dist/{chunk-COFT3YPA.js → chunk-EM3WCK2K.js} +5 -5
  13. package/dist/{chunk-YVWJ3TRY.js → chunk-GEUUDNCI.js} +5 -5
  14. package/dist/{chunk-SCTS3EMJ.js → chunk-GINCQZMM.js} +3 -3
  15. package/dist/{chunk-4VRHDFF2.js → chunk-HP4C2DFL.js} +1 -1
  16. package/dist/{chunk-NLWIBA55.js → chunk-HTQJSW3Y.js} +3 -3
  17. package/dist/{chunk-EHYAOIE4.cjs → chunk-OKEJY2GC.cjs} +8 -8
  18. package/dist/{chunk-RSE3MU4G.cjs → chunk-OYU7QNLQ.cjs} +11 -11
  19. package/dist/{chunk-NZYMMYWN.js → chunk-QL4RUHKU.js} +1 -1
  20. package/dist/{chunk-5SWQ2ZU5.cjs → chunk-RMXLHYEG.cjs} +26 -26
  21. package/dist/{chunk-MM66P4X4.js → chunk-SKEW5NMJ.js} +22 -49
  22. package/dist/{chunk-XEIDJ6SL.cjs → chunk-SSXQYS5K.cjs} +65 -65
  23. package/dist/{chunk-3XDVGHL4.js → chunk-TYMLEI2I.js} +2 -2
  24. package/dist/{chunk-SBPPM65Y.js → chunk-UF3NFAQK.js} +265 -198
  25. package/dist/{chunk-FMFCPX3R.cjs → chunk-UJZ5Y3RK.cjs} +33 -33
  26. package/dist/{chunk-C5KMQLJP.js → chunk-URYLQ4MC.js} +15 -11
  27. package/dist/{chunk-MQ3ZM7FJ.js → chunk-VGRQK7YS.js} +1 -1
  28. package/dist/{chunk-JYJBL7GD.js → chunk-XYSKJ7GA.js} +1 -1
  29. package/dist/{chunk-Z3VAFLYK.cjs → chunk-YREYU6DY.cjs} +9 -9
  30. package/dist/{chunk-VKR56R3U.js → chunk-ZDGK2TNJ.js} +3 -3
  31. package/dist/{cloud-tenants-5JTQ2ENQ.cjs → cloud-tenants-XP3L6PWO.cjs} +3 -3
  32. package/dist/{cloud-tenants-NH7VE7KE.js → cloud-tenants-XVVFCOK2.js} +2 -2
  33. package/dist/components/case-studies/index.cjs +14 -14
  34. package/dist/components/case-studies/index.js +3 -3
  35. package/dist/components/chat/assistant-ask-prompts.d.ts +34 -14
  36. package/dist/components/chat/assistant-ask-prompts.d.ts.map +1 -1
  37. package/dist/components/chat/hooks/index.d.ts +1 -1
  38. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  39. package/dist/components/chat/hooks/use-ask-prompts.d.ts +34 -7
  40. package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -1
  41. package/dist/components/chat/index.cjs +2 -4
  42. package/dist/components/chat/index.js +3 -5
  43. package/dist/components/contact/index.cjs +4 -4
  44. package/dist/components/contact/index.js +3 -3
  45. package/dist/components/docs/index.cjs +7 -7
  46. package/dist/components/docs/index.js +6 -6
  47. package/dist/components/embeds/index.cjs +4 -4
  48. package/dist/components/embeds/index.js +3 -3
  49. package/dist/components/faq/faq-ask-card.d.ts +8 -11
  50. package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
  51. package/dist/components/faq/index.cjs +4 -4
  52. package/dist/components/faq/index.js +3 -3
  53. package/dist/components/features/auth/auth-benefits-panel.d.ts +3 -1
  54. package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
  55. package/dist/components/features/auth/auth-shell.d.ts +3 -1
  56. package/dist/components/features/auth/auth-shell.d.ts.map +1 -1
  57. package/dist/components/features/index.cjs +3 -3
  58. package/dist/components/features/index.js +2 -2
  59. package/dist/components/help-center-pages/index.cjs +71 -71
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +35 -37
  62. package/dist/components/index.js +14 -16
  63. package/dist/components/meeting-scheduler/index.cjs +19 -19
  64. package/dist/components/meeting-scheduler/index.js +2 -2
  65. package/dist/components/navigation/index.cjs +6 -6
  66. package/dist/components/navigation/index.js +5 -5
  67. package/dist/components/onboarding-guides/index.cjs +5 -5
  68. package/dist/components/onboarding-guides/index.js +4 -4
  69. package/dist/components/product-demo/index.cjs +6 -6
  70. package/dist/components/product-demo/index.js +6 -6
  71. package/dist/components/tickets/index.cjs +7 -7
  72. package/dist/components/tickets/index.js +6 -6
  73. package/dist/components/ui/index.cjs +3 -5
  74. package/dist/components/ui/index.js +4 -6
  75. package/dist/{devices-PV76NGQO.cjs → devices-MMHLY67A.cjs} +4 -4
  76. package/dist/{devices-OC7JEI6U.js → devices-S7PJJI66.js} +2 -2
  77. package/dist/index.cjs +7 -7
  78. package/dist/index.js +14 -14
  79. package/dist/{knowledge-5AYFIVKD.cjs → knowledge-LJNFAJNE.cjs} +4 -4
  80. package/dist/{knowledge-L7WQ7IEP.js → knowledge-WW3LOQKN.js} +2 -2
  81. package/dist/{logs-4F77RJXJ.cjs → logs-F4ZVNUKQ.cjs} +11 -11
  82. package/dist/{logs-MGFHGVIE.js → logs-I4DMHQDA.js} +2 -2
  83. package/dist/{policies-VCGM3C5Z.cjs → policies-KZXFXGD7.cjs} +7 -7
  84. package/dist/{policies-WRDZFNIB.js → policies-RX55V46V.js} +2 -2
  85. package/dist/{software-update-YD2MNL3K.cjs → software-update-4A242VDB.cjs} +6 -6
  86. package/dist/{software-update-WVG2GDZO.js → software-update-VI7FQYR4.js} +2 -2
  87. package/dist/utils/index.cjs +8 -6
  88. package/dist/utils/index.d.ts +1 -1
  89. package/dist/utils/index.d.ts.map +1 -1
  90. package/dist/utils/index.js +6 -5
  91. package/dist/utils/trial.d.ts +17 -9
  92. package/dist/utils/trial.d.ts.map +1 -1
  93. package/package.json +1 -1
  94. package/src/components/chat/assistant-ask-prompts.tsx +84 -39
  95. package/src/components/chat/hooks/index.ts +3 -2
  96. package/src/components/chat/hooks/use-ask-prompts.ts +140 -56
  97. package/src/components/faq/faq-ask-card.tsx +22 -67
  98. package/src/components/features/auth/auth-benefits-panel.tsx +15 -8
  99. package/src/components/features/auth/auth-shell.tsx +4 -2
  100. package/src/utils/index.ts +1 -1
  101. package/src/utils/trial.ts +16 -10
@@ -5958,14 +5958,15 @@ function groupTokenRatesByProvider(rates) {
5958
5958
  }
5959
5959
 
5960
5960
  // src/utils/trial.ts
5961
- var TRIAL_DAYS = 14;
5962
- var TRIAL_LABELS = {
5963
- /** "14 day free trial" */
5964
- length: `${TRIAL_DAYS} day free trial`,
5961
+ var TRIAL_TERMS = {
5965
5962
  noCard: "No card required",
5966
5963
  cancel: "Cancel Anytime",
5967
5964
  noContract: "No Contract"
5968
5965
  };
5966
+ var trialLengthLabel = (days) => `${days} day free trial`;
5967
+ function trialLabels(days) {
5968
+ return { ...TRIAL_TERMS, length: days === null || days === void 0 || days === "" ? null : trialLengthLabel(days) };
5969
+ }
5969
5970
 
5970
5971
  // src/utils/seo-title.ts
5971
5972
  var SEO_TITLE_MAX_LENGTH = 60;
@@ -8892,11 +8893,8 @@ function AskCard({
8892
8893
  );
8893
8894
  }
8894
8895
 
8895
- // src/components/chat/assistant-ask-prompts.tsx
8896
- import { useMemo as useMemo9 } from "react";
8897
-
8898
8896
  // src/components/chat/hooks/use-ask-prompts.ts
8899
- import { useCallback as useCallback6, useId as useId2, useLayoutEffect as useLayoutEffect5, useSyncExternalStore as useSyncExternalStore2 } from "react";
8897
+ import { useCallback as useCallback6, useId as useId2, useLayoutEffect as useLayoutEffect5, useMemo as useMemo9, useState as useState13, useSyncExternalStore as useSyncExternalStore2 } from "react";
8900
8898
  var ASK_PROMPTS_DEFAULT_COUNT = 3;
8901
8899
  function buildAskPromptsUrl(base, { count, topic, exclude = [] }) {
8902
8900
  const params = new URLSearchParams({ count: String(count) });
@@ -8916,8 +8914,9 @@ function useAskPrompts({
8916
8914
  const assistant = useAssistantRuntime();
8917
8915
  const base = assistantAvailable(assistant) ? assistant.askPromptsUrl : void 0;
8918
8916
  const url = base && enabled ? buildAskPromptsUrl(base, { count, topic, exclude }) : null;
8919
- const { data, isLoading } = useSelfFetch(url);
8920
- return { prompts: data?.prompts ?? [], isLoading: !!base && (!enabled || isLoading), supported: !!base };
8917
+ const { data, dataUrl, error } = useSelfFetch(url);
8918
+ const landed = url !== null && (dataUrl === url || error);
8919
+ return { prompts: landed ? data?.prompts ?? [] : [], isLoading: !!base && !landed, supported: !!base };
8921
8920
  }
8922
8921
  function useAssistantOpen(topic, onOpen) {
8923
8922
  const assistant = useAssistantRuntime();
@@ -8933,90 +8932,158 @@ function useAssistantOpen(topic, onOpen) {
8933
8932
  [onOpen, runtimeOpen, source, topic]
8934
8933
  );
8935
8934
  }
8936
- var NO_IDS = [];
8937
- function createShownList() {
8938
- const bySurface = /* @__PURE__ */ new Map();
8935
+ function createAskQueue() {
8936
+ const entries = /* @__PURE__ */ new Map();
8939
8937
  const listeners = /* @__PURE__ */ new Set();
8940
- let snapshot = NO_IDS;
8938
+ let next = 0;
8941
8939
  const publish = () => {
8942
- const lists = [...bySurface.values()];
8943
- const next = lists.some((list) => list === null) ? null : lists.flatMap((list) => list ?? []);
8944
- const same = next === null ? snapshot === null : snapshot !== null && next.join(",") === snapshot.join(",");
8945
- if (same) return;
8946
- snapshot = next === null ? null : next.length > 0 ? next : NO_IDS;
8947
8940
  for (const listener of listeners) listener();
8948
8941
  };
8949
8942
  return {
8950
- set(surface, ids) {
8951
- bySurface.set(surface, ids);
8943
+ enter(surface) {
8944
+ if (entries.has(surface)) return;
8945
+ entries.set(surface, { turn: next++, ids: null });
8952
8946
  publish();
8953
8947
  },
8954
- remove(surface) {
8955
- bySurface.delete(surface);
8948
+ settle(surface, ids) {
8949
+ const entry = entries.get(surface);
8950
+ if (!entry || (entry.ids?.join(",") ?? null) === (ids?.join(",") ?? null)) return;
8951
+ entry.ids = ids;
8956
8952
  publish();
8957
8953
  },
8954
+ leave(surface) {
8955
+ if (entries.delete(surface)) publish();
8956
+ },
8958
8957
  subscribe(listener) {
8959
8958
  listeners.add(listener);
8960
8959
  return () => listeners.delete(listener);
8961
8960
  },
8962
- read: () => snapshot
8961
+ turnOf(surface) {
8962
+ const own = entries.get(surface);
8963
+ if (!own) return null;
8964
+ const shown = [];
8965
+ for (const [other, entry] of entries) {
8966
+ if (other === surface) continue;
8967
+ if (entry.ids === null) {
8968
+ if (entry.turn < own.turn) return null;
8969
+ continue;
8970
+ }
8971
+ shown.push(...entry.ids);
8972
+ }
8973
+ return shown.join(",");
8974
+ }
8963
8975
  };
8964
8976
  }
8965
- var shownLists = /* @__PURE__ */ new Map();
8966
- function useShownList() {
8977
+ var askQueues = /* @__PURE__ */ new Map();
8978
+ function useAskQueue() {
8967
8979
  const scope = useAssistantRuntime()?.askPromptsUrl ?? "";
8968
- let list = shownLists.get(scope);
8969
- if (!list) {
8970
- list = createShownList();
8971
- shownLists.set(scope, list);
8980
+ let queue = askQueues.get(scope);
8981
+ if (!queue) {
8982
+ queue = createAskQueue();
8983
+ askQueues.set(scope, queue);
8972
8984
  }
8973
- return list;
8985
+ return queue;
8974
8986
  }
8975
- function useShownAskPrompts(ids) {
8987
+ function useAskSurface({
8988
+ topic,
8989
+ count = ASK_PROMPTS_DEFAULT_COUNT,
8990
+ exclude,
8991
+ enabled = true,
8992
+ onOpen
8993
+ } = {}) {
8994
+ const assistant = useAssistantRuntime();
8976
8995
  const surface = useId2();
8977
- const list = useShownList();
8978
- const key = ids === void 0 ? void 0 : ids === null ? null : ids.join(",");
8996
+ const queue = useAskQueue();
8997
+ const picks = assistantAvailable(assistant) && !!assistant.askPromptsUrl && enabled && exclude !== null;
8979
8998
  useLayoutEffect5(() => {
8980
- if (key === void 0) return void 0;
8981
- list.set(surface, key === null ? null : key ? key.split(",") : NO_IDS);
8982
- return () => list.remove(surface);
8983
- }, [list, surface, key]);
8984
- }
8985
- function useShownAskPromptIds() {
8986
- const list = useShownList();
8987
- return useSyncExternalStore2(list.subscribe, list.read, () => NO_IDS);
8999
+ if (!picks) return void 0;
9000
+ queue.enter(surface);
9001
+ return () => queue.leave(surface);
9002
+ }, [queue, surface, picks]);
9003
+ const turn = useSyncExternalStore2(
9004
+ queue.subscribe,
9005
+ () => queue.turnOf(surface),
9006
+ () => null
9007
+ );
9008
+ const [shownAtTurn, setShownAtTurn] = useState13(null);
9009
+ if (picks && turn !== null && shownAtTurn === null) setShownAtTurn(turn);
9010
+ const leftOut = useMemo9(() => exclude ?? (shownAtTurn ? shownAtTurn.split(",") : void 0), [exclude, shownAtTurn]);
9011
+ const { prompts, isLoading, supported } = useAskPrompts({
9012
+ topic,
9013
+ count,
9014
+ exclude: leftOut,
9015
+ // Told exactly what to leave out, a surface needs nobody's pick: it never waits for a turn.
9016
+ enabled: picks && (exclude !== void 0 || shownAtTurn !== null)
9017
+ });
9018
+ const settled = picks && !isLoading ? prompts.map((prompt) => prompt.id).join(",") : null;
9019
+ useLayoutEffect5(() => {
9020
+ queue.settle(surface, settled === null ? null : settled ? settled.split(",") : []);
9021
+ }, [queue, surface, settled]);
9022
+ const open = useAssistantOpen(topic, onOpen);
9023
+ const scoped = useMemo9(() => assistant ? { ...assistant, open } : null, [assistant, open]);
9024
+ const onAsk = assistant?.onAsk;
9025
+ const reportAsk = useCallback6((prompt) => onAsk?.({ promptId: prompt.id, topic }), [onAsk, topic]);
9026
+ return { assistant, scoped, prompts, isLoading: supported && (!picks || isLoading), supported, open, reportAsk };
8988
9027
  }
8989
9028
 
8990
9029
  // src/components/chat/assistant-ask-prompts.tsx
8991
9030
  import { jsx as jsx30 } from "react/jsx-runtime";
9031
+ var DEFAULT_ASK_CARD = {
9032
+ title: "Still deciding?",
9033
+ description: "{assistant} answers from our docs and customer stories."
9034
+ };
9035
+ var fillAssistant = (text2, name) => text2.split("{assistant}").join(name);
8992
9036
  function AssistantAskPrompts({
9037
+ variant = "row",
8993
9038
  topic,
8994
- count = ASK_PROMPTS_DEFAULT_COUNT,
9039
+ count,
9040
+ exclude,
9041
+ enabled,
8995
9042
  label,
8996
9043
  loading = false,
9044
+ title,
9045
+ description,
8997
9046
  onOpen,
8998
9047
  align,
8999
9048
  fadeColor,
9000
9049
  className
9001
9050
  }) {
9051
+ const card = variant === "card";
9002
9052
  const assistant = useAssistantRuntime();
9003
- const { prompts, isLoading, supported } = useAskPrompts({ topic, count });
9004
- const open = useAssistantOpen(topic, onOpen);
9005
- const shown = assistantAvailable(assistant) && supported;
9006
- useShownAskPrompts(shown ? isLoading ? null : prompts.map((prompt) => prompt.id) : void 0);
9007
- const scoped = useMemo9(() => assistant ? { ...assistant, open } : null, [assistant, open]);
9008
- if (!assistantAvailable(assistant) || !supported) return null;
9009
- return /* @__PURE__ */ jsx30(AssistantRuntimeContext.Provider, { value: scoped, children: /* @__PURE__ */ jsx30(
9053
+ const slots = count ?? (card ? assistant?.askCard?.count : void 0) ?? ASK_PROMPTS_DEFAULT_COUNT;
9054
+ const ask = useAskSurface({ topic, count: slots, exclude, enabled, onOpen });
9055
+ if (!assistantAvailable(assistant)) return null;
9056
+ const shared = {
9057
+ prompts: ask.prompts,
9058
+ loading: ask.isLoading || loading,
9059
+ source: assistant.source,
9060
+ icon: assistant.icon,
9061
+ onOpen: ask.open,
9062
+ onAsk: ask.reportAsk
9063
+ };
9064
+ if (card) {
9065
+ const name = label ?? assistant.name;
9066
+ if (!name) return null;
9067
+ const words2 = description ?? assistant.askCard?.description ?? DEFAULT_ASK_CARD.description;
9068
+ return /* @__PURE__ */ jsx30(AssistantRuntimeContext.Provider, { value: ask.scoped, children: /* @__PURE__ */ jsx30(
9069
+ AskCard,
9070
+ {
9071
+ ...shared,
9072
+ title: fillAssistant(title ?? assistant.askCard?.title ?? DEFAULT_ASK_CARD.title, name),
9073
+ description: words2 ? fillAssistant(words2, name) : void 0,
9074
+ count: ask.supported ? slots : 0,
9075
+ label: name,
9076
+ className
9077
+ }
9078
+ ) });
9079
+ }
9080
+ if (!ask.supported) return null;
9081
+ return /* @__PURE__ */ jsx30(AssistantRuntimeContext.Provider, { value: ask.scoped, children: /* @__PURE__ */ jsx30(
9010
9082
  AskPrompts,
9011
9083
  {
9012
- prompts,
9013
- loading: isLoading || loading,
9014
- count,
9015
- source: assistant.source,
9084
+ ...shared,
9085
+ count: slots,
9016
9086
  label: label ?? assistant.name ?? void 0,
9017
- icon: assistant.icon,
9018
- onOpen: open,
9019
- onAsk: (prompt) => assistant.onAsk?.({ promptId: prompt.id, topic }),
9020
9087
  align,
9021
9088
  fadeColor,
9022
9089
  className
@@ -9028,7 +9095,7 @@ function AssistantAskPrompts({
9028
9095
  import { useMemo as useMemo12 } from "react";
9029
9096
 
9030
9097
  // src/components/chat/quick-action-wall.tsx
9031
- import { useRef as useRef8, useState as useState14, useEffect as useEffect9, useMemo as useMemo11 } from "react";
9098
+ import { useRef as useRef8, useState as useState15, useEffect as useEffect9, useMemo as useMemo11 } from "react";
9032
9099
 
9033
9100
  // src/components/ui/marquee-wall.tsx
9034
9101
  import {
@@ -9037,7 +9104,7 @@ import {
9037
9104
  useLayoutEffect as useLayoutEffect6,
9038
9105
  useMemo as useMemo10,
9039
9106
  useRef as useRef7,
9040
- useState as useState13,
9107
+ useState as useState14,
9041
9108
  useSyncExternalStore as useSyncExternalStore3
9042
9109
  } from "react";
9043
9110
  import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
@@ -9088,7 +9155,7 @@ var subscribeNever = () => () => {
9088
9155
  };
9089
9156
  var alwaysDriver = () => true;
9090
9157
  function useMarqueeSync() {
9091
- const [controller] = useState13(createMarqueeSyncController);
9158
+ const [controller] = useState14(createMarqueeSyncController);
9092
9159
  return controller;
9093
9160
  }
9094
9161
  var MARQUEE_TRACK_OFFSETS = /* @__PURE__ */ new Map();
@@ -9176,7 +9243,7 @@ function MarqueeWall({
9176
9243
  const trackRef = useRef7(null);
9177
9244
  const copyRef = useRef7(null);
9178
9245
  const reducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)") ?? false;
9179
- const [overflows, setOverflows] = useState13(false);
9246
+ const [overflows, setOverflows] = useState14(false);
9180
9247
  const copySizeRef = useRef7(0);
9181
9248
  const wrapSizeRef = useRef7(0);
9182
9249
  const measure = useCallback7(() => {
@@ -9262,7 +9329,7 @@ function MarqueeWall({
9262
9329
  useEffect8(() => {
9263
9330
  applyTransformRef.current = applyTransform;
9264
9331
  });
9265
- const [member] = useState13(() => ({
9332
+ const [member] = useState14(() => ({
9266
9333
  apply: (pos) => {
9267
9334
  applyTransformRef.current(pos);
9268
9335
  }
@@ -9464,8 +9531,8 @@ function QuickActionWall({
9464
9531
  sync
9465
9532
  }) {
9466
9533
  const brickRef = useRef8(null);
9467
- const [brickWidth, setBrickWidth] = useState14(0);
9468
- const [chipWidth, setChipWidth] = useState14(0);
9534
+ const [brickWidth, setBrickWidth] = useState15(0);
9535
+ const [chipWidth, setChipWidth] = useState15(0);
9469
9536
  useEffect9(() => {
9470
9537
  const el = brickRef.current;
9471
9538
  if (!el) return void 0;
@@ -9832,10 +9899,10 @@ function MingoOnboardingListSkeleton({ rows = 6, className }) {
9832
9899
  }
9833
9900
 
9834
9901
  // src/components/chat/mingo-welcome.tsx
9835
- import { useCallback as useCallback8, useMemo as useMemo14, useState as useState16 } from "react";
9902
+ import { useCallback as useCallback8, useMemo as useMemo14, useState as useState17 } from "react";
9836
9903
 
9837
9904
  // src/components/chat/mingo-chat-history.tsx
9838
- import { useState as useState15, useMemo as useMemo13, useRef as useRef9, useEffect as useEffect10 } from "react";
9905
+ import { useState as useState16, useMemo as useMemo13, useRef as useRef9, useEffect as useEffect10 } from "react";
9839
9906
 
9840
9907
  // src/components/chat/chat-dialog-menu-items.tsx
9841
9908
  import { jsx as jsx37 } from "react/jsx-runtime";
@@ -9936,7 +10003,7 @@ function MingoChatHistoryRow({
9936
10003
  const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink || !!onRequestCompact;
9937
10004
  const owner = dialog.owner;
9938
10005
  const hasAvatar = !!(owner?.name || owner?.avatarUrl);
9939
- const [menuOpen, setMenuOpen] = useState15(false);
10006
+ const [menuOpen, setMenuOpen] = useState16(false);
9940
10007
  const menuItems = chatDialogMenuItems({
9941
10008
  onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
9942
10009
  onRename: onRequestRename && (() => onRequestRename(dialog)),
@@ -10194,7 +10261,7 @@ function MingoWelcome({
10194
10261
  const heading = title ?? "Hey, I'm Mingo";
10195
10262
  const resolvedPromo = hasExistingChats ? null : promo === void 0 ? onStartGuideChat ? DEFAULT_PROMO : null : promo;
10196
10263
  const hydrated = useIsHydrated();
10197
- const [dismissedThisSession, setPromoDismissed] = useState16(false);
10264
+ const [dismissedThisSession, setPromoDismissed] = useState17(false);
10198
10265
  const storedDismissed = useMemo14(() => {
10199
10266
  if (!hydrated || !resolvedPromo) return false;
10200
10267
  try {
@@ -10695,10 +10762,10 @@ function MingoChatHeader({
10695
10762
  }
10696
10763
 
10697
10764
  // src/components/chat/mingo-chat-rail.tsx
10698
- import { useEffect as useEffect13, useRef as useRef12, useState as useState18 } from "react";
10765
+ import { useEffect as useEffect13, useRef as useRef12, useState as useState19 } from "react";
10699
10766
 
10700
10767
  // src/components/chat/chat-header-search-field.tsx
10701
- import { useState as useState17, useRef as useRef11, useEffect as useEffect12, useCallback as useCallback9 } from "react";
10768
+ import { useState as useState18, useRef as useRef11, useEffect as useEffect12, useCallback as useCallback9 } from "react";
10702
10769
  import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
10703
10770
  function ChatHeaderSearchField({
10704
10771
  initialValue,
@@ -10707,10 +10774,10 @@ function ChatHeaderSearchField({
10707
10774
  autoFocus = true,
10708
10775
  className
10709
10776
  }) {
10710
- const [value, setValue] = useState17(initialValue ?? "");
10777
+ const [value, setValue] = useState18(initialValue ?? "");
10711
10778
  const debounced = useDebounce(value, 300);
10712
10779
  const lastEmitted = useRef11(initialValue ?? "");
10713
- const [exiting, setExiting] = useState17(false);
10780
+ const [exiting, setExiting] = useState18(false);
10714
10781
  const collapsedRef = useRef11(false);
10715
10782
  useEffect12(() => {
10716
10783
  if (exiting) return;
@@ -10831,7 +10898,7 @@ function MingoChatRail({
10831
10898
  onExpand,
10832
10899
  className
10833
10900
  }) {
10834
- const [searchOpen, setSearchOpen] = useState18(!!searchQuery?.trim());
10901
+ const [searchOpen, setSearchOpen] = useState19(!!searchQuery?.trim());
10835
10902
  const hasSearch = !!searchQuery?.trim();
10836
10903
  const items = [];
10837
10904
  if (onNewChat) items.push({ id: "new", label: "Start New Chat", icon: /* @__PURE__ */ jsx48(ChatPlusIcon, {}), onClick: onNewChat });
@@ -11002,7 +11069,7 @@ function MingoChatRail({
11002
11069
  );
11003
11070
  }
11004
11071
  function MingoChatRailRow({ dialog, active, status, onSelect, menuItems }) {
11005
- const [menuOpen, setMenuOpen] = useState18(false);
11072
+ const [menuOpen, setMenuOpen] = useState19(false);
11006
11073
  const hasMenu = menuItems.length > 0;
11007
11074
  const glyph = status ? STATUS_GLYPHS[status] : void 0;
11008
11075
  const title = dialog.title || "Untitled Chat";
@@ -11218,15 +11285,15 @@ function MingoHistoryRail({
11218
11285
  }
11219
11286
 
11220
11287
  // src/components/chat/mingo-chat-modals.tsx
11221
- import { useState as useState19 } from "react";
11288
+ import { useState as useState20 } from "react";
11222
11289
  import { Fragment as Fragment15, jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
11223
11290
  var footerBtn = "flex-1 min-w-0 rounded-md px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent disabled:opacity-50 disabled:cursor-not-allowed";
11224
11291
  var cancelBtn = cn(footerBtn, "border border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-bg-hover");
11225
11292
  var saveBtn = cn(footerBtn, "bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover");
11226
11293
  var dangerBtn = cn(footerBtn, "bg-ods-error text-ods-text-on-accent hover:opacity-90");
11227
11294
  function RenameChatModal({ isOpen, initialName = "", onClose, onSave }) {
11228
- const [name, setName] = useState19(initialName);
11229
- const [seededWith, setSeededWith] = useState19({ isOpen, initialName });
11295
+ const [name, setName] = useState20(initialName);
11296
+ const [seededWith, setSeededWith] = useState20({ isOpen, initialName });
11230
11297
  if (seededWith.isOpen !== isOpen || seededWith.initialName !== initialName) {
11231
11298
  setSeededWith({ isOpen, initialName });
11232
11299
  if (isOpen) setName(initialName);
@@ -11659,7 +11726,7 @@ function useObjectUrl(file) {
11659
11726
  }
11660
11727
 
11661
11728
  // src/components/chat/chat-context-memory-bar.tsx
11662
- import { useEffect as useEffect15, useRef as useRef14, useState as useState20 } from "react";
11729
+ import { useEffect as useEffect15, useRef as useRef14, useState as useState21 } from "react";
11663
11730
  import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
11664
11731
  var itemKey3 = (item) => `${item.type}:${item.id}`;
11665
11732
  function ChatContextMemoryBar({
@@ -11669,7 +11736,7 @@ function ChatContextMemoryBar({
11669
11736
  disabled = false,
11670
11737
  className
11671
11738
  }) {
11672
- const [open, setOpen] = useState20(false);
11739
+ const [open, setOpen] = useState21(false);
11673
11740
  const rootRef = useRef14(null);
11674
11741
  if (items.length === 0 && open) setOpen(false);
11675
11742
  useEffect15(() => {
@@ -12416,7 +12483,7 @@ var ChatTopNavigation = forwardRef22(
12416
12483
  ChatTopNavigation.displayName = "ChatTopNavigation";
12417
12484
 
12418
12485
  // src/components/chat/onboarding-carousel.tsx
12419
- import { useState as useState21 } from "react";
12486
+ import { useState as useState22 } from "react";
12420
12487
  import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
12421
12488
  function OnboardingCarousel({
12422
12489
  steps,
@@ -12427,7 +12494,7 @@ function OnboardingCarousel({
12427
12494
  label = "Introduction",
12428
12495
  className
12429
12496
  }) {
12430
- const [index, setIndex] = useState21(0);
12497
+ const [index, setIndex] = useState22(0);
12431
12498
  const lastIndex = steps.length - 1;
12432
12499
  const isFirst = index === 0;
12433
12500
  const isLast = index === lastIndex;
@@ -12859,7 +12926,7 @@ function useCaptions() {
12859
12926
  }
12860
12927
 
12861
12928
  // src/components/features/video-bites-strip.tsx
12862
- import { useMemo as useMemo20, useRef as useRef17, useState as useState23 } from "react";
12929
+ import { useMemo as useMemo20, useRef as useRef17, useState as useState24 } from "react";
12863
12930
 
12864
12931
  // src/components/user-display.tsx
12865
12932
  import { jsx as jsx67, jsxs as jsxs54 } from "react/jsx-runtime";
@@ -12927,7 +12994,7 @@ function CardHitLayer({
12927
12994
  }
12928
12995
 
12929
12996
  // src/components/features/cards-strip.tsx
12930
- import React3, { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef16, useState as useState22 } from "react";
12997
+ import React3, { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef16, useState as useState23 } from "react";
12931
12998
  import { Fragment as Fragment21, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
12932
12999
  var TRACK_GAP_PX = 16;
12933
13000
  var CHEVRON_SUPPRESS_MS = 4e3;
@@ -13044,9 +13111,9 @@ function CardsStrip(props) {
13044
13111
  const wrapperRef = useRef16(null);
13045
13112
  const scrollerRef = useRef16(null);
13046
13113
  const trackRef = useRef16(null);
13047
- const [reducedMotion, setReducedMotion] = useState22(false);
13048
- const [isTouch, setIsTouch] = useState22(false);
13049
- const [isMobile, setIsMobile] = useState22(false);
13114
+ const [reducedMotion, setReducedMotion] = useState23(false);
13115
+ const [isTouch, setIsTouch] = useState23(false);
13116
+ const [isMobile, setIsMobile] = useState23(false);
13050
13117
  useEffect17(() => {
13051
13118
  const subs = [];
13052
13119
  const watch = (query, set) => {
@@ -13065,11 +13132,11 @@ function CardsStrip(props) {
13065
13132
  });
13066
13133
  };
13067
13134
  }, []);
13068
- const [overflows, setOverflows] = useState22(false);
13069
- const [marqueeEligible, setMarqueeEligible] = useState22(false);
13135
+ const [overflows, setOverflows] = useState23(false);
13136
+ const [marqueeEligible, setMarqueeEligible] = useState23(false);
13070
13137
  const singleCopyWidthRef = useRef16(0);
13071
13138
  const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
13072
- const [insets, setInsets] = useState22(NO_BLEED);
13139
+ const [insets, setInsets] = useState23(NO_BLEED);
13073
13140
  const measure = useCallback11(() => {
13074
13141
  const wrapper = wrapperRef.current;
13075
13142
  const track = trackRef.current;
@@ -13106,7 +13173,7 @@ function CardsStrip(props) {
13106
13173
  return () => observe(null);
13107
13174
  }, [observe]);
13108
13175
  const autoplay = useAutoplay(nearViewport);
13109
- const [activeKey, setActiveKey] = useState22(null);
13176
+ const [activeKey, setActiveKey] = useState23(null);
13110
13177
  const activeKeyRef = useRef16(null);
13111
13178
  const activate = useCallback11((key) => {
13112
13179
  activeKeyRef.current = key;
@@ -13189,7 +13256,7 @@ function CardsStrip(props) {
13189
13256
  readBack: () => mirror(scrollerRef.current?.scrollLeft ?? 0),
13190
13257
  onAfterFrame: syncHoverIfScrolled
13191
13258
  });
13192
- const [mountedIdx, setMountedIdx] = useState22(() => /* @__PURE__ */ new Set());
13259
+ const [mountedIdx, setMountedIdx] = useState23(() => /* @__PURE__ */ new Set());
13193
13260
  const cardObserverRef = useRef16(null);
13194
13261
  const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
13195
13262
  const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
@@ -13226,7 +13293,7 @@ function CardsStrip(props) {
13226
13293
  cardObserverRef.current = null;
13227
13294
  };
13228
13295
  }, []);
13229
- const [cardRefFns] = useState22(() => /* @__PURE__ */ new Map());
13296
+ const [cardRefFns] = useState23(() => /* @__PURE__ */ new Map());
13230
13297
  const getCardRef = useCallback11(
13231
13298
  (idx) => {
13232
13299
  let fn = cardRefFns.get(idx);
@@ -13558,7 +13625,7 @@ function VideoBiteCard({
13558
13625
  const hasTarget = !!(targetHref || bite.onNavigate || onBiteNavigate);
13559
13626
  const key = cardKey ?? `${bite.url}__${index}`;
13560
13627
  const controlled = active !== void 0;
13561
- const [selfActive, setSelfActive] = useState23(false);
13628
+ const [selfActive, setSelfActive] = useState24(false);
13562
13629
  const isActive = controlled ? !!active : selfActive;
13563
13630
  const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
13564
13631
  const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
@@ -16695,15 +16762,15 @@ function useChunkCatchup({
16695
16762
  }
16696
16763
 
16697
16764
  // src/components/chat/hooks/use-scripted-stream.ts
16698
- import { useEffect as useEffect19, useState as useState24 } from "react";
16765
+ import { useEffect as useEffect19, useState as useState25 } from "react";
16699
16766
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
16700
16767
  function prefersReducedMotion() {
16701
16768
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
16702
16769
  }
16703
16770
  function useScriptedStream(frames, resetKey, enabled = true) {
16704
- const [index, setIndex] = useState24(0);
16705
- const [reducedMotion, setReducedMotion] = useState24(false);
16706
- const [prevKey, setPrevKey] = useState24(resetKey);
16771
+ const [index, setIndex] = useState25(0);
16772
+ const [reducedMotion, setReducedMotion] = useState25(false);
16773
+ const [prevKey, setPrevKey] = useState25(resetKey);
16707
16774
  if (resetKey !== prevKey) {
16708
16775
  setPrevKey(resetKey);
16709
16776
  setIndex(0);
@@ -16730,7 +16797,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
16730
16797
  }
16731
16798
 
16732
16799
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
16733
- import { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef19, useState as useState25 } from "react";
16800
+ import { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef19, useState as useState26 } from "react";
16734
16801
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
16735
16802
  var RESYNC_AFTER_HIDDEN_MS = 1e4;
16736
16803
  var RESYNC_COALESCE_MS = 1e3;
@@ -16752,11 +16819,11 @@ function useJetStreamDialogSubscription({
16752
16819
  inactiveThresholdMs,
16753
16820
  resyncSignal = 0
16754
16821
  }) {
16755
- const [isConnected, setIsConnected] = useState25(false);
16756
- const [subscriptionLive, setIsSubscribed] = useState25(false);
16757
- const [reconnectionCount, setReconnectionCount] = useState25(0);
16758
- const [recoveryCount, setRecoveryCount] = useState25(0);
16759
- const [seqEntry, setSeqEntry] = useState25(null);
16822
+ const [isConnected, setIsConnected] = useState26(false);
16823
+ const [subscriptionLive, setIsSubscribed] = useState26(false);
16824
+ const [reconnectionCount, setReconnectionCount] = useState26(0);
16825
+ const [recoveryCount, setRecoveryCount] = useState26(0);
16826
+ const [seqEntry, setSeqEntry] = useState26(null);
16760
16827
  const currentStreamSeq = seqEntry && seqEntry.dialogId === dialogId ? seqEntry.seq : null;
16761
16828
  const isSubscribed = subscriptionLive && enabled && Boolean(dialogId) && isConnected;
16762
16829
  const lastRecoveryReportRef = useRef19(0);
@@ -17032,7 +17099,7 @@ function useJetStreamDialogSubscription({
17032
17099
  }
17033
17100
 
17034
17101
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
17035
- import { useEffect as useEffect21, useRef as useRef20, useState as useState26 } from "react";
17102
+ import { useEffect as useEffect21, useRef as useRef20, useState as useState27 } from "react";
17036
17103
  function useNatsDialogSubscription({
17037
17104
  enabled,
17038
17105
  dialogId,
@@ -17046,9 +17113,9 @@ function useNatsDialogSubscription({
17046
17113
  clientConfig = {},
17047
17114
  reconnectionBackoff
17048
17115
  }) {
17049
- const [isConnected, setIsConnected] = useState26(false);
17050
- const [isSubscribed, setIsSubscribed] = useState26(false);
17051
- const [reconnectionCount, setReconnectionCount] = useState26(0);
17116
+ const [isConnected, setIsConnected] = useState27(false);
17117
+ const [isSubscribed, setIsSubscribed] = useState27(false);
17118
+ const [reconnectionCount, setReconnectionCount] = useState27(0);
17052
17119
  const clientRef = useRef20(null);
17053
17120
  const subscriptionRefs = useRef20(/* @__PURE__ */ new Map());
17054
17121
  const onEventRef = useRef20(onEvent);
@@ -17306,7 +17373,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
17306
17373
 
17307
17374
  // src/components/chat/hooks/use-slash-commands.ts
17308
17375
  import { useQuery as useQuery2 } from "@tanstack/react-query";
17309
- import { useEffect as useEffect22, useState as useState27 } from "react";
17376
+ import { useEffect as useEffect22, useState as useState28 } from "react";
17310
17377
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
17311
17378
  try {
17312
17379
  const url = new URL(commandsUrl, window.location.origin);
@@ -17323,7 +17390,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17323
17390
  }
17324
17391
  var NO_COMMANDS = [];
17325
17392
  function useSlashCommands(prefix, commandsUrl) {
17326
- const [answered, setAnswered] = useState27(null);
17393
+ const [answered, setAnswered] = useState28(null);
17327
17394
  const commands = prefix != null && answered?.prefix === prefix ? answered.commands : NO_COMMANDS;
17328
17395
  const loading = prefix != null && answered?.prefix !== prefix;
17329
17396
  useEffect22(() => {
@@ -17433,7 +17500,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
17433
17500
 
17434
17501
  // src/components/chat/hooks/use-chat-attachments.ts
17435
17502
  import { fileTypeFromBlob } from "file-type";
17436
- import { useCallback as useCallback14, useEffect as useEffect23, useMemo as useMemo21, useRef as useRef21, useState as useState28 } from "react";
17503
+ import { useCallback as useCallback14, useEffect as useEffect23, useMemo as useMemo21, useRef as useRef21, useState as useState29 } from "react";
17437
17504
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
17438
17505
  var CHAT_ATTACHMENTS_FOLDER = "chat";
17439
17506
  var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
@@ -17500,7 +17567,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
17500
17567
  function useChatAttachments() {
17501
17568
  const runtime = useRequiredChatRuntime();
17502
17569
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
17503
- const [attachments, setAttachments] = useState28([]);
17570
+ const [attachments, setAttachments] = useState29([]);
17504
17571
  const controllersRef = useRef21(/* @__PURE__ */ new Map());
17505
17572
  const updateOne = useCallback14((id, patch) => {
17506
17573
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
@@ -17666,14 +17733,14 @@ function useChatAttachments() {
17666
17733
  }
17667
17734
 
17668
17735
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
17669
- import { useCallback as useCallback15, useEffect as useEffect24, useRef as useRef22, useState as useState29 } from "react";
17736
+ import { useCallback as useCallback15, useEffect as useEffect24, useRef as useRef22, useState as useState30 } from "react";
17670
17737
  import { jsx as jsx86 } from "react/jsx-runtime";
17671
17738
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
17672
17739
  function useChatAttachmentImageGallery() {
17673
17740
  const runtime = useRequiredChatRuntime();
17674
17741
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
17675
17742
  const panelRef = useRef22(null);
17676
- const [state, setState] = useState29(CLOSED);
17743
+ const [state, setState] = useState30(CLOSED);
17677
17744
  const handleClose = useCallback15(() => setState(CLOSED), []);
17678
17745
  useEffect24(() => {
17679
17746
  const root = panelRef.current;
@@ -17721,7 +17788,7 @@ function absolutize(prefix) {
17721
17788
  }
17722
17789
 
17723
17790
  // src/components/chat/hooks/use-chat-identity.ts
17724
- import { createContext as createContext4, createElement, useContext as useContext4, useEffect as useEffect25, useState as useState30 } from "react";
17791
+ import { createContext as createContext4, createElement, useContext as useContext4, useEffect as useEffect25, useState as useState31 } from "react";
17725
17792
  var ANON_DEFAULTS = {
17726
17793
  authTier: "anon",
17727
17794
  source: null,
@@ -17733,7 +17800,7 @@ function useResolveChatIdentity(enabled) {
17733
17800
  const url = runtime.endpoints.identityUrl;
17734
17801
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
17735
17802
  const requestKey = enabled ? `${url}\0${proxyEmail ?? ""}` : null;
17736
- const [resolved, setResolved] = useState30(null);
17803
+ const [resolved, setResolved] = useState31(null);
17737
17804
  const data = resolved?.key === requestKey ? resolved.data : ANON_DEFAULTS;
17738
17805
  const isLoading = requestKey !== null && resolved?.key !== requestKey;
17739
17806
  useEffect25(() => {
@@ -17798,13 +17865,13 @@ function useCloseOnNavigation(close, pathname) {
17798
17865
  }
17799
17866
 
17800
17867
  // src/components/chat/hooks/use-chat.ts
17801
- import { useState as useState32, useCallback as useCallback17, useEffect as useEffect27, useRef as useRef25 } from "react";
17868
+ import { useState as useState33, useCallback as useCallback17, useEffect as useEffect27, useRef as useRef25 } from "react";
17802
17869
 
17803
17870
  // src/components/chat/hooks/use-sse.ts
17804
- import { useState as useState31, useCallback as useCallback16, useRef as useRef24 } from "react";
17871
+ import { useState as useState32, useCallback as useCallback16, useRef as useRef24 } from "react";
17805
17872
  function useSSE({ streamFn } = {}) {
17806
- const [isStreaming, setIsStreaming] = useState31(false);
17807
- const [error, setError] = useState31(null);
17873
+ const [isStreaming, setIsStreaming] = useState32(false);
17874
+ const [error, setError] = useState32(null);
17808
17875
  const abortControllerRef = useRef24(null);
17809
17876
  const streamMessage = useCallback16(
17810
17877
  async function* (message, extra) {
@@ -17874,8 +17941,8 @@ function useChat({
17874
17941
  initialMessages,
17875
17942
  onMessagesChange
17876
17943
  } = {}) {
17877
- const [messages, setMessages] = useState32(() => initialMessages ?? []);
17878
- const [isTyping, setIsTyping] = useState32(false);
17944
+ const [messages, setMessages] = useState33(() => initialMessages ?? []);
17945
+ const [isTyping, setIsTyping] = useState33(false);
17879
17946
  const currentAssistantSegmentsRef = useRef25([]);
17880
17947
  const onMessagesChangeRef = useRef25(onMessagesChange);
17881
17948
  useEffect27(() => {
@@ -18120,7 +18187,7 @@ function useChat({
18120
18187
  }
18121
18188
 
18122
18189
  // src/components/chat/hooks/use-sse-chat-adapter.ts
18123
- import { useCallback as useCallback20, useMemo as useMemo24, useRef as useRef28, useState as useState36 } from "react";
18190
+ import { useCallback as useCallback20, useMemo as useMemo24, useRef as useRef28, useState as useState37 } from "react";
18124
18191
 
18125
18192
  // src/chat-protocol/confirm-tool.ts
18126
18193
  function buildConfirmToolBody(request) {
@@ -20704,7 +20771,7 @@ function createChatDialogStore(options = {}) {
20704
20771
  }
20705
20772
 
20706
20773
  // src/components/chat/stream/use-chat-stream-reducer.ts
20707
- import { useCallback as useCallback18, useEffect as useEffect28, useMemo as useMemo22, useState as useState33, useSyncExternalStore as useSyncExternalStore4 } from "react";
20774
+ import { useCallback as useCallback18, useEffect as useEffect28, useMemo as useMemo22, useState as useState34, useSyncExternalStore as useSyncExternalStore4 } from "react";
20708
20775
 
20709
20776
  // src/components/chat/stream/delta-batcher.ts
20710
20777
  var DELTA_FLUSH_FALLBACK_MS = 50;
@@ -20800,7 +20867,7 @@ function useChatStreamReducer({
20800
20867
  const state = useSyncExternalStore4(subscribe2, getSnapshot2, getServerSnapshot2);
20801
20868
  useEffect28(() => store.retain(dialogId, side), [store, dialogId, side]);
20802
20869
  const key = useMemo22(() => ({ store, dialogId, side }), [store, dialogId, side]);
20803
- const [batcher] = useState33(
20870
+ const [batcher] = useState34(
20804
20871
  () => createDeltaBatcher({
20805
20872
  applyOne: (event, k) => {
20806
20873
  if (k) k.store.apply(k.dialogId, k.side, event);
@@ -20923,7 +20990,7 @@ function buildDiscussPrompt(reference, options = {}) {
20923
20990
  }
20924
20991
 
20925
20992
  // src/components/chat/hooks/use-chat-history-hydration.ts
20926
- import { useEffect as useEffect29, useRef as useRef26, useState as useState34 } from "react";
20993
+ import { useEffect as useEffect29, useRef as useRef26, useState as useState35 } from "react";
20927
20994
  function useChatHistoryHydration({
20928
20995
  active,
20929
20996
  source,
@@ -20934,7 +21001,7 @@ function useChatHistoryHydration({
20934
21001
  bumpMetaTick,
20935
21002
  onOrphanedConversation
20936
21003
  }) {
20937
- const [isHydratingHistory, setIsHydratingHistory] = useState34(false);
21004
+ const [isHydratingHistory, setIsHydratingHistory] = useState35(false);
20938
21005
  const hydratedKeyRef = useRef26(null);
20939
21006
  const runIdRef = useRef26(0);
20940
21007
  useEffect29(() => {
@@ -21009,7 +21076,7 @@ function useChatHistoryHydration({
21009
21076
  }
21010
21077
 
21011
21078
  // src/components/chat/hooks/use-managed-dialog-list.ts
21012
- import { useCallback as useCallback19, useEffect as useEffect30, useMemo as useMemo23, useRef as useRef27, useState as useState35 } from "react";
21079
+ import { useCallback as useCallback19, useEffect as useEffect30, useMemo as useMemo23, useRef as useRef27, useState as useState36 } from "react";
21013
21080
  function useManagedDialogList({
21014
21081
  autoLoad,
21015
21082
  fetchDialogs,
@@ -21021,19 +21088,19 @@ function useManagedDialogList({
21021
21088
  onDialogRemoved,
21022
21089
  logTag
21023
21090
  }) {
21024
- const [dialogs, setDialogs] = useState35([]);
21025
- const [dialogsNextCursor, setDialogsNextCursor] = useState35(null);
21026
- const [isDialogsLoading, setIsDialogsLoading] = useState35(false);
21027
- const [settledSearch, setSettledSearch] = useState35(
21091
+ const [dialogs, setDialogs] = useState36([]);
21092
+ const [dialogsNextCursor, setDialogsNextCursor] = useState36(null);
21093
+ const [isDialogsLoading, setIsDialogsLoading] = useState36(false);
21094
+ const [settledSearch, setSettledSearch] = useState36(
21028
21095
  autoLoad && fetchDialogs ? void 0 : null
21029
21096
  );
21030
- const [autoLoadWas, setAutoLoadWas] = useState35(autoLoad);
21097
+ const [autoLoadWas, setAutoLoadWas] = useState36(autoLoad);
21031
21098
  if (autoLoad !== autoLoadWas) {
21032
21099
  setAutoLoadWas(autoLoad);
21033
21100
  if (autoLoad && fetchDialogs) setSettledSearch(void 0);
21034
21101
  }
21035
21102
  const pendingRef = useRef27(false);
21036
- const [dialogsError, setDialogsError] = useState35(false);
21103
+ const [dialogsError, setDialogsError] = useState36(false);
21037
21104
  const dialogsRef = useRef27(dialogs);
21038
21105
  useEffect30(() => {
21039
21106
  dialogsRef.current = dialogs;
@@ -21267,7 +21334,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21267
21334
  pruneStaleChatConversationStorage(source);
21268
21335
  conversationIdRef.current = conversationStorage.load()?.conversationId ?? null;
21269
21336
  }
21270
- const [conversationId, setConversationId] = useState36(() => conversationIdRef.current);
21337
+ const [conversationId, setConversationId] = useState37(() => conversationIdRef.current);
21271
21338
  const commitConversationId = useCallback20(
21272
21339
  (id) => {
21273
21340
  conversationIdRef.current = id;
@@ -21370,7 +21437,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21370
21437
  () => conversationsUrl ? createChatConversationsApi(conversationsUrl) : null,
21371
21438
  [conversationsUrl]
21372
21439
  );
21373
- const [dialogSearch, setDialogSearch] = useState36("");
21440
+ const [dialogSearch, setDialogSearch] = useState37("");
21374
21441
  const fetchActiveDialogs = useMemo24(
21375
21442
  () => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "active" }) : void 0,
21376
21443
  [conversationsApi]
@@ -21688,7 +21755,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21688
21755
  }
21689
21756
 
21690
21757
  // src/components/chat/hooks/use-nats-chat-adapter.ts
21691
- import { useCallback as useCallback21, useEffect as useEffect31, useMemo as useMemo25, useRef as useRef29, useState as useState37 } from "react";
21758
+ import { useCallback as useCallback21, useEffect as useEffect31, useMemo as useMemo25, useRef as useRef29, useState as useState38 } from "react";
21692
21759
 
21693
21760
  // src/chat-protocol/nats-decoder.ts
21694
21761
  function str(value) {
@@ -22702,7 +22769,7 @@ function useNatsChatAdapter(config, options = {}) {
22702
22769
  modelLabel = null
22703
22770
  } = config;
22704
22771
  const isManagedMode = fetchDialogs !== void 0;
22705
- const [internalDialogId, setInternalDialogId] = useState37(null);
22772
+ const [internalDialogId, setInternalDialogId] = useState38(null);
22706
22773
  const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
22707
22774
  const currentDialogIdRef = useRef29(dialogId);
22708
22775
  useEffect31(() => {
@@ -22720,8 +22787,8 @@ function useNatsChatAdapter(config, options = {}) {
22720
22787
  if (!requestId) return void 0;
22721
22788
  return handleRejectRef.current(requestId);
22722
22789
  }, []);
22723
- const [dialogStore] = useState37(() => createChatDialogStore());
22724
- const [globalApprovalStatuses] = useState37(() => ({}));
22790
+ const [dialogStore] = useState38(() => createChatDialogStore());
22791
+ const [globalApprovalStatuses] = useState38(() => ({}));
22725
22792
  const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
22726
22793
  const { state, applyEvent, mutate } = useChatStreamReducer({
22727
22794
  store: dialogStore,
@@ -22776,7 +22843,7 @@ function useNatsChatAdapter(config, options = {}) {
22776
22843
  },
22777
22844
  [applyEvent]
22778
22845
  );
22779
- const [isCreatingDialog, setIsCreatingDialog] = useState37(false);
22846
+ const [isCreatingDialog, setIsCreatingDialog] = useState38(false);
22780
22847
  const {
22781
22848
  dialogs,
22782
22849
  isDialogsLoading,
@@ -22803,9 +22870,9 @@ function useNatsChatAdapter(config, options = {}) {
22803
22870
  }
22804
22871
  }
22805
22872
  });
22806
- const [messagesNextCursor, setMessagesNextCursor] = useState37(null);
22807
- const [isMessagesLoading, setIsMessagesLoading] = useState37(false);
22808
- const [connectedForDialog, setConnectedForDialog] = useState37(null);
22873
+ const [messagesNextCursor, setMessagesNextCursor] = useState38(null);
22874
+ const [isMessagesLoading, setIsMessagesLoading] = useState38(false);
22875
+ const [connectedForDialog, setConnectedForDialog] = useState38(null);
22809
22876
  const hasConnectedOnceRef = useRef29(false);
22810
22877
  const {
22811
22878
  processChunk: catchupProcessChunk,
@@ -23116,7 +23183,7 @@ function useNatsChatAdapter(config, options = {}) {
23116
23183
  }
23117
23184
 
23118
23185
  // src/components/chat/hooks/use-stable-shallow.ts
23119
- import { useState as useState38 } from "react";
23186
+ import { useState as useState39 } from "react";
23120
23187
  function shallowEqual(a, b) {
23121
23188
  const aKeys = Object.keys(a);
23122
23189
  if (aKeys.length !== Object.keys(b).length) return false;
@@ -23125,14 +23192,14 @@ function shallowEqual(a, b) {
23125
23192
  return aKeys.every((key) => key in b && Object.is(aRec[key], bRec[key]));
23126
23193
  }
23127
23194
  function useStableShallow(value) {
23128
- const [cached, setCached] = useState38(value);
23195
+ const [cached, setCached] = useState39(value);
23129
23196
  const same = cached === value || cached !== void 0 && value !== void 0 && shallowEqual(cached, value);
23130
23197
  if (!same) setCached(value);
23131
23198
  return same ? cached : value;
23132
23199
  }
23133
23200
 
23134
23201
  // src/components/chat/hooks/use-unified-chat.ts
23135
- import { useCallback as useCallback22, useEffect as useEffect32, useMemo as useMemo26, useRef as useRef30, useState as useState39 } from "react";
23202
+ import { useCallback as useCallback22, useEffect as useEffect32, useMemo as useMemo26, useRef as useRef30, useState as useState40 } from "react";
23136
23203
  var EMPTY_SSE_OPTIONS = {};
23137
23204
  function createDisabledNatsConfig() {
23138
23205
  return {
@@ -23147,7 +23214,7 @@ function createDisabledNatsConfig() {
23147
23214
  }
23148
23215
  function useUnifiedChat(options) {
23149
23216
  const { modes, activeMode, mingoStateOverride, injectedDialogCapabilities } = options;
23150
- const [disabledNatsConfig] = useState39(createDisabledNatsConfig);
23217
+ const [disabledNatsConfig] = useState40(createDisabledNatsConfig);
23151
23218
  const sseActive = activeMode === "guide" && modes.guide !== void 0;
23152
23219
  const natsActive = activeMode === "mingo" && modes.mingo !== void 0;
23153
23220
  const sseState = useSseChatAdapter(modes.guide ?? EMPTY_SSE_OPTIONS, {
@@ -23657,7 +23724,7 @@ import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
23657
23724
  import { usePreventScroll } from "@react-aria/overlays";
23658
23725
  import { isIOS } from "@react-aria/utils";
23659
23726
  import { MessageSquare as MessageSquare2 } from "lucide-react";
23660
- import React7, { useCallback as useCallback26, useEffect as useEffect35, useImperativeHandle as useImperativeHandle2, useMemo as useMemo29, useRef as useRef35, useState as useState44 } from "react";
23727
+ import React7, { useCallback as useCallback26, useEffect as useEffect35, useImperativeHandle as useImperativeHandle2, useMemo as useMemo29, useRef as useRef35, useState as useState45 } from "react";
23661
23728
 
23662
23729
  // src/components/ui/drawer.tsx
23663
23730
  import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -23667,12 +23734,12 @@ import {
23667
23734
  forwardRef as forwardRef24,
23668
23735
  useEffect as useEffect34,
23669
23736
  useRef as useRef32,
23670
- useState as useState41,
23737
+ useState as useState42,
23671
23738
  useSyncExternalStore as useSyncExternalStore5
23672
23739
  } from "react";
23673
23740
 
23674
23741
  // src/hooks/ui/use-resizable-panel-size.ts
23675
- import { useCallback as useCallback23, useMemo as useMemo27, useState as useState40 } from "react";
23742
+ import { useCallback as useCallback23, useMemo as useMemo27, useState as useState41 } from "react";
23676
23743
  var CHOSEN_SIZE_KEY_SUFFIX = ":chosen";
23677
23744
  function isStoredPanelSize(value) {
23678
23745
  if (typeof value !== "object" || value === null) return false;
@@ -23696,7 +23763,7 @@ function useResizablePanelSize({
23696
23763
  }) : null,
23697
23764
  [enabled, storageKey]
23698
23765
  );
23699
- const [held, setChosen] = useState40(() => ({ storage, size: storage?.load()?.size ?? null }));
23766
+ const [held, setChosen] = useState41(() => ({ storage, size: storage?.load()?.size ?? null }));
23700
23767
  const chosen = held.storage === storage ? held : { storage, size: storage?.load()?.size ?? null };
23701
23768
  if (chosen !== held) setChosen(chosen);
23702
23769
  const chosenSize = chosen.size;
@@ -23980,7 +24047,7 @@ var DrawerContent = forwardRef24(
23980
24047
  const resolvedSide = side ?? "right";
23981
24048
  const isHorizontal = HORIZONTAL_SIDES2.has(resolvedSide);
23982
24049
  const headerHeight = useHeaderHeight();
23983
- const [isMobile, setIsMobile] = useState41(false);
24050
+ const [isMobile, setIsMobile] = useState42(false);
23984
24051
  useEffect34(() => {
23985
24052
  if (typeof window === "undefined") return void 0;
23986
24053
  const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
@@ -24082,7 +24149,7 @@ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx88("div", { c
24082
24149
  DrawerFooter.displayName = "DrawerFooter";
24083
24150
 
24084
24151
  // src/components/ui/hover-dropdown.tsx
24085
- import { useState as useState42, useRef as useRef33, useCallback as useCallback24 } from "react";
24152
+ import { useState as useState43, useRef as useRef33, useCallback as useCallback24 } from "react";
24086
24153
  import { Fragment as Fragment34, jsx as jsx89, jsxs as jsxs70 } from "react/jsx-runtime";
24087
24154
  function DefaultAnchor({ href, className, children }) {
24088
24155
  return /* @__PURE__ */ jsx89("a", { href, className, children });
@@ -24095,7 +24162,7 @@ function HoverDropdown({
24095
24162
  className,
24096
24163
  renderAnchor
24097
24164
  }) {
24098
- const [open, setOpen] = useState42(false);
24165
+ const [open, setOpen] = useState43(false);
24099
24166
  const timeoutRef = useRef33(void 0);
24100
24167
  const containerRef = useRef33(null);
24101
24168
  const panelRef = useRef33(null);
@@ -24199,7 +24266,7 @@ function HoverDropdown({
24199
24266
  }
24200
24267
 
24201
24268
  // src/components/chat/hooks/use-chat-dialog-manager.ts
24202
- import { useCallback as useCallback25, useMemo as useMemo28, useRef as useRef34, useState as useState43 } from "react";
24269
+ import { useCallback as useCallback25, useMemo as useMemo28, useRef as useRef34, useState as useState44 } from "react";
24203
24270
  function useChatDialogManager({
24204
24271
  dialogs,
24205
24272
  activeDialogId,
@@ -24211,8 +24278,8 @@ function useChatDialogManager({
24211
24278
  fetchArchivedDialogs,
24212
24279
  unarchiveDialog
24213
24280
  }) {
24214
- const [renameTarget, setRenameTarget] = useState43(null);
24215
- const [archiveTarget, setArchiveTarget] = useState43(null);
24281
+ const [renameTarget, setRenameTarget] = useState44(null);
24282
+ const [archiveTarget, setArchiveTarget] = useState44(null);
24216
24283
  const handleConfirmRename = useCallback25(
24217
24284
  (name) => {
24218
24285
  if (renameTarget) void renameDialog(renameTarget.id, name);
@@ -24220,7 +24287,7 @@ function useChatDialogManager({
24220
24287
  },
24221
24288
  [renameTarget, renameDialog]
24222
24289
  );
24223
- const [openingDialogId, setOpeningDialogId] = useState43(null);
24290
+ const [openingDialogId, setOpeningDialogId] = useState44(null);
24224
24291
  const handleConfirmArchive = useCallback25(async () => {
24225
24292
  if (archiveTarget) {
24226
24293
  try {
@@ -24236,11 +24303,11 @@ function useChatDialogManager({
24236
24303
  }
24237
24304
  setArchiveTarget(null);
24238
24305
  }, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
24239
- const [archiveOpen, setArchiveOpen] = useState43(false);
24240
- const [archivedDialogs, setArchivedDialogs] = useState43([]);
24241
- const [archivedCursor, setArchivedCursor] = useState43(null);
24242
- const [archivedLoading, setArchivedLoading] = useState43(false);
24243
- const [archivedPending, setArchivedPending] = useState43(false);
24306
+ const [archiveOpen, setArchiveOpen] = useState44(false);
24307
+ const [archivedDialogs, setArchivedDialogs] = useState44([]);
24308
+ const [archivedCursor, setArchivedCursor] = useState44(null);
24309
+ const [archivedLoading, setArchivedLoading] = useState44(false);
24310
+ const [archivedPending, setArchivedPending] = useState44(false);
24244
24311
  const archivedRequestIdRef = useRef34(0);
24245
24312
  const loadArchivedPage = useCallback25(
24246
24313
  async (cursor) => {
@@ -24280,7 +24347,7 @@ function useChatDialogManager({
24280
24347
  void loadArchivedPage();
24281
24348
  }, [loadArchivedPage]);
24282
24349
  const closeArchive = useCallback25(() => setArchiveOpen(false), []);
24283
- const [viewingArchivedId, setViewingArchivedId] = useState43(null);
24350
+ const [viewingArchivedId, setViewingArchivedId] = useState44(null);
24284
24351
  const handleSelectDialog = useCallback25(
24285
24352
  (id) => {
24286
24353
  setViewingArchivedId(null);
@@ -24299,7 +24366,7 @@ function useChatDialogManager({
24299
24366
  },
24300
24367
  [selectDialog]
24301
24368
  );
24302
- const [restoreTarget, setRestoreTarget] = useState43(null);
24369
+ const [restoreTarget, setRestoreTarget] = useState44(null);
24303
24370
  const handleConfirmRestore = useCallback25(async () => {
24304
24371
  if (restoreTarget) {
24305
24372
  try {
@@ -24463,8 +24530,8 @@ var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
24463
24530
  var NO_CONTEXT_ITEMS = [];
24464
24531
  var RAIL_ANIM_MS = 320;
24465
24532
  function useRailPresence(open) {
24466
- const [mounted, setMounted] = useState44(open);
24467
- const [active, setActive] = useState44(false);
24533
+ const [mounted, setMounted] = useState45(open);
24534
+ const [active, setActive] = useState45(false);
24468
24535
  if (open && !mounted) setMounted(true);
24469
24536
  if (!open && active) setActive(false);
24470
24537
  useEffect35(() => {
@@ -24691,7 +24758,7 @@ function SourceChips({
24691
24758
  onClose,
24692
24759
  onDiscuss
24693
24760
  }) {
24694
- const [expanded, setExpanded] = useState44(false);
24761
+ const [expanded, setExpanded] = useState45(false);
24695
24762
  if (cited.length === 0) {
24696
24763
  const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
24697
24764
  if (fallback.length === 0) return null;
@@ -24822,7 +24889,7 @@ function EmbeddableChatInner({
24822
24889
  defaultProp: defaultOpen ?? false,
24823
24890
  onChange: onOpenChange
24824
24891
  });
24825
- const [autoFocusInput] = useState44(() => {
24892
+ const [autoFocusInput] = useState45(() => {
24826
24893
  if (typeof window === "undefined") return false;
24827
24894
  return !window.matchMedia("(pointer: coarse)").matches;
24828
24895
  });
@@ -24855,7 +24922,7 @@ function EmbeddableChatInner({
24855
24922
  };
24856
24923
  }, [isOpen, shellLess]);
24857
24924
  const chatInputRef = useRef35(null);
24858
- const [quickActionPreview, setQuickActionPreview] = useState44(null);
24925
+ const [quickActionPreview, setQuickActionPreview] = useState45(null);
24859
24926
  const slashCommandsProp = useMemo29(
24860
24927
  () => ({
24861
24928
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
@@ -24878,7 +24945,7 @@ function EmbeddableChatInner({
24878
24945
  }, [modes, tableIdForDocumentType]);
24879
24946
  const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
24880
24947
  const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
24881
- const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState44(initialActiveMode);
24948
+ const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState45(initialActiveMode);
24882
24949
  const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
24883
24950
  const handleActiveModeChange = useCallback26(
24884
24951
  (next) => {
@@ -24954,7 +25021,7 @@ function EmbeddableChatInner({
24954
25021
  injectedDialogCapabilities: mingoDialogCapabilities
24955
25022
  });
24956
25023
  const historyListMode = dialogCapabilities !== void 0;
24957
- const [namingNewChat, setNamingNewChat] = useState44(false);
25024
+ const [namingNewChat, setNamingNewChat] = useState45(false);
24958
25025
  const sendMessage = useCallback26(
24959
25026
  async (text2, options) => {
24960
25027
  if (activeDialogId == null) setNamingNewChat(true);
@@ -24998,17 +25065,17 @@ function EmbeddableChatInner({
24998
25065
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
24999
25066
  const contextMaxItems = contextPicker?.maxItems ?? 10;
25000
25067
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
25001
- const [contextItems, setContextItems] = useState44(NO_CONTEXT_ITEMS);
25002
- const [contextPickerOpen, setContextPickerOpen] = useState44(false);
25003
- const [mentionQuery, setMentionQuery] = useState44(null);
25068
+ const [contextItems, setContextItems] = useState45(NO_CONTEXT_ITEMS);
25069
+ const [contextPickerOpen, setContextPickerOpen] = useState45(false);
25070
+ const [mentionQuery, setMentionQuery] = useState45(null);
25004
25071
  const mentionActiveRef = useRef35(false);
25005
25072
  useEffect35(() => {
25006
25073
  mentionActiveRef.current = mentionQuery !== null;
25007
25074
  }, [mentionQuery]);
25008
25075
  const mentionKeysRef = useRef35(/* @__PURE__ */ new Set());
25009
25076
  const scopeDialogId = activeDialogId ?? null;
25010
- const [composerScope, setComposerScope] = useState44({ dialogId: scopeDialogId, mode: activeMode });
25011
- const [composerKey, setComposerKey] = useState44(0);
25077
+ const [composerScope, setComposerScope] = useState45({ dialogId: scopeDialogId, mode: activeMode });
25078
+ const [composerKey, setComposerKey] = useState45(0);
25012
25079
  if (composerScope.dialogId !== scopeDialogId || composerScope.mode !== activeMode) {
25013
25080
  const named = namingNewChat && composerScope.dialogId == null && scopeDialogId != null && composerScope.mode === activeMode;
25014
25081
  setComposerScope({ dialogId: scopeDialogId, mode: activeMode });
@@ -25123,7 +25190,7 @@ function EmbeddableChatInner({
25123
25190
  () => effectiveAssistantIcon ? /* @__PURE__ */ jsx90(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx90(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
25124
25191
  [effectiveAssistantIcon]
25125
25192
  );
25126
- const [timestampCache] = useState44(() => /* @__PURE__ */ new Map());
25193
+ const [timestampCache] = useState45(() => /* @__PURE__ */ new Map());
25127
25194
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
25128
25195
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
25129
25196
  const messages = useMemo29(() => {
@@ -25321,10 +25388,10 @@ function EmbeddableChatInner({
25321
25388
  },
25322
25389
  [chatLoading, messages.length, resolvedBaseRoute, chipBasePlatform, handleNavigationClose, askAbout]
25323
25390
  );
25324
- const [portalHost, setPortalHost] = useState44(null);
25325
- const [panelBoundary, setPanelBoundary] = useState44(null);
25391
+ const [portalHost, setPortalHost] = useState45(null);
25392
+ const [panelBoundary, setPanelBoundary] = useState45(null);
25326
25393
  const splitMinWidth = (isV2 ? MINGO_V2_RAIL_WIDTH : HISTORY_RAIL_WIDTH) + CHAT_BLOCK_MIN_WIDTH;
25327
- const [canSplit, setCanSplit] = useState44(false);
25394
+ const [canSplit, setCanSplit] = useState45(false);
25328
25395
  useEffect35(() => {
25329
25396
  if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
25330
25397
  const ro = new ResizeObserver((entries) => {
@@ -25341,9 +25408,9 @@ function EmbeddableChatInner({
25341
25408
  },
25342
25409
  [splitMinWidth]
25343
25410
  );
25344
- const [railCollapsed, setRailCollapsed] = useState44(false);
25411
+ const [railCollapsed, setRailCollapsed] = useState45(false);
25345
25412
  const railStorageHydrated = useIsHydrated();
25346
- const [railStorageRead, setRailStorageRead] = useState44(false);
25413
+ const [railStorageRead, setRailStorageRead] = useState45(false);
25347
25414
  if (railStorageHydrated && !railStorageRead) {
25348
25415
  setRailStorageRead(true);
25349
25416
  try {
@@ -25361,13 +25428,13 @@ function EmbeddableChatInner({
25361
25428
  return next;
25362
25429
  });
25363
25430
  }, []);
25364
- const [railSearchOpen, setRailSearchOpen] = useState44(false);
25431
+ const [railSearchOpen, setRailSearchOpen] = useState45(false);
25365
25432
  const splitEligible = historyListMode;
25366
25433
  const wideMingo = splitEligible && canSplit && !previewMode;
25367
25434
  const splitActive = wideMingo && !railCollapsed;
25368
25435
  const railPresence = useRailPresence(splitActive);
25369
25436
  const showWideHeader = wideMingo || railPresence.mounted;
25370
- const [composeOpen, setComposeOpen] = useState44(false);
25437
+ const [composeOpen, setComposeOpen] = useState45(false);
25371
25438
  if (hasConversation && composeOpen) setComposeOpen(false);
25372
25439
  const isMingoMode = historyListMode;
25373
25440
  const emptyListSkipped = mingoCaps.emptyListSkipsToCompose === true && dialogs.length === 0 && !dialogsInitialLoading && !mingoCaps.searchQuery;
@@ -25413,8 +25480,8 @@ function EmbeddableChatInner({
25413
25480
  useEffect35(() => {
25414
25481
  if (activeDialogId && !isViewingArchived) lastDialogIdRef.current = activeDialogId;
25415
25482
  }, [activeDialogId, isViewingArchived]);
25416
- const [pendingDraft, setPendingDraft] = useState44(null);
25417
- const [seededDraft, setSeededDraft] = useState44(null);
25483
+ const [pendingDraft, setPendingDraft] = useState45(null);
25484
+ const [seededDraft, setSeededDraft] = useState45(null);
25418
25485
  if (pendingDraft && seededDraft !== pendingDraft) {
25419
25486
  setSeededDraft(pendingDraft);
25420
25487
  setContextItems(pendingDraft.mentions);
@@ -26047,7 +26114,7 @@ function EmbeddableChatInner({
26047
26114
  }
26048
26115
 
26049
26116
  // src/components/chat/proxy-credentials-panel.tsx
26050
- import { useMemo as useMemo30, useState as useState45 } from "react";
26117
+ import { useMemo as useMemo30, useState as useState46 } from "react";
26051
26118
 
26052
26119
  // src/components/ui/field.tsx
26053
26120
  import { useId as useId4 } from "react";
@@ -26190,12 +26257,12 @@ function ProxyCredentialsPanel({ description }) {
26190
26257
  }
26191
26258
  function ProxyCredentialsForm({ description, saved }) {
26192
26259
  const { secret: savedSecret, email: savedEmail, ...savedOptional } = saved ?? { email: "", secret: "" };
26193
- const [secret, setSecret] = useState45("");
26194
- const [email, setEmail] = useState45(savedEmail);
26195
- const [optional, setOptional] = useState45(savedOptional);
26196
- const [savedKeyTail, setSavedKeyTail] = useState45(savedSecret ? maskKey(savedSecret) : null);
26197
- const [activeEmail, setActiveEmail] = useState45(savedEmail || null);
26198
- const [status, setStatus] = useState45("");
26260
+ const [secret, setSecret] = useState46("");
26261
+ const [email, setEmail] = useState46(savedEmail);
26262
+ const [optional, setOptional] = useState46(savedOptional);
26263
+ const [savedKeyTail, setSavedKeyTail] = useState46(savedSecret ? maskKey(savedSecret) : null);
26264
+ const [activeEmail, setActiveEmail] = useState46(savedEmail || null);
26265
+ const [status, setStatus] = useState46("");
26199
26266
  const errors = useMemo30(() => {
26200
26267
  const out = {};
26201
26268
  for (const { field } of EMBED_PROXY_OPTIONAL_HEADERS) {
@@ -26465,8 +26532,9 @@ export {
26465
26532
  tokensForBalance,
26466
26533
  tokenRateProviderLabel,
26467
26534
  groupTokenRatesByProvider,
26468
- TRIAL_DAYS,
26469
- TRIAL_LABELS,
26535
+ TRIAL_TERMS,
26536
+ trialLengthLabel,
26537
+ trialLabels,
26470
26538
  SEO_TITLE_MAX_LENGTH,
26471
26539
  SEO_DESCRIPTION_MAX_LENGTH,
26472
26540
  BRAND_MARK_SVGS,
@@ -26655,8 +26723,7 @@ export {
26655
26723
  assistantAvailable,
26656
26724
  useAskPrompts,
26657
26725
  useAssistantOpen,
26658
- useShownAskPrompts,
26659
- useShownAskPromptIds,
26726
+ useAskSurface,
26660
26727
  AssistantAskPrompts,
26661
26728
  useMarqueeSync,
26662
26729
  getMarqueeTrackOffset,