@axiom-lattice/react-sdk 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{AgentDetailSideApp-ZGV4WC4V.mjs → AgentDetailSideApp-OW5LUKMG.mjs} +7 -7
  2. package/dist/{AgentGovernanceWorkbench-HCVHQ3P7.mjs → AgentGovernanceWorkbench-NNCUUU3E.mjs} +8 -8
  3. package/dist/{MessageGraph-OA2HMEHI.mjs → MessageGraph-SGLKFEJK.mjs} +3 -3
  4. package/dist/{ReactChart-DWIFRI5G.mjs → ReactChart-FHVYPC7S.mjs} +3 -3
  5. package/dist/{SkillFlow-IHRME3YO.mjs → SkillFlow-MLSQCF4X.mjs} +3 -3
  6. package/dist/{TasksSideApp-KKBQDSO4.mjs → TasksSideApp-F2ZZTWGN.mjs} +4 -4
  7. package/dist/{TeamWorkspace-ETVDJAYT.mjs → TeamWorkspace-AQOUI5EN.mjs} +3 -3
  8. package/dist/{TopologyRuntimeView-F7JQAXN2.mjs → TopologyRuntimeView-6GZUQLB6.mjs} +4 -4
  9. package/dist/{WorkflowAutomationView-PBZ5K43L.mjs → WorkflowAutomationView-UUAUG3LZ.mjs} +6 -6
  10. package/dist/{chunk-EHUPRLAS.mjs → chunk-HLOK3K5J.mjs} +14 -26
  11. package/dist/chunk-HLOK3K5J.mjs.map +1 -0
  12. package/dist/{chunk-KU634FOH.mjs → chunk-J23W2JYG.mjs} +3 -3
  13. package/dist/{chunk-6XGZ74LQ.mjs → chunk-JBDRDPL5.mjs} +13 -13
  14. package/dist/{chunk-57IPUJ5T.mjs → chunk-MASPEZN4.mjs} +2 -2
  15. package/dist/{chunk-TA243DB6.mjs → chunk-RDC4ZHXF.mjs} +100 -73
  16. package/dist/chunk-RDC4ZHXF.mjs.map +1 -0
  17. package/dist/{chunk-3MF4SALK.mjs → chunk-TIYJFBLK.mjs} +5 -5
  18. package/dist/{chunk-3FXH5ZAQ.mjs → chunk-TMGDS7XU.mjs} +2 -2
  19. package/dist/{chunk-JQLUFZKH.mjs → chunk-TXBE42BY.mjs} +5 -5
  20. package/dist/{chunk-3SEKZBYQ.mjs → chunk-ZQ7G446O.mjs} +2 -2
  21. package/dist/{embed-page-AgentDetailSideApp-RM4TDSC5.js → embed-page-AgentDetailSideApp-2M4MLVQQ.js} +1 -1
  22. package/dist/{embed-page-AgentGovernanceWorkbench-G6A6QNZY.js → embed-page-AgentGovernanceWorkbench-KEVBIQP6.js} +1 -1
  23. package/dist/{embed-page-MessageGraph-ZLGTKJNE.js → embed-page-MessageGraph-PRBUQINR.js} +1 -1
  24. package/dist/{embed-page-ReactChart-IB6R6G57.js → embed-page-ReactChart-V6JJXCEV.js} +1 -1
  25. package/dist/{embed-page-SkillFlow-STU36L34.js → embed-page-SkillFlow-6LPE2VG3.js} +1 -1
  26. package/dist/{embed-page-TasksSideApp-X4APWG4G.js → embed-page-TasksSideApp-OFZI54MF.js} +1 -1
  27. package/dist/{embed-page-TeamWorkspace-EK4BNNGD.js → embed-page-TeamWorkspace-QSSAF3AA.js} +1 -1
  28. package/dist/{embed-page-TopologyRuntimeView-X5CHJPHN.js → embed-page-TopologyRuntimeView-PHULW2NG.js} +1 -1
  29. package/dist/{embed-page-WorkflowAutomationView-3LIT27E2.js → embed-page-WorkflowAutomationView-LQS6H7X6.js} +1 -1
  30. package/dist/{embed-page-chunk-DDK2VFYD.js → embed-page-chunk-7PNQFZMK.js} +7 -7
  31. package/dist/{embed-page-chunk-EQRDCFN5.js → embed-page-chunk-D5EY6ASK.js} +1 -1
  32. package/dist/{embed-page-chunk-5WPKSLDW.js → embed-page-chunk-IJ2YWGKU.js} +1 -1
  33. package/dist/{embed-page-chunk-W45YCZIC.js → embed-page-chunk-O44JEYLD.js} +7 -7
  34. package/dist/embed-page-chunk-PFCR6CFL.js +2 -0
  35. package/dist/{embed-page-chunk-7D54ACES.js → embed-page-chunk-SSWDAKQU.js} +1 -1
  36. package/dist/{embed-page-chunk-734QFJP3.js → embed-page-chunk-YNHKD2CY.js} +1 -1
  37. package/dist/embed-page.js +1 -1
  38. package/dist/index.js +806 -785
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +9 -9
  41. package/package.json +3 -3
  42. package/dist/chunk-EHUPRLAS.mjs.map +0 -1
  43. package/dist/chunk-TA243DB6.mjs.map +0 -1
  44. package/dist/embed-page-chunk-64FTYZ5F.js +0 -2
  45. /package/dist/{AgentDetailSideApp-ZGV4WC4V.mjs.map → AgentDetailSideApp-OW5LUKMG.mjs.map} +0 -0
  46. /package/dist/{AgentGovernanceWorkbench-HCVHQ3P7.mjs.map → AgentGovernanceWorkbench-NNCUUU3E.mjs.map} +0 -0
  47. /package/dist/{MessageGraph-OA2HMEHI.mjs.map → MessageGraph-SGLKFEJK.mjs.map} +0 -0
  48. /package/dist/{ReactChart-DWIFRI5G.mjs.map → ReactChart-FHVYPC7S.mjs.map} +0 -0
  49. /package/dist/{SkillFlow-IHRME3YO.mjs.map → SkillFlow-MLSQCF4X.mjs.map} +0 -0
  50. /package/dist/{TasksSideApp-KKBQDSO4.mjs.map → TasksSideApp-F2ZZTWGN.mjs.map} +0 -0
  51. /package/dist/{TeamWorkspace-ETVDJAYT.mjs.map → TeamWorkspace-AQOUI5EN.mjs.map} +0 -0
  52. /package/dist/{TopologyRuntimeView-F7JQAXN2.mjs.map → TopologyRuntimeView-6GZUQLB6.mjs.map} +0 -0
  53. /package/dist/{WorkflowAutomationView-PBZ5K43L.mjs.map → WorkflowAutomationView-UUAUG3LZ.mjs.map} +0 -0
  54. /package/dist/{chunk-KU634FOH.mjs.map → chunk-J23W2JYG.mjs.map} +0 -0
  55. /package/dist/{chunk-6XGZ74LQ.mjs.map → chunk-JBDRDPL5.mjs.map} +0 -0
  56. /package/dist/{chunk-57IPUJ5T.mjs.map → chunk-MASPEZN4.mjs.map} +0 -0
  57. /package/dist/{chunk-3MF4SALK.mjs.map → chunk-TIYJFBLK.mjs.map} +0 -0
  58. /package/dist/{chunk-3FXH5ZAQ.mjs.map → chunk-TMGDS7XU.mjs.map} +0 -0
  59. /package/dist/{chunk-JQLUFZKH.mjs.map → chunk-TXBE42BY.mjs.map} +0 -0
  60. /package/dist/{chunk-3SEKZBYQ.mjs.map → chunk-ZQ7G446O.mjs.map} +0 -0
@@ -3,10 +3,10 @@ import {
3
3
  Chating,
4
4
  InitialMessageSubmitter,
5
5
  ProjectSelector
6
- } from "./chunk-6XGZ74LQ.mjs";
6
+ } from "./chunk-JBDRDPL5.mjs";
7
7
  import {
8
8
  useClient
9
- } from "./chunk-TA243DB6.mjs";
9
+ } from "./chunk-RDC4ZHXF.mjs";
10
10
  import {
11
11
  useT
12
12
  } from "./chunk-PEEXMLMK.mjs";
@@ -205,4 +205,4 @@ export {
205
205
  TrainingContextCard,
206
206
  CopilotPanel
207
207
  };
208
- //# sourceMappingURL=chunk-KU634FOH.mjs.map
208
+ //# sourceMappingURL=chunk-J23W2JYG.mjs.map
@@ -9,7 +9,7 @@ import {
9
9
  useAuthOptional,
10
10
  useClient,
11
11
  useLatticeChatShellContext
12
- } from "./chunk-TA243DB6.mjs";
12
+ } from "./chunk-RDC4ZHXF.mjs";
13
13
  import {
14
14
  XMarkdown_default,
15
15
  formatErrorMessage,
@@ -25246,7 +25246,7 @@ import { useState as useState73, useEffect as useEffect51, useCallback as useCal
25246
25246
  import { BrainCircuit, Trash2 as Trash29, Network } from "lucide-react";
25247
25247
  import { Modal as Modal18, message as message12, Tag as Tag17, Typography as Typography21, Input as Input23, Button as Button37, Space as Space20, Spin as Spin16 } from "antd";
25248
25248
  import { Fragment as Fragment25, jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
25249
- var SkillFlow = lazy(() => import("./SkillFlow-IHRME3YO.mjs"));
25249
+ var SkillFlow = lazy(() => import("./SkillFlow-MLSQCF4X.mjs"));
25250
25250
  var { Text: Text21 } = Typography21;
25251
25251
  var { TextArea: TextArea5 } = Input23;
25252
25252
  var SkillList = () => {
@@ -29488,7 +29488,7 @@ import { Spin as Spin21 } from "antd";
29488
29488
  import { ListChecks as ListChecks2 } from "lucide-react";
29489
29489
  import { jsx as jsx107 } from "react/jsx-runtime";
29490
29490
  var TasksSideApp = lazy2(
29491
- () => import("./TasksSideApp-KKBQDSO4.mjs").then((m) => ({ default: m.TasksSideApp }))
29491
+ () => import("./TasksSideApp-F2ZZTWGN.mjs").then((m) => ({ default: m.TasksSideApp }))
29492
29492
  );
29493
29493
  var TasksButton = () => {
29494
29494
  const { openSideApp, sideAppVisible, sideAppSelectedCard } = useChatUIContext();
@@ -29762,7 +29762,7 @@ ${JSON.stringify(
29762
29762
  // src/components/Chat/MessageViewPanel.tsx
29763
29763
  import { jsx as jsx109 } from "react/jsx-runtime";
29764
29764
  var MessageGraph = React77.lazy(
29765
- () => import("./MessageGraph-OA2HMEHI.mjs").then((m) => ({ default: m.MessageGraph }))
29765
+ () => import("./MessageGraph-SGLKFEJK.mjs").then((m) => ({ default: m.MessageGraph }))
29766
29766
  );
29767
29767
  var MessageViewPanel = ({
29768
29768
  messages,
@@ -38416,19 +38416,19 @@ var DEFAULT_WORKSPACE_MENU_ITEMS = [
38416
38416
  ];
38417
38417
  var PanelSuspenseFallback = () => /* @__PURE__ */ jsx152("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", minHeight: 120 }, children: /* @__PURE__ */ jsx152(Spin32, {}) });
38418
38418
  var AgentGovernanceWorkbench = lazy3(
38419
- () => import("./AgentGovernanceWorkbench-HCVHQ3P7.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
38419
+ () => import("./AgentGovernanceWorkbench-NNCUUU3E.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
38420
38420
  );
38421
38421
  var TopologyRuntimeView = lazy3(
38422
- () => import("./TopologyRuntimeView-F7JQAXN2.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
38422
+ () => import("./TopologyRuntimeView-6GZUQLB6.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
38423
38423
  );
38424
38424
  var WorkflowAutomationView = lazy3(
38425
- () => import("./WorkflowAutomationView-PBZ5K43L.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
38425
+ () => import("./WorkflowAutomationView-UUAUG3LZ.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
38426
38426
  );
38427
38427
  var TasksSideApp2 = lazy3(
38428
- () => import("./TasksSideApp-KKBQDSO4.mjs").then((m) => ({ default: m.TasksSideApp }))
38428
+ () => import("./TasksSideApp-F2ZZTWGN.mjs").then((m) => ({ default: m.TasksSideApp }))
38429
38429
  );
38430
38430
  var AgentDetailSideApp = lazy3(
38431
- () => import("./AgentDetailSideApp-ZGV4WC4V.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
38431
+ () => import("./AgentDetailSideApp-OW5LUKMG.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
38432
38432
  );
38433
38433
  var createWrapper = (Component2) => {
38434
38434
  return () => /* @__PURE__ */ jsx152(Suspense4, { fallback: /* @__PURE__ */ jsx152(PanelSuspenseFallback, {}), children: /* @__PURE__ */ jsx152(Component2, { ...{} }) });
@@ -47524,10 +47524,10 @@ var McpAppCard = ({ data, component_key }) => {
47524
47524
  // src/components/GenUI/elements/builtIns.tsx
47525
47525
  import { jsx as jsx190 } from "react/jsx-runtime";
47526
47526
  var TasksSideApp3 = lazy4(
47527
- () => import("./TasksSideApp-KKBQDSO4.mjs").then((m) => ({ default: m.TasksSideApp }))
47527
+ () => import("./TasksSideApp-F2ZZTWGN.mjs").then((m) => ({ default: m.TasksSideApp }))
47528
47528
  );
47529
47529
  var TeamWorkspace = lazy4(
47530
- () => import("./TeamWorkspace-ETVDJAYT.mjs").then((m) => ({ default: m.TeamWorkspace }))
47530
+ () => import("./TeamWorkspace-AQOUI5EN.mjs").then((m) => ({ default: m.TeamWorkspace }))
47531
47531
  );
47532
47532
  var elements = {
47533
47533
  action_show_attachments_uploader: {
@@ -47850,7 +47850,7 @@ var LazyReactInfographic = lazy5(
47850
47850
  () => import("./ReactInfographic-P7JL7DME.mjs").then((m) => ({ default: m.ReactInfographic }))
47851
47851
  );
47852
47852
  var LazyReactChart = lazy5(
47853
- () => import("./ReactChart-DWIFRI5G.mjs").then((m) => ({ default: m.ReactChart }))
47853
+ () => import("./ReactChart-FHVYPC7S.mjs").then((m) => ({ default: m.ReactChart }))
47854
47854
  );
47855
47855
  function BlockLoading() {
47856
47856
  const t = useT();
@@ -48770,4 +48770,4 @@ export {
48770
48770
  http://jedwatson.github.io/classnames
48771
48771
  *)
48772
48772
  */
48773
- //# sourceMappingURL=chunk-6XGZ74LQ.mjs.map
48773
+ //# sourceMappingURL=chunk-JBDRDPL5.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  TaskActionsButton,
5
5
  isHiddenStatus,
6
6
  taskOrigin
7
- } from "./chunk-6XGZ74LQ.mjs";
7
+ } from "./chunk-JBDRDPL5.mjs";
8
8
  import {
9
9
  useT
10
10
  } from "./chunk-PEEXMLMK.mjs";
@@ -491,4 +491,4 @@ var TaskOutlineList = ({
491
491
  export {
492
492
  TaskOutlineList
493
493
  };
494
- //# sourceMappingURL=chunk-57IPUJ5T.mjs.map
494
+ //# sourceMappingURL=chunk-MASPEZN4.mjs.map
@@ -70,21 +70,65 @@ function clearAuthItems() {
70
70
  }
71
71
 
72
72
  // src/context/AuthContext.tsx
73
- import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
74
- import { jsx } from "react/jsx-runtime";
73
+ import { createContext, useContext as useContext2, useState, useCallback, useEffect, useRef } from "react";
74
+
75
+ // src/i18n/LocaleLayerIfAbsent.tsx
76
+ import { useContext, useMemo } from "react";
77
+ import { Fragment, jsx } from "react/jsx-runtime";
78
+ function LocaleLayerIfAbsent({
79
+ locale,
80
+ storageKey = DEFAULT_LOCALE_STORAGE_KEY,
81
+ onLocaleChange,
82
+ children
83
+ }) {
84
+ const providedAbove = useContext(LocaleBridgeContext) !== null;
85
+ const initialLocale = useMemo(
86
+ () => locale ?? readStoredLocale(storageKey) ?? "en-US",
87
+ [locale, storageKey]
88
+ );
89
+ const handleLocaleChange = useMemo(
90
+ () => onLocaleChange ?? (() => {
91
+ if (typeof window !== "undefined") window.location.reload();
92
+ }),
93
+ [onLocaleChange]
94
+ );
95
+ if (providedAbove) return /* @__PURE__ */ jsx(Fragment, { children });
96
+ return /* @__PURE__ */ jsx(
97
+ LatticeLocaleProvider,
98
+ {
99
+ locale: initialLocale,
100
+ storageKey,
101
+ onLocaleChange: handleLocaleChange,
102
+ children
103
+ }
104
+ );
105
+ }
106
+
107
+ // src/context/AuthContext.tsx
108
+ import { jsx as jsx2 } from "react/jsx-runtime";
75
109
  var AuthContext = createContext(null);
76
110
  var useAuth = () => {
77
- const context = useContext(AuthContext);
111
+ const context = useContext2(AuthContext);
78
112
  if (!context) {
79
113
  throw new Error("useAuth must be used within an AuthProvider");
80
114
  }
81
115
  return context;
82
116
  };
83
117
  var useAuthOptional = () => {
84
- const context = useContext(AuthContext);
118
+ const context = useContext2(AuthContext);
85
119
  return context;
86
120
  };
87
- var AuthProvider = ({
121
+ var AuthProvider = (props) => (
122
+ /* The locale layer sits above the inner provider on purpose: this component
123
+ * calls useT() for its own error copy (see below), so a layer rendered inside
124
+ * its return value would not reach that call. One layer here covers every
125
+ * auth screen: LoginForm/RegisterForm/TenantSelector all require this
126
+ * provider — useAuth() throws without it — and none of them mounts a locale
127
+ * provider of its own, so without this the whole logged-out screen paints raw
128
+ * keys. */
129
+ /* @__PURE__ */ jsx2(LocaleLayerIfAbsent, { children: /* @__PURE__ */ jsx2(AuthProviderInner, { ...props }) })
130
+ );
131
+ var AuthProviderInner = ({
88
132
  children,
89
133
  baseURL,
90
134
  onLoginSuccess,
@@ -390,7 +434,7 @@ var AuthProvider = ({
390
434
  clearError,
391
435
  changePassword
392
436
  };
393
- return /* @__PURE__ */ jsx(AuthContext.Provider, { value, children });
437
+ return /* @__PURE__ */ jsx2(AuthContext.Provider, { value, children });
394
438
  };
395
439
 
396
440
  // src/context.tsx
@@ -398,13 +442,13 @@ import { App } from "antd";
398
442
  import {
399
443
  createContext as createContext2,
400
444
  useCallback as useCallback2,
401
- useContext as useContext2,
445
+ useContext as useContext3,
402
446
  useEffect as useEffect2,
403
- useMemo,
447
+ useMemo as useMemo2,
404
448
  useRef as useRef2
405
449
  } from "react";
406
450
  import { Client } from "@axiom-lattice/client-sdk";
407
- import { jsx as jsx2 } from "react/jsx-runtime";
451
+ import { jsx as jsx3 } from "react/jsx-runtime";
408
452
  var AxiomLatticeContext = createContext2({
409
453
  getClient: () => {
410
454
  throw new Error("getClient must be used within AxiomLatticeProvider");
@@ -419,17 +463,16 @@ function AxiomLatticeProvider({
419
463
  onLocaleChange,
420
464
  children
421
465
  }) {
422
- const localeProvidedAbove = useContext2(LocaleBridgeContext) !== null;
423
- const authContext = useContext2(AuthContext);
466
+ const authContext = useContext3(AuthContext);
424
467
  const tenantId = authContext?.currentTenant?.id;
425
- const effectiveApiKey = useMemo(() => {
468
+ const effectiveApiKey = useMemo2(() => {
426
469
  if (authContext?.isAuthenticated) {
427
470
  return readAuthItem("lattice_token") || config.apiKey;
428
471
  }
429
472
  return config.apiKey;
430
473
  }, [authContext?.isAuthenticated, authContext?.currentTenant?.id, config.apiKey]);
431
474
  const clientCacheRef = useRef2(/* @__PURE__ */ new Map());
432
- const baseConfig = useMemo(
475
+ const baseConfig = useMemo2(
433
476
  () => ({
434
477
  baseURL: config.baseURL,
435
478
  apiKey: effectiveApiKey,
@@ -439,7 +482,7 @@ function AxiomLatticeProvider({
439
482
  }),
440
483
  [config.baseURL, effectiveApiKey, config.transport]
441
484
  );
442
- const baseClient = useMemo(() => {
485
+ const baseClient = useMemo2(() => {
443
486
  const client = createClient ? createClient(baseConfig) : new Client(baseConfig);
444
487
  if (tenantId) {
445
488
  client.setTenantId(tenantId);
@@ -472,52 +515,35 @@ function AxiomLatticeProvider({
472
515
  },
473
516
  [baseClient]
474
517
  );
475
- const value = useMemo(
518
+ const value = useMemo2(
476
519
  () => ({
477
520
  getClient
478
521
  }),
479
522
  [getClient]
480
523
  );
481
- const initialLocale = useMemo(
482
- () => locale ?? readStoredLocale(storageKey) ?? "en-US",
483
- [locale, storageKey]
484
- );
485
- const handleLocaleChange = useMemo(
486
- () => onLocaleChange ?? (() => {
487
- if (typeof window !== "undefined") window.location.reload();
488
- }),
489
- [onLocaleChange]
490
- );
491
- const content = /* @__PURE__ */ jsx2(AxiomLatticeContext.Provider, { value, children });
492
- return /* @__PURE__ */ jsx2(App, { component: false, children: localeProvidedAbove ? content : (
493
- /* No locale layer above: supply one so a host that mounts only this
494
- * provider gets real copy and a working switch, not raw keys. The
495
- * dictionaries it loads are what `useT()` below would otherwise render
496
- * as keys. */
497
- /* @__PURE__ */ jsx2(
498
- LatticeLocaleProvider,
499
- {
500
- locale: initialLocale,
501
- storageKey,
502
- onLocaleChange: handleLocaleChange,
503
- children: content
504
- }
505
- )
524
+ return /* @__PURE__ */ jsx3(App, { component: false, children: /* @__PURE__ */ jsx3(
525
+ LocaleLayerIfAbsent,
526
+ {
527
+ locale,
528
+ storageKey,
529
+ onLocaleChange,
530
+ children: /* @__PURE__ */ jsx3(AxiomLatticeContext.Provider, { value, children })
531
+ }
506
532
  ) });
507
533
  }
508
534
  function useClient(assistantId) {
509
- const context = useContext2(AxiomLatticeContext);
535
+ const context = useContext3(AxiomLatticeContext);
510
536
  if (!context) {
511
537
  throw new Error(
512
538
  "useClient must be used within an AxiomLatticeProvider"
513
539
  );
514
540
  }
515
- return useMemo(() => context.getClient(assistantId), [context, assistantId]);
541
+ return useMemo2(() => context.getClient(assistantId), [context, assistantId]);
516
542
  }
517
543
  function useAxiomLattice({
518
544
  assistantId
519
545
  } = {}) {
520
- const context = useContext2(AxiomLatticeContext);
546
+ const context = useContext3(AxiomLatticeContext);
521
547
  if (!context) {
522
548
  throw new Error(
523
549
  "useAxiomLattice must be used within an AxiomLatticeProvider"
@@ -528,17 +554,17 @@ function useAxiomLattice({
528
554
  "useAxiomLattice requires assistantId parameter. Use useClient(assistantId) instead."
529
555
  );
530
556
  }
531
- return useMemo(() => context.getClient(assistantId), [context, assistantId]);
557
+ return useMemo2(() => context.getClient(assistantId), [context, assistantId]);
532
558
  }
533
559
 
534
560
  // src/components/Chat/LatticeChatShellContext.tsx
535
561
  import {
536
562
  createContext as createContext3,
537
563
  useCallback as useCallback3,
538
- useContext as useContext3,
564
+ useContext as useContext4,
539
565
  useState as useState3
540
566
  } from "react";
541
- import { jsx as jsx3 } from "react/jsx-runtime";
567
+ import { jsx as jsx4 } from "react/jsx-runtime";
542
568
  var DEFAULT_MIDDLEWARE_TYPES = [
543
569
  {
544
570
  type: "filesystem",
@@ -1087,7 +1113,7 @@ var LatticeChatShellContextProvider = ({
1087
1113
  setConfig(defaultConfig);
1088
1114
  saveToLocalStorage(defaultConfig);
1089
1115
  }, [initialConfig, saveToLocalStorage]);
1090
- return /* @__PURE__ */ jsx3(
1116
+ return /* @__PURE__ */ jsx4(
1091
1117
  LatticeChatShellContext.Provider,
1092
1118
  {
1093
1119
  value: {
@@ -1103,7 +1129,7 @@ var LatticeChatShellContextProvider = ({
1103
1129
  );
1104
1130
  };
1105
1131
  var useLatticeChatShellContext = () => {
1106
- const context = useContext3(LatticeChatShellContext);
1132
+ const context = useContext4(LatticeChatShellContext);
1107
1133
  if (!context) {
1108
1134
  throw new Error(
1109
1135
  "useLatticeChatShellContext must be used within a LatticeChatShellContextProvider"
@@ -1188,7 +1214,7 @@ import {
1188
1214
  } from "antd";
1189
1215
  import { PlusOutlined } from "@ant-design/icons";
1190
1216
  import { theme } from "antd";
1191
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
1217
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
1192
1218
  var { TextArea } = Input;
1193
1219
  var { Text } = Typography;
1194
1220
  var CreateSkillModal = ({
@@ -1290,7 +1316,7 @@ var CreateSkillModal = ({
1290
1316
  const handleAddMetadataRow = () => {
1291
1317
  setMetadataRows([...metadataRows, { key: "", value: "" }]);
1292
1318
  };
1293
- return /* @__PURE__ */ jsx4(
1319
+ return /* @__PURE__ */ jsx5(
1294
1320
  Modal,
1295
1321
  {
1296
1322
  title: isEdit ? t("chatConfig.skill.edit.title") : t("chatConfig.skill.create.title"),
@@ -1302,7 +1328,7 @@ var CreateSkillModal = ({
1302
1328
  styles: {
1303
1329
  body: { padding: 16 }
1304
1330
  },
1305
- children: /* @__PURE__ */ jsx4(
1331
+ children: /* @__PURE__ */ jsx5(
1306
1332
  Form,
1307
1333
  {
1308
1334
  form,
@@ -1319,8 +1345,8 @@ var CreateSkillModal = ({
1319
1345
  },
1320
1346
  children: [
1321
1347
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1322
- /* @__PURE__ */ jsx4(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.name") }),
1323
- /* @__PURE__ */ jsx4(
1348
+ /* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.name") }),
1349
+ /* @__PURE__ */ jsx5(
1324
1350
  Form.Item,
1325
1351
  {
1326
1352
  name: "name",
@@ -1333,13 +1359,13 @@ var CreateSkillModal = ({
1333
1359
  { min: 1, max: 64, message: t("chatConfig.skill.validation.nameLength") }
1334
1360
  ],
1335
1361
  style: { marginBottom: 0 },
1336
- children: /* @__PURE__ */ jsx4(Input, { placeholder: "e.g., data-analysis", disabled: isEdit })
1362
+ children: /* @__PURE__ */ jsx5(Input, { placeholder: "e.g., data-analysis", disabled: isEdit })
1337
1363
  }
1338
1364
  )
1339
1365
  ] }),
1340
1366
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1341
- /* @__PURE__ */ jsx4(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.description") }),
1342
- /* @__PURE__ */ jsx4(
1367
+ /* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.description") }),
1368
+ /* @__PURE__ */ jsx5(
1343
1369
  Form.Item,
1344
1370
  {
1345
1371
  name: "description",
@@ -1347,7 +1373,7 @@ var CreateSkillModal = ({
1347
1373
  { required: true, message: t("chatConfig.skill.validation.descriptionRequired") }
1348
1374
  ],
1349
1375
  style: { marginBottom: 0 },
1350
- children: /* @__PURE__ */ jsx4(
1376
+ children: /* @__PURE__ */ jsx5(
1351
1377
  TextArea,
1352
1378
  {
1353
1379
  placeholder: t("chatConfig.skill.placeholder.description"),
@@ -1358,12 +1384,12 @@ var CreateSkillModal = ({
1358
1384
  )
1359
1385
  ] }),
1360
1386
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1361
- /* @__PURE__ */ jsx4(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.license") }),
1362
- /* @__PURE__ */ jsx4(Form.Item, { name: "license", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx4(Input, { placeholder: t("chatConfig.skill.placeholder.license") }) })
1387
+ /* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.license") }),
1388
+ /* @__PURE__ */ jsx5(Form.Item, { name: "license", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(Input, { placeholder: t("chatConfig.skill.placeholder.license") }) })
1363
1389
  ] }),
1364
1390
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1365
- /* @__PURE__ */ jsx4(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.compatibility") }),
1366
- /* @__PURE__ */ jsx4(Form.Item, { name: "compatibility", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx4(Input, { placeholder: t("chatConfig.skill.placeholder.compatibility") }) })
1391
+ /* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.compatibility") }),
1392
+ /* @__PURE__ */ jsx5(Form.Item, { name: "compatibility", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(Input, { placeholder: t("chatConfig.skill.placeholder.compatibility") }) })
1367
1393
  ] }),
1368
1394
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1369
1395
  /* @__PURE__ */ jsxs(
@@ -1376,7 +1402,7 @@ var CreateSkillModal = ({
1376
1402
  gap: 8
1377
1403
  },
1378
1404
  children: [
1379
- /* @__PURE__ */ jsx4(
1405
+ /* @__PURE__ */ jsx5(
1380
1406
  Text,
1381
1407
  {
1382
1408
  style: {
@@ -1387,11 +1413,11 @@ var CreateSkillModal = ({
1387
1413
  children: t("chatConfig.skill.field.metadata")
1388
1414
  }
1389
1415
  ),
1390
- /* @__PURE__ */ jsx4(
1416
+ /* @__PURE__ */ jsx5(
1391
1417
  Button,
1392
1418
  {
1393
1419
  size: "small",
1394
- icon: /* @__PURE__ */ jsx4(PlusOutlined, {}),
1420
+ icon: /* @__PURE__ */ jsx5(PlusOutlined, {}),
1395
1421
  onClick: handleAddMetadataRow,
1396
1422
  children: t("chatConfig.skill.metadata.add")
1397
1423
  }
@@ -1400,7 +1426,7 @@ var CreateSkillModal = ({
1400
1426
  }
1401
1427
  ),
1402
1428
  /* @__PURE__ */ jsxs(Space, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
1403
- metadataRows.length === 0 && /* @__PURE__ */ jsx4(
1429
+ metadataRows.length === 0 && /* @__PURE__ */ jsx5(
1404
1430
  Text,
1405
1431
  {
1406
1432
  style: {
@@ -1420,7 +1446,7 @@ var CreateSkillModal = ({
1420
1446
  width: "100%"
1421
1447
  },
1422
1448
  children: [
1423
- /* @__PURE__ */ jsx4(
1449
+ /* @__PURE__ */ jsx5(
1424
1450
  Text,
1425
1451
  {
1426
1452
  style: { fontSize: 11, color: token.colorTextSecondary },
@@ -1428,7 +1454,7 @@ var CreateSkillModal = ({
1428
1454
  }
1429
1455
  ),
1430
1456
  /* @__PURE__ */ jsxs(Space, { style: { width: "100%" }, size: 8, wrap: true, children: [
1431
- /* @__PURE__ */ jsx4(
1457
+ /* @__PURE__ */ jsx5(
1432
1458
  Input,
1433
1459
  {
1434
1460
  value: row.key,
@@ -1437,7 +1463,7 @@ var CreateSkillModal = ({
1437
1463
  onChange: (e) => handleMetadataChange(index, "key", e.target.value)
1438
1464
  }
1439
1465
  ),
1440
- /* @__PURE__ */ jsx4(
1466
+ /* @__PURE__ */ jsx5(
1441
1467
  Input,
1442
1468
  {
1443
1469
  value: row.value,
@@ -1454,8 +1480,8 @@ var CreateSkillModal = ({
1454
1480
  ] })
1455
1481
  ] }),
1456
1482
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
1457
- /* @__PURE__ */ jsx4(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.content") }),
1458
- /* @__PURE__ */ jsx4(Form.Item, { name: "content", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx4(
1483
+ /* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.content") }),
1484
+ /* @__PURE__ */ jsx5(Form.Item, { name: "content", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(
1459
1485
  TextArea,
1460
1486
  {
1461
1487
  placeholder: t("chatConfig.skill.placeholder.content"),
@@ -1474,8 +1500,8 @@ var CreateSkillModal = ({
1474
1500
  marginTop: 8
1475
1501
  },
1476
1502
  children: [
1477
- /* @__PURE__ */ jsx4(Button, { onClick: handleCancel, children: t("common.cancel") }),
1478
- /* @__PURE__ */ jsx4(Button, { type: "primary", htmlType: "submit", loading, children: isEdit ? t("chatConfig.skill.action.save") : t("chatConfig.skill.action.create") })
1503
+ /* @__PURE__ */ jsx5(Button, { onClick: handleCancel, children: t("common.cancel") }),
1504
+ /* @__PURE__ */ jsx5(Button, { type: "primary", htmlType: "submit", loading, children: isEdit ? t("chatConfig.skill.action.save") : t("chatConfig.skill.action.create") })
1479
1505
  ]
1480
1506
  }
1481
1507
  )
@@ -1496,6 +1522,7 @@ export {
1496
1522
  writeAuthItem,
1497
1523
  removeAuthItem,
1498
1524
  clearAuthItems,
1525
+ LocaleLayerIfAbsent,
1499
1526
  useAuth,
1500
1527
  useAuthOptional,
1501
1528
  AuthProvider,
@@ -1510,4 +1537,4 @@ export {
1510
1537
  CreateSkillModal,
1511
1538
  CreateSkillModal_default
1512
1539
  };
1513
- //# sourceMappingURL=chunk-TA243DB6.mjs.map
1540
+ //# sourceMappingURL=chunk-RDC4ZHXF.mjs.map