@flamingo-stack/openframe-frontend-core 0.0.725 → 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 (107) hide show
  1. package/dist/{chunk-JVHP7Y4S.js → chunk-2F4DO7DS.js} +2 -2
  2. package/dist/{chunk-4ZZ4TNCY.cjs → chunk-32QAIKXR.cjs} +9 -9
  3. package/dist/{chunk-AI3CLDZO.cjs → chunk-33QHEG7K.cjs} +289 -285
  4. package/dist/{chunk-QV4GO3GW.cjs → chunk-4ICMFNCJ.cjs} +29 -56
  5. package/dist/{chunk-YPEILGVZ.cjs → chunk-5K3QUH7C.cjs} +3 -3
  6. package/dist/{chunk-5FVWDDX6.js → chunk-66XG5RFJ.js} +2 -2
  7. package/dist/{chunk-ZSXZE4FJ.cjs → chunk-7N6M77PI.cjs} +3 -3
  8. package/dist/{chunk-2VOZ37BL.cjs → chunk-7VYBSCCL.cjs} +35 -35
  9. package/dist/{chunk-7V5KFBY2.cjs → chunk-APJCBQ7X.cjs} +16 -16
  10. package/dist/{chunk-RU6BTELI.cjs → chunk-CELBOIKC.cjs} +538 -491
  11. package/dist/{chunk-SEVKFMKR.cjs → chunk-CI7KWY6L.cjs} +3 -3
  12. package/dist/{chunk-OBMWSUBK.js → chunk-EM3WCK2K.js} +5 -5
  13. package/dist/{chunk-ASHRHL4W.js → chunk-GEUUDNCI.js} +5 -5
  14. package/dist/{chunk-ZZRUKEN2.js → chunk-GINCQZMM.js} +3 -3
  15. package/dist/{chunk-AX4F35C2.js → chunk-HP4C2DFL.js} +1 -1
  16. package/dist/{chunk-ASIXPRHV.js → chunk-HTQJSW3Y.js} +3 -3
  17. package/dist/{chunk-SE4O4HCD.cjs → chunk-OKEJY2GC.cjs} +8 -8
  18. package/dist/{chunk-B7234BE2.cjs → chunk-OYU7QNLQ.cjs} +11 -11
  19. package/dist/{chunk-PUADVXJD.js → chunk-QL4RUHKU.js} +1 -1
  20. package/dist/{chunk-LYQYLPPV.cjs → chunk-RMXLHYEG.cjs} +26 -26
  21. package/dist/{chunk-MGTZ2BKY.js → chunk-SKEW5NMJ.js} +22 -49
  22. package/dist/{chunk-772242QR.cjs → chunk-SSXQYS5K.cjs} +65 -65
  23. package/dist/{chunk-F56GNKX2.js → chunk-TYMLEI2I.js} +2 -2
  24. package/dist/{chunk-MLFS5G3V.js → chunk-UF3NFAQK.js} +315 -268
  25. package/dist/{chunk-2SO3OJFY.cjs → chunk-UJZ5Y3RK.cjs} +33 -33
  26. package/dist/{chunk-W2DXHR2R.js → chunk-URYLQ4MC.js} +15 -11
  27. package/dist/{chunk-F77J34W2.js → chunk-VGRQK7YS.js} +1 -1
  28. package/dist/{chunk-IOTAUWWF.js → chunk-XYSKJ7GA.js} +1 -1
  29. package/dist/{chunk-LR6DJY4Z.cjs → chunk-YREYU6DY.cjs} +9 -9
  30. package/dist/{chunk-JAKG6BY7.js → chunk-ZDGK2TNJ.js} +3 -3
  31. package/dist/{cloud-tenants-SMULXU54.cjs → cloud-tenants-XP3L6PWO.cjs} +3 -3
  32. package/dist/{cloud-tenants-US63E2HV.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/entity-cards/dispatch.d.ts.map +1 -1
  38. package/dist/components/chat/hooks/index.d.ts +1 -1
  39. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  40. package/dist/components/chat/hooks/use-ask-prompts.d.ts +34 -7
  41. package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -1
  42. package/dist/components/chat/index.cjs +2 -4
  43. package/dist/components/chat/index.js +3 -5
  44. package/dist/components/contact/index.cjs +4 -4
  45. package/dist/components/contact/index.js +3 -3
  46. package/dist/components/docs/index.cjs +7 -7
  47. package/dist/components/docs/index.js +6 -6
  48. package/dist/components/embeds/index.cjs +4 -4
  49. package/dist/components/embeds/index.js +3 -3
  50. package/dist/components/faq/faq-ask-card.d.ts +8 -11
  51. package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
  52. package/dist/components/faq/index.cjs +4 -4
  53. package/dist/components/faq/index.js +3 -3
  54. package/dist/components/features/auth/auth-benefits-panel.d.ts +3 -1
  55. package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
  56. package/dist/components/features/auth/auth-shell.d.ts +3 -1
  57. package/dist/components/features/auth/auth-shell.d.ts.map +1 -1
  58. package/dist/components/features/index.cjs +3 -3
  59. package/dist/components/features/index.js +2 -2
  60. package/dist/components/help-center-pages/index.cjs +71 -71
  61. package/dist/components/help-center-pages/index.js +13 -13
  62. package/dist/components/index.cjs +35 -37
  63. package/dist/components/index.js +14 -16
  64. package/dist/components/meeting-scheduler/index.cjs +19 -19
  65. package/dist/components/meeting-scheduler/index.js +2 -2
  66. package/dist/components/navigation/index.cjs +6 -6
  67. package/dist/components/navigation/index.js +5 -5
  68. package/dist/components/onboarding-guides/index.cjs +5 -5
  69. package/dist/components/onboarding-guides/index.js +4 -4
  70. package/dist/components/product-demo/index.cjs +6 -6
  71. package/dist/components/product-demo/index.js +6 -6
  72. package/dist/components/tickets/index.cjs +7 -7
  73. package/dist/components/tickets/index.js +6 -6
  74. package/dist/components/ui/index.cjs +3 -5
  75. package/dist/components/ui/index.js +4 -6
  76. package/dist/{devices-6ZURNFRB.cjs → devices-MMHLY67A.cjs} +4 -4
  77. package/dist/{devices-JWHGWKLK.js → devices-S7PJJI66.js} +2 -2
  78. package/dist/index.cjs +7 -7
  79. package/dist/index.js +14 -14
  80. package/dist/{knowledge-CY66JZ54.cjs → knowledge-LJNFAJNE.cjs} +4 -4
  81. package/dist/{knowledge-TEDPLCFX.js → knowledge-WW3LOQKN.js} +2 -2
  82. package/dist/{logs-MO357RE7.cjs → logs-F4ZVNUKQ.cjs} +11 -11
  83. package/dist/{logs-S46THPPD.js → logs-I4DMHQDA.js} +2 -2
  84. package/dist/{policies-GSH4K5YP.cjs → policies-KZXFXGD7.cjs} +7 -7
  85. package/dist/{policies-BUXT7DKF.js → policies-RX55V46V.js} +2 -2
  86. package/dist/{software-update-2ETT35NM.cjs → software-update-4A242VDB.cjs} +6 -6
  87. package/dist/{software-update-YKS6KLX2.js → software-update-VI7FQYR4.js} +2 -2
  88. package/dist/utils/index.cjs +25 -24
  89. package/dist/utils/index.d.ts +1 -1
  90. package/dist/utils/index.d.ts.map +1 -1
  91. package/dist/utils/index.js +23 -23
  92. package/dist/utils/source-grouping.d.ts +15 -5
  93. package/dist/utils/source-grouping.d.ts.map +1 -1
  94. package/dist/utils/trial.d.ts +17 -9
  95. package/dist/utils/trial.d.ts.map +1 -1
  96. package/package.json +1 -1
  97. package/src/components/chat/assistant-ask-prompts.tsx +84 -39
  98. package/src/components/chat/entity-cards/dispatch.tsx +47 -58
  99. package/src/components/chat/hooks/index.ts +3 -2
  100. package/src/components/chat/hooks/use-ask-prompts.ts +140 -56
  101. package/src/components/faq/faq-ask-card.tsx +22 -67
  102. package/src/components/features/auth/auth-benefits-panel.tsx +15 -8
  103. package/src/components/features/auth/auth-shell.tsx +4 -2
  104. package/src/utils/index.ts +1 -1
  105. package/src/utils/source-grouping.ts +24 -14
  106. package/src/utils/source-icons.ts +16 -16
  107. package/src/utils/trial.ts +16 -10
@@ -207,16 +207,10 @@ import {
207
207
  Arrow02LeftIcon,
208
208
  Arrow02RightIcon,
209
209
  ArrowRightUpIcon,
210
- BankIcon,
211
210
  BoxArchiveIcon,
212
- BracketCurlyCheckIcon,
213
211
  CalendarIcon,
214
- CallIcon,
215
- ChartBar01VerIcon,
216
- ChartPieIcon,
217
212
  ChatPlusIcon,
218
213
  ChatQuestionIcon,
219
- ChatQuoteIcon,
220
214
  ChatsIcon,
221
215
  CheckCircleIcon,
222
216
  CheckFillIcon,
@@ -224,22 +218,15 @@ import {
224
218
  Chevron02LeftIcon,
225
219
  Chevron02RightIcon,
226
220
  ClickupLogoIcon,
227
- ClipboardListIcon,
228
221
  ClockHistoryIcon,
229
222
  CodeIcon,
230
- CodeSquareIcon,
231
- CodingBranchIcon,
232
223
  CodingCommitIcon,
233
- CodingMergeIcon,
234
224
  CodingPullRequestIcon,
235
- CoinsExchangeCurrencyIcon,
236
225
  CompassIcon,
237
- Copy01Icon,
238
226
  DotsLoaderIcon,
239
227
  Ellipsis01Icon,
240
228
  ExternalLinkIcon,
241
229
  EyeIcon,
242
- FileCodeIcon,
243
230
  FileContentIcon,
244
231
  GeminiLogoGreyIcon,
245
232
  InfoCircleIcon,
@@ -249,11 +236,9 @@ import {
249
236
  Megaphone01Icon,
250
237
  MessageIndicatorIcon,
251
238
  MicrophoneIcon,
252
- MoneyBillDollarIcon,
253
239
  NewspaperIcon,
254
240
  OpenaiLogoGreyIcon,
255
241
  PackageCheckIcon,
256
- PackageIcon,
257
242
  PackagePlusIcon,
258
243
  PenEditIcon,
259
244
  PlusCircleIcon,
@@ -5973,14 +5958,15 @@ function groupTokenRatesByProvider(rates) {
5973
5958
  }
5974
5959
 
5975
5960
  // src/utils/trial.ts
5976
- var TRIAL_DAYS = 14;
5977
- var TRIAL_LABELS = {
5978
- /** "14 day free trial" */
5979
- length: `${TRIAL_DAYS} day free trial`,
5961
+ var TRIAL_TERMS = {
5980
5962
  noCard: "No card required",
5981
5963
  cancel: "Cancel Anytime",
5982
5964
  noContract: "No Contract"
5983
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
+ }
5984
5970
 
5985
5971
  // src/utils/seo-title.ts
5986
5972
  var SEO_TITLE_MAX_LENGTH = 60;
@@ -6879,11 +6865,11 @@ var SOURCE_ICON_NAMES = {
6879
6865
  vendors: "package-search",
6880
6866
  // Financials
6881
6867
  "investor-updates": "mail",
6882
- "financial-kpis": "activity",
6883
- "financial-cap-table": "table",
6884
- "financial-pnl": "trending-up",
6885
- "financial-balance-sheet": "dollar-sign",
6886
- "financial-cash-flow": "banknote",
6868
+ "financial-kpis": "chart-bar-01-ver",
6869
+ "financial-cap-table": "chart-pie",
6870
+ "financial-pnl": "money-bill-dollar",
6871
+ "financial-balance-sheet": "bank",
6872
+ "financial-cash-flow": "coins-exchange-currency",
6887
6873
  // ClickUp
6888
6874
  "clickup-roadmap": "clickup",
6889
6875
  "clickup-delivery": "clickup",
@@ -6902,22 +6888,22 @@ var SOURCE_ICON_NAMES = {
6902
6888
  // Communications
6903
6889
  "slack-messages": "slack",
6904
6890
  // People-hub employee content
6905
- "what-i-shipped": "package",
6906
- "how-i-work": "book-open",
6907
- "ai-prompts": "message-square",
6891
+ "what-i-shipped": "rocket-02",
6892
+ "how-i-work": "clipboard-list",
6893
+ "ai-prompts": "chat-quote",
6908
6894
  // Product-hub internal
6909
6895
  "design-docs": "file-text",
6910
6896
  "openframe-tenants": "openframe",
6911
- "prospect-calls": "phone",
6897
+ "prospect-calls": "call",
6912
6898
  // Code intelligence
6913
- "code-rules": "check-square",
6914
- "code-graph-repos": "github",
6899
+ "code-rules": "bracket-curly-check",
6900
+ "code-graph-repos": "coding-branch",
6915
6901
  "code-graph-deployments": "package",
6916
- "code-graph-files": "file-text",
6917
- "code-symbols": "box",
6918
- "code-duplicates": "search",
6919
- "code-impact": "activity",
6920
- "change-sets": "coding-branch"
6902
+ "code-graph-files": "file-code",
6903
+ "code-symbols": "code-square",
6904
+ "code-duplicates": "copy-01",
6905
+ "code-impact": "coding-pull-request",
6906
+ "change-sets": "coding-merge"
6921
6907
  };
6922
6908
  function getSourceIconName(tableId) {
6923
6909
  if (!tableId) return void 0;
@@ -7094,8 +7080,7 @@ function typeOf(source) {
7094
7080
  return source.documentType || defaultDocumentTypeForTableId(source.sourceRepo) || "";
7095
7081
  }
7096
7082
  function joinsTableChip(source) {
7097
- if (!source.sourceRepo) return false;
7098
- return groupsByTable(typeOf({ ...source, sourceRepo: source.sourceRepo }));
7083
+ return !!source.sourceRepo;
7099
7084
  }
7100
7085
  function rowsOf(source) {
7101
7086
  if (isGroupedChip(source)) return source.items ?? [];
@@ -8908,11 +8893,8 @@ function AskCard({
8908
8893
  );
8909
8894
  }
8910
8895
 
8911
- // src/components/chat/assistant-ask-prompts.tsx
8912
- import { useMemo as useMemo9 } from "react";
8913
-
8914
8896
  // src/components/chat/hooks/use-ask-prompts.ts
8915
- 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";
8916
8898
  var ASK_PROMPTS_DEFAULT_COUNT = 3;
8917
8899
  function buildAskPromptsUrl(base, { count, topic, exclude = [] }) {
8918
8900
  const params = new URLSearchParams({ count: String(count) });
@@ -8932,8 +8914,9 @@ function useAskPrompts({
8932
8914
  const assistant = useAssistantRuntime();
8933
8915
  const base = assistantAvailable(assistant) ? assistant.askPromptsUrl : void 0;
8934
8916
  const url = base && enabled ? buildAskPromptsUrl(base, { count, topic, exclude }) : null;
8935
- const { data, isLoading } = useSelfFetch(url);
8936
- 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 };
8937
8920
  }
8938
8921
  function useAssistantOpen(topic, onOpen) {
8939
8922
  const assistant = useAssistantRuntime();
@@ -8949,90 +8932,158 @@ function useAssistantOpen(topic, onOpen) {
8949
8932
  [onOpen, runtimeOpen, source, topic]
8950
8933
  );
8951
8934
  }
8952
- var NO_IDS = [];
8953
- function createShownList() {
8954
- const bySurface = /* @__PURE__ */ new Map();
8935
+ function createAskQueue() {
8936
+ const entries = /* @__PURE__ */ new Map();
8955
8937
  const listeners = /* @__PURE__ */ new Set();
8956
- let snapshot = NO_IDS;
8938
+ let next = 0;
8957
8939
  const publish = () => {
8958
- const lists = [...bySurface.values()];
8959
- const next = lists.some((list) => list === null) ? null : lists.flatMap((list) => list ?? []);
8960
- const same = next === null ? snapshot === null : snapshot !== null && next.join(",") === snapshot.join(",");
8961
- if (same) return;
8962
- snapshot = next === null ? null : next.length > 0 ? next : NO_IDS;
8963
8940
  for (const listener of listeners) listener();
8964
8941
  };
8965
8942
  return {
8966
- set(surface, ids) {
8967
- bySurface.set(surface, ids);
8943
+ enter(surface) {
8944
+ if (entries.has(surface)) return;
8945
+ entries.set(surface, { turn: next++, ids: null });
8968
8946
  publish();
8969
8947
  },
8970
- remove(surface) {
8971
- 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;
8972
8952
  publish();
8973
8953
  },
8954
+ leave(surface) {
8955
+ if (entries.delete(surface)) publish();
8956
+ },
8974
8957
  subscribe(listener) {
8975
8958
  listeners.add(listener);
8976
8959
  return () => listeners.delete(listener);
8977
8960
  },
8978
- 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
+ }
8979
8975
  };
8980
8976
  }
8981
- var shownLists = /* @__PURE__ */ new Map();
8982
- function useShownList() {
8977
+ var askQueues = /* @__PURE__ */ new Map();
8978
+ function useAskQueue() {
8983
8979
  const scope = useAssistantRuntime()?.askPromptsUrl ?? "";
8984
- let list = shownLists.get(scope);
8985
- if (!list) {
8986
- list = createShownList();
8987
- shownLists.set(scope, list);
8980
+ let queue = askQueues.get(scope);
8981
+ if (!queue) {
8982
+ queue = createAskQueue();
8983
+ askQueues.set(scope, queue);
8988
8984
  }
8989
- return list;
8985
+ return queue;
8990
8986
  }
8991
- 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();
8992
8995
  const surface = useId2();
8993
- const list = useShownList();
8994
- 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;
8995
8998
  useLayoutEffect5(() => {
8996
- if (key === void 0) return void 0;
8997
- list.set(surface, key === null ? null : key ? key.split(",") : NO_IDS);
8998
- return () => list.remove(surface);
8999
- }, [list, surface, key]);
9000
- }
9001
- function useShownAskPromptIds() {
9002
- const list = useShownList();
9003
- 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 };
9004
9027
  }
9005
9028
 
9006
9029
  // src/components/chat/assistant-ask-prompts.tsx
9007
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);
9008
9036
  function AssistantAskPrompts({
9037
+ variant = "row",
9009
9038
  topic,
9010
- count = ASK_PROMPTS_DEFAULT_COUNT,
9039
+ count,
9040
+ exclude,
9041
+ enabled,
9011
9042
  label,
9012
9043
  loading = false,
9044
+ title,
9045
+ description,
9013
9046
  onOpen,
9014
9047
  align,
9015
9048
  fadeColor,
9016
9049
  className
9017
9050
  }) {
9051
+ const card = variant === "card";
9018
9052
  const assistant = useAssistantRuntime();
9019
- const { prompts, isLoading, supported } = useAskPrompts({ topic, count });
9020
- const open = useAssistantOpen(topic, onOpen);
9021
- const shown = assistantAvailable(assistant) && supported;
9022
- useShownAskPrompts(shown ? isLoading ? null : prompts.map((prompt) => prompt.id) : void 0);
9023
- const scoped = useMemo9(() => assistant ? { ...assistant, open } : null, [assistant, open]);
9024
- if (!assistantAvailable(assistant) || !supported) return null;
9025
- 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(
9026
9082
  AskPrompts,
9027
9083
  {
9028
- prompts,
9029
- loading: isLoading || loading,
9030
- count,
9031
- source: assistant.source,
9084
+ ...shared,
9085
+ count: slots,
9032
9086
  label: label ?? assistant.name ?? void 0,
9033
- icon: assistant.icon,
9034
- onOpen: open,
9035
- onAsk: (prompt) => assistant.onAsk?.({ promptId: prompt.id, topic }),
9036
9087
  align,
9037
9088
  fadeColor,
9038
9089
  className
@@ -9044,7 +9095,7 @@ function AssistantAskPrompts({
9044
9095
  import { useMemo as useMemo12 } from "react";
9045
9096
 
9046
9097
  // src/components/chat/quick-action-wall.tsx
9047
- 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";
9048
9099
 
9049
9100
  // src/components/ui/marquee-wall.tsx
9050
9101
  import {
@@ -9053,7 +9104,7 @@ import {
9053
9104
  useLayoutEffect as useLayoutEffect6,
9054
9105
  useMemo as useMemo10,
9055
9106
  useRef as useRef7,
9056
- useState as useState13,
9107
+ useState as useState14,
9057
9108
  useSyncExternalStore as useSyncExternalStore3
9058
9109
  } from "react";
9059
9110
  import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
@@ -9104,7 +9155,7 @@ var subscribeNever = () => () => {
9104
9155
  };
9105
9156
  var alwaysDriver = () => true;
9106
9157
  function useMarqueeSync() {
9107
- const [controller] = useState13(createMarqueeSyncController);
9158
+ const [controller] = useState14(createMarqueeSyncController);
9108
9159
  return controller;
9109
9160
  }
9110
9161
  var MARQUEE_TRACK_OFFSETS = /* @__PURE__ */ new Map();
@@ -9192,7 +9243,7 @@ function MarqueeWall({
9192
9243
  const trackRef = useRef7(null);
9193
9244
  const copyRef = useRef7(null);
9194
9245
  const reducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)") ?? false;
9195
- const [overflows, setOverflows] = useState13(false);
9246
+ const [overflows, setOverflows] = useState14(false);
9196
9247
  const copySizeRef = useRef7(0);
9197
9248
  const wrapSizeRef = useRef7(0);
9198
9249
  const measure = useCallback7(() => {
@@ -9278,7 +9329,7 @@ function MarqueeWall({
9278
9329
  useEffect8(() => {
9279
9330
  applyTransformRef.current = applyTransform;
9280
9331
  });
9281
- const [member] = useState13(() => ({
9332
+ const [member] = useState14(() => ({
9282
9333
  apply: (pos) => {
9283
9334
  applyTransformRef.current(pos);
9284
9335
  }
@@ -9480,8 +9531,8 @@ function QuickActionWall({
9480
9531
  sync
9481
9532
  }) {
9482
9533
  const brickRef = useRef8(null);
9483
- const [brickWidth, setBrickWidth] = useState14(0);
9484
- const [chipWidth, setChipWidth] = useState14(0);
9534
+ const [brickWidth, setBrickWidth] = useState15(0);
9535
+ const [chipWidth, setChipWidth] = useState15(0);
9485
9536
  useEffect9(() => {
9486
9537
  const el = brickRef.current;
9487
9538
  if (!el) return void 0;
@@ -9848,10 +9899,10 @@ function MingoOnboardingListSkeleton({ rows = 6, className }) {
9848
9899
  }
9849
9900
 
9850
9901
  // src/components/chat/mingo-welcome.tsx
9851
- 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";
9852
9903
 
9853
9904
  // src/components/chat/mingo-chat-history.tsx
9854
- 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";
9855
9906
 
9856
9907
  // src/components/chat/chat-dialog-menu-items.tsx
9857
9908
  import { jsx as jsx37 } from "react/jsx-runtime";
@@ -9952,7 +10003,7 @@ function MingoChatHistoryRow({
9952
10003
  const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink || !!onRequestCompact;
9953
10004
  const owner = dialog.owner;
9954
10005
  const hasAvatar = !!(owner?.name || owner?.avatarUrl);
9955
- const [menuOpen, setMenuOpen] = useState15(false);
10006
+ const [menuOpen, setMenuOpen] = useState16(false);
9956
10007
  const menuItems = chatDialogMenuItems({
9957
10008
  onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
9958
10009
  onRename: onRequestRename && (() => onRequestRename(dialog)),
@@ -10210,7 +10261,7 @@ function MingoWelcome({
10210
10261
  const heading = title ?? "Hey, I'm Mingo";
10211
10262
  const resolvedPromo = hasExistingChats ? null : promo === void 0 ? onStartGuideChat ? DEFAULT_PROMO : null : promo;
10212
10263
  const hydrated = useIsHydrated();
10213
- const [dismissedThisSession, setPromoDismissed] = useState16(false);
10264
+ const [dismissedThisSession, setPromoDismissed] = useState17(false);
10214
10265
  const storedDismissed = useMemo14(() => {
10215
10266
  if (!hydrated || !resolvedPromo) return false;
10216
10267
  try {
@@ -10711,10 +10762,10 @@ function MingoChatHeader({
10711
10762
  }
10712
10763
 
10713
10764
  // src/components/chat/mingo-chat-rail.tsx
10714
- 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";
10715
10766
 
10716
10767
  // src/components/chat/chat-header-search-field.tsx
10717
- 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";
10718
10769
  import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
10719
10770
  function ChatHeaderSearchField({
10720
10771
  initialValue,
@@ -10723,10 +10774,10 @@ function ChatHeaderSearchField({
10723
10774
  autoFocus = true,
10724
10775
  className
10725
10776
  }) {
10726
- const [value, setValue] = useState17(initialValue ?? "");
10777
+ const [value, setValue] = useState18(initialValue ?? "");
10727
10778
  const debounced = useDebounce(value, 300);
10728
10779
  const lastEmitted = useRef11(initialValue ?? "");
10729
- const [exiting, setExiting] = useState17(false);
10780
+ const [exiting, setExiting] = useState18(false);
10730
10781
  const collapsedRef = useRef11(false);
10731
10782
  useEffect12(() => {
10732
10783
  if (exiting) return;
@@ -10847,7 +10898,7 @@ function MingoChatRail({
10847
10898
  onExpand,
10848
10899
  className
10849
10900
  }) {
10850
- const [searchOpen, setSearchOpen] = useState18(!!searchQuery?.trim());
10901
+ const [searchOpen, setSearchOpen] = useState19(!!searchQuery?.trim());
10851
10902
  const hasSearch = !!searchQuery?.trim();
10852
10903
  const items = [];
10853
10904
  if (onNewChat) items.push({ id: "new", label: "Start New Chat", icon: /* @__PURE__ */ jsx48(ChatPlusIcon, {}), onClick: onNewChat });
@@ -11018,7 +11069,7 @@ function MingoChatRail({
11018
11069
  );
11019
11070
  }
11020
11071
  function MingoChatRailRow({ dialog, active, status, onSelect, menuItems }) {
11021
- const [menuOpen, setMenuOpen] = useState18(false);
11072
+ const [menuOpen, setMenuOpen] = useState19(false);
11022
11073
  const hasMenu = menuItems.length > 0;
11023
11074
  const glyph = status ? STATUS_GLYPHS[status] : void 0;
11024
11075
  const title = dialog.title || "Untitled Chat";
@@ -11234,15 +11285,15 @@ function MingoHistoryRail({
11234
11285
  }
11235
11286
 
11236
11287
  // src/components/chat/mingo-chat-modals.tsx
11237
- import { useState as useState19 } from "react";
11288
+ import { useState as useState20 } from "react";
11238
11289
  import { Fragment as Fragment15, jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
11239
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";
11240
11291
  var cancelBtn = cn(footerBtn, "border border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-bg-hover");
11241
11292
  var saveBtn = cn(footerBtn, "bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover");
11242
11293
  var dangerBtn = cn(footerBtn, "bg-ods-error text-ods-text-on-accent hover:opacity-90");
11243
11294
  function RenameChatModal({ isOpen, initialName = "", onClose, onSave }) {
11244
- const [name, setName] = useState19(initialName);
11245
- const [seededWith, setSeededWith] = useState19({ isOpen, initialName });
11295
+ const [name, setName] = useState20(initialName);
11296
+ const [seededWith, setSeededWith] = useState20({ isOpen, initialName });
11246
11297
  if (seededWith.isOpen !== isOpen || seededWith.initialName !== initialName) {
11247
11298
  setSeededWith({ isOpen, initialName });
11248
11299
  if (isOpen) setName(initialName);
@@ -11675,7 +11726,7 @@ function useObjectUrl(file) {
11675
11726
  }
11676
11727
 
11677
11728
  // src/components/chat/chat-context-memory-bar.tsx
11678
- 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";
11679
11730
  import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
11680
11731
  var itemKey3 = (item) => `${item.type}:${item.id}`;
11681
11732
  function ChatContextMemoryBar({
@@ -11685,7 +11736,7 @@ function ChatContextMemoryBar({
11685
11736
  disabled = false,
11686
11737
  className
11687
11738
  }) {
11688
- const [open, setOpen] = useState20(false);
11739
+ const [open, setOpen] = useState21(false);
11689
11740
  const rootRef = useRef14(null);
11690
11741
  if (items.length === 0 && open) setOpen(false);
11691
11742
  useEffect15(() => {
@@ -12432,7 +12483,7 @@ var ChatTopNavigation = forwardRef22(
12432
12483
  ChatTopNavigation.displayName = "ChatTopNavigation";
12433
12484
 
12434
12485
  // src/components/chat/onboarding-carousel.tsx
12435
- import { useState as useState21 } from "react";
12486
+ import { useState as useState22 } from "react";
12436
12487
  import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
12437
12488
  function OnboardingCarousel({
12438
12489
  steps,
@@ -12443,7 +12494,7 @@ function OnboardingCarousel({
12443
12494
  label = "Introduction",
12444
12495
  className
12445
12496
  }) {
12446
- const [index, setIndex] = useState21(0);
12497
+ const [index, setIndex] = useState22(0);
12447
12498
  const lastIndex = steps.length - 1;
12448
12499
  const isFirst = index === 0;
12449
12500
  const isLast = index === lastIndex;
@@ -12875,7 +12926,7 @@ function useCaptions() {
12875
12926
  }
12876
12927
 
12877
12928
  // src/components/features/video-bites-strip.tsx
12878
- 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";
12879
12930
 
12880
12931
  // src/components/user-display.tsx
12881
12932
  import { jsx as jsx67, jsxs as jsxs54 } from "react/jsx-runtime";
@@ -12943,7 +12994,7 @@ function CardHitLayer({
12943
12994
  }
12944
12995
 
12945
12996
  // src/components/features/cards-strip.tsx
12946
- 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";
12947
12998
  import { Fragment as Fragment21, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
12948
12999
  var TRACK_GAP_PX = 16;
12949
13000
  var CHEVRON_SUPPRESS_MS = 4e3;
@@ -13060,9 +13111,9 @@ function CardsStrip(props) {
13060
13111
  const wrapperRef = useRef16(null);
13061
13112
  const scrollerRef = useRef16(null);
13062
13113
  const trackRef = useRef16(null);
13063
- const [reducedMotion, setReducedMotion] = useState22(false);
13064
- const [isTouch, setIsTouch] = useState22(false);
13065
- const [isMobile, setIsMobile] = useState22(false);
13114
+ const [reducedMotion, setReducedMotion] = useState23(false);
13115
+ const [isTouch, setIsTouch] = useState23(false);
13116
+ const [isMobile, setIsMobile] = useState23(false);
13066
13117
  useEffect17(() => {
13067
13118
  const subs = [];
13068
13119
  const watch = (query, set) => {
@@ -13081,11 +13132,11 @@ function CardsStrip(props) {
13081
13132
  });
13082
13133
  };
13083
13134
  }, []);
13084
- const [overflows, setOverflows] = useState22(false);
13085
- const [marqueeEligible, setMarqueeEligible] = useState22(false);
13135
+ const [overflows, setOverflows] = useState23(false);
13136
+ const [marqueeEligible, setMarqueeEligible] = useState23(false);
13086
13137
  const singleCopyWidthRef = useRef16(0);
13087
13138
  const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
13088
- const [insets, setInsets] = useState22(NO_BLEED);
13139
+ const [insets, setInsets] = useState23(NO_BLEED);
13089
13140
  const measure = useCallback11(() => {
13090
13141
  const wrapper = wrapperRef.current;
13091
13142
  const track = trackRef.current;
@@ -13122,7 +13173,7 @@ function CardsStrip(props) {
13122
13173
  return () => observe(null);
13123
13174
  }, [observe]);
13124
13175
  const autoplay = useAutoplay(nearViewport);
13125
- const [activeKey, setActiveKey] = useState22(null);
13176
+ const [activeKey, setActiveKey] = useState23(null);
13126
13177
  const activeKeyRef = useRef16(null);
13127
13178
  const activate = useCallback11((key) => {
13128
13179
  activeKeyRef.current = key;
@@ -13205,7 +13256,7 @@ function CardsStrip(props) {
13205
13256
  readBack: () => mirror(scrollerRef.current?.scrollLeft ?? 0),
13206
13257
  onAfterFrame: syncHoverIfScrolled
13207
13258
  });
13208
- const [mountedIdx, setMountedIdx] = useState22(() => /* @__PURE__ */ new Set());
13259
+ const [mountedIdx, setMountedIdx] = useState23(() => /* @__PURE__ */ new Set());
13209
13260
  const cardObserverRef = useRef16(null);
13210
13261
  const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
13211
13262
  const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
@@ -13242,7 +13293,7 @@ function CardsStrip(props) {
13242
13293
  cardObserverRef.current = null;
13243
13294
  };
13244
13295
  }, []);
13245
- const [cardRefFns] = useState22(() => /* @__PURE__ */ new Map());
13296
+ const [cardRefFns] = useState23(() => /* @__PURE__ */ new Map());
13246
13297
  const getCardRef = useCallback11(
13247
13298
  (idx) => {
13248
13299
  let fn = cardRefFns.get(idx);
@@ -13574,7 +13625,7 @@ function VideoBiteCard({
13574
13625
  const hasTarget = !!(targetHref || bite.onNavigate || onBiteNavigate);
13575
13626
  const key = cardKey ?? `${bite.url}__${index}`;
13576
13627
  const controlled = active !== void 0;
13577
- const [selfActive, setSelfActive] = useState23(false);
13628
+ const [selfActive, setSelfActive] = useState24(false);
13578
13629
  const isActive = controlled ? !!active : selfActive;
13579
13630
  const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
13580
13631
  const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
@@ -15820,11 +15871,11 @@ function refHydratedEntry(docType, label, renderRef) {
15820
15871
  };
15821
15872
  }
15822
15873
  var FINANCIAL_CARD_CONFIGS = {
15823
- financial_kpi: { label: "Financial KPI", icon: () => /* @__PURE__ */ jsx85(ChartBar01VerIcon, { size: 24 }) },
15824
- cap_table: { label: "Cap table entry", icon: () => /* @__PURE__ */ jsx85(ChartPieIcon, { size: 24 }) },
15825
- profit_loss: { label: "P&L period", icon: () => /* @__PURE__ */ jsx85(MoneyBillDollarIcon, { size: 24 }) },
15826
- balance_sheet: { label: "Balance sheet", icon: () => /* @__PURE__ */ jsx85(BankIcon, { size: 24 }) },
15827
- cash_flow: { label: "Cash flow", icon: () => /* @__PURE__ */ jsx85(CoinsExchangeCurrencyIcon, { size: 24 }) }
15874
+ financial_kpi: { label: "Financial KPI" },
15875
+ cap_table: { label: "Cap table entry" },
15876
+ profit_loss: { label: "P&L period" },
15877
+ balance_sheet: { label: "Balance sheet" },
15878
+ cash_flow: { label: "Cash flow" }
15828
15879
  };
15829
15880
  function registryEntries(configs, build) {
15830
15881
  const out = {};
@@ -15838,7 +15889,7 @@ function financialRegistryEntries() {
15838
15889
  GenericFinancialChatCard,
15839
15890
  {
15840
15891
  chatRef: displayRef,
15841
- icon: cfg.icon(),
15892
+ icon: sourceGlyph(docType),
15842
15893
  isNewTab: opts.isNewTab,
15843
15894
  discuss: opts.discuss
15844
15895
  }
@@ -15864,41 +15915,45 @@ var GITHUB_CARD_CONFIGS = {
15864
15915
  github_pr_review: { label: "GitHub review", kind: "pr_review" },
15865
15916
  github_pr_review_public: { label: "GitHub review (public)", kind: "pr_review" }
15866
15917
  };
15867
- var OpenFrameGlyph = resolveIcon("openframe");
15868
15918
  var REF_GLYPH_CARD_CONFIGS = {
15869
- openframe_tenant: { label: "OpenFrame tenant", icon: () => /* @__PURE__ */ jsx85(OpenFrameGlyph, { size: 24 }) },
15870
- prospect_call: { label: "Prospect call", icon: () => /* @__PURE__ */ jsx85(CallIcon, { size: 24 }), media: true },
15919
+ openframe_tenant: { label: "OpenFrame tenant" },
15920
+ prospect_call: { label: "Prospect call", media: true },
15871
15921
  // Code intelligence (product-hub internal): the review rules a repository is
15872
15922
  // held to, the repositories themselves, and one row per deployment
15873
15923
  // environment. Glyph cards like their siblings — none of the three has a
15874
15924
  // cover image, and a rule is read in the admin screen it links to.
15875
- code_rule: { label: "Code rule", icon: () => /* @__PURE__ */ jsx85(BracketCurlyCheckIcon, { size: 24 }) },
15876
- code_repo: { label: "Repository", icon: () => /* @__PURE__ */ jsx85(CodingBranchIcon, { size: 24 }) },
15877
- code_deployment: { label: "Deployment", icon: () => /* @__PURE__ */ jsx85(PackageIcon, { size: 24 }) },
15925
+ code_rule: { label: "Code rule" },
15926
+ code_repo: { label: "Repository" },
15927
+ code_deployment: { label: "Deployment" },
15878
15928
  // The graph's own objects: one source file's public surface, one public
15879
15929
  // symbol, a near-duplicate cluster, and a pull request's blast radius.
15880
15930
  // Glyph cards for the same reason as their three siblings — none carries a
15881
15931
  // cover image, and each links to the admin screen that renders it in full.
15882
- code_file: { label: "Code file", icon: () => /* @__PURE__ */ jsx85(FileCodeIcon, { size: 24 }) },
15883
- code_symbol: { label: "Code symbol", icon: () => /* @__PURE__ */ jsx85(CodeSquareIcon, { size: 24 }) },
15884
- code_duplicate: { label: "Duplicate code", icon: () => /* @__PURE__ */ jsx85(Copy01Icon, { size: 24 }) },
15885
- code_impact: { label: "Change impact", icon: () => /* @__PURE__ */ jsx85(CodingPullRequestIcon, { size: 24 }) },
15932
+ code_file: { label: "Code file" },
15933
+ code_symbol: { label: "Code symbol" },
15934
+ code_duplicate: { label: "Duplicate code" },
15935
+ code_impact: { label: "Change impact" },
15886
15936
  // A change set: pull requests across repositories declared as one change, with the ClickUp tasks and design
15887
15937
  // docs its pull requests are attached to. ONE card for it wherever a set is shown (chat, a design doc's page).
15888
- change_set: { label: "Change set", icon: () => /* @__PURE__ */ jsx85(CodingMergeIcon, { size: 24 }) },
15938
+ change_set: { label: "Change set" },
15889
15939
  // A page of the public website (pricing, product, legal, and every page the navigation lists), read live
15890
15940
  // from the data the page shows. A glyph card: a page has no cover of its own, and the card opens the page.
15891
15941
  site_page: { label: "Website page", icon: (ref) => /* @__PURE__ */ jsx85(SitePageGlyph, { iconName: refText(ref, "icon_name") }) },
15892
15942
  // What OpenFrame charges, read live from its billing: the plan in force, or one AI model's token exchange
15893
15943
  // rate. A glyph card; it opens the pricing page.
15894
- openframe_price: { label: "OpenFrame price", icon: () => /* @__PURE__ */ jsx85(OpenFrameGlyph, { size: 24 }) },
15944
+ openframe_price: { label: "OpenFrame price" },
15895
15945
  // A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
15896
15946
  vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ jsx85(VendorGlyph, { title: ref?.title ?? "", logoUrl: refText(ref, "logo_url") }) }
15897
15947
  };
15948
+ function sourceGlyph(docType) {
15949
+ const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
15950
+ return /* @__PURE__ */ jsx85(Icon, { className: "size-6" });
15951
+ }
15898
15952
  function refGlyphRegistryEntries() {
15899
- return registryEntries(
15900
- REF_GLYPH_CARD_CONFIGS,
15901
- (cfg, docType) => refHydratedEntry(
15953
+ return registryEntries(REF_GLYPH_CARD_CONFIGS, (config, docType) => {
15954
+ const glyph = config.icon ?? (() => sourceGlyph(docType));
15955
+ const cfg = config;
15956
+ return refHydratedEntry(
15902
15957
  docType,
15903
15958
  cfg.label,
15904
15959
  (displayRef, opts) => cfg.media ? /* @__PURE__ */ jsx85(
@@ -15910,24 +15965,16 @@ function refGlyphRegistryEntries() {
15910
15965
  displayRef.metadata?.videoPoster,
15911
15966
  opts.extras?.buildOgPlaceholderUrl?.(displayRef.title ?? "") ?? null
15912
15967
  ),
15913
- fallbackIcon: cfg.icon(displayRef),
15968
+ fallbackIcon: glyph(displayRef),
15914
15969
  status: { label: cfg.label, variant: "grey" },
15915
15970
  chatRef: displayRef,
15916
15971
  isNewTab: opts.isNewTab,
15917
15972
  discuss: opts.discuss,
15918
15973
  menuAriaLabel: `${cfg.label} actions`
15919
15974
  }
15920
- ) : /* @__PURE__ */ jsx85(
15921
- GlyphChatCard,
15922
- {
15923
- chatRef: displayRef,
15924
- icon: cfg.icon(displayRef),
15925
- isNewTab: opts.isNewTab,
15926
- discuss: opts.discuss
15927
- }
15928
- )
15929
- )
15930
- );
15975
+ ) : /* @__PURE__ */ jsx85(GlyphChatCard, { chatRef: displayRef, icon: glyph(displayRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
15976
+ );
15977
+ });
15931
15978
  }
15932
15979
  function fetchedEmployeeEntryDisplayRef(item, chatRef) {
15933
15980
  const it = item;
@@ -15938,9 +15985,9 @@ function fetchedEmployeeEntryDisplayRef(item, chatRef) {
15938
15985
  return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
15939
15986
  }
15940
15987
  var EMPLOYEE_ENTRY_CARD_CONFIGS = {
15941
- what_i_shipped: { label: "What I Shipped", icon: () => /* @__PURE__ */ jsx85(Rocket02Icon, { size: 24 }) },
15942
- how_i_work: { label: "How I Work", icon: () => /* @__PURE__ */ jsx85(ClipboardListIcon, { size: 24 }) },
15943
- ai_prompt: { label: "Squawkbox", icon: () => /* @__PURE__ */ jsx85(ChatQuoteIcon, { size: 24 }) }
15988
+ what_i_shipped: { label: "What I Shipped" },
15989
+ how_i_work: { label: "How I Work" },
15990
+ ai_prompt: { label: "Squawkbox" }
15944
15991
  };
15945
15992
  function employeeEntryRegistryEntries() {
15946
15993
  return registryEntries(EMPLOYEE_ENTRY_CARD_CONFIGS, (cfg, docType) => ({
@@ -15952,7 +15999,7 @@ function employeeEntryRegistryEntries() {
15952
15999
  GlyphChatCard,
15953
16000
  {
15954
16001
  chatRef: fetchedEmployeeEntryDisplayRef(item, chatRef),
15955
- icon: cfg.icon(),
16002
+ icon: sourceGlyph(docType),
15956
16003
  isNewTab: opts.isNewTab,
15957
16004
  discuss: opts.discuss
15958
16005
  }
@@ -16715,15 +16762,15 @@ function useChunkCatchup({
16715
16762
  }
16716
16763
 
16717
16764
  // src/components/chat/hooks/use-scripted-stream.ts
16718
- import { useEffect as useEffect19, useState as useState24 } from "react";
16765
+ import { useEffect as useEffect19, useState as useState25 } from "react";
16719
16766
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
16720
16767
  function prefersReducedMotion() {
16721
16768
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
16722
16769
  }
16723
16770
  function useScriptedStream(frames, resetKey, enabled = true) {
16724
- const [index, setIndex] = useState24(0);
16725
- const [reducedMotion, setReducedMotion] = useState24(false);
16726
- const [prevKey, setPrevKey] = useState24(resetKey);
16771
+ const [index, setIndex] = useState25(0);
16772
+ const [reducedMotion, setReducedMotion] = useState25(false);
16773
+ const [prevKey, setPrevKey] = useState25(resetKey);
16727
16774
  if (resetKey !== prevKey) {
16728
16775
  setPrevKey(resetKey);
16729
16776
  setIndex(0);
@@ -16750,7 +16797,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
16750
16797
  }
16751
16798
 
16752
16799
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
16753
- 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";
16754
16801
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
16755
16802
  var RESYNC_AFTER_HIDDEN_MS = 1e4;
16756
16803
  var RESYNC_COALESCE_MS = 1e3;
@@ -16772,11 +16819,11 @@ function useJetStreamDialogSubscription({
16772
16819
  inactiveThresholdMs,
16773
16820
  resyncSignal = 0
16774
16821
  }) {
16775
- const [isConnected, setIsConnected] = useState25(false);
16776
- const [subscriptionLive, setIsSubscribed] = useState25(false);
16777
- const [reconnectionCount, setReconnectionCount] = useState25(0);
16778
- const [recoveryCount, setRecoveryCount] = useState25(0);
16779
- 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);
16780
16827
  const currentStreamSeq = seqEntry && seqEntry.dialogId === dialogId ? seqEntry.seq : null;
16781
16828
  const isSubscribed = subscriptionLive && enabled && Boolean(dialogId) && isConnected;
16782
16829
  const lastRecoveryReportRef = useRef19(0);
@@ -17052,7 +17099,7 @@ function useJetStreamDialogSubscription({
17052
17099
  }
17053
17100
 
17054
17101
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
17055
- 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";
17056
17103
  function useNatsDialogSubscription({
17057
17104
  enabled,
17058
17105
  dialogId,
@@ -17066,9 +17113,9 @@ function useNatsDialogSubscription({
17066
17113
  clientConfig = {},
17067
17114
  reconnectionBackoff
17068
17115
  }) {
17069
- const [isConnected, setIsConnected] = useState26(false);
17070
- const [isSubscribed, setIsSubscribed] = useState26(false);
17071
- const [reconnectionCount, setReconnectionCount] = useState26(0);
17116
+ const [isConnected, setIsConnected] = useState27(false);
17117
+ const [isSubscribed, setIsSubscribed] = useState27(false);
17118
+ const [reconnectionCount, setReconnectionCount] = useState27(0);
17072
17119
  const clientRef = useRef20(null);
17073
17120
  const subscriptionRefs = useRef20(/* @__PURE__ */ new Map());
17074
17121
  const onEventRef = useRef20(onEvent);
@@ -17326,7 +17373,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
17326
17373
 
17327
17374
  // src/components/chat/hooks/use-slash-commands.ts
17328
17375
  import { useQuery as useQuery2 } from "@tanstack/react-query";
17329
- import { useEffect as useEffect22, useState as useState27 } from "react";
17376
+ import { useEffect as useEffect22, useState as useState28 } from "react";
17330
17377
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
17331
17378
  try {
17332
17379
  const url = new URL(commandsUrl, window.location.origin);
@@ -17343,7 +17390,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17343
17390
  }
17344
17391
  var NO_COMMANDS = [];
17345
17392
  function useSlashCommands(prefix, commandsUrl) {
17346
- const [answered, setAnswered] = useState27(null);
17393
+ const [answered, setAnswered] = useState28(null);
17347
17394
  const commands = prefix != null && answered?.prefix === prefix ? answered.commands : NO_COMMANDS;
17348
17395
  const loading = prefix != null && answered?.prefix !== prefix;
17349
17396
  useEffect22(() => {
@@ -17453,7 +17500,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
17453
17500
 
17454
17501
  // src/components/chat/hooks/use-chat-attachments.ts
17455
17502
  import { fileTypeFromBlob } from "file-type";
17456
- 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";
17457
17504
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
17458
17505
  var CHAT_ATTACHMENTS_FOLDER = "chat";
17459
17506
  var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
@@ -17520,7 +17567,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
17520
17567
  function useChatAttachments() {
17521
17568
  const runtime = useRequiredChatRuntime();
17522
17569
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
17523
- const [attachments, setAttachments] = useState28([]);
17570
+ const [attachments, setAttachments] = useState29([]);
17524
17571
  const controllersRef = useRef21(/* @__PURE__ */ new Map());
17525
17572
  const updateOne = useCallback14((id, patch) => {
17526
17573
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
@@ -17686,14 +17733,14 @@ function useChatAttachments() {
17686
17733
  }
17687
17734
 
17688
17735
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
17689
- 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";
17690
17737
  import { jsx as jsx86 } from "react/jsx-runtime";
17691
17738
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
17692
17739
  function useChatAttachmentImageGallery() {
17693
17740
  const runtime = useRequiredChatRuntime();
17694
17741
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
17695
17742
  const panelRef = useRef22(null);
17696
- const [state, setState] = useState29(CLOSED);
17743
+ const [state, setState] = useState30(CLOSED);
17697
17744
  const handleClose = useCallback15(() => setState(CLOSED), []);
17698
17745
  useEffect24(() => {
17699
17746
  const root = panelRef.current;
@@ -17741,7 +17788,7 @@ function absolutize(prefix) {
17741
17788
  }
17742
17789
 
17743
17790
  // src/components/chat/hooks/use-chat-identity.ts
17744
- 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";
17745
17792
  var ANON_DEFAULTS = {
17746
17793
  authTier: "anon",
17747
17794
  source: null,
@@ -17753,7 +17800,7 @@ function useResolveChatIdentity(enabled) {
17753
17800
  const url = runtime.endpoints.identityUrl;
17754
17801
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
17755
17802
  const requestKey = enabled ? `${url}\0${proxyEmail ?? ""}` : null;
17756
- const [resolved, setResolved] = useState30(null);
17803
+ const [resolved, setResolved] = useState31(null);
17757
17804
  const data = resolved?.key === requestKey ? resolved.data : ANON_DEFAULTS;
17758
17805
  const isLoading = requestKey !== null && resolved?.key !== requestKey;
17759
17806
  useEffect25(() => {
@@ -17818,13 +17865,13 @@ function useCloseOnNavigation(close, pathname) {
17818
17865
  }
17819
17866
 
17820
17867
  // src/components/chat/hooks/use-chat.ts
17821
- 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";
17822
17869
 
17823
17870
  // src/components/chat/hooks/use-sse.ts
17824
- 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";
17825
17872
  function useSSE({ streamFn } = {}) {
17826
- const [isStreaming, setIsStreaming] = useState31(false);
17827
- const [error, setError] = useState31(null);
17873
+ const [isStreaming, setIsStreaming] = useState32(false);
17874
+ const [error, setError] = useState32(null);
17828
17875
  const abortControllerRef = useRef24(null);
17829
17876
  const streamMessage = useCallback16(
17830
17877
  async function* (message, extra) {
@@ -17894,8 +17941,8 @@ function useChat({
17894
17941
  initialMessages,
17895
17942
  onMessagesChange
17896
17943
  } = {}) {
17897
- const [messages, setMessages] = useState32(() => initialMessages ?? []);
17898
- const [isTyping, setIsTyping] = useState32(false);
17944
+ const [messages, setMessages] = useState33(() => initialMessages ?? []);
17945
+ const [isTyping, setIsTyping] = useState33(false);
17899
17946
  const currentAssistantSegmentsRef = useRef25([]);
17900
17947
  const onMessagesChangeRef = useRef25(onMessagesChange);
17901
17948
  useEffect27(() => {
@@ -18140,7 +18187,7 @@ function useChat({
18140
18187
  }
18141
18188
 
18142
18189
  // src/components/chat/hooks/use-sse-chat-adapter.ts
18143
- 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";
18144
18191
 
18145
18192
  // src/chat-protocol/confirm-tool.ts
18146
18193
  function buildConfirmToolBody(request) {
@@ -20724,7 +20771,7 @@ function createChatDialogStore(options = {}) {
20724
20771
  }
20725
20772
 
20726
20773
  // src/components/chat/stream/use-chat-stream-reducer.ts
20727
- 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";
20728
20775
 
20729
20776
  // src/components/chat/stream/delta-batcher.ts
20730
20777
  var DELTA_FLUSH_FALLBACK_MS = 50;
@@ -20820,7 +20867,7 @@ function useChatStreamReducer({
20820
20867
  const state = useSyncExternalStore4(subscribe2, getSnapshot2, getServerSnapshot2);
20821
20868
  useEffect28(() => store.retain(dialogId, side), [store, dialogId, side]);
20822
20869
  const key = useMemo22(() => ({ store, dialogId, side }), [store, dialogId, side]);
20823
- const [batcher] = useState33(
20870
+ const [batcher] = useState34(
20824
20871
  () => createDeltaBatcher({
20825
20872
  applyOne: (event, k) => {
20826
20873
  if (k) k.store.apply(k.dialogId, k.side, event);
@@ -20943,7 +20990,7 @@ function buildDiscussPrompt(reference, options = {}) {
20943
20990
  }
20944
20991
 
20945
20992
  // src/components/chat/hooks/use-chat-history-hydration.ts
20946
- 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";
20947
20994
  function useChatHistoryHydration({
20948
20995
  active,
20949
20996
  source,
@@ -20954,7 +21001,7 @@ function useChatHistoryHydration({
20954
21001
  bumpMetaTick,
20955
21002
  onOrphanedConversation
20956
21003
  }) {
20957
- const [isHydratingHistory, setIsHydratingHistory] = useState34(false);
21004
+ const [isHydratingHistory, setIsHydratingHistory] = useState35(false);
20958
21005
  const hydratedKeyRef = useRef26(null);
20959
21006
  const runIdRef = useRef26(0);
20960
21007
  useEffect29(() => {
@@ -21029,7 +21076,7 @@ function useChatHistoryHydration({
21029
21076
  }
21030
21077
 
21031
21078
  // src/components/chat/hooks/use-managed-dialog-list.ts
21032
- 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";
21033
21080
  function useManagedDialogList({
21034
21081
  autoLoad,
21035
21082
  fetchDialogs,
@@ -21041,19 +21088,19 @@ function useManagedDialogList({
21041
21088
  onDialogRemoved,
21042
21089
  logTag
21043
21090
  }) {
21044
- const [dialogs, setDialogs] = useState35([]);
21045
- const [dialogsNextCursor, setDialogsNextCursor] = useState35(null);
21046
- const [isDialogsLoading, setIsDialogsLoading] = useState35(false);
21047
- 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(
21048
21095
  autoLoad && fetchDialogs ? void 0 : null
21049
21096
  );
21050
- const [autoLoadWas, setAutoLoadWas] = useState35(autoLoad);
21097
+ const [autoLoadWas, setAutoLoadWas] = useState36(autoLoad);
21051
21098
  if (autoLoad !== autoLoadWas) {
21052
21099
  setAutoLoadWas(autoLoad);
21053
21100
  if (autoLoad && fetchDialogs) setSettledSearch(void 0);
21054
21101
  }
21055
21102
  const pendingRef = useRef27(false);
21056
- const [dialogsError, setDialogsError] = useState35(false);
21103
+ const [dialogsError, setDialogsError] = useState36(false);
21057
21104
  const dialogsRef = useRef27(dialogs);
21058
21105
  useEffect30(() => {
21059
21106
  dialogsRef.current = dialogs;
@@ -21287,7 +21334,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21287
21334
  pruneStaleChatConversationStorage(source);
21288
21335
  conversationIdRef.current = conversationStorage.load()?.conversationId ?? null;
21289
21336
  }
21290
- const [conversationId, setConversationId] = useState36(() => conversationIdRef.current);
21337
+ const [conversationId, setConversationId] = useState37(() => conversationIdRef.current);
21291
21338
  const commitConversationId = useCallback20(
21292
21339
  (id) => {
21293
21340
  conversationIdRef.current = id;
@@ -21390,7 +21437,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21390
21437
  () => conversationsUrl ? createChatConversationsApi(conversationsUrl) : null,
21391
21438
  [conversationsUrl]
21392
21439
  );
21393
- const [dialogSearch, setDialogSearch] = useState36("");
21440
+ const [dialogSearch, setDialogSearch] = useState37("");
21394
21441
  const fetchActiveDialogs = useMemo24(
21395
21442
  () => conversationsApi ? (params) => conversationsApi.fetchDialogs({ ...params, status: "active" }) : void 0,
21396
21443
  [conversationsApi]
@@ -21708,7 +21755,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21708
21755
  }
21709
21756
 
21710
21757
  // src/components/chat/hooks/use-nats-chat-adapter.ts
21711
- 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";
21712
21759
 
21713
21760
  // src/chat-protocol/nats-decoder.ts
21714
21761
  function str(value) {
@@ -22722,7 +22769,7 @@ function useNatsChatAdapter(config, options = {}) {
22722
22769
  modelLabel = null
22723
22770
  } = config;
22724
22771
  const isManagedMode = fetchDialogs !== void 0;
22725
- const [internalDialogId, setInternalDialogId] = useState37(null);
22772
+ const [internalDialogId, setInternalDialogId] = useState38(null);
22726
22773
  const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
22727
22774
  const currentDialogIdRef = useRef29(dialogId);
22728
22775
  useEffect31(() => {
@@ -22740,8 +22787,8 @@ function useNatsChatAdapter(config, options = {}) {
22740
22787
  if (!requestId) return void 0;
22741
22788
  return handleRejectRef.current(requestId);
22742
22789
  }, []);
22743
- const [dialogStore] = useState37(() => createChatDialogStore());
22744
- const [globalApprovalStatuses] = useState37(() => ({}));
22790
+ const [dialogStore] = useState38(() => createChatDialogStore());
22791
+ const [globalApprovalStatuses] = useState38(() => ({}));
22745
22792
  const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
22746
22793
  const { state, applyEvent, mutate } = useChatStreamReducer({
22747
22794
  store: dialogStore,
@@ -22796,7 +22843,7 @@ function useNatsChatAdapter(config, options = {}) {
22796
22843
  },
22797
22844
  [applyEvent]
22798
22845
  );
22799
- const [isCreatingDialog, setIsCreatingDialog] = useState37(false);
22846
+ const [isCreatingDialog, setIsCreatingDialog] = useState38(false);
22800
22847
  const {
22801
22848
  dialogs,
22802
22849
  isDialogsLoading,
@@ -22823,9 +22870,9 @@ function useNatsChatAdapter(config, options = {}) {
22823
22870
  }
22824
22871
  }
22825
22872
  });
22826
- const [messagesNextCursor, setMessagesNextCursor] = useState37(null);
22827
- const [isMessagesLoading, setIsMessagesLoading] = useState37(false);
22828
- const [connectedForDialog, setConnectedForDialog] = useState37(null);
22873
+ const [messagesNextCursor, setMessagesNextCursor] = useState38(null);
22874
+ const [isMessagesLoading, setIsMessagesLoading] = useState38(false);
22875
+ const [connectedForDialog, setConnectedForDialog] = useState38(null);
22829
22876
  const hasConnectedOnceRef = useRef29(false);
22830
22877
  const {
22831
22878
  processChunk: catchupProcessChunk,
@@ -23136,7 +23183,7 @@ function useNatsChatAdapter(config, options = {}) {
23136
23183
  }
23137
23184
 
23138
23185
  // src/components/chat/hooks/use-stable-shallow.ts
23139
- import { useState as useState38 } from "react";
23186
+ import { useState as useState39 } from "react";
23140
23187
  function shallowEqual(a, b) {
23141
23188
  const aKeys = Object.keys(a);
23142
23189
  if (aKeys.length !== Object.keys(b).length) return false;
@@ -23145,14 +23192,14 @@ function shallowEqual(a, b) {
23145
23192
  return aKeys.every((key) => key in b && Object.is(aRec[key], bRec[key]));
23146
23193
  }
23147
23194
  function useStableShallow(value) {
23148
- const [cached, setCached] = useState38(value);
23195
+ const [cached, setCached] = useState39(value);
23149
23196
  const same = cached === value || cached !== void 0 && value !== void 0 && shallowEqual(cached, value);
23150
23197
  if (!same) setCached(value);
23151
23198
  return same ? cached : value;
23152
23199
  }
23153
23200
 
23154
23201
  // src/components/chat/hooks/use-unified-chat.ts
23155
- 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";
23156
23203
  var EMPTY_SSE_OPTIONS = {};
23157
23204
  function createDisabledNatsConfig() {
23158
23205
  return {
@@ -23167,7 +23214,7 @@ function createDisabledNatsConfig() {
23167
23214
  }
23168
23215
  function useUnifiedChat(options) {
23169
23216
  const { modes, activeMode, mingoStateOverride, injectedDialogCapabilities } = options;
23170
- const [disabledNatsConfig] = useState39(createDisabledNatsConfig);
23217
+ const [disabledNatsConfig] = useState40(createDisabledNatsConfig);
23171
23218
  const sseActive = activeMode === "guide" && modes.guide !== void 0;
23172
23219
  const natsActive = activeMode === "mingo" && modes.mingo !== void 0;
23173
23220
  const sseState = useSseChatAdapter(modes.guide ?? EMPTY_SSE_OPTIONS, {
@@ -23677,7 +23724,7 @@ import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
23677
23724
  import { usePreventScroll } from "@react-aria/overlays";
23678
23725
  import { isIOS } from "@react-aria/utils";
23679
23726
  import { MessageSquare as MessageSquare2 } from "lucide-react";
23680
- 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";
23681
23728
 
23682
23729
  // src/components/ui/drawer.tsx
23683
23730
  import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -23687,12 +23734,12 @@ import {
23687
23734
  forwardRef as forwardRef24,
23688
23735
  useEffect as useEffect34,
23689
23736
  useRef as useRef32,
23690
- useState as useState41,
23737
+ useState as useState42,
23691
23738
  useSyncExternalStore as useSyncExternalStore5
23692
23739
  } from "react";
23693
23740
 
23694
23741
  // src/hooks/ui/use-resizable-panel-size.ts
23695
- 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";
23696
23743
  var CHOSEN_SIZE_KEY_SUFFIX = ":chosen";
23697
23744
  function isStoredPanelSize(value) {
23698
23745
  if (typeof value !== "object" || value === null) return false;
@@ -23716,7 +23763,7 @@ function useResizablePanelSize({
23716
23763
  }) : null,
23717
23764
  [enabled, storageKey]
23718
23765
  );
23719
- const [held, setChosen] = useState40(() => ({ storage, size: storage?.load()?.size ?? null }));
23766
+ const [held, setChosen] = useState41(() => ({ storage, size: storage?.load()?.size ?? null }));
23720
23767
  const chosen = held.storage === storage ? held : { storage, size: storage?.load()?.size ?? null };
23721
23768
  if (chosen !== held) setChosen(chosen);
23722
23769
  const chosenSize = chosen.size;
@@ -24000,7 +24047,7 @@ var DrawerContent = forwardRef24(
24000
24047
  const resolvedSide = side ?? "right";
24001
24048
  const isHorizontal = HORIZONTAL_SIDES2.has(resolvedSide);
24002
24049
  const headerHeight = useHeaderHeight();
24003
- const [isMobile, setIsMobile] = useState41(false);
24050
+ const [isMobile, setIsMobile] = useState42(false);
24004
24051
  useEffect34(() => {
24005
24052
  if (typeof window === "undefined") return void 0;
24006
24053
  const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
@@ -24102,7 +24149,7 @@ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx88("div", { c
24102
24149
  DrawerFooter.displayName = "DrawerFooter";
24103
24150
 
24104
24151
  // src/components/ui/hover-dropdown.tsx
24105
- 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";
24106
24153
  import { Fragment as Fragment34, jsx as jsx89, jsxs as jsxs70 } from "react/jsx-runtime";
24107
24154
  function DefaultAnchor({ href, className, children }) {
24108
24155
  return /* @__PURE__ */ jsx89("a", { href, className, children });
@@ -24115,7 +24162,7 @@ function HoverDropdown({
24115
24162
  className,
24116
24163
  renderAnchor
24117
24164
  }) {
24118
- const [open, setOpen] = useState42(false);
24165
+ const [open, setOpen] = useState43(false);
24119
24166
  const timeoutRef = useRef33(void 0);
24120
24167
  const containerRef = useRef33(null);
24121
24168
  const panelRef = useRef33(null);
@@ -24219,7 +24266,7 @@ function HoverDropdown({
24219
24266
  }
24220
24267
 
24221
24268
  // src/components/chat/hooks/use-chat-dialog-manager.ts
24222
- 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";
24223
24270
  function useChatDialogManager({
24224
24271
  dialogs,
24225
24272
  activeDialogId,
@@ -24231,8 +24278,8 @@ function useChatDialogManager({
24231
24278
  fetchArchivedDialogs,
24232
24279
  unarchiveDialog
24233
24280
  }) {
24234
- const [renameTarget, setRenameTarget] = useState43(null);
24235
- const [archiveTarget, setArchiveTarget] = useState43(null);
24281
+ const [renameTarget, setRenameTarget] = useState44(null);
24282
+ const [archiveTarget, setArchiveTarget] = useState44(null);
24236
24283
  const handleConfirmRename = useCallback25(
24237
24284
  (name) => {
24238
24285
  if (renameTarget) void renameDialog(renameTarget.id, name);
@@ -24240,7 +24287,7 @@ function useChatDialogManager({
24240
24287
  },
24241
24288
  [renameTarget, renameDialog]
24242
24289
  );
24243
- const [openingDialogId, setOpeningDialogId] = useState43(null);
24290
+ const [openingDialogId, setOpeningDialogId] = useState44(null);
24244
24291
  const handleConfirmArchive = useCallback25(async () => {
24245
24292
  if (archiveTarget) {
24246
24293
  try {
@@ -24256,11 +24303,11 @@ function useChatDialogManager({
24256
24303
  }
24257
24304
  setArchiveTarget(null);
24258
24305
  }, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
24259
- const [archiveOpen, setArchiveOpen] = useState43(false);
24260
- const [archivedDialogs, setArchivedDialogs] = useState43([]);
24261
- const [archivedCursor, setArchivedCursor] = useState43(null);
24262
- const [archivedLoading, setArchivedLoading] = useState43(false);
24263
- 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);
24264
24311
  const archivedRequestIdRef = useRef34(0);
24265
24312
  const loadArchivedPage = useCallback25(
24266
24313
  async (cursor) => {
@@ -24300,7 +24347,7 @@ function useChatDialogManager({
24300
24347
  void loadArchivedPage();
24301
24348
  }, [loadArchivedPage]);
24302
24349
  const closeArchive = useCallback25(() => setArchiveOpen(false), []);
24303
- const [viewingArchivedId, setViewingArchivedId] = useState43(null);
24350
+ const [viewingArchivedId, setViewingArchivedId] = useState44(null);
24304
24351
  const handleSelectDialog = useCallback25(
24305
24352
  (id) => {
24306
24353
  setViewingArchivedId(null);
@@ -24319,7 +24366,7 @@ function useChatDialogManager({
24319
24366
  },
24320
24367
  [selectDialog]
24321
24368
  );
24322
- const [restoreTarget, setRestoreTarget] = useState43(null);
24369
+ const [restoreTarget, setRestoreTarget] = useState44(null);
24323
24370
  const handleConfirmRestore = useCallback25(async () => {
24324
24371
  if (restoreTarget) {
24325
24372
  try {
@@ -24483,8 +24530,8 @@ var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
24483
24530
  var NO_CONTEXT_ITEMS = [];
24484
24531
  var RAIL_ANIM_MS = 320;
24485
24532
  function useRailPresence(open) {
24486
- const [mounted, setMounted] = useState44(open);
24487
- const [active, setActive] = useState44(false);
24533
+ const [mounted, setMounted] = useState45(open);
24534
+ const [active, setActive] = useState45(false);
24488
24535
  if (open && !mounted) setMounted(true);
24489
24536
  if (!open && active) setActive(false);
24490
24537
  useEffect35(() => {
@@ -24711,7 +24758,7 @@ function SourceChips({
24711
24758
  onClose,
24712
24759
  onDiscuss
24713
24760
  }) {
24714
- const [expanded, setExpanded] = useState44(false);
24761
+ const [expanded, setExpanded] = useState45(false);
24715
24762
  if (cited.length === 0) {
24716
24763
  const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
24717
24764
  if (fallback.length === 0) return null;
@@ -24842,7 +24889,7 @@ function EmbeddableChatInner({
24842
24889
  defaultProp: defaultOpen ?? false,
24843
24890
  onChange: onOpenChange
24844
24891
  });
24845
- const [autoFocusInput] = useState44(() => {
24892
+ const [autoFocusInput] = useState45(() => {
24846
24893
  if (typeof window === "undefined") return false;
24847
24894
  return !window.matchMedia("(pointer: coarse)").matches;
24848
24895
  });
@@ -24875,7 +24922,7 @@ function EmbeddableChatInner({
24875
24922
  };
24876
24923
  }, [isOpen, shellLess]);
24877
24924
  const chatInputRef = useRef35(null);
24878
- const [quickActionPreview, setQuickActionPreview] = useState44(null);
24925
+ const [quickActionPreview, setQuickActionPreview] = useState45(null);
24879
24926
  const slashCommandsProp = useMemo29(
24880
24927
  () => ({
24881
24928
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
@@ -24898,7 +24945,7 @@ function EmbeddableChatInner({
24898
24945
  }, [modes, tableIdForDocumentType]);
24899
24946
  const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
24900
24947
  const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
24901
- const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState44(initialActiveMode);
24948
+ const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState45(initialActiveMode);
24902
24949
  const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
24903
24950
  const handleActiveModeChange = useCallback26(
24904
24951
  (next) => {
@@ -24974,7 +25021,7 @@ function EmbeddableChatInner({
24974
25021
  injectedDialogCapabilities: mingoDialogCapabilities
24975
25022
  });
24976
25023
  const historyListMode = dialogCapabilities !== void 0;
24977
- const [namingNewChat, setNamingNewChat] = useState44(false);
25024
+ const [namingNewChat, setNamingNewChat] = useState45(false);
24978
25025
  const sendMessage = useCallback26(
24979
25026
  async (text2, options) => {
24980
25027
  if (activeDialogId == null) setNamingNewChat(true);
@@ -25018,17 +25065,17 @@ function EmbeddableChatInner({
25018
25065
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
25019
25066
  const contextMaxItems = contextPicker?.maxItems ?? 10;
25020
25067
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
25021
- const [contextItems, setContextItems] = useState44(NO_CONTEXT_ITEMS);
25022
- const [contextPickerOpen, setContextPickerOpen] = useState44(false);
25023
- 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);
25024
25071
  const mentionActiveRef = useRef35(false);
25025
25072
  useEffect35(() => {
25026
25073
  mentionActiveRef.current = mentionQuery !== null;
25027
25074
  }, [mentionQuery]);
25028
25075
  const mentionKeysRef = useRef35(/* @__PURE__ */ new Set());
25029
25076
  const scopeDialogId = activeDialogId ?? null;
25030
- const [composerScope, setComposerScope] = useState44({ dialogId: scopeDialogId, mode: activeMode });
25031
- const [composerKey, setComposerKey] = useState44(0);
25077
+ const [composerScope, setComposerScope] = useState45({ dialogId: scopeDialogId, mode: activeMode });
25078
+ const [composerKey, setComposerKey] = useState45(0);
25032
25079
  if (composerScope.dialogId !== scopeDialogId || composerScope.mode !== activeMode) {
25033
25080
  const named = namingNewChat && composerScope.dialogId == null && scopeDialogId != null && composerScope.mode === activeMode;
25034
25081
  setComposerScope({ dialogId: scopeDialogId, mode: activeMode });
@@ -25143,7 +25190,7 @@ function EmbeddableChatInner({
25143
25190
  () => effectiveAssistantIcon ? /* @__PURE__ */ jsx90(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx90(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
25144
25191
  [effectiveAssistantIcon]
25145
25192
  );
25146
- const [timestampCache] = useState44(() => /* @__PURE__ */ new Map());
25193
+ const [timestampCache] = useState45(() => /* @__PURE__ */ new Map());
25147
25194
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
25148
25195
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
25149
25196
  const messages = useMemo29(() => {
@@ -25341,10 +25388,10 @@ function EmbeddableChatInner({
25341
25388
  },
25342
25389
  [chatLoading, messages.length, resolvedBaseRoute, chipBasePlatform, handleNavigationClose, askAbout]
25343
25390
  );
25344
- const [portalHost, setPortalHost] = useState44(null);
25345
- const [panelBoundary, setPanelBoundary] = useState44(null);
25391
+ const [portalHost, setPortalHost] = useState45(null);
25392
+ const [panelBoundary, setPanelBoundary] = useState45(null);
25346
25393
  const splitMinWidth = (isV2 ? MINGO_V2_RAIL_WIDTH : HISTORY_RAIL_WIDTH) + CHAT_BLOCK_MIN_WIDTH;
25347
- const [canSplit, setCanSplit] = useState44(false);
25394
+ const [canSplit, setCanSplit] = useState45(false);
25348
25395
  useEffect35(() => {
25349
25396
  if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
25350
25397
  const ro = new ResizeObserver((entries) => {
@@ -25361,9 +25408,9 @@ function EmbeddableChatInner({
25361
25408
  },
25362
25409
  [splitMinWidth]
25363
25410
  );
25364
- const [railCollapsed, setRailCollapsed] = useState44(false);
25411
+ const [railCollapsed, setRailCollapsed] = useState45(false);
25365
25412
  const railStorageHydrated = useIsHydrated();
25366
- const [railStorageRead, setRailStorageRead] = useState44(false);
25413
+ const [railStorageRead, setRailStorageRead] = useState45(false);
25367
25414
  if (railStorageHydrated && !railStorageRead) {
25368
25415
  setRailStorageRead(true);
25369
25416
  try {
@@ -25381,13 +25428,13 @@ function EmbeddableChatInner({
25381
25428
  return next;
25382
25429
  });
25383
25430
  }, []);
25384
- const [railSearchOpen, setRailSearchOpen] = useState44(false);
25431
+ const [railSearchOpen, setRailSearchOpen] = useState45(false);
25385
25432
  const splitEligible = historyListMode;
25386
25433
  const wideMingo = splitEligible && canSplit && !previewMode;
25387
25434
  const splitActive = wideMingo && !railCollapsed;
25388
25435
  const railPresence = useRailPresence(splitActive);
25389
25436
  const showWideHeader = wideMingo || railPresence.mounted;
25390
- const [composeOpen, setComposeOpen] = useState44(false);
25437
+ const [composeOpen, setComposeOpen] = useState45(false);
25391
25438
  if (hasConversation && composeOpen) setComposeOpen(false);
25392
25439
  const isMingoMode = historyListMode;
25393
25440
  const emptyListSkipped = mingoCaps.emptyListSkipsToCompose === true && dialogs.length === 0 && !dialogsInitialLoading && !mingoCaps.searchQuery;
@@ -25433,8 +25480,8 @@ function EmbeddableChatInner({
25433
25480
  useEffect35(() => {
25434
25481
  if (activeDialogId && !isViewingArchived) lastDialogIdRef.current = activeDialogId;
25435
25482
  }, [activeDialogId, isViewingArchived]);
25436
- const [pendingDraft, setPendingDraft] = useState44(null);
25437
- const [seededDraft, setSeededDraft] = useState44(null);
25483
+ const [pendingDraft, setPendingDraft] = useState45(null);
25484
+ const [seededDraft, setSeededDraft] = useState45(null);
25438
25485
  if (pendingDraft && seededDraft !== pendingDraft) {
25439
25486
  setSeededDraft(pendingDraft);
25440
25487
  setContextItems(pendingDraft.mentions);
@@ -26067,7 +26114,7 @@ function EmbeddableChatInner({
26067
26114
  }
26068
26115
 
26069
26116
  // src/components/chat/proxy-credentials-panel.tsx
26070
- import { useMemo as useMemo30, useState as useState45 } from "react";
26117
+ import { useMemo as useMemo30, useState as useState46 } from "react";
26071
26118
 
26072
26119
  // src/components/ui/field.tsx
26073
26120
  import { useId as useId4 } from "react";
@@ -26210,12 +26257,12 @@ function ProxyCredentialsPanel({ description }) {
26210
26257
  }
26211
26258
  function ProxyCredentialsForm({ description, saved }) {
26212
26259
  const { secret: savedSecret, email: savedEmail, ...savedOptional } = saved ?? { email: "", secret: "" };
26213
- const [secret, setSecret] = useState45("");
26214
- const [email, setEmail] = useState45(savedEmail);
26215
- const [optional, setOptional] = useState45(savedOptional);
26216
- const [savedKeyTail, setSavedKeyTail] = useState45(savedSecret ? maskKey(savedSecret) : null);
26217
- const [activeEmail, setActiveEmail] = useState45(savedEmail || null);
26218
- 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("");
26219
26266
  const errors = useMemo30(() => {
26220
26267
  const out = {};
26221
26268
  for (const { field } of EMBED_PROXY_OPTIONAL_HEADERS) {
@@ -26485,8 +26532,9 @@ export {
26485
26532
  tokensForBalance,
26486
26533
  tokenRateProviderLabel,
26487
26534
  groupTokenRatesByProvider,
26488
- TRIAL_DAYS,
26489
- TRIAL_LABELS,
26535
+ TRIAL_TERMS,
26536
+ trialLengthLabel,
26537
+ trialLabels,
26490
26538
  SEO_TITLE_MAX_LENGTH,
26491
26539
  SEO_DESCRIPTION_MAX_LENGTH,
26492
26540
  BRAND_MARK_SVGS,
@@ -26675,8 +26723,7 @@ export {
26675
26723
  assistantAvailable,
26676
26724
  useAskPrompts,
26677
26725
  useAssistantOpen,
26678
- useShownAskPrompts,
26679
- useShownAskPromptIds,
26726
+ useAskSurface,
26680
26727
  AssistantAskPrompts,
26681
26728
  useMarqueeSync,
26682
26729
  getMarqueeTrackOffset,