@axiom-lattice/react-sdk 2.1.82 → 2.1.84

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.
package/dist/index.mjs CHANGED
@@ -4017,7 +4017,7 @@ var ChatUIContext = createContext7({
4017
4017
  setSideAppSelectedCard: emptyHandler,
4018
4018
  openSideApp: emptyHandler,
4019
4019
  closeSideApp: emptyHandler,
4020
- menuCollapsed: false,
4020
+ menuCollapsed: void 0,
4021
4021
  setMenuCollapsed: emptyHandler,
4022
4022
  openContentApp: emptyHandler,
4023
4023
  closeContentApp: emptyHandler,
@@ -4036,7 +4036,7 @@ var ChatUIContextProvider = ({
4036
4036
  const [toolsVisible, setToolsVisible] = useState20(false);
4037
4037
  const [toolSelectedCard, setToolSelectedCard] = useState20(null);
4038
4038
  const [contentAppSelectedCard, setContentAppSelectedCard] = useState20(null);
4039
- const [menuCollapsed, setMenuCollapsed] = useState20(false);
4039
+ const [menuCollapsed, setMenuCollapsed] = useState20(void 0);
4040
4040
  const openDetail = useCallback17((card) => {
4041
4041
  setDetailSelectedCard(card);
4042
4042
  setDetailVisible(true);
@@ -4137,6 +4137,11 @@ var useStyle = createStyles2(({ token, css }) => {
4137
4137
  .ant-prompts {
4138
4138
  color: ${token.colorText};
4139
4139
  }
4140
+
4141
+ @media (max-width: 768px) {
4142
+ padding: 0;
4143
+ gap: 0;
4144
+ }
4140
4145
  `,
4141
4146
  header: css`
4142
4147
  min-height: 40px;
@@ -4145,6 +4150,11 @@ var useStyle = createStyles2(({ token, css }) => {
4145
4150
  padding: 0 ${token.padding}px;
4146
4151
  box-sizing: border-box;
4147
4152
  flex-shrink: 0;
4153
+
4154
+ @media (max-width: 768px) {
4155
+ padding: 0 8px;
4156
+ min-height: 36px;
4157
+ }
4148
4158
  `,
4149
4159
  contentArea: css`
4150
4160
  flex: 1;
@@ -4152,12 +4162,20 @@ var useStyle = createStyles2(({ token, css }) => {
4152
4162
  flex-direction: column;
4153
4163
  overflow: hidden;
4154
4164
  gap: 8px;
4165
+
4166
+ @media (max-width: 768px) {
4167
+ gap: 4px;
4168
+ }
4155
4169
  `,
4156
4170
  columns: css`
4157
4171
  flex: 1;
4158
4172
  display: flex;
4159
4173
  gap: 8px;
4160
4174
  overflow: hidden;
4175
+
4176
+ @media (max-width: 768px) {
4177
+ gap: 0;
4178
+ }
4161
4179
  `,
4162
4180
  menu: css`
4163
4181
  // background: ${token.colorBgContainer}90;
@@ -4174,6 +4192,22 @@ var useStyle = createStyles2(({ token, css }) => {
4174
4192
  &.expanded {
4175
4193
  width: 240px;
4176
4194
  }
4195
+
4196
+ @media (max-width: 768px) {
4197
+ position: fixed;
4198
+ left: 0;
4199
+ top: 0;
4200
+ bottom: 0;
4201
+ z-index: 100;
4202
+ background: ${token.colorBgLayout};
4203
+ border-right: 1px solid ${token.colorBorder};
4204
+ box-shadow: ${token.boxShadow};
4205
+ width: 0;
4206
+
4207
+ &.expanded {
4208
+ width: 240px;
4209
+ }
4210
+ }
4177
4211
  `,
4178
4212
  menuToggle: css`
4179
4213
  position: relative;
@@ -4245,6 +4279,13 @@ var useStyle = createStyles2(({ token, css }) => {
4245
4279
  white-space: pre-wrap;
4246
4280
  word-break: break-all;
4247
4281
  }
4282
+
4283
+ @media (max-width: 768px) {
4284
+ min-width: 0;
4285
+ border-radius: 0;
4286
+ border: none;
4287
+ gap: 8px;
4288
+ }
4248
4289
  `,
4249
4290
  chat: css`
4250
4291
  width: 100%;
@@ -4277,6 +4318,10 @@ var useStyle = createStyles2(({ token, css }) => {
4277
4318
  background-repeat: no-repeat;
4278
4319
  background-position: bottom;
4279
4320
  }
4321
+
4322
+ @media (max-width: 768px) {
4323
+ padding: 4px;
4324
+ }
4280
4325
  `,
4281
4326
  detailPanel: css`
4282
4327
  display: flex;
@@ -4314,6 +4359,29 @@ var useStyle = createStyles2(({ token, css }) => {
4314
4359
  bottom: 16px;
4315
4360
  top: 2px;
4316
4361
  }
4362
+
4363
+ @media (max-width: 768px) {
4364
+ border-radius: 0;
4365
+
4366
+ &.open {
4367
+ position: fixed;
4368
+ top: 0;
4369
+ right: 0;
4370
+ bottom: 0;
4371
+ left: 0;
4372
+ width: 100vw !important;
4373
+ height: 100dvh;
4374
+ z-index: 50;
4375
+ border: none;
4376
+ }
4377
+
4378
+ &.small,
4379
+ &.middle,
4380
+ &.large,
4381
+ &.full {
4382
+ width: 100vw !important;
4383
+ }
4384
+ }
4317
4385
  `,
4318
4386
  toolPanel: css`
4319
4387
  display: flex;
@@ -4331,6 +4399,22 @@ var useStyle = createStyles2(({ token, css }) => {
4331
4399
  box-shadow: ${token.boxShadow};
4332
4400
  border-color: ${token.colorBorder};
4333
4401
  }
4402
+
4403
+ @media (max-width: 768px) {
4404
+ border-radius: 0;
4405
+
4406
+ &.open {
4407
+ position: fixed;
4408
+ top: 0;
4409
+ right: 0;
4410
+ bottom: 0;
4411
+ left: 0;
4412
+ width: 100vw !important;
4413
+ height: 100dvh;
4414
+ z-index: 50;
4415
+ border: none;
4416
+ }
4417
+ }
4334
4418
  `,
4335
4419
  detailContent: css`
4336
4420
  // padding: 8px 8px;
@@ -4896,6 +4980,26 @@ var useStyle = createStyles2(({ token, css }) => {
4896
4980
  };
4897
4981
  });
4898
4982
 
4983
+ // src/hooks/useMediaQuery.ts
4984
+ import { useState as useState21, useEffect as useEffect14 } from "react";
4985
+ function useMediaQuery(query) {
4986
+ const [matches, setMatches] = useState21(() => {
4987
+ if (typeof window !== "undefined") {
4988
+ return window.matchMedia(query).matches;
4989
+ }
4990
+ return false;
4991
+ });
4992
+ useEffect14(() => {
4993
+ const mql = window.matchMedia(query);
4994
+ const handler = (event) => {
4995
+ setMatches(event.matches);
4996
+ };
4997
+ mql.addEventListener("change", handler);
4998
+ return () => mql.removeEventListener("change", handler);
4999
+ }, [query]);
5000
+ return matches;
5001
+ }
5002
+
4899
5003
  // src/components/Chat/ColumnLayout.tsx
4900
5004
  import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
4901
5005
  var ColumnLayout = ({
@@ -4916,7 +5020,8 @@ var ColumnLayout = ({
4916
5020
  contentAppSelectedCard,
4917
5021
  menuCollapsed
4918
5022
  } = useChatUIContext();
4919
- const isMenuCollapsed = menuCollapsed || detailVisible;
5023
+ const isMobile = useMediaQuery("(max-width: 768px)");
5024
+ const isMenuCollapsed = menuCollapsed ?? (isMobile || detailVisible);
4920
5025
  const menuStateClass = isMenuCollapsed ? "collapsed" : "expanded";
4921
5026
  const hasSidePanelsOpen = detailVisible || toolsVisible;
4922
5027
  const resolvedDetailSize = toolsVisible && (detailSize || "large") === "large" ? "middle" : detailSize || "large";
@@ -4927,17 +5032,24 @@ var ColumnLayout = ({
4927
5032
  ] }),
4928
5033
  /* @__PURE__ */ jsxs5("div", { className: styles.contentArea, children: [
4929
5034
  header && /* @__PURE__ */ jsx12("div", { className: styles.header, children: header }),
4930
- /* @__PURE__ */ jsxs5("div", { className: styles.columns, children: [
4931
- /* @__PURE__ */ jsx12("div", { className: `${styles.mainContent} ${hasSidePanelsOpen ? "open" : ""}`, children: /* @__PURE__ */ jsx12("div", { className: `${styles.chat} ${contentAppSelectedCard ? "full_content_width" : ""}`, children: main }) }),
4932
- /* @__PURE__ */ jsx12(
4933
- "div",
4934
- {
4935
- className: `${styles.detailPanel} ${detailVisible ? `open ${resolvedDetailSize}` : ""}`,
4936
- children: detailVisible && detailSelectedCard && detail ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: detail }) : null
4937
- }
4938
- ),
4939
- /* @__PURE__ */ jsx12("div", { className: `${styles.toolPanel} ${toolsVisible ? "open" : ""}`, children: toolsVisible && tools ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: tools }) : null })
4940
- ] })
5035
+ /* @__PURE__ */ jsxs5(
5036
+ "div",
5037
+ {
5038
+ className: styles.columns,
5039
+ style: { gap: hasSidePanelsOpen ? void 0 : 0 },
5040
+ children: [
5041
+ /* @__PURE__ */ jsx12("div", { className: `${styles.mainContent} ${hasSidePanelsOpen ? "open" : ""}`, children: /* @__PURE__ */ jsx12("div", { className: `${styles.chat} ${contentAppSelectedCard ? "full_content_width" : ""}`, children: main }) }),
5042
+ /* @__PURE__ */ jsx12(
5043
+ "div",
5044
+ {
5045
+ className: `${styles.detailPanel} ${detailVisible ? `open ${resolvedDetailSize}` : ""}`,
5046
+ children: detailVisible && detailSelectedCard && detail ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: detail }) : null
5047
+ }
5048
+ ),
5049
+ /* @__PURE__ */ jsx12("div", { className: `${styles.toolPanel} ${toolsVisible ? "open" : ""}`, children: toolsVisible && tools ? /* @__PURE__ */ jsx12("div", { className: styles.detailContent, children: tools }) : null })
5050
+ ]
5051
+ }
5052
+ )
4941
5053
  ] })
4942
5054
  ] });
4943
5055
  };
@@ -4951,11 +5063,11 @@ import {
4951
5063
 
4952
5064
  // src/components/GenUI/elements/confirm_feedback.tsx
4953
5065
  import { Button as Button9, Space as Space3, Typography as Typography4 } from "antd";
4954
- import { useState as useState26 } from "react";
5066
+ import { useState as useState27 } from "react";
4955
5067
 
4956
5068
  // src/components/GenUI/MDResponse.tsx
4957
5069
  import XMarkdown from "@ant-design/x-markdown";
4958
- import React13, { useRef as useRef11, useState as useState25, useMemo as useMemo7, useDeferredValue } from "react";
5070
+ import React13, { useRef as useRef11, useState as useState26, useMemo as useMemo7, useDeferredValue } from "react";
4959
5071
  import { createStyles as createStyles6 } from "antd-style";
4960
5072
 
4961
5073
  // src/components/GenUI/Code.tsx
@@ -4963,13 +5075,13 @@ import { CodeHighlighter, Mermaid } from "@ant-design/x";
4963
5075
 
4964
5076
  // src/components/GenUI/ReactInfographic.tsx
4965
5077
  import { Infographic } from "@antv/infographic";
4966
- import { useRef as useRef8, useEffect as useEffect14 } from "react";
5078
+ import { useRef as useRef8, useEffect as useEffect15 } from "react";
4967
5079
  import { jsx as jsx13 } from "react/jsx-runtime";
4968
5080
  var ReactInfographic = (props) => {
4969
5081
  const { children } = props;
4970
5082
  const $container = useRef8(null);
4971
5083
  let infographicInstance = useRef8(null);
4972
- useEffect14(() => {
5084
+ useEffect15(() => {
4973
5085
  if ($container.current) {
4974
5086
  infographicInstance.current = new Infographic({
4975
5087
  container: $container.current,
@@ -4984,7 +5096,7 @@ var ReactInfographic = (props) => {
4984
5096
  infographicInstance.current?.destroy();
4985
5097
  };
4986
5098
  }, []);
4987
- useEffect14(() => {
5099
+ useEffect15(() => {
4988
5100
  const a = `infographic sequence-steps-simple
4989
5101
  data
4990
5102
  sequences
@@ -5000,14 +5112,14 @@ data
5000
5112
  };
5001
5113
 
5002
5114
  // src/components/GenUI/ReactChart.tsx
5003
- import { useEffect as useEffect15, useRef as useRef9, useState as useState22 } from "react";
5115
+ import { useEffect as useEffect16, useRef as useRef9, useState as useState23 } from "react";
5004
5116
  import * as echarts from "echarts";
5005
5117
  import { Card as Card5 } from "antd";
5006
5118
  import { parse } from "best-effort-json-parser";
5007
5119
 
5008
5120
  // src/components/GenUI/elements/generic_data_table.tsx
5009
5121
  import { Table, Typography as Typography3, Button as Button5, Flex, Space as Space2 } from "antd";
5010
- import { useState as useState21 } from "react";
5122
+ import { useState as useState22 } from "react";
5011
5123
  import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
5012
5124
 
5013
5125
  // src/components/Chat/SideAppBrowserContext.tsx
@@ -5027,7 +5139,7 @@ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
5027
5139
  var { Text: Text3 } = Typography3;
5028
5140
  var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
5029
5141
  const { dataSource, message: message23 } = data ?? {};
5030
- const [expandedRowKeys, setExpandedRowKeys] = useState21([]);
5142
+ const [expandedRowKeys, setExpandedRowKeys] = useState22([]);
5031
5143
  const openSideApp = useSideAppOpener();
5032
5144
  const processedData = dataSource?.map((item, index) => ({
5033
5145
  ...item,
@@ -5507,8 +5619,8 @@ var ReactChart = (props) => {
5507
5619
  const chartRef = useRef9(null);
5508
5620
  const chartInstance = useRef9(null);
5509
5621
  const resizeObserverRef = useRef9(null);
5510
- const [tableData, setTableData] = useState22(null);
5511
- useEffect15(() => {
5622
+ const [tableData, setTableData] = useState23(null);
5623
+ useEffect16(() => {
5512
5624
  if (!chartRef.current) {
5513
5625
  return;
5514
5626
  }
@@ -5581,7 +5693,7 @@ var ReactChart = (props) => {
5581
5693
  window.removeEventListener("resize", handleResize);
5582
5694
  };
5583
5695
  }, [children]);
5584
- useEffect15(() => {
5696
+ useEffect16(() => {
5585
5697
  return () => {
5586
5698
  if (resizeObserverRef.current) {
5587
5699
  resizeObserverRef.current.disconnect();
@@ -5641,12 +5753,12 @@ import { Collapse } from "antd";
5641
5753
  import { createStyles as createStyles5 } from "antd-style";
5642
5754
 
5643
5755
  // src/components/GenUI/FileRenderer.tsx
5644
- import { useEffect as useEffect17, useState as useState24, useMemo as useMemo3 } from "react";
5756
+ import { useEffect as useEffect18, useState as useState25, useMemo as useMemo3 } from "react";
5645
5757
  import { Spin as Spin2, Alert as Alert4, Button as Button7 } from "antd";
5646
5758
  import { createStyles as createStyles4 } from "antd-style";
5647
5759
 
5648
5760
  // src/components/GenUI/MarkdownViewer.tsx
5649
- import React9, { useState as useState23, useEffect as useEffect16, useRef as useRef10 } from "react";
5761
+ import React9, { useState as useState24, useEffect as useEffect17, useRef as useRef10 } from "react";
5650
5762
  import { Button as Button6, Tooltip, message } from "antd";
5651
5763
  import {
5652
5764
  CopyOutlined,
@@ -5919,9 +6031,9 @@ var MarkdownViewer = ({
5919
6031
  style
5920
6032
  }) => {
5921
6033
  const { styles, cx } = useStyles();
5922
- const [copied, setCopied] = useState23(false);
6034
+ const [copied, setCopied] = useState24(false);
5923
6035
  const contentRef = useRef10(null);
5924
- useEffect16(() => {
6036
+ useEffect17(() => {
5925
6037
  if (copied) {
5926
6038
  const timer = setTimeout(() => setCopied(false), 2e3);
5927
6039
  return () => clearTimeout(timer);
@@ -6174,11 +6286,11 @@ var FileRenderer = ({
6174
6286
  showHeader = true
6175
6287
  }) => {
6176
6288
  const { styles } = useStyles2();
6177
- const [content, setContent] = useState24("");
6178
- const [loading, setLoading] = useState24(true);
6179
- const [error, setError] = useState24(null);
6289
+ const [content, setContent] = useState25("");
6290
+ const [loading, setLoading] = useState25(true);
6291
+ const [error, setError] = useState25(null);
6180
6292
  const category = useMemo3(() => getFileCategory(fileName), [fileName]);
6181
- useEffect17(() => {
6293
+ useEffect18(() => {
6182
6294
  if (category === "markdown" || category === "text") {
6183
6295
  setLoading(true);
6184
6296
  setError(null);
@@ -6734,7 +6846,7 @@ var ConfirmFeedback = ({
6734
6846
  }) => {
6735
6847
  const { message: message23, type, config, feedback, options } = data ?? {};
6736
6848
  const { sendMessage } = useAgentChat();
6737
- const [clicked, setClicked] = useState26(false);
6849
+ const [clicked, setClicked] = useState27(false);
6738
6850
  return /* @__PURE__ */ jsxs11(Space3, { direction: "vertical", style: { width: "100%" }, children: [
6739
6851
  /* @__PURE__ */ jsx24(MDResponse, { content: message23 }),
6740
6852
  options ? /* @__PURE__ */ jsx24(Space3, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx24(
@@ -6813,7 +6925,7 @@ var ConfirmFeedback = ({
6813
6925
 
6814
6926
  // src/components/GenUI/elements/clarify_feedback.tsx
6815
6927
  import { Button as Button10, Space as Space4, Typography as Typography5, List, Checkbox, Input as Input3 } from "antd";
6816
- import { useState as useState27 } from "react";
6928
+ import { useState as useState28 } from "react";
6817
6929
  import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
6818
6930
  var { Text: Text5 } = Typography5;
6819
6931
  var ClarifyFeedback = ({
@@ -6822,9 +6934,9 @@ var ClarifyFeedback = ({
6822
6934
  }) => {
6823
6935
  const { questions } = data ?? {};
6824
6936
  const { sendMessage } = useAgentChat();
6825
- const [currentStep, setCurrentStep] = useState27(0);
6826
- const [answers, setAnswers] = useState27({});
6827
- const [submitted, setSubmitted] = useState27(false);
6937
+ const [currentStep, setCurrentStep] = useState28(0);
6938
+ const [answers, setAnswers] = useState28({});
6939
+ const [submitted, setSubmitted] = useState28(false);
6828
6940
  const currentQuestion = questions?.[currentStep];
6829
6941
  const totalQuestions = questions?.length || 0;
6830
6942
  const handleOptionChange = (selected) => {
@@ -7337,7 +7449,7 @@ import {
7337
7449
  DownOutlined,
7338
7450
  UpOutlined
7339
7451
  } from "@ant-design/icons";
7340
- import { useState as useState28, useEffect as useEffect19 } from "react";
7452
+ import { useState as useState29, useEffect as useEffect20 } from "react";
7341
7453
  import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
7342
7454
  var { Text: Text7 } = Typography8;
7343
7455
  var useStyle3 = createStyles8(({ token, css }) => ({
@@ -7382,10 +7494,10 @@ var Todo = ({
7382
7494
  const allCompleted = data.every((item) => item.status === "completed");
7383
7495
  return allPending || allCompleted;
7384
7496
  };
7385
- const [isExpanded, setIsExpanded] = useState28(
7497
+ const [isExpanded, setIsExpanded] = useState29(
7386
7498
  () => smartCollapse ? getDefaultExpanded() : false
7387
7499
  );
7388
- useEffect19(() => {
7500
+ useEffect20(() => {
7389
7501
  if (smartCollapse) {
7390
7502
  setIsExpanded(getDefaultExpanded());
7391
7503
  }
@@ -7576,7 +7688,7 @@ var WriteTodos = ({
7576
7688
  };
7577
7689
 
7578
7690
  // src/components/GenUI/FileExplorer.tsx
7579
- import { useState as useState29, useEffect as useEffect20, useMemo as useMemo8 } from "react";
7691
+ import { useState as useState30, useEffect as useEffect21, useMemo as useMemo8 } from "react";
7580
7692
  import { Splitter, Tree, Empty } from "antd";
7581
7693
  import {
7582
7694
  FolderOutlined,
@@ -7860,10 +7972,10 @@ var FileExplorer = ({
7860
7972
  }) => {
7861
7973
  const { files } = data ?? {};
7862
7974
  const { styles, cx } = useStyles5();
7863
- const [fileList, setFileList] = useState29([]);
7864
- const [selectedKey, setSelectedKey] = useState29("");
7865
- const [expandedKeys, setExpandedKeys] = useState29([]);
7866
- useEffect20(() => {
7975
+ const [fileList, setFileList] = useState30([]);
7976
+ const [selectedKey, setSelectedKey] = useState30("");
7977
+ const [expandedKeys, setExpandedKeys] = useState30([]);
7978
+ useEffect21(() => {
7867
7979
  let list = [];
7868
7980
  if (Array.isArray(files)) {
7869
7981
  list = files;
@@ -7883,7 +7995,7 @@ var FileExplorer = ({
7883
7995
  () => buildTreeData(fileList, expandedKeys),
7884
7996
  [fileList, expandedKeys]
7885
7997
  );
7886
- useEffect20(() => {
7998
+ useEffect21(() => {
7887
7999
  if (treeData.length > 0 && expandedKeys.length === 0) {
7888
8000
  const getAllKeys = (nodes) => {
7889
8001
  let keys = [];
@@ -7977,7 +8089,7 @@ import {
7977
8089
  Button as Button13
7978
8090
  } from "antd";
7979
8091
  import dayjs from "dayjs";
7980
- import { useState as useState30 } from "react";
8092
+ import { useState as useState31 } from "react";
7981
8093
  import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
7982
8094
  var AttachmentsCard = ({
7983
8095
  data,
@@ -7991,7 +8103,7 @@ var AttachmentsCard = ({
7991
8103
  const baseURL = config.baseURL;
7992
8104
  const fileBaseURL = `${baseURL}/api/assistants/${assistantId}/threads/${threadId}/sandbox/downloadfile?path=`;
7993
8105
  const { Text: Text48 } = Typography10;
7994
- const [showAll, setShowAll] = useState30(false);
8106
+ const [showAll, setShowAll] = useState31(false);
7995
8107
  const openSideApp = useSideAppOpener();
7996
8108
  const getStyles = () => {
7997
8109
  switch (size) {
@@ -8173,7 +8285,7 @@ var AttachmentsCard = ({
8173
8285
 
8174
8286
  // src/components/GenUI/elements/attachments_viewer_side_app.tsx
8175
8287
  import { Button as Button14, Empty as Empty2, Skeleton } from "antd";
8176
- import { useEffect as useEffect21, useState as useState31 } from "react";
8288
+ import { useEffect as useEffect22, useState as useState32 } from "react";
8177
8289
 
8178
8290
  // src/components/GenUI/RenderMDFromURL.tsx
8179
8291
  import { jsx as jsx35 } from "react/jsx-runtime";
@@ -8194,13 +8306,13 @@ function AttachmentsViewerSideApp({
8194
8306
  data,
8195
8307
  component_key
8196
8308
  }) {
8197
- const [loading, setLoading] = useState31(false);
8309
+ const [loading, setLoading] = useState32(false);
8198
8310
  const { file_id, url, full_url } = data ?? {};
8199
- const [fileUri, setFileUri] = useState31({
8311
+ const [fileUri, setFileUri] = useState32({
8200
8312
  url: full_url || "",
8201
8313
  fileName: extractFileName(file_id || "")
8202
8314
  });
8203
- useEffect21(() => {
8315
+ useEffect22(() => {
8204
8316
  setFileUri({
8205
8317
  url: full_url || "",
8206
8318
  fileName: extractFileName(file_id || "")
@@ -8244,7 +8356,7 @@ function AttachmentsViewerSideApp({
8244
8356
  import { Button as Button15, Space as Space10, Typography as Typography11 } from "antd";
8245
8357
 
8246
8358
  // src/components/GenUI/elements/ContentPreviewCollapse.tsx
8247
- import { useRef as useRef12, useState as useState32, useEffect as useEffect22, useCallback as useCallback20 } from "react";
8359
+ import { useRef as useRef12, useState as useState33, useEffect as useEffect23, useCallback as useCallback20 } from "react";
8248
8360
  import { Collapse as Collapse5 } from "antd";
8249
8361
  import { createStyles as createStyles10 } from "antd-style";
8250
8362
  import { DownOutlined as DownOutlined3, UpOutlined as UpOutlined2 } from "@ant-design/icons";
@@ -8314,8 +8426,8 @@ var ContentPreviewCollapse = ({
8314
8426
  showAllText = "Show all content",
8315
8427
  showLessText = "Show less"
8316
8428
  }) => {
8317
- const [showFullContent, setShowFullContent] = useState32(false);
8318
- const [isOverflowing, setIsOverflowing] = useState32(false);
8429
+ const [showFullContent, setShowFullContent] = useState33(false);
8430
+ const [isOverflowing, setIsOverflowing] = useState33(false);
8319
8431
  const contentRef = useRef12(null);
8320
8432
  const showShadow = isOverflowing && !showFullContent;
8321
8433
  const { styles, cx } = useStyle4({ showShadow });
@@ -8325,7 +8437,7 @@ var ContentPreviewCollapse = ({
8325
8437
  setIsOverflowing(scrollHeight > collapsedMaxHeight);
8326
8438
  }
8327
8439
  }, [collapsedMaxHeight]);
8328
- useEffect22(() => {
8440
+ useEffect23(() => {
8329
8441
  const element = contentRef.current;
8330
8442
  if (!element) return;
8331
8443
  checkOverflow();
@@ -8819,10 +8931,10 @@ import ErrorBoundary from "antd/es/alert/ErrorBoundary";
8819
8931
  import {
8820
8932
  memo,
8821
8933
  useCallback as useCallback21,
8822
- useEffect as useEffect23,
8934
+ useEffect as useEffect24,
8823
8935
  useMemo as useMemo9,
8824
8936
  useRef as useRef13,
8825
- useState as useState33
8937
+ useState as useState34
8826
8938
  } from "react";
8827
8939
  import { jsx as jsx42 } from "react/jsx-runtime";
8828
8940
  var LazyBubble = ({
@@ -8831,9 +8943,9 @@ var LazyBubble = ({
8831
8943
  autoLoadRightPanel
8832
8944
  }) => {
8833
8945
  const ref = useRef13(null);
8834
- const [isVisible, setIsVisible] = useState33(false);
8835
- const [wasEverVisible, setWasEverVisible] = useState33(false);
8836
- useEffect23(() => {
8946
+ const [isVisible, setIsVisible] = useState34(false);
8947
+ const [wasEverVisible, setWasEverVisible] = useState34(false);
8948
+ useEffect24(() => {
8837
8949
  const observer = new IntersectionObserver(
8838
8950
  ([entry]) => {
8839
8951
  const visible = entry.isIntersecting;
@@ -8853,7 +8965,7 @@ var LazyBubble = ({
8853
8965
  }
8854
8966
  };
8855
8967
  }, [wasEverVisible]);
8856
- useEffect23(() => {
8968
+ useEffect24(() => {
8857
8969
  autoLoadRightPanel?.();
8858
8970
  }, []);
8859
8971
  const getPlaceholder = () => {
@@ -8886,7 +8998,7 @@ var MessageList = ({
8886
8998
  const { styles } = useStyle();
8887
8999
  const openSideApp = useSideAppOpener();
8888
9000
  const messageLengthRef = useRef13(messages?.length ?? 0);
8889
- useEffect23(() => {
9001
+ useEffect24(() => {
8890
9002
  if (messages?.length) {
8891
9003
  messageLengthRef.current = messages?.length;
8892
9004
  }
@@ -8996,7 +9108,7 @@ import {
8996
9108
  Space as Space30,
8997
9109
  Typography as Typography42
8998
9110
  } from "antd";
8999
- import React51, { useCallback as useCallback33, useContext as useContext11, useEffect as useEffect45, useRef as useRef23, useState as useState65 } from "react";
9111
+ import React51, { useCallback as useCallback33, useContext as useContext11, useEffect as useEffect46, useRef as useRef23, useState as useState66 } from "react";
9000
9112
  import { BrainCircuit as BrainCircuit3 } from "lucide-react";
9001
9113
 
9002
9114
  // src/components/GenUI/HITLContainer.tsx
@@ -9070,7 +9182,7 @@ var HITLContainer = () => {
9070
9182
  import { Typography as Typography15, Space as Space14, Button as Button18, message as message4 } from "antd";
9071
9183
  import { createStyles as createStyles13 } from "antd-style";
9072
9184
  import { ClockCircleOutlined as ClockCircleOutlined2, DownOutlined as DownOutlined4, RightOutlined as RightOutlined3, LoadingOutlined as LoadingOutlined3, DeleteOutlined } from "@ant-design/icons";
9073
- import { useState as useState34 } from "react";
9185
+ import { useState as useState35 } from "react";
9074
9186
  import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
9075
9187
  var useStyle7 = createStyles13(({ css, token }) => ({
9076
9188
  container: css`
@@ -9160,9 +9272,9 @@ var useStyle7 = createStyles13(({ css, token }) => ({
9160
9272
  var PendingMessagesContainer = () => {
9161
9273
  const { styles } = useStyle7();
9162
9274
  const { pendingMessages, sendMessage, removePendingMessage } = useAgentChat();
9163
- const [expanded, setExpanded] = useState34(true);
9164
- const [sendingId, setSendingId] = useState34(null);
9165
- const [deletingId, setDeletingId] = useState34(null);
9275
+ const [expanded, setExpanded] = useState35(true);
9276
+ const [sendingId, setSendingId] = useState35(null);
9277
+ const [deletingId, setDeletingId] = useState35(null);
9166
9278
  if (!pendingMessages || pendingMessages.length === 0) return null;
9167
9279
  const handleSendMessage = async (msg) => {
9168
9280
  if (sendingId || deletingId) return;
@@ -9617,7 +9729,7 @@ var FileExplorerButton = ({}) => {
9617
9729
  };
9618
9730
 
9619
9731
  // src/components/Chat/ScheduleButton.tsx
9620
- import { useState as useState35, useCallback as useCallback22, useEffect as useEffect24 } from "react";
9732
+ import { useState as useState36, useCallback as useCallback22, useEffect as useEffect25 } from "react";
9621
9733
  import { Tooltip as Tooltip6, Button as Button20, Spin as Spin3 } from "antd";
9622
9734
  import { CalendarOutlined } from "@ant-design/icons";
9623
9735
  import { ScheduledTaskStatus } from "@axiom-lattice/client-sdk";
@@ -9628,9 +9740,9 @@ var ScheduleButton = ({
9628
9740
  const { threadId, assistantId } = useAgentChat();
9629
9741
  const { openSideApp } = useChatUIContext();
9630
9742
  const client = useClient(assistantId || "");
9631
- const [scheduledTasks, setScheduledTasks] = useState35([]);
9632
- const [loading, setLoading] = useState35(false);
9633
- const [taskCount, setTaskCount] = useState35(0);
9743
+ const [scheduledTasks, setScheduledTasks] = useState36([]);
9744
+ const [loading, setLoading] = useState36(false);
9745
+ const [taskCount, setTaskCount] = useState36(0);
9634
9746
  const fetchScheduledTasks = useCallback22(async () => {
9635
9747
  if (!threadId) return;
9636
9748
  setLoading(true);
@@ -9649,7 +9761,7 @@ var ScheduleButton = ({
9649
9761
  setLoading(false);
9650
9762
  }
9651
9763
  }, [client, threadId]);
9652
- useEffect24(() => {
9764
+ useEffect25(() => {
9653
9765
  fetchScheduledTasks();
9654
9766
  }, [fetchScheduledTasks]);
9655
9767
  if (!threadId) {
@@ -10057,19 +10169,19 @@ var ThreadManagementButtons = () => {
10057
10169
  import React43, {
10058
10170
  createContext as createContext9,
10059
10171
  useContext as useContext10,
10060
- useState as useState57,
10172
+ useState as useState58,
10061
10173
  useCallback as useCallback31,
10062
- useEffect as useEffect40
10174
+ useEffect as useEffect41
10063
10175
  } from "react";
10064
10176
  import { WorkspaceClient, Client as Client2 } from "@axiom-lattice/client-sdk";
10065
10177
 
10066
10178
  // src/components/Chat/WorkspaceResourceManager.tsx
10067
- import { useMemo as useMemo20, useEffect as useEffect39, useRef as useRef17, useState as useState56 } from "react";
10179
+ import { useMemo as useMemo20, useEffect as useEffect40, useRef as useRef17, useState as useState57 } from "react";
10068
10180
  import { FolderOpen as FolderOpen2, Activity as Activity3, Database as Database4, Plug as Plug2, Bot as Bot2, Wrench, Zap, LogOut as LogOut3, Building2 as Building23, Key, Share2, History, Inbox, FlaskConical as FlaskConical3 } from "lucide-react";
10069
10181
  import { Modal as Modal13, Avatar as Avatar8, Popover as Popover2, Button as Button41 } from "antd";
10070
10182
 
10071
10183
  // src/components/Chat/Menu.tsx
10072
- import React19, { useState as useState36, useMemo as useMemo10, useCallback as useCallback24 } from "react";
10184
+ import React19, { useState as useState37, useMemo as useMemo10, useCallback as useCallback24 } from "react";
10073
10185
  import { Drawer } from "antd";
10074
10186
  import { Plus, ChevronRight, ChevronDown, Cpu, PanelLeftClose } from "lucide-react";
10075
10187
  import { createStyles as createStyles16 } from "antd-style";
@@ -10181,10 +10293,10 @@ var Menu = ({
10181
10293
  const { styles: menuStyles } = useMenuStyles();
10182
10294
  const { styles } = useStyle();
10183
10295
  const isControlled = collapsed !== void 0;
10184
- const [internalIsIconView, setInternalIsIconView] = useState36(!defaultExpanded);
10296
+ const [internalIsIconView, setInternalIsIconView] = useState37(!defaultExpanded);
10185
10297
  const isIconView = isControlled ? collapsed : internalIsIconView;
10186
- const [drawerStates, setDrawerStates] = useState36({});
10187
- const [expandedInlineDrawers, setExpandedInlineDrawers] = useState36(
10298
+ const [drawerStates, setDrawerStates] = useState37({});
10299
+ const [expandedInlineDrawers, setExpandedInlineDrawers] = useState37(
10188
10300
  () => {
10189
10301
  const defaultExpanded2 = /* @__PURE__ */ new Set();
10190
10302
  items.forEach((item) => {
@@ -10384,13 +10496,13 @@ var Menu = ({
10384
10496
  };
10385
10497
 
10386
10498
  // src/components/Chat/ProjectCardList.tsx
10387
- import { useState as useState38 } from "react";
10499
+ import { useState as useState39 } from "react";
10388
10500
  import { Button as Button24, Empty as Empty3, Spin as Spin4, Card as Card11, Typography as Typography16, theme as theme2 } from "antd";
10389
10501
  import { createStyles as createStyles17 } from "antd-style";
10390
10502
  import { Plus as Plus2, LayoutGrid, List as List3, FolderOpen } from "lucide-react";
10391
10503
 
10392
10504
  // src/components/Chat/CreateProjectModal.tsx
10393
- import { useState as useState37 } from "react";
10505
+ import { useState as useState38 } from "react";
10394
10506
  import { Modal as Modal2, Input as Input4, Form as Form3 } from "antd";
10395
10507
  import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
10396
10508
  var CreateProjectModal = ({
@@ -10399,7 +10511,7 @@ var CreateProjectModal = ({
10399
10511
  onCreate
10400
10512
  }) => {
10401
10513
  const [form] = Form3.useForm();
10402
- const [isSubmitting, setIsSubmitting] = useState37(false);
10514
+ const [isSubmitting, setIsSubmitting] = useState38(false);
10403
10515
  const handleSubmit = async (values) => {
10404
10516
  setIsSubmitting(true);
10405
10517
  try {
@@ -10752,8 +10864,8 @@ var useStyle8 = createStyles17(({ css, token }) => ({
10752
10864
  var ProjectCardList = () => {
10753
10865
  const { styles } = useStyle8();
10754
10866
  const { token } = theme2.useToken();
10755
- const [viewMode, setViewMode] = useState38("grid");
10756
- const [isCreateModalOpen, setIsCreateModalOpen] = useState38(false);
10867
+ const [viewMode, setViewMode] = useState39("grid");
10868
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState39(false);
10757
10869
  const {
10758
10870
  projects,
10759
10871
  loading,
@@ -10896,7 +11008,7 @@ var ProjectCardList = () => {
10896
11008
  };
10897
11009
 
10898
11010
  // src/components/Chat/MetricsConfigDrawerContent.tsx
10899
- import { useState as useState39, useEffect as useEffect25 } from "react";
11011
+ import { useState as useState40, useEffect as useEffect26 } from "react";
10900
11012
  import { Activity, Plus as Plus3, Edit2, Trash2, TestTube2, Loader2, Database, Settings, ChevronRight as ChevronRight2, ChevronLeft as ChevronLeft2, Check as Check2 } from "lucide-react";
10901
11013
  import { Card as Card12, Button as Button25, Space as Space16, Typography as Typography17, Tag as Tag6, Modal as Modal3, message as message5, Input as Input5, Select, Popconfirm, Steps, Checkbox as Checkbox2, Spin as Spin5, theme as theme3 } from "antd";
10902
11014
  import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
@@ -10907,13 +11019,13 @@ var MetricsConfigDrawerContent = () => {
10907
11019
  const { config } = useLatticeChatShellContext();
10908
11020
  const { token } = useToken2();
10909
11021
  const { get, post, put, del } = useApi();
10910
- const [configs, setConfigs] = useState39([]);
10911
- const [loading, setLoading] = useState39(false);
10912
- const [testingId, setTestingId] = useState39(null);
10913
- const [formModalOpen, setFormModalOpen] = useState39(false);
10914
- const [editingConfig, setEditingConfig] = useState39(null);
11022
+ const [configs, setConfigs] = useState40([]);
11023
+ const [loading, setLoading] = useState40(false);
11024
+ const [testingId, setTestingId] = useState40(null);
11025
+ const [formModalOpen, setFormModalOpen] = useState40(false);
11026
+ const [editingConfig, setEditingConfig] = useState40(null);
10915
11027
  const tenantId = config.headers?.["x-tenant-id"] || "default";
10916
- useEffect25(() => {
11028
+ useEffect26(() => {
10917
11029
  loadConfigs();
10918
11030
  }, [tenantId]);
10919
11031
  const loadConfigs = async () => {
@@ -11112,14 +11224,14 @@ var MetricsConfigFormModal = ({
11112
11224
  const { token } = useToken2();
11113
11225
  const { get, post, put } = useApi();
11114
11226
  const tenantId = config.headers?.["x-tenant-id"] || "default";
11115
- const [currentStep, setCurrentStep] = useState39(0);
11116
- const [saving, setSaving] = useState39(false);
11117
- const [fetchingDatasources, setFetchingDatasources] = useState39(false);
11118
- const [availableDatasources, setAvailableDatasources] = useState39([]);
11119
- const [selectedViewDatasource, setSelectedViewDatasource] = useState39(null);
11120
- const [availableMetrics, setAvailableMetrics] = useState39([]);
11121
- const [fetchingMetrics, setFetchingMetrics] = useState39(false);
11122
- const [formData, setFormData] = useState39({
11227
+ const [currentStep, setCurrentStep] = useState40(0);
11228
+ const [saving, setSaving] = useState40(false);
11229
+ const [fetchingDatasources, setFetchingDatasources] = useState40(false);
11230
+ const [availableDatasources, setAvailableDatasources] = useState40([]);
11231
+ const [selectedViewDatasource, setSelectedViewDatasource] = useState40(null);
11232
+ const [availableMetrics, setAvailableMetrics] = useState40([]);
11233
+ const [fetchingMetrics, setFetchingMetrics] = useState40(false);
11234
+ const [formData, setFormData] = useState40({
11123
11235
  key: editingConfig?.key || "",
11124
11236
  name: editingConfig?.name || "",
11125
11237
  description: editingConfig?.description || "",
@@ -11159,12 +11271,12 @@ var MetricsConfigFormModal = ({
11159
11271
  selectedDataSources: editingConfig?.config?.selectedDataSources || []
11160
11272
  });
11161
11273
  };
11162
- useEffect25(() => {
11274
+ useEffect26(() => {
11163
11275
  if (open) {
11164
11276
  resetForm();
11165
11277
  }
11166
11278
  }, [open, editingConfig]);
11167
- useEffect25(() => {
11279
+ useEffect26(() => {
11168
11280
  if (currentStep === 1 && availableDatasources.length === 0 && !fetchingDatasources) {
11169
11281
  handleFetchDatasources();
11170
11282
  }
@@ -11562,7 +11674,7 @@ var MetricsConfigFormModal = ({
11562
11674
  };
11563
11675
 
11564
11676
  // src/components/Chat/DatabaseConfigDrawerContent.tsx
11565
- import { useState as useState40, useEffect as useEffect26 } from "react";
11677
+ import { useState as useState41, useEffect as useEffect27 } from "react";
11566
11678
  import { createStyles as createStyles18 } from "antd-style";
11567
11679
  import { Database as Database2, Plus as Plus4, Edit2 as Edit22, Trash2 as Trash22, TestTube2 as TestTube22, Loader2 as Loader22 } from "lucide-react";
11568
11680
  import { Card as Card13, Button as Button26, Space as Space17, Typography as Typography18, Tag as Tag7, Modal as Modal4, message as message6, Input as Input6, Select as Select2, Popconfirm as Popconfirm2 } from "antd";
@@ -11636,12 +11748,12 @@ var DatabaseConfigDrawerContent = ({
11636
11748
  const { styles } = useStyles7();
11637
11749
  const { config } = useLatticeChatShellContext();
11638
11750
  const { get, post, put, del } = useApi();
11639
- const [configs, setConfigs] = useState40([]);
11640
- const [loading, setLoading] = useState40(false);
11641
- const [testingId, setTestingId] = useState40(null);
11642
- const [formModalOpen, setFormModalOpen] = useState40(false);
11643
- const [editingConfig, setEditingConfig] = useState40(null);
11644
- useEffect26(() => {
11751
+ const [configs, setConfigs] = useState41([]);
11752
+ const [loading, setLoading] = useState41(false);
11753
+ const [testingId, setTestingId] = useState41(null);
11754
+ const [formModalOpen, setFormModalOpen] = useState41(false);
11755
+ const [editingConfig, setEditingConfig] = useState41(null);
11756
+ useEffect27(() => {
11645
11757
  loadConfigs();
11646
11758
  }, [tenantId]);
11647
11759
  const loadConfigs = async () => {
@@ -11850,7 +11962,7 @@ var DatabaseConfigFormModal = ({
11850
11962
  }) => {
11851
11963
  const { config } = useLatticeChatShellContext();
11852
11964
  const { post, put } = useApi();
11853
- const [formData, setFormData] = useState40({
11965
+ const [formData, setFormData] = useState41({
11854
11966
  key: editingConfig?.key || "",
11855
11967
  name: editingConfig?.name || "",
11856
11968
  description: editingConfig?.description || "",
@@ -11862,7 +11974,7 @@ var DatabaseConfigFormModal = ({
11862
11974
  password: editingConfig?.config.password || "",
11863
11975
  connectionString: editingConfig?.config.connectionString || ""
11864
11976
  });
11865
- const [saving, setSaving] = useState40(false);
11977
+ const [saving, setSaving] = useState41(false);
11866
11978
  const handleSubmit = async () => {
11867
11979
  setSaving(true);
11868
11980
  try {
@@ -12074,7 +12186,7 @@ var DatabaseConfigFormModal = ({
12074
12186
  };
12075
12187
 
12076
12188
  // src/components/Chat/McpConfigDrawerContent.tsx
12077
- import { useState as useState41, useEffect as useEffect27 } from "react";
12189
+ import { useState as useState42, useEffect as useEffect28 } from "react";
12078
12190
  import { Plug, Plus as Plus5, Edit2 as Edit23, Trash2 as Trash23, TestTube2 as TestTube23, Loader2 as Loader23, Settings as Settings2, Database as Database3, ChevronRight as ChevronRight3, ChevronLeft as ChevronLeft3, Check as Check3, Terminal, Globe, Server } from "lucide-react";
12079
12191
  import { Card as Card14, Button as Button27, Space as Space18, Typography as Typography19, Tag as Tag8, Modal as Modal5, message as message7, Input as Input7, Select as Select3, Popconfirm as Popconfirm3, Steps as Steps2, Checkbox as Checkbox3, Spin as Spin6, theme as theme4, Collapse as Collapse7 } from "antd";
12080
12192
  import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs36 } from "react/jsx-runtime";
@@ -12088,12 +12200,12 @@ var McpConfigDrawerContent = ({
12088
12200
  const { config } = useLatticeChatShellContext();
12089
12201
  const { token } = useToken3();
12090
12202
  const { get, post, put, del } = useApi();
12091
- const [configs, setConfigs] = useState41([]);
12092
- const [loading, setLoading] = useState41(false);
12093
- const [testingId, setTestingId] = useState41(null);
12094
- const [formModalOpen, setFormModalOpen] = useState41(false);
12095
- const [editingConfig, setEditingConfig] = useState41(null);
12096
- useEffect27(() => {
12203
+ const [configs, setConfigs] = useState42([]);
12204
+ const [loading, setLoading] = useState42(false);
12205
+ const [testingId, setTestingId] = useState42(null);
12206
+ const [formModalOpen, setFormModalOpen] = useState42(false);
12207
+ const [editingConfig, setEditingConfig] = useState42(null);
12208
+ useEffect28(() => {
12097
12209
  loadConfigs();
12098
12210
  }, [tenantId]);
12099
12211
  const loadConfigs = async () => {
@@ -12307,11 +12419,11 @@ var McpConfigFormModal = ({
12307
12419
  const { config } = useLatticeChatShellContext();
12308
12420
  const { token } = useToken3();
12309
12421
  const { post, put } = useApi();
12310
- const [currentStep, setCurrentStep] = useState41(0);
12311
- const [saving, setSaving] = useState41(false);
12312
- const [fetchingTools, setFetchingTools] = useState41(false);
12313
- const [availableTools, setAvailableTools] = useState41([]);
12314
- const [formData, setFormData] = useState41({
12422
+ const [currentStep, setCurrentStep] = useState42(0);
12423
+ const [saving, setSaving] = useState42(false);
12424
+ const [fetchingTools, setFetchingTools] = useState42(false);
12425
+ const [availableTools, setAvailableTools] = useState42([]);
12426
+ const [formData, setFormData] = useState42({
12315
12427
  key: editingConfig?.key || "",
12316
12428
  name: editingConfig?.name || "",
12317
12429
  description: editingConfig?.description || "",
@@ -12351,12 +12463,12 @@ var McpConfigFormModal = ({
12351
12463
  selectedTools: editingConfig?.selectedTools || []
12352
12464
  });
12353
12465
  };
12354
- useEffect27(() => {
12466
+ useEffect28(() => {
12355
12467
  if (open) {
12356
12468
  resetForm();
12357
12469
  }
12358
12470
  }, [open, editingConfig]);
12359
- useEffect27(() => {
12471
+ useEffect28(() => {
12360
12472
  if (currentStep === 1 && availableTools.length === 0 && !fetchingTools) {
12361
12473
  handleFetchTools();
12362
12474
  }
@@ -12707,7 +12819,7 @@ var McpConfigFormModal = ({
12707
12819
  };
12708
12820
 
12709
12821
  // src/components/Chat/AssistantFlow.tsx
12710
- import { useMemo as useMemo13, useEffect as useEffect30, useState as useState45, useCallback as useCallback27, useRef as useRef15 } from "react";
12822
+ import { useMemo as useMemo13, useEffect as useEffect31, useState as useState46, useCallback as useCallback27, useRef as useRef15 } from "react";
12711
12823
  import {
12712
12824
  ReactFlow,
12713
12825
  Background,
@@ -13513,7 +13625,7 @@ var AssistantNode = ({
13513
13625
  var AssistantNode_default = AssistantNode;
13514
13626
 
13515
13627
  // src/components/Chat/AgentConfigPanel.tsx
13516
- import { useState as useState42, useEffect as useEffect28, useMemo as useMemo12, useCallback as useCallback25, useRef as useRef14 } from "react";
13628
+ import { useState as useState43, useEffect as useEffect29, useMemo as useMemo12, useCallback as useCallback25, useRef as useRef14 } from "react";
13517
13629
  import {
13518
13630
  Form as Form4,
13519
13631
  Input as Input8,
@@ -13560,7 +13672,7 @@ var { TextArea: TextArea4 } = Input8;
13560
13672
  var { Text: Text18, Title: Title4 } = Typography21;
13561
13673
  var SectionCard = ({ title, icon, badge, children, defaultExpanded = true }) => {
13562
13674
  const { token } = theme6.useToken();
13563
- const [expanded, setExpanded] = useState42(defaultExpanded);
13675
+ const [expanded, setExpanded] = useState43(defaultExpanded);
13564
13676
  return /* @__PURE__ */ jsxs38(
13565
13677
  Card15,
13566
13678
  {
@@ -13774,11 +13886,11 @@ var getMiddlewareTypeDefinition = (middlewareType, availableTypes) => {
13774
13886
  return availableTypes?.find((t) => t.type === middlewareType);
13775
13887
  };
13776
13888
  var SkillListField = ({ propertyKey, label, value, onChange, token }) => {
13777
- const [skills, setSkills] = useState42([]);
13778
- const [loading, setLoading] = useState42(false);
13889
+ const [skills, setSkills] = useState43([]);
13890
+ const [loading, setLoading] = useState43(false);
13779
13891
  const { get } = useApi();
13780
13892
  const fetchedRef = useRef14(false);
13781
- useEffect28(() => {
13893
+ useEffect29(() => {
13782
13894
  if (fetchedRef.current) return;
13783
13895
  fetchedRef.current = true;
13784
13896
  const fetchSkills = async () => {
@@ -13885,11 +13997,11 @@ var SkillListField = ({ propertyKey, label, value, onChange, token }) => {
13885
13997
  ] }, propertyKey) });
13886
13998
  };
13887
13999
  var DatabaseListField = ({ propertyKey, label, value, onChange, token }) => {
13888
- const [databases, setDatabases] = useState42([]);
13889
- const [loading, setLoading] = useState42(false);
14000
+ const [databases, setDatabases] = useState43([]);
14001
+ const [loading, setLoading] = useState43(false);
13890
14002
  const { get } = useApi();
13891
14003
  const fetchedRef = useRef14(false);
13892
- useEffect28(() => {
14004
+ useEffect29(() => {
13893
14005
  if (fetchedRef.current) return;
13894
14006
  fetchedRef.current = true;
13895
14007
  const fetchDatabases = async () => {
@@ -14000,11 +14112,11 @@ var DatabaseListField = ({ propertyKey, label, value, onChange, token }) => {
14000
14112
  ] }, propertyKey) });
14001
14113
  };
14002
14114
  var MetricsListField = ({ propertyKey, label, value, onChange, token }) => {
14003
- const [servers, setServers] = useState42([]);
14004
- const [loading, setLoading] = useState42(false);
14115
+ const [servers, setServers] = useState43([]);
14116
+ const [loading, setLoading] = useState43(false);
14005
14117
  const { get } = useApi();
14006
14118
  const fetchedRef = useRef14(false);
14007
- useEffect28(() => {
14119
+ useEffect29(() => {
14008
14120
  if (fetchedRef.current) return;
14009
14121
  fetchedRef.current = true;
14010
14122
  const fetchMetricsServers = async () => {
@@ -14116,7 +14228,7 @@ var MetricsListField = ({ propertyKey, label, value, onChange, token }) => {
14116
14228
  };
14117
14229
  var TopologyEdgeField = ({ propertyKey, label, value, onChange, token }) => {
14118
14230
  const edges = Array.isArray(value) ? value : [];
14119
- const [newEdge, setNewEdge] = useState42({ from: "", to: "", purpose: "" });
14231
+ const [newEdge, setNewEdge] = useState43({ from: "", to: "", purpose: "" });
14120
14232
  const handleAdd = () => {
14121
14233
  if (!newEdge.from.trim() || !newEdge.to.trim() || !newEdge.purpose.trim()) return;
14122
14234
  onChange([...edges, { ...newEdge }]);
@@ -14209,7 +14321,7 @@ var TopologyEdgeField = ({ propertyKey, label, value, onChange, token }) => {
14209
14321
  ] }, propertyKey) });
14210
14322
  };
14211
14323
  var MiddlewareSectionCard = ({ middleware, middlewareType, onToggle, onConfigChange, token }) => {
14212
- const [expanded, setExpanded] = useState42(middleware.enabled);
14324
+ const [expanded, setExpanded] = useState43(middleware.enabled);
14213
14325
  const getIcon = () => {
14214
14326
  switch (middleware.type) {
14215
14327
  case "browser":
@@ -14375,17 +14487,17 @@ var AgentConfigPanel = ({
14375
14487
  const { token } = theme6.useToken();
14376
14488
  const { config } = useLatticeChatShellContext();
14377
14489
  const { get } = useApi();
14378
- const [toolsLoading, setToolsLoading] = useState42(false);
14379
- const [saving, setSaving] = useState42(false);
14380
- const [deleting, setDeleting] = useState42(false);
14381
- const [isDeleteModalOpen, setIsDeleteModalOpen] = useState42(false);
14382
- const [tools, setTools] = useState42([]);
14383
- const [selectedTools, setSelectedTools] = useState42([]);
14384
- const [selectedSubAgents, setSelectedSubAgents] = useState42([]);
14385
- const [agentPrompt, setAgentPrompt] = useState42("");
14386
- const [isPromptModalOpen, setIsPromptModalOpen] = useState42(false);
14387
- const [agentType, setAgentType] = useState42("react");
14388
- const [middleware, setMiddleware] = useState42([]);
14490
+ const [toolsLoading, setToolsLoading] = useState43(false);
14491
+ const [saving, setSaving] = useState43(false);
14492
+ const [deleting, setDeleting] = useState43(false);
14493
+ const [isDeleteModalOpen, setIsDeleteModalOpen] = useState43(false);
14494
+ const [tools, setTools] = useState43([]);
14495
+ const [selectedTools, setSelectedTools] = useState43([]);
14496
+ const [selectedSubAgents, setSelectedSubAgents] = useState43([]);
14497
+ const [agentPrompt, setAgentPrompt] = useState43("");
14498
+ const [isPromptModalOpen, setIsPromptModalOpen] = useState43(false);
14499
+ const [agentType, setAgentType] = useState43("react");
14500
+ const [middleware, setMiddleware] = useState43([]);
14389
14501
  const parsedConfig = useMemo12(() => {
14390
14502
  if (!assistant?.graphDefinition) {
14391
14503
  return null;
@@ -14450,7 +14562,7 @@ var AgentConfigPanel = ({
14450
14562
  setToolsLoading(false);
14451
14563
  }
14452
14564
  }, [get, visible]);
14453
- useEffect28(() => {
14565
+ useEffect29(() => {
14454
14566
  if (visible && assistant) {
14455
14567
  fetchTools();
14456
14568
  if (parsedConfig) {
@@ -15106,7 +15218,7 @@ var AgentConfigPanel = ({
15106
15218
  var AgentConfigPanel_default = AgentConfigPanel;
15107
15219
 
15108
15220
  // src/components/Chat/CreateAssistantModal.tsx
15109
- import { useState as useState44, useCallback as useCallback26 } from "react";
15221
+ import { useState as useState45, useCallback as useCallback26 } from "react";
15110
15222
  import {
15111
15223
  Modal as Modal7,
15112
15224
  Form as Form5,
@@ -15122,7 +15234,7 @@ import {
15122
15234
  import { PlusOutlined as PlusOutlined3, ForkOutlined as ForkOutlined2 } from "@ant-design/icons";
15123
15235
 
15124
15236
  // src/components/Chat/ParentAgentSelector.tsx
15125
- import { useEffect as useEffect29, useState as useState43 } from "react";
15237
+ import { useEffect as useEffect30, useState as useState44 } from "react";
15126
15238
  import { Select as Select5, Typography as Typography22 } from "antd";
15127
15239
  import { jsx as jsx64, jsxs as jsxs39 } from "react/jsx-runtime";
15128
15240
  var { Text: Text19 } = Typography22;
@@ -15131,10 +15243,10 @@ var ParentAgentSelector = ({
15131
15243
  value,
15132
15244
  placeholder = "Select a parent agent to extend..."
15133
15245
  }) => {
15134
- const [assistants, setAssistants] = useState43([]);
15135
- const [loading, setLoading] = useState43(false);
15246
+ const [assistants, setAssistants] = useState44([]);
15247
+ const [loading, setLoading] = useState44(false);
15136
15248
  const { get } = useApi();
15137
- useEffect29(() => {
15249
+ useEffect30(() => {
15138
15250
  const fetchAssistants = async () => {
15139
15251
  setLoading(true);
15140
15252
  try {
@@ -15274,10 +15386,10 @@ var CreateAssistantModal = ({
15274
15386
  onSuccess
15275
15387
  }) => {
15276
15388
  const [form] = Form5.useForm();
15277
- const [loading, setLoading] = useState44(false);
15278
- const [creationMode, setCreationMode] = useState44("scratch");
15279
- const [parentAssistant, setParentAssistant] = useState44(null);
15280
- const [subAgentDecisions, setSubAgentDecisions] = useState44([]);
15389
+ const [loading, setLoading] = useState45(false);
15390
+ const [creationMode, setCreationMode] = useState45("scratch");
15391
+ const [parentAssistant, setParentAssistant] = useState45(null);
15392
+ const [subAgentDecisions, setSubAgentDecisions] = useState45([]);
15281
15393
  const { get, post } = useApi();
15282
15394
  const { token } = theme8.useToken();
15283
15395
  const resetExtendState = useCallback26(() => {
@@ -15666,11 +15778,11 @@ var AssistantFlowInner = ({ onChat }) => {
15666
15778
  const { setCenter, fitView } = useReactFlow();
15667
15779
  const [nodes, setNodes, onNodesChange] = useNodesState([]);
15668
15780
  const [edges, setEdges, onEdgesChange] = useEdgesState([]);
15669
- const [assistants, setAssistants] = useState45([]);
15670
- const [assistantsLoading, setAssistantsLoading] = useState45(false);
15671
- const [configPanelVisible, setConfigPanelVisible] = useState45(false);
15672
- const [selectedAssistant, setSelectedAssistant] = useState45(null);
15673
- const [isCreateModalOpen, setIsCreateModalOpen] = useState45(false);
15781
+ const [assistants, setAssistants] = useState46([]);
15782
+ const [assistantsLoading, setAssistantsLoading] = useState46(false);
15783
+ const [configPanelVisible, setConfigPanelVisible] = useState46(false);
15784
+ const [selectedAssistant, setSelectedAssistant] = useState46(null);
15785
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState46(false);
15674
15786
  const { get, del, put } = useApi();
15675
15787
  const { config } = useLatticeChatShellContext();
15676
15788
  const { token } = theme9.useToken();
@@ -15718,10 +15830,10 @@ var AssistantFlowInner = ({ onChat }) => {
15718
15830
  setAssistantsLoading(false);
15719
15831
  }
15720
15832
  };
15721
- useEffect30(() => {
15833
+ useEffect31(() => {
15722
15834
  fetchAssistants();
15723
15835
  }, []);
15724
- useEffect30(() => {
15836
+ useEffect31(() => {
15725
15837
  if (!assistants || assistants.length === 0) {
15726
15838
  setNodes([]);
15727
15839
  setEdges([]);
@@ -15985,7 +16097,7 @@ var AssistantFlowInner = ({ onChat }) => {
15985
16097
  });
15986
16098
  lastCreatedAssistantRef.current = createdAssistant;
15987
16099
  };
15988
- useEffect30(() => {
16100
+ useEffect31(() => {
15989
16101
  if (selectedAssistant) {
15990
16102
  const node = nodes.find((n) => n.id === selectedAssistant.id);
15991
16103
  if (node) {
@@ -15993,7 +16105,7 @@ var AssistantFlowInner = ({ onChat }) => {
15993
16105
  }
15994
16106
  }
15995
16107
  }, [selectedAssistant, nodes, setCenter]);
15996
- useEffect30(() => {
16108
+ useEffect31(() => {
15997
16109
  if (assistants.length > 0 && selectedAssistant) {
15998
16110
  const assistant = assistants.find((a) => a.id === selectedAssistant.id);
15999
16111
  if (assistant && !configPanelVisible) {
@@ -16002,7 +16114,7 @@ var AssistantFlowInner = ({ onChat }) => {
16002
16114
  }
16003
16115
  }, [assistants, selectedAssistant, configPanelVisible]);
16004
16116
  const lastCreatedAssistantRef = useRef15(null);
16005
- useEffect30(() => {
16117
+ useEffect31(() => {
16006
16118
  if (lastCreatedAssistantRef.current && !assistants.find((a) => a.id === lastCreatedAssistantRef.current?.id)) {
16007
16119
  lastCreatedAssistantRef.current = null;
16008
16120
  }
@@ -16117,7 +16229,7 @@ var AssistantFlow = (props) => /* @__PURE__ */ jsx67(ReactFlowProvider, { childr
16117
16229
  var AssistantFlow_default = AssistantFlow;
16118
16230
 
16119
16231
  // src/components/Chat/SkillFlow.tsx
16120
- import { useMemo as useMemo15, useEffect as useEffect32, useState as useState48 } from "react";
16232
+ import { useMemo as useMemo15, useEffect as useEffect33, useState as useState49 } from "react";
16121
16233
  import {
16122
16234
  ReactFlow as ReactFlow2,
16123
16235
  Background as Background2,
@@ -16131,7 +16243,7 @@ import { Button as Button33, theme as theme12 } from "antd";
16131
16243
  import { PlusOutlined as PlusOutlined7 } from "@ant-design/icons";
16132
16244
 
16133
16245
  // src/components/Chat/SkillNode.tsx
16134
- import { useEffect as useEffect31, useMemo as useMemo14, useState as useState46 } from "react";
16246
+ import { useEffect as useEffect32, useMemo as useMemo14, useState as useState47 } from "react";
16135
16247
  import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
16136
16248
  import {
16137
16249
  Avatar as Avatar5,
@@ -16196,7 +16308,7 @@ var SkillNode = ({ data }) => {
16196
16308
  if (!skill) {
16197
16309
  return null;
16198
16310
  }
16199
- const [currentSkill, setCurrentSkill] = useState46(skill);
16311
+ const [currentSkill, setCurrentSkill] = useState47(skill);
16200
16312
  const badgeColor = getBadgeColor2(currentSkill.name);
16201
16313
  const initials = currentSkill.name?.split("-").map((n) => n.charAt(0)).join("").toUpperCase().slice(0, 2) || "SK";
16202
16314
  const hasSubSkills = currentSkill.subSkills && currentSkill.subSkills.length > 0;
@@ -16218,20 +16330,20 @@ var SkillNode = ({ data }) => {
16218
16330
  const handleCopy = (text) => {
16219
16331
  navigator.clipboard.writeText(text);
16220
16332
  };
16221
- const [isEditing, setIsEditing] = useState46(false);
16222
- const [draftSkill, setDraftSkill] = useState46({
16333
+ const [isEditing, setIsEditing] = useState47(false);
16334
+ const [draftSkill, setDraftSkill] = useState47({
16223
16335
  ...skill,
16224
16336
  id: skill.name
16225
16337
  });
16226
- const [metadataRows, setMetadataRows] = useState46(
16338
+ const [metadataRows, setMetadataRows] = useState47(
16227
16339
  metadataEntries.map(([key, value]) => ({
16228
16340
  key,
16229
16341
  value
16230
16342
  }))
16231
16343
  );
16232
- const [isModalOpen, setIsModalOpen] = useState46(false);
16233
- const [saving, setSaving] = useState46(false);
16234
- useEffect31(() => {
16344
+ const [isModalOpen, setIsModalOpen] = useState47(false);
16345
+ const [saving, setSaving] = useState47(false);
16346
+ useEffect32(() => {
16235
16347
  setIsEditing(false);
16236
16348
  setCurrentSkill(skill);
16237
16349
  setDraftSkill({ ...skill, id: skill.name });
@@ -17334,7 +17446,7 @@ var SkillNode = ({ data }) => {
17334
17446
  var SkillNode_default = SkillNode;
17335
17447
 
17336
17448
  // src/components/Chat/CreateSkillModal.tsx
17337
- import { useState as useState47 } from "react";
17449
+ import { useState as useState48 } from "react";
17338
17450
  import {
17339
17451
  Modal as Modal9,
17340
17452
  Form as Form6,
@@ -17356,11 +17468,11 @@ var CreateSkillModal = ({
17356
17468
  onSuccess
17357
17469
  }) => {
17358
17470
  const [form] = Form6.useForm();
17359
- const [loading, setLoading] = useState47(false);
17471
+ const [loading, setLoading] = useState48(false);
17360
17472
  const { post } = useApi();
17361
17473
  const { token } = theme11.useToken();
17362
17474
  const defaultMetadataRows = [{ key: "category", value: "global" }];
17363
- const [metadataRows, setMetadataRows] = useState47(defaultMetadataRows);
17475
+ const [metadataRows, setMetadataRows] = useState48(defaultMetadataRows);
17364
17476
  const handleSubmit = async () => {
17365
17477
  try {
17366
17478
  const values = await form.validateFields();
@@ -17630,9 +17742,9 @@ import { jsx as jsx70, jsxs as jsxs45 } from "react/jsx-runtime";
17630
17742
  var SkillFlowInner = ({ onNodeClick }) => {
17631
17743
  const [nodes, setNodes, onNodesChange] = useNodesState2([]);
17632
17744
  const [edges, setEdges, onEdgesChange] = useEdgesState2([]);
17633
- const [isCreateModalOpen, setIsCreateModalOpen] = useState48(false);
17634
- const [skills, setSkills] = useState48([]);
17635
- const [skillsLoading, setSkillsLoading] = useState48(false);
17745
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState49(false);
17746
+ const [skills, setSkills] = useState49([]);
17747
+ const [skillsLoading, setSkillsLoading] = useState49(false);
17636
17748
  const { token } = theme12.useToken();
17637
17749
  const { get } = useApi();
17638
17750
  const nodeTypes2 = useMemo15(
@@ -17655,10 +17767,10 @@ var SkillFlowInner = ({ onNodeClick }) => {
17655
17767
  setSkillsLoading(false);
17656
17768
  }
17657
17769
  };
17658
- useEffect32(() => {
17770
+ useEffect33(() => {
17659
17771
  fetchSkills();
17660
17772
  }, []);
17661
- useEffect32(() => {
17773
+ useEffect33(() => {
17662
17774
  if (!skills || skills.length === 0) {
17663
17775
  setNodes([]);
17664
17776
  setEdges([]);
@@ -17867,7 +17979,7 @@ var SkillFlow_default = SkillFlow;
17867
17979
  // src/components/Chat/ToolsList.tsx
17868
17980
  import { List as List6, Avatar as Avatar6, theme as theme13, Alert as Alert7, Button as Button34, Tag as Tag13 } from "antd";
17869
17981
  import { ReloadOutlined } from "@ant-design/icons";
17870
- import { useEffect as useEffect33, useState as useState49, useCallback as useCallback28 } from "react";
17982
+ import { useEffect as useEffect34, useState as useState50, useCallback as useCallback28 } from "react";
17871
17983
  import { jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
17872
17984
  var ToolsList = ({
17873
17985
  onToolSelect,
@@ -17875,12 +17987,12 @@ var ToolsList = ({
17875
17987
  }) => {
17876
17988
  const { token } = theme13.useToken();
17877
17989
  const { get } = useApi();
17878
- const [state, setState] = useState49({
17990
+ const [state, setState] = useState50({
17879
17991
  tools: [],
17880
17992
  isLoading: false,
17881
17993
  error: null
17882
17994
  });
17883
- const [selectedToolId, setSelectedToolId] = useState49(null);
17995
+ const [selectedToolId, setSelectedToolId] = useState50(null);
17884
17996
  const fetchTools = useCallback28(async () => {
17885
17997
  setState((prev) => ({ ...prev, isLoading: true, error: null }));
17886
17998
  try {
@@ -17913,7 +18025,7 @@ var ToolsList = ({
17913
18025
  const handleRefresh = useCallback28(() => {
17914
18026
  fetchTools();
17915
18027
  }, [fetchTools]);
17916
- useEffect33(() => {
18028
+ useEffect34(() => {
17917
18029
  if (autoLoad) {
17918
18030
  fetchTools();
17919
18031
  }
@@ -18103,7 +18215,7 @@ var ToolsList = ({
18103
18215
  };
18104
18216
 
18105
18217
  // src/components/Chat/TopologyAutomationView.tsx
18106
- import { useEffect as useEffect35, useState as useState50, useCallback as useCallback29, useMemo as useMemo17 } from "react";
18218
+ import { useEffect as useEffect36, useState as useState51, useCallback as useCallback29, useMemo as useMemo17 } from "react";
18107
18219
  import {
18108
18220
  ReactFlow as ReactFlow3,
18109
18221
  Background as Background3,
@@ -18355,7 +18467,7 @@ var CopilotPanel = ({
18355
18467
  };
18356
18468
 
18357
18469
  // src/components/Chat/CreateWorkflowModal.tsx
18358
- import { useEffect as useEffect34 } from "react";
18470
+ import { useEffect as useEffect35 } from "react";
18359
18471
  import { Modal as Modal10, Form as Form7, Input as Input13 } from "antd";
18360
18472
  import { jsx as jsx74 } from "react/jsx-runtime";
18361
18473
  function extractName(purpose) {
@@ -18380,7 +18492,7 @@ var CreateWorkflowModal = ({
18380
18492
  }) => {
18381
18493
  const { post } = useApi();
18382
18494
  const [form] = Form7.useForm();
18383
- useEffect34(() => {
18495
+ useEffect35(() => {
18384
18496
  if (open) {
18385
18497
  form.resetFields();
18386
18498
  }
@@ -18570,9 +18682,9 @@ function TopologyFlowInner({
18570
18682
  }) {
18571
18683
  const [nodes, setNodes, onNodesChange] = useNodesState3(initialNodes);
18572
18684
  const [edges, setEdges, onEdgesChange] = useEdgesState3(initialEdges);
18573
- const [specModalOpen, setSpecModalOpen] = useState50(false);
18685
+ const [specModalOpen, setSpecModalOpen] = useState51(false);
18574
18686
  const nodeTypes2 = useMemo17(() => ({ topologyNode: TopologyNode_default }), []);
18575
- useEffect35(() => {
18687
+ useEffect36(() => {
18576
18688
  setNodes(initialNodes);
18577
18689
  setEdges(initialEdges);
18578
18690
  }, [initialNodes, initialEdges, setNodes, setEdges]);
@@ -18780,14 +18892,14 @@ function TopologyFlowInner({
18780
18892
  }
18781
18893
  var TopologyAutomationView = () => {
18782
18894
  const { get, del } = useApi();
18783
- const [agents, setAgents] = useState50([]);
18784
- const [agentNameMap, setAgentNameMap] = useState50(/* @__PURE__ */ new Map());
18785
- const [selectedWorkflowId, setSelectedWorkflowId] = useState50(null);
18786
- const [copilotOpen, setCopilotOpen] = useState50(true);
18787
- const [initialLoading, setInitialLoading] = useState50(true);
18788
- const [error, setError] = useState50(null);
18789
- const [isCreateModalOpen, setIsCreateModalOpen] = useState50(false);
18790
- const [initialMessage, setInitialMessage] = useState50(null);
18895
+ const [agents, setAgents] = useState51([]);
18896
+ const [agentNameMap, setAgentNameMap] = useState51(/* @__PURE__ */ new Map());
18897
+ const [selectedWorkflowId, setSelectedWorkflowId] = useState51(null);
18898
+ const [copilotOpen, setCopilotOpen] = useState51(true);
18899
+ const [initialLoading, setInitialLoading] = useState51(true);
18900
+ const [error, setError] = useState51(null);
18901
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState51(false);
18902
+ const [initialMessage, setInitialMessage] = useState51(null);
18791
18903
  const workflowTools = useMemo17(
18792
18904
  () => [
18793
18905
  "create_agent",
@@ -18822,7 +18934,7 @@ var TopologyAutomationView = () => {
18822
18934
  }
18823
18935
  setError(null);
18824
18936
  }, [get]);
18825
- useEffect35(() => {
18937
+ useEffect36(() => {
18826
18938
  let cancelled = false;
18827
18939
  const load = async () => {
18828
18940
  try {
@@ -18991,7 +19103,7 @@ var TopologyAutomationView = () => {
18991
19103
  };
18992
19104
 
18993
19105
  // src/components/Chat/TopologyRuntimeView.tsx
18994
- import { useEffect as useEffect36, useState as useState51, useMemo as useMemo18, useCallback as useCallback30, useRef as useRef16 } from "react";
19106
+ import { useEffect as useEffect37, useState as useState52, useMemo as useMemo18, useCallback as useCallback30, useRef as useRef16 } from "react";
18995
19107
  import {
18996
19108
  Spin as Spin9,
18997
19109
  Empty as Empty6,
@@ -19305,16 +19417,16 @@ function FlowCanvas({ steps }) {
19305
19417
  const initialEdges = useEdgesFromSteps(steps);
19306
19418
  const [nodes, setNodes, onNodesChange] = useNodesState4(initialNodes);
19307
19419
  const [edges, setEdges, onEdgesChange] = useEdgesState4(initialEdges);
19308
- const [selectedNodeId, setSelectedNodeId] = useState51(null);
19420
+ const [selectedNodeId, setSelectedNodeId] = useState52(null);
19309
19421
  const selectedStep = useMemo18(
19310
19422
  () => steps.find((s) => s.id === selectedNodeId) || null,
19311
19423
  [steps, selectedNodeId]
19312
19424
  );
19313
- useEffect36(() => {
19425
+ useEffect37(() => {
19314
19426
  setNodes(initialNodes);
19315
19427
  setEdges(initialEdges);
19316
19428
  }, [initialNodes, initialEdges, setNodes, setEdges]);
19317
- useEffect36(() => {
19429
+ useEffect37(() => {
19318
19430
  if (selectedNodeId) {
19319
19431
  setNodes(
19320
19432
  (nds) => nds.map((n) => ({
@@ -19509,8 +19621,8 @@ function RunSummaryBanner({ run, agentName }) {
19509
19621
  }
19510
19622
  var RunDetail = ({ run, agentName, open, onClose, onRunUpdate, autoRefresh, onAutoRefreshChange }) => {
19511
19623
  const { get } = useApi();
19512
- const [steps, setSteps] = useState51([]);
19513
- const [loading, setLoading] = useState51(false);
19624
+ const [steps, setSteps] = useState52([]);
19625
+ const [loading, setLoading] = useState52(false);
19514
19626
  const stepsPollTimeoutRef = useRef16(null);
19515
19627
  const stepsPollSessionRef = useRef16(0);
19516
19628
  const fetchSteps = useCallback30(async () => {
@@ -19531,12 +19643,12 @@ var RunDetail = ({ run, agentName, open, onClose, onRunUpdate, autoRefresh, onAu
19531
19643
  } catch {
19532
19644
  }
19533
19645
  }, [get, run.id, onRunUpdate]);
19534
- useEffect36(() => {
19646
+ useEffect37(() => {
19535
19647
  if (!open) return;
19536
19648
  setLoading(true);
19537
19649
  fetchSteps().finally(() => setLoading(false));
19538
19650
  }, [open, run.id, fetchSteps]);
19539
- useEffect36(() => {
19651
+ useEffect37(() => {
19540
19652
  if (stepsPollTimeoutRef.current) {
19541
19653
  clearTimeout(stepsPollTimeoutRef.current);
19542
19654
  stepsPollTimeoutRef.current = null;
@@ -19598,12 +19710,12 @@ var RunDetail = ({ run, agentName, open, onClose, onRunUpdate, autoRefresh, onAu
19598
19710
  var POLLING_INTERVAL = 3e3;
19599
19711
  var TopologyRuntimeView = () => {
19600
19712
  const { get, del } = useApi();
19601
- const [runs, setRuns] = useState51([]);
19602
- const [agentNames, setAgentNames] = useState51({});
19603
- const [loading, setLoading] = useState51(true);
19604
- const [error, setError] = useState51(null);
19605
- const [selectedRun, setSelectedRun] = useState51(null);
19606
- const [autoRefresh, setAutoRefresh] = useState51(true);
19713
+ const [runs, setRuns] = useState52([]);
19714
+ const [agentNames, setAgentNames] = useState52({});
19715
+ const [loading, setLoading] = useState52(true);
19716
+ const [error, setError] = useState52(null);
19717
+ const [selectedRun, setSelectedRun] = useState52(null);
19718
+ const [autoRefresh, setAutoRefresh] = useState52(true);
19607
19719
  const pollingSessionRef = useRef16(0);
19608
19720
  const handleRunUpdate = useCallback30((updated) => {
19609
19721
  setRuns(
@@ -19650,7 +19762,7 @@ var TopologyRuntimeView = () => {
19650
19762
  setLoading(false);
19651
19763
  }
19652
19764
  }, [get]);
19653
- useEffect36(() => {
19765
+ useEffect37(() => {
19654
19766
  let cancelled = false;
19655
19767
  const init2 = async () => {
19656
19768
  try {
@@ -19686,7 +19798,7 @@ var TopologyRuntimeView = () => {
19686
19798
  cancelled = true;
19687
19799
  };
19688
19800
  }, [get]);
19689
- useEffect36(() => {
19801
+ useEffect37(() => {
19690
19802
  return () => {
19691
19803
  pollingSessionRef.current = 0;
19692
19804
  };
@@ -19794,15 +19906,15 @@ var TopologyRuntimeView = () => {
19794
19906
  };
19795
19907
 
19796
19908
  // src/components/Chat/TopologyInboxView.tsx
19797
- import { useEffect as useEffect37, useState as useState52 } from "react";
19909
+ import { useEffect as useEffect38, useState as useState53 } from "react";
19798
19910
  import { Card as Card18, Typography as Typography31, Spin as Spin10, Empty as Empty7, List as List8, Button as Button37, Space as Space24, Tag as Tag17 } from "antd";
19799
19911
  import { InboxOutlined, ReloadOutlined as ReloadOutlined3 } from "@ant-design/icons";
19800
19912
  import { jsx as jsx77, jsxs as jsxs51 } from "react/jsx-runtime";
19801
19913
  var { Text: Text28, Title: Title6 } = Typography31;
19802
19914
  var TopologyInboxView = () => {
19803
19915
  const { get } = useApi();
19804
- const [items, setItems] = useState52([]);
19805
- const [loading, setLoading] = useState52(true);
19916
+ const [items, setItems] = useState53([]);
19917
+ const [loading, setLoading] = useState53(true);
19806
19918
  const fetchInbox = async () => {
19807
19919
  setLoading(true);
19808
19920
  try {
@@ -19829,7 +19941,7 @@ var TopologyInboxView = () => {
19829
19941
  setLoading(false);
19830
19942
  }
19831
19943
  };
19832
- useEffect37(() => {
19944
+ useEffect38(() => {
19833
19945
  fetchInbox();
19834
19946
  }, [get]);
19835
19947
  return /* @__PURE__ */ jsxs51("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
@@ -19912,7 +20024,7 @@ var TopologyInboxView = () => {
19912
20024
  };
19913
20025
 
19914
20026
  // src/components/Eval/EvalPanel.tsx
19915
- import React41, { useState as useState55, useMemo as useMemo19 } from "react";
20027
+ import React41, { useState as useState56, useMemo as useMemo19 } from "react";
19916
20028
  import { createStyles as createStyles22 } from "antd-style";
19917
20029
  import { Button as Button40, Card as Card22, Typography as Typography35, Row as Row3, Col as Col3, Tag as Tag20, theme as theme15, Dropdown as Dropdown2, Popconfirm as Popconfirm9, message as message14 } from "antd";
19918
20030
  import { Play as Play2, FlaskConical as FlaskConical2, TestTube2 as TestTube26, TrendingUp, CheckCircle as CheckCircle2, XCircle as XCircle2, ArrowRight as ArrowRight2, ChevronDown as ChevronDown3, Trash2 as Trash27, Clock } from "lucide-react";
@@ -20029,7 +20141,7 @@ var EvalSuiteCardList = ({ projectId, onSelectSuite }) => {
20029
20141
  };
20030
20142
 
20031
20143
  // src/components/Eval/EvalSuiteDetail.tsx
20032
- import { useState as useState53 } from "react";
20144
+ import { useState as useState54 } from "react";
20033
20145
  import { createStyles as createStyles20 } from "antd-style";
20034
20146
  import { Button as Button38, Card as Card20, Typography as Typography33, Modal as Modal12, Form as Form8, Input as Input14, Select as Select6, Table as Table3, Popconfirm as Popconfirm7, Empty as Empty9 } from "antd";
20035
20147
  import { Play, Plus as Plus6, Trash2 as Trash25, Bot, MessageSquare, FlaskConical } from "lucide-react";
@@ -20133,9 +20245,9 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun }) => {
20133
20245
  const { suites } = useEvalSuites(projectId);
20134
20246
  const { cases, create: createCase, remove: removeCase } = useEvalCases(projectId, suiteId);
20135
20247
  const { start } = useEvalRuns(projectId);
20136
- const [modalOpen, setModalOpen] = useState53(false);
20248
+ const [modalOpen, setModalOpen] = useState54(false);
20137
20249
  const [form] = Form8.useForm();
20138
- const [agents, setAgents] = useState53([]);
20250
+ const [agents, setAgents] = useState54([]);
20139
20251
  const suite = suites.find((s) => s.id === suiteId) || {};
20140
20252
  const loadAgents = async () => {
20141
20253
  try {
@@ -20268,7 +20380,7 @@ var EvalSuiteDetail = ({ projectId, suiteId, onBack, onRun }) => {
20268
20380
  };
20269
20381
 
20270
20382
  // src/components/Eval/EvalRunResults.tsx
20271
- import { useEffect as useEffect38, useState as useState54 } from "react";
20383
+ import { useEffect as useEffect39, useState as useState55 } from "react";
20272
20384
  import { createStyles as createStyles21 } from "antd-style";
20273
20385
  import { Button as Button39, Card as Card21, Typography as Typography34, Progress as Progress4, Tag as Tag19, Table as Table4, Empty as Empty10, Popconfirm as Popconfirm8, message as message13 } from "antd";
20274
20386
  import { CheckCircle, XCircle, Trash2 as Trash26 } from "lucide-react";
@@ -20357,9 +20469,9 @@ var useStyle11 = createStyles21(({ token, css }) => ({
20357
20469
  var EvalRunResults = ({ runId, onBack }) => {
20358
20470
  const { styles } = useStyle11();
20359
20471
  const client = useClient("__GLOBAL__");
20360
- const [run, setRun] = useState54(null);
20472
+ const [run, setRun] = useState55(null);
20361
20473
  const { status: streamingStatus, progress, connected } = useEvalRunStream(runId);
20362
- useEffect38(() => {
20474
+ useEffect39(() => {
20363
20475
  client.eval.runs.get(runId).then(setRun).catch(console.error);
20364
20476
  }, [runId, client]);
20365
20477
  if (!run) {
@@ -20710,10 +20822,10 @@ var EvalPanel = () => {
20710
20822
  const { styles, cx } = useStyle12();
20711
20823
  const { token } = theme15.useToken();
20712
20824
  const { projects } = useEvalProjects();
20713
- const [projectId, setProjectId] = useState55("");
20714
- const [page, setPage] = useState55("dashboard");
20715
- const [suiteId, setSuiteId] = useState55("");
20716
- const [runId, setRunId] = useState55("");
20825
+ const [projectId, setProjectId] = useState56("");
20826
+ const [page, setPage] = useState56("dashboard");
20827
+ const [suiteId, setSuiteId] = useState56("");
20828
+ const [runId, setRunId] = useState56("");
20717
20829
  React41.useEffect(() => {
20718
20830
  if (!projectId && projects.length > 0) {
20719
20831
  setProjectId(projects[0].id);
@@ -20901,8 +21013,8 @@ var EvalPanel = () => {
20901
21013
  ] });
20902
21014
  }
20903
21015
  const SuiteListPage = () => {
20904
- const [showAdd, setShowAdd] = useState55(false);
20905
- const [name, setName] = useState55("");
21016
+ const [showAdd, setShowAdd] = useState56(false);
21017
+ const [name, setName] = useState56("");
20906
21018
  const { create } = useEvalSuites(projectId);
20907
21019
  const handleAdd = async () => {
20908
21020
  if (!name.trim()) return;
@@ -21086,7 +21198,7 @@ var WorkspaceResourceManager = ({
21086
21198
  const { openContentApp, menuCollapsed, setMenuCollapsed } = useChatUIContext();
21087
21199
  const hasOpenedDefault = useRef17(false);
21088
21200
  const hasRegistered = useRef17(false);
21089
- useEffect39(() => {
21201
+ useEffect40(() => {
21090
21202
  if (!hasRegistered.current) {
21091
21203
  hasRegistered.current = true;
21092
21204
  regsiterElement("workspace_projects", {
@@ -21145,8 +21257,8 @@ var WorkspaceResourceManager = ({
21145
21257
  const { user, logout, tenants, currentTenant, selectTenant, isLoading } = useAuth();
21146
21258
  const { setWorkspace, setProject } = useWorkspaceContext();
21147
21259
  const { config } = useLatticeChatShellContext();
21148
- const [tenantModalOpen, setTenantModalOpen] = useState56(false);
21149
- const [changePasswordOpen, setChangePasswordOpen] = useState56(false);
21260
+ const [tenantModalOpen, setTenantModalOpen] = useState57(false);
21261
+ const [changePasswordOpen, setChangePasswordOpen] = useState57(false);
21150
21262
  const menuItems = useMemo20(() => {
21151
21263
  const items = config.workspaceMenuItems?.length ? [...config.workspaceMenuItems] : [...DEFAULT_WORKSPACE_MENU_ITEMS];
21152
21264
  return items.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
@@ -21178,7 +21290,7 @@ var WorkspaceResourceManager = ({
21178
21290
  });
21179
21291
  }
21180
21292
  };
21181
- useEffect39(() => {
21293
+ useEffect40(() => {
21182
21294
  if (!hasOpenedDefault.current && menuItems.length > 0) {
21183
21295
  hasOpenedDefault.current = true;
21184
21296
  const firstRoute = menuItems.find((item) => item.type === "route");
@@ -21394,8 +21506,8 @@ var WorkspaceContextProvider = ({
21394
21506
  }
21395
21507
  return null;
21396
21508
  };
21397
- const [workspaceId, setWorkspaceId] = useState57(getInitialWorkspaceId);
21398
- const [projectId, setProjectId] = useState57(getInitialProjectId);
21509
+ const [workspaceId, setWorkspaceId] = useState58(getInitialWorkspaceId);
21510
+ const [projectId, setProjectId] = useState58(getInitialProjectId);
21399
21511
  React43.useEffect(() => {
21400
21512
  const wsId = getInitialWorkspaceId();
21401
21513
  const pjId = getInitialProjectId();
@@ -21403,13 +21515,13 @@ var WorkspaceContextProvider = ({
21403
21515
  Client2.setWorkspaceContext(wsId || void 0, pjId || void 0);
21404
21516
  }
21405
21517
  }, []);
21406
- useEffect40(() => {
21518
+ useEffect41(() => {
21407
21519
  Client2.setWorkspaceContext(workspaceId || void 0, projectId || void 0);
21408
21520
  }, [workspaceId, projectId]);
21409
- const [workspaces, setWorkspaces] = useState57([]);
21410
- const [projects, setProjects] = useState57([]);
21411
- const [loading, setLoading] = useState57(false);
21412
- const [error, setError] = useState57(null);
21521
+ const [workspaces, setWorkspaces] = useState58([]);
21522
+ const [projects, setProjects] = useState58([]);
21523
+ const [loading, setLoading] = useState58(false);
21524
+ const [error, setError] = useState58(null);
21413
21525
  const client = React43.useMemo(() => {
21414
21526
  const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
21415
21527
  return new WorkspaceClient({
@@ -21430,7 +21542,7 @@ var WorkspaceContextProvider = ({
21430
21542
  setWorkspaces([]);
21431
21543
  resetSelectedWorkspace();
21432
21544
  }, [resetSelectedWorkspace, setWorkspaces]);
21433
- useEffect40(() => {
21545
+ useEffect41(() => {
21434
21546
  resetWS();
21435
21547
  refreshWorkspaces();
21436
21548
  }, [tenantId]);
@@ -21463,28 +21575,28 @@ var WorkspaceContextProvider = ({
21463
21575
  setLoading(false);
21464
21576
  }
21465
21577
  }, [client, workspaceId]);
21466
- useEffect40(() => {
21578
+ useEffect41(() => {
21467
21579
  if (workspaceId && typeof window !== "undefined") {
21468
21580
  sessionStorage.setItem("workspaceId", workspaceId);
21469
21581
  }
21470
21582
  }, [workspaceId]);
21471
- useEffect40(() => {
21583
+ useEffect41(() => {
21472
21584
  if (projectId && typeof window !== "undefined") {
21473
21585
  sessionStorage.setItem("projectId", projectId);
21474
21586
  }
21475
21587
  }, [projectId]);
21476
- useEffect40(() => {
21588
+ useEffect41(() => {
21477
21589
  refreshWorkspaces().catch((err) => {
21478
21590
  console.warn("Failed to load workspaces:", err);
21479
21591
  });
21480
21592
  }, [refreshWorkspaces]);
21481
- useEffect40(() => {
21593
+ useEffect41(() => {
21482
21594
  if (workspaces.length > 0 && !workspaceId) {
21483
21595
  const firstWorkspace = workspaces[0];
21484
21596
  setWorkspaceId(firstWorkspace.id);
21485
21597
  }
21486
21598
  }, [workspaces, workspaceId]);
21487
- useEffect40(() => {
21599
+ useEffect41(() => {
21488
21600
  if (workspaceId) {
21489
21601
  refreshProjects(workspaceId);
21490
21602
  } else {
@@ -21700,15 +21812,15 @@ var WorkspaceContextProvider = ({
21700
21812
  };
21701
21813
 
21702
21814
  // src/components/Chat/DatabasePicker.tsx
21703
- import { useRef as useRef18, useState as useState58 } from "react";
21815
+ import { useRef as useRef18, useState as useState59 } from "react";
21704
21816
  import { Modal as Modal14, List as List9, Checkbox as Checkbox5, Spin as Spin12, Empty as Empty11, Typography as Typography36, Button as Button42, Space as Space25, Tooltip as Tooltip14 } from "antd";
21705
21817
  import { Database as Database5 } from "lucide-react";
21706
21818
  import { Fragment as Fragment14, jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
21707
21819
  var DatabasePicker = ({ senderRef, iconOnly }) => {
21708
- const [modalOpen, setModalOpen] = useState58(false);
21709
- const [databases, setDatabases] = useState58([]);
21710
- const [loading, setLoading] = useState58(false);
21711
- const [selectedDatabases, setSelectedDatabases] = useState58([]);
21820
+ const [modalOpen, setModalOpen] = useState59(false);
21821
+ const [databases, setDatabases] = useState59([]);
21822
+ const [loading, setLoading] = useState59(false);
21823
+ const [selectedDatabases, setSelectedDatabases] = useState59([]);
21712
21824
  const { get } = useApi();
21713
21825
  const fetchedRef = useRef18(false);
21714
21826
  const loadDatabases = async () => {
@@ -21850,15 +21962,15 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
21850
21962
  };
21851
21963
 
21852
21964
  // src/components/Chat/SkillPicker.tsx
21853
- import { useRef as useRef19, useState as useState59 } from "react";
21965
+ import { useRef as useRef19, useState as useState60 } from "react";
21854
21966
  import { Modal as Modal15, List as List10, Checkbox as Checkbox6, Spin as Spin13, Empty as Empty12, Typography as Typography37, Button as Button43, Space as Space26, Tooltip as Tooltip15 } from "antd";
21855
21967
  import { BrainCircuit } from "lucide-react";
21856
21968
  import { Fragment as Fragment15, jsx as jsx85, jsxs as jsxs58 } from "react/jsx-runtime";
21857
21969
  var SkillPicker = ({ senderRef, iconOnly }) => {
21858
- const [modalOpen, setModalOpen] = useState59(false);
21859
- const [skills, setSkills] = useState59([]);
21860
- const [loading, setLoading] = useState59(false);
21861
- const [selectedSkills, setSelectedSkills] = useState59([]);
21970
+ const [modalOpen, setModalOpen] = useState60(false);
21971
+ const [skills, setSkills] = useState60([]);
21972
+ const [loading, setLoading] = useState60(false);
21973
+ const [selectedSkills, setSelectedSkills] = useState60([]);
21862
21974
  const { get } = useApi();
21863
21975
  const fetchedRef = useRef19(false);
21864
21976
  const loadSkills = async () => {
@@ -22000,14 +22112,14 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
22000
22112
  };
22001
22113
 
22002
22114
  // src/components/Chat/AgentPicker.tsx
22003
- import { useRef as useRef20, useState as useState60 } from "react";
22115
+ import { useRef as useRef20, useState as useState61 } from "react";
22004
22116
  import { Modal as Modal16, List as List11, Empty as Empty13, Typography as Typography38, Button as Button44, Tooltip as Tooltip16 } from "antd";
22005
22117
  import { Bot as Bot3 } from "lucide-react";
22006
22118
  import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
22007
22119
  var AgentPicker = ({ senderRef, iconOnly }) => {
22008
- const [modalOpen, setModalOpen] = useState60(false);
22009
- const [loading, setLoading] = useState60(false);
22010
- const [selectedAgent, setSelectedAgent] = useState60(null);
22120
+ const [modalOpen, setModalOpen] = useState61(false);
22121
+ const [loading, setLoading] = useState61(false);
22122
+ const [selectedAgent, setSelectedAgent] = useState61(null);
22011
22123
  const { assistants, currentAssistant, selectAssistant } = useAssistantContext();
22012
22124
  const fetchedRef = useRef20(false);
22013
22125
  const handleOpenModal = () => {
@@ -22116,7 +22228,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
22116
22228
  };
22117
22229
 
22118
22230
  // src/components/Chat/MetricsDataSourcePicker.tsx
22119
- import { useEffect as useEffect42, useState as useState61, useRef as useRef21 } from "react";
22231
+ import { useEffect as useEffect43, useState as useState62, useRef as useRef21 } from "react";
22120
22232
  import { Modal as Modal17, List as List12, Spin as Spin15, Empty as Empty14, Typography as Typography39, Button as Button45, Tag as Tag21, Tooltip as Tooltip17 } from "antd";
22121
22233
  import { Database as Database6, Check as Check4, Server as Server3 } from "lucide-react";
22122
22234
  import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
@@ -22125,9 +22237,9 @@ var MetricsDataSourcePicker = ({
22125
22237
  senderRef,
22126
22238
  iconOnly
22127
22239
  }) => {
22128
- const [modalOpen, setModalOpen] = useState61(false);
22129
- const [loading, setLoading] = useState61(false);
22130
- const [dataSources, setDataSources] = useState61([]);
22240
+ const [modalOpen, setModalOpen] = useState62(false);
22241
+ const [loading, setLoading] = useState62(false);
22242
+ const [dataSources, setDataSources] = useState62([]);
22131
22243
  const { config } = useLatticeChatShellContext();
22132
22244
  const { customRunConfig, updateCustomRunConfig } = useConversationContext();
22133
22245
  const { get } = useApi();
@@ -22205,7 +22317,7 @@ var MetricsDataSourcePicker = ({
22205
22317
  console.error("Failed to save datasource to sessionStorage:", error);
22206
22318
  }
22207
22319
  };
22208
- useEffect42(() => {
22320
+ useEffect43(() => {
22209
22321
  if (hasInitializedRef.current) return;
22210
22322
  hasInitializedRef.current = true;
22211
22323
  loadDataSources().then(() => {
@@ -22456,7 +22568,7 @@ var MetricsDataSourcePicker = ({
22456
22568
  };
22457
22569
 
22458
22570
  // src/components/Chat/ModelSelector.tsx
22459
- import { useState as useState62, useEffect as useEffect43, useCallback as useCallback32, useRef as useRef22 } from "react";
22571
+ import { useState as useState63, useEffect as useEffect44, useCallback as useCallback32, useRef as useRef22 } from "react";
22460
22572
  import { Select as Select7 } from "antd";
22461
22573
  import { jsx as jsx88 } from "react/jsx-runtime";
22462
22574
  var ModelSelector = ({
@@ -22465,11 +22577,11 @@ var ModelSelector = ({
22465
22577
  defaultModelKey = "default",
22466
22578
  style
22467
22579
  }) => {
22468
- const [models, setModels] = useState62([]);
22469
- const [isLoading, setIsLoading] = useState62(false);
22470
- const [internalValue, setInternalValue] = useState62(null);
22471
- const [dropdownOpen, setDropdownOpen] = useState62(false);
22472
- const [isHovered, setIsHovered] = useState62(false);
22580
+ const [models, setModels] = useState63([]);
22581
+ const [isLoading, setIsLoading] = useState63(false);
22582
+ const [internalValue, setInternalValue] = useState63(null);
22583
+ const [dropdownOpen, setDropdownOpen] = useState63(false);
22584
+ const [isHovered, setIsHovered] = useState63(false);
22473
22585
  const hasFetchedRef = useRef22(false);
22474
22586
  const hasSetDefaultRef = useRef22(false);
22475
22587
  const { get } = useApi();
@@ -22501,7 +22613,7 @@ var ModelSelector = ({
22501
22613
  setIsLoading(false);
22502
22614
  }
22503
22615
  }, [get, defaultModelKey]);
22504
- useEffect43(() => {
22616
+ useEffect44(() => {
22505
22617
  fetchModels();
22506
22618
  }, [fetchModels]);
22507
22619
  const handleChange = (modelKey) => {
@@ -22564,7 +22676,7 @@ import {
22564
22676
  } from "@ant-design/icons";
22565
22677
  import { Prompts } from "@ant-design/x";
22566
22678
  import { Space as Space28, Typography as Typography40, Spin as Spin16 } from "antd";
22567
- import { useEffect as useEffect44, useState as useState63, useMemo as useMemo21 } from "react";
22679
+ import { useEffect as useEffect45, useState as useState64, useMemo as useMemo21 } from "react";
22568
22680
  import { BrainCircuit as BrainCircuit2 } from "lucide-react";
22569
22681
  import { jsx as jsx89, jsxs as jsxs61 } from "react/jsx-runtime";
22570
22682
  var categoryConfig = {
@@ -22649,12 +22761,12 @@ var SkillCategoryPrompts = ({
22649
22761
  senderRef,
22650
22762
  visible = true
22651
22763
  }) => {
22652
- const [skills, setSkills] = useState63([]);
22653
- const [loading, setLoading] = useState63(false);
22654
- const [showAll, setShowAll] = useState63(false);
22764
+ const [skills, setSkills] = useState64([]);
22765
+ const [loading, setLoading] = useState64(false);
22766
+ const [showAll, setShowAll] = useState64(false);
22655
22767
  const { get } = useApi();
22656
22768
  const MAX_SIMPLE_ITEMS = 10;
22657
- useEffect44(() => {
22769
+ useEffect45(() => {
22658
22770
  const loadSkills = async () => {
22659
22771
  setLoading(true);
22660
22772
  try {
@@ -22833,7 +22945,7 @@ import {
22833
22945
  } from "@ant-design/icons";
22834
22946
  import { Prompts as Prompts2 } from "@ant-design/x";
22835
22947
  import { Space as Space29, Tabs } from "antd";
22836
- import { useState as useState64, useMemo as useMemo22 } from "react";
22948
+ import { useState as useState65, useMemo as useMemo22 } from "react";
22837
22949
  import { jsx as jsx90, jsxs as jsxs62 } from "react/jsx-runtime";
22838
22950
  var defaultCategoryIcons = {
22839
22951
  financial: /* @__PURE__ */ jsx90(DollarOutlined, {}),
@@ -23052,7 +23164,7 @@ var BusinessAnalysisPrompts = ({
23052
23164
  simpleModeTitle = "Quick Analysis",
23053
23165
  expandModeTitle = "Analysis Categories"
23054
23166
  }) => {
23055
- const [showAll, setShowAll] = useState64(false);
23167
+ const [showAll, setShowAll] = useState65(false);
23056
23168
  const { config } = useLatticeChatShellContext();
23057
23169
  const analysisData = useMemo22(() => {
23058
23170
  const customData = config.quickPromptsData;
@@ -23225,10 +23337,10 @@ var Chating = ({
23225
23337
  initialMessage,
23226
23338
  onInitialMessageSent
23227
23339
  }) => {
23228
- const [content, setContent] = useState65("");
23229
- const [attachedFiles, setAttachedFiles] = useState65([]);
23340
+ const [content, setContent] = useState66("");
23341
+ const [attachedFiles, setAttachedFiles] = useState66([]);
23230
23342
  const { styles } = useStyle();
23231
- const [headerOpen, setHeaderOpen] = useState65(false);
23343
+ const [headerOpen, setHeaderOpen] = useState66(false);
23232
23344
  const attachmentsRef = useRef23(null);
23233
23345
  const senderRef = React51.useRef(null);
23234
23346
  const {
@@ -23253,8 +23365,8 @@ var Chating = ({
23253
23365
  const hasPendingMessages = pendingMessages?.length > 0;
23254
23366
  const isInputDisabled = interrupts && interrupts.length > 0;
23255
23367
  const typingFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
23256
- const [typingFrameIndex, setTypingFrameIndex] = useState65(0);
23257
- useEffect45(() => {
23368
+ const [typingFrameIndex, setTypingFrameIndex] = useState66(0);
23369
+ useEffect46(() => {
23258
23370
  if (!isStreaming) return;
23259
23371
  const interval = setInterval(() => {
23260
23372
  setTypingFrameIndex((prev) => (prev + 1) % typingFrames.length);
@@ -23265,13 +23377,13 @@ var Chating = ({
23265
23377
  const systemContextSentRef = useRef23(false);
23266
23378
  const initialMessageSentRef = useRef23(false);
23267
23379
  const prevLoadingRef = useRef23(false);
23268
- useEffect45(() => {
23380
+ useEffect46(() => {
23269
23381
  systemContextSentRef.current = false;
23270
23382
  }, [threadId]);
23271
- useEffect45(() => {
23383
+ useEffect46(() => {
23272
23384
  initialMessageSentRef.current = false;
23273
23385
  }, [threadId]);
23274
- useEffect45(() => {
23386
+ useEffect46(() => {
23275
23387
  const wasLoading = prevLoadingRef.current;
23276
23388
  prevLoadingRef.current = isLoading;
23277
23389
  if (wasLoading && !isLoading && initialMessage && threadId && !initialMessageSentRef.current) {
@@ -23283,16 +23395,16 @@ var Chating = ({
23283
23395
  onInitialMessageSent?.();
23284
23396
  }
23285
23397
  }, [isLoading, initialMessage, threadId, sendMessage, onInitialMessageSent]);
23286
- const [modelConfig, setModelConfig] = useState65(null);
23398
+ const [modelConfig, setModelConfig] = useState66(null);
23287
23399
  const handleModelChange = useCallback33((config2) => {
23288
23400
  setModelConfig(config2);
23289
23401
  if (config2) {
23290
23402
  updateCustomRunConfig({ modelConfig: config2 });
23291
23403
  }
23292
23404
  }, [updateCustomRunConfig]);
23293
- const [isEmptyState, setIsEmptyState] = useState65(showEmptyState && messages.length === 0 && !pendingMessages?.length);
23294
- const [isTransitioning, setIsTransitioning] = useState65(false);
23295
- useEffect45(() => {
23405
+ const [isEmptyState, setIsEmptyState] = useState66(showEmptyState && messages.length === 0 && !pendingMessages?.length);
23406
+ const [isTransitioning, setIsTransitioning] = useState66(false);
23407
+ useEffect46(() => {
23296
23408
  if (!showEmptyState) {
23297
23409
  setIsEmptyState(false);
23298
23410
  return;
@@ -23317,9 +23429,9 @@ var Chating = ({
23317
23429
  const listPathByFolder = workspaceContext?.listPathByFolder ?? (async () => []);
23318
23430
  const workspaceId = workspaceContext?.workspaceId ?? null;
23319
23431
  const projectId = workspaceContext?.projectId ?? null;
23320
- const [workspaceFiles, setWorkspaceFiles] = useState65([]);
23321
- const [suggestionsLoading, setSuggestionsLoading] = useState65(false);
23322
- const [suggestionsOpen, setSuggestionsOpen] = useState65(false);
23432
+ const [workspaceFiles, setWorkspaceFiles] = useState66([]);
23433
+ const [suggestionsLoading, setSuggestionsLoading] = useState66(false);
23434
+ const [suggestionsOpen, setSuggestionsOpen] = useState66(false);
23323
23435
  const getFileIcon3 = (filename) => {
23324
23436
  const ext = filename.split(".").pop()?.toLowerCase();
23325
23437
  const iconStyle = { fontSize: 16 };
@@ -23379,7 +23491,7 @@ var Chating = ({
23379
23491
  setSuggestionsLoading(false);
23380
23492
  }
23381
23493
  };
23382
- useEffect45(() => {
23494
+ useEffect46(() => {
23383
23495
  regsiterElement("action_show_attachments_uploader", {
23384
23496
  card_view: () => null,
23385
23497
  action: (data) => {
@@ -23577,8 +23689,8 @@ ${nextContent}`;
23577
23689
  ...showRefreshButton ? [refreshButton] : [],
23578
23690
  /* @__PURE__ */ jsx91(ThreadManagementButtons, {}, "thread-buttons")
23579
23691
  ];
23580
- const [skills, setSkills] = useState65([]);
23581
- const [skillsLoading, setSkillsLoading] = useState65(false);
23692
+ const [skills, setSkills] = useState66([]);
23693
+ const [skillsLoading, setSkillsLoading] = useState66(false);
23582
23694
  const { get: apiGet } = useApi();
23583
23695
  const loadSkills = async () => {
23584
23696
  if (skills.length > 0) return;
@@ -23602,7 +23714,7 @@ ${nextContent}`;
23602
23714
  return isEmpty ? "Type / to see available skills, or @ to reference files" : void 0;
23603
23715
  };
23604
23716
  const renderSender = (isEmpty) => {
23605
- const [suggestionMode, setSuggestionMode] = useState65(null);
23717
+ const [suggestionMode, setSuggestionMode] = useState66(null);
23606
23718
  const suggestionItems = suggestionMode === "skills" ? skills.map((skill) => ({
23607
23719
  value: skill.name,
23608
23720
  icon: /* @__PURE__ */ jsx91(BrainCircuit3, { size: 14, style: { color: "#722ed1" } }),
@@ -23981,7 +24093,7 @@ var InternetSearchCard = ({
23981
24093
  };
23982
24094
 
23983
24095
  // src/components/GenUI/elements/schedule_viewer.tsx
23984
- import { useState as useState66, useEffect as useEffect46, useCallback as useCallback34 } from "react";
24096
+ import { useState as useState67, useEffect as useEffect47, useCallback as useCallback34 } from "react";
23985
24097
  import {
23986
24098
  Tag as Tag22,
23987
24099
  Button as Button48,
@@ -24145,9 +24257,9 @@ var ScheduleViewer = ({ data }) => {
24145
24257
  const { styles } = useStyles8();
24146
24258
  const { threadId, assistantId, tasks: initialTasks, onRefresh } = data ?? {};
24147
24259
  const client = useClient(assistantId || "");
24148
- const [tasks, setTasks] = useState66(initialTasks || []);
24149
- const [loading, setLoading] = useState66(false);
24150
- const [actionLoading, setActionLoading] = useState66(null);
24260
+ const [tasks, setTasks] = useState67(initialTasks || []);
24261
+ const [loading, setLoading] = useState67(false);
24262
+ const [actionLoading, setActionLoading] = useState67(null);
24151
24263
  const handleRefresh = useCallback34(async () => {
24152
24264
  if (!threadId) return;
24153
24265
  setLoading(true);
@@ -24210,12 +24322,12 @@ var ScheduleViewer = ({ data }) => {
24210
24322
  },
24211
24323
  [client, handleRefresh]
24212
24324
  );
24213
- useEffect46(() => {
24325
+ useEffect47(() => {
24214
24326
  if (threadId && (!initialTasks || initialTasks.length === 0)) {
24215
24327
  handleRefresh();
24216
24328
  }
24217
24329
  }, [threadId]);
24218
- useEffect46(() => {
24330
+ useEffect47(() => {
24219
24331
  if (initialTasks) {
24220
24332
  setTasks(initialTasks);
24221
24333
  }
@@ -24683,13 +24795,13 @@ var TeamGraph = ({ data }) => {
24683
24795
  var TeamGraph_default = TeamGraph;
24684
24796
 
24685
24797
  // src/components/GenUI/elements/TeamWorkspace/index.tsx
24686
- import { useState as useState71, useMemo as useMemo27 } from "react";
24798
+ import { useState as useState72, useMemo as useMemo27 } from "react";
24687
24799
  import { Layout, Spin as Spin18, Button as Button52 } from "antd";
24688
24800
  import { RefreshCw } from "lucide-react";
24689
24801
  import { createStyles as createStyles33 } from "antd-style";
24690
24802
 
24691
24803
  // src/components/GenUI/elements/TeamWorkspace/TeamWorkspaceMenu.tsx
24692
- import React53, { useState as useState67 } from "react";
24804
+ import React53, { useState as useState68 } from "react";
24693
24805
  import {
24694
24806
  LayoutDashboard,
24695
24807
  Inbox as Inbox2,
@@ -24883,7 +24995,7 @@ var TeamWorkspaceMenu = ({
24883
24995
  onItemClick
24884
24996
  }) => {
24885
24997
  const { styles } = useStyles9();
24886
- const [isExpanded, setIsExpanded] = useState67(false);
24998
+ const [isExpanded, setIsExpanded] = useState68(false);
24887
24999
  const mainItems = items.filter((item) => !item.group);
24888
25000
  const teammateItems = items.filter((item) => item.group === "Teammates");
24889
25001
  const teamItems = items.filter((item) => item.group === "Team");
@@ -25360,7 +25472,7 @@ var TeamDashboard = ({
25360
25472
  };
25361
25473
 
25362
25474
  // src/components/GenUI/elements/TeamWorkspace/IssuesView.tsx
25363
- import { useState as useState69, useMemo as useMemo24 } from "react";
25475
+ import { useState as useState70, useMemo as useMemo24 } from "react";
25364
25476
  import { Typography as Typography51, Badge as Badge8, Empty as Empty17, Tooltip as Tooltip21 } from "antd";
25365
25477
  import {
25366
25478
  CheckCircle2 as CheckCircle24,
@@ -25375,7 +25487,7 @@ import {
25375
25487
  import { createStyles as createStyles28 } from "antd-style";
25376
25488
 
25377
25489
  // src/components/GenUI/elements/TeamWorkspace/TaskDetailModal.tsx
25378
- import { useState as useState68 } from "react";
25490
+ import { useState as useState69 } from "react";
25379
25491
  import { Modal as Modal18, Typography as Typography50, Tag as Tag24, Divider as Divider7, Tabs as Tabs2, Timeline } from "antd";
25380
25492
  import { createStyles as createStyles27 } from "antd-style";
25381
25493
  import {
@@ -25800,7 +25912,7 @@ var TaskDetailModal = ({
25800
25912
  onClose
25801
25913
  }) => {
25802
25914
  const { styles } = useStyles11();
25803
- const [activeTab, setActiveTab] = useState68("comments");
25915
+ const [activeTab, setActiveTab] = useState69("comments");
25804
25916
  if (!task) return null;
25805
25917
  const statusConfig2 = getStatusConfig2(task.status);
25806
25918
  const tabItems = [
@@ -26226,7 +26338,7 @@ var formatDate2 = (timestamp) => {
26226
26338
  });
26227
26339
  };
26228
26340
  var ListGroupComponent = ({ group, styles, defaultExpanded = true, onTaskClick }) => {
26229
- const [isExpanded, setIsExpanded] = useState69(defaultExpanded);
26341
+ const [isExpanded, setIsExpanded] = useState70(defaultExpanded);
26230
26342
  return /* @__PURE__ */ jsxs72("div", { className: styles.listGroup, children: [
26231
26343
  /* @__PURE__ */ jsxs72(
26232
26344
  "div",
@@ -26269,9 +26381,9 @@ var IssuesView = ({
26269
26381
  teammates
26270
26382
  }) => {
26271
26383
  const { styles } = useStyles12();
26272
- const [viewMode, setViewMode] = useState69("list");
26273
- const [selectedTask, setSelectedTask] = useState69(null);
26274
- const [modalVisible, setModalVisible] = useState69(false);
26384
+ const [viewMode, setViewMode] = useState70("list");
26385
+ const [selectedTask, setSelectedTask] = useState70(null);
26386
+ const [modalVisible, setModalVisible] = useState70(false);
26275
26387
  const listGroups = useMemo24(() => {
26276
26388
  const groups = [
26277
26389
  {
@@ -26882,7 +26994,7 @@ var TeamMemberChat = ({
26882
26994
  };
26883
26995
 
26884
26996
  // src/components/GenUI/elements/MailboxPanel.tsx
26885
- import { useState as useState70, useMemo as useMemo26 } from "react";
26997
+ import { useState as useState71, useMemo as useMemo26 } from "react";
26886
26998
  import { Typography as Typography55, Empty as Empty18 } from "antd";
26887
26999
  import { createStyles as createStyles32 } from "antd-style";
26888
27000
  import {
@@ -27305,7 +27417,7 @@ var getMessagePreview = (content) => {
27305
27417
  return firstLine.length > 80 ? firstLine.slice(0, 80) + "..." : firstLine;
27306
27418
  };
27307
27419
  var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageClick }) => {
27308
- const [isExpanded, setIsExpanded] = useState70(defaultExpanded);
27420
+ const [isExpanded, setIsExpanded] = useState71(defaultExpanded);
27309
27421
  return /* @__PURE__ */ jsxs76("div", { className: styles.listGroup, children: [
27310
27422
  /* @__PURE__ */ jsxs76(
27311
27423
  "div",
@@ -27360,8 +27472,8 @@ var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageC
27360
27472
  };
27361
27473
  var MailboxPanel = ({ data }) => {
27362
27474
  const { styles } = useStyles16();
27363
- const [selectedMessage, setSelectedMessage] = useState70(null);
27364
- const [modalVisible, setModalVisible] = useState70(false);
27475
+ const [selectedMessage, setSelectedMessage] = useState71(null);
27476
+ const [modalVisible, setModalVisible] = useState71(false);
27365
27477
  const { teamMailbox = [] } = data || {};
27366
27478
  const messageGroups = useMemo26(() => {
27367
27479
  const groupsMap = /* @__PURE__ */ new Map();
@@ -27491,7 +27603,7 @@ var TeamWorkspace = ({
27491
27603
  isLoading,
27492
27604
  refresh
27493
27605
  } = useTeamWorkspaceData(parent_thread_id || null, assistantId);
27494
- const [activeMenuId, setActiveMenuId] = useState71("dashboard");
27606
+ const [activeMenuId, setActiveMenuId] = useState72("dashboard");
27495
27607
  const menuItems = useMemo27(() => {
27496
27608
  const items = [
27497
27609
  {
@@ -27974,7 +28086,7 @@ var TaskBoard = ({
27974
28086
  };
27975
28087
 
27976
28088
  // src/components/GenUI/elements/Mailbox.tsx
27977
- import { useState as useState72, useMemo as useMemo29, useRef as useRef24, useEffect as useEffect47 } from "react";
28089
+ import { useState as useState73, useMemo as useMemo29, useRef as useRef24, useEffect as useEffect48 } from "react";
27978
28090
  import { jsx as jsx109, jsxs as jsxs80 } from "react/jsx-runtime";
27979
28091
  var useStyle16 = () => {
27980
28092
  return {
@@ -28260,7 +28372,7 @@ var renderMessageWithMentions = (content, mentions, styles) => {
28260
28372
  var TeamChat = ({ data }) => {
28261
28373
  const styles = useStyle16();
28262
28374
  const { teamName, currentUser, teammates, messages, onSendMessage } = data || {};
28263
- const [inputValue, setInputValue] = useState72("");
28375
+ const [inputValue, setInputValue] = useState73("");
28264
28376
  const messagesEndRef = useRef24(null);
28265
28377
  const sortedMessages = useMemo29(() => {
28266
28378
  return [...messages || []].sort(
@@ -28270,7 +28382,7 @@ var TeamChat = ({ data }) => {
28270
28382
  const mentions = useMemo29(() => {
28271
28383
  return teammates?.map((t) => t.name) || [];
28272
28384
  }, [teammates]);
28273
- useEffect47(() => {
28385
+ useEffect48(() => {
28274
28386
  messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
28275
28387
  }, [sortedMessages]);
28276
28388
  const handleSend = () => {
@@ -28444,7 +28556,7 @@ import { Button as Button53, Typography as Typography56 } from "antd";
28444
28556
  import { ExpandOutlined as ExpandOutlined2 } from "@ant-design/icons";
28445
28557
 
28446
28558
  // src/streaming-html/StreamingHTMLRenderer.tsx
28447
- import React61, { useEffect as useEffect48, useRef as useRef25, useCallback as useCallback35, useState as useState73 } from "react";
28559
+ import React61, { useEffect as useEffect49, useRef as useRef25, useCallback as useCallback35, useState as useState74 } from "react";
28448
28560
 
28449
28561
  // src/streaming-html/show-widget-css-generator.ts
28450
28562
  function generateShowWidgetCSS(tokens) {
@@ -29145,12 +29257,12 @@ var StreamingHTMLRenderer = ({
29145
29257
  const isScriptExecuted = useRef25(false);
29146
29258
  const [iframeHeight, setIframeHeight] = React61.useState(0);
29147
29259
  const [iframeWidth, setIframeWidth] = React61.useState(void 0);
29148
- const [currentMessageIndex, setCurrentMessageIndex] = useState73(0);
29149
- const [showLoading, setShowLoading] = useState73(true);
29150
- useEffect48(() => {
29260
+ const [currentMessageIndex, setCurrentMessageIndex] = useState74(0);
29261
+ const [showLoading, setShowLoading] = useState74(true);
29262
+ useEffect49(() => {
29151
29263
  isCompleteRef.current = isComplete;
29152
29264
  }, [isComplete]);
29153
- useEffect48(() => {
29265
+ useEffect49(() => {
29154
29266
  if (iframeHeight > 0) {
29155
29267
  setShowLoading(false);
29156
29268
  return;
@@ -29226,7 +29338,7 @@ var StreamingHTMLRenderer = ({
29226
29338
  onError?.(streamingError);
29227
29339
  }
29228
29340
  }, [onError]);
29229
- useEffect48(() => {
29341
+ useEffect49(() => {
29230
29342
  const handleMessage = (event) => {
29231
29343
  const iframe = iframeRef.current;
29232
29344
  if (!iframe || event.source !== iframe.contentWindow) {
@@ -29279,7 +29391,7 @@ var StreamingHTMLRenderer = ({
29279
29391
  window.removeEventListener("message", handleMessage);
29280
29392
  };
29281
29393
  }, [onError, onPrompt, sendChunk, executeScripts]);
29282
- useEffect48(() => {
29394
+ useEffect49(() => {
29283
29395
  if (html === prevHTMLRef.current) {
29284
29396
  return;
29285
29397
  }
@@ -29290,12 +29402,12 @@ var StreamingHTMLRenderer = ({
29290
29402
  sendChunk(newChunk);
29291
29403
  }
29292
29404
  }, [html, sendChunk]);
29293
- useEffect48(() => {
29405
+ useEffect49(() => {
29294
29406
  if (isComplete && isReadyRef.current) {
29295
29407
  executeScripts();
29296
29408
  }
29297
29409
  }, [isComplete, executeScripts]);
29298
- useEffect48(() => {
29410
+ useEffect49(() => {
29299
29411
  const container = containerRef.current;
29300
29412
  if (!container) return;
29301
29413
  const antBubble = container.closest(".ant-bubble");
@@ -29321,7 +29433,7 @@ var StreamingHTMLRenderer = ({
29321
29433
  resizeObserverRef.current = null;
29322
29434
  };
29323
29435
  }, []);
29324
- useEffect48(() => {
29436
+ useEffect49(() => {
29325
29437
  return () => {
29326
29438
  isReadyRef.current = false;
29327
29439
  pendingChunksRef.current = [];
@@ -29634,7 +29746,7 @@ var regsiterElement = (language, ElementMeta) => {
29634
29746
  // src/components/Chat/SideAppViewBrowser.tsx
29635
29747
  import { Dropdown as Dropdown3, Tooltip as Tooltip23 } from "antd";
29636
29748
  import { createStyles as createStyles34 } from "antd-style";
29637
- import { useEffect as useEffect49, useMemo as useMemo30, useState as useState74 } from "react";
29749
+ import { useEffect as useEffect50, useMemo as useMemo30, useState as useState75 } from "react";
29638
29750
  import { Fragment as Fragment21, jsx as jsx113, jsxs as jsxs83 } from "react/jsx-runtime";
29639
29751
  var useStyle17 = createStyles34(({ token, css }) => {
29640
29752
  return {
@@ -29835,11 +29947,11 @@ var SideAppViewBrowser = ({ region = "side" }) => {
29835
29947
  const selectedCard = region === "side" ? sideAppSelectedCard : contextAppSelectedCard;
29836
29948
  const closeApp = region === "side" ? closeSideApp : closeContentApp;
29837
29949
  const openApp = region === "side" ? openSideApp : openContentApp;
29838
- const [activeKey, setActiveKey] = useState74(
29950
+ const [activeKey, setActiveKey] = useState75(
29839
29951
  JSON.stringify(selectedCard)
29840
29952
  );
29841
- const [hoveredTab, setHoveredTab] = useState74(null);
29842
- const [items, setItems] = useState74([]);
29953
+ const [hoveredTab, setHoveredTab] = useState75(null);
29954
+ const [items, setItems] = useState75([]);
29843
29955
  const add = (key, label, children, componentKey) => {
29844
29956
  const newPanes = [...items, { label, children, key, componentKey }];
29845
29957
  setItems(newPanes);
@@ -29866,7 +29978,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
29866
29978
  const switchTab = (key) => {
29867
29979
  setActiveKey(key);
29868
29980
  };
29869
- useEffect49(() => {
29981
+ useEffect50(() => {
29870
29982
  if (!selectedCard) return;
29871
29983
  const key = JSON.stringify(selectedCard);
29872
29984
  if (items.find((item) => item.key === key)) {
@@ -29975,7 +30087,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
29975
30087
  };
29976
30088
 
29977
30089
  // src/components/Chat/ProjectSelector.tsx
29978
- import { useState as useState75, useCallback as useCallback38, useMemo as useMemo31, useRef as useRef26 } from "react";
30090
+ import { useState as useState76, useCallback as useCallback38, useMemo as useMemo31, useRef as useRef26 } from "react";
29979
30091
  import { Modal as Modal20, Input as Input15, Button as Button54, message as message18 } from "antd";
29980
30092
  import { createStyles as createStyles35 } from "antd-style";
29981
30093
  import { Folder, ChevronDown as ChevronDown6, Building2 as Building24 } from "lucide-react";
@@ -30211,13 +30323,13 @@ var ProjectSelector = ({
30211
30323
  setProject,
30212
30324
  createProject
30213
30325
  } = useWorkspaceContext();
30214
- const [isWorkspaceListOpen, setIsWorkspaceListOpen] = useState75(false);
30326
+ const [isWorkspaceListOpen, setIsWorkspaceListOpen] = useState76(false);
30215
30327
  const workspaceDropdownRef = useRef26(null);
30216
- const [isProjectListOpen, setIsProjectListOpen] = useState75(false);
30217
- const [isModalOpen, setIsModalOpen] = useState75(false);
30218
- const [projectName, setProjectName] = useState75("");
30219
- const [validationError, setValidationError] = useState75(null);
30220
- const [isCreating, setIsCreating] = useState75(false);
30328
+ const [isProjectListOpen, setIsProjectListOpen] = useState76(false);
30329
+ const [isModalOpen, setIsModalOpen] = useState76(false);
30330
+ const [projectName, setProjectName] = useState76("");
30331
+ const [validationError, setValidationError] = useState76(null);
30332
+ const [isCreating, setIsCreating] = useState76(false);
30221
30333
  const projectNameInputRef = useRef26(null);
30222
30334
  const currentProject = useMemo31(() => {
30223
30335
  return projects.find((p) => p.id === projectId);
@@ -30386,7 +30498,7 @@ var ProjectSelector = ({
30386
30498
  };
30387
30499
 
30388
30500
  // src/components/Chat/ToolPanelFiles.tsx
30389
- import { useCallback as useCallback39, useEffect as useEffect50, useMemo as useMemo32, useState as useState76 } from "react";
30501
+ import { useCallback as useCallback39, useEffect as useEffect51, useMemo as useMemo32, useState as useState77 } from "react";
30390
30502
  import { message as message19 } from "antd";
30391
30503
 
30392
30504
  // src/components/Chat/FileDirectoryPanel.tsx
@@ -30745,12 +30857,12 @@ var ToolPanelFiles = () => {
30745
30857
  uploadFileToFolder
30746
30858
  } = useWorkspaceContext();
30747
30859
  const { currentAssistant } = useAssistantContext();
30748
- const [folderEntries, setFolderEntries] = useState76({});
30749
- const [folderLoading, setFolderLoading] = useState76({});
30750
- const [directoryChildren, setDirectoryChildren] = useState76({});
30751
- const [directoryLoading, setDirectoryLoading] = useState76({});
30752
- const [directoryExpanded, setDirectoryExpanded] = useState76({});
30753
- const [uploadingFolder, setUploadingFolder] = useState76(null);
30860
+ const [folderEntries, setFolderEntries] = useState77({});
30861
+ const [folderLoading, setFolderLoading] = useState77({});
30862
+ const [directoryChildren, setDirectoryChildren] = useState77({});
30863
+ const [directoryLoading, setDirectoryLoading] = useState77({});
30864
+ const [directoryExpanded, setDirectoryExpanded] = useState77({});
30865
+ const [uploadingFolder, setUploadingFolder] = useState77(null);
30754
30866
  const resourceFolders = useMemo32(() => {
30755
30867
  return config.resourceFolders && config.resourceFolders.length > 0 ? config.resourceFolders : [{ name: "/", displayName: "Project Assets", allowUpload: true }];
30756
30868
  }, [config.resourceFolders]);
@@ -30812,7 +30924,7 @@ var ToolPanelFiles = () => {
30812
30924
  setDirectoryLoading((prev) => ({ ...prev, [path]: false }));
30813
30925
  }
30814
30926
  }, [directoryExpanded, listPath, currentAssistant?.id]);
30815
- useEffect50(() => {
30927
+ useEffect51(() => {
30816
30928
  resourceFolders.forEach((folder) => {
30817
30929
  void loadAssetsForFolder(folder, false);
30818
30930
  });
@@ -31072,7 +31184,7 @@ var AgentConversations = ({
31072
31184
  import { useContext as useContext12 } from "react";
31073
31185
 
31074
31186
  // src/components/Chat/ChatSidebar.tsx
31075
- import { useState as useState77, useMemo as useMemo34, useCallback as useCallback41 } from "react";
31187
+ import { useState as useState78, useMemo as useMemo34, useCallback as useCallback41 } from "react";
31076
31188
  import { Drawer as Drawer3, Avatar as Avatar14, Popover as Popover3, Button as Button56 } from "antd";
31077
31189
  import {
31078
31190
  History as History2,
@@ -31310,8 +31422,8 @@ var ChatSidebar = ({
31310
31422
  const { sideAppVisible, menuCollapsed, setMenuCollapsed } = useChatUIContext();
31311
31423
  const { user, logout } = useAuth();
31312
31424
  const { createThread } = useConversationContext();
31313
- const [drawerStates, setDrawerStates] = useState77({});
31314
- const [changePasswordOpen, setChangePasswordOpen] = useState77(false);
31425
+ const [drawerStates, setDrawerStates] = useState78({});
31426
+ const [changePasswordOpen, setChangePasswordOpen] = useState78(false);
31315
31427
  const {
31316
31428
  sidebarMode,
31317
31429
  sidebarShowToggle,
@@ -31570,7 +31682,7 @@ var LatticeChatView = (props) => {
31570
31682
  };
31571
31683
 
31572
31684
  // src/components/Chat/SettingsModal.tsx
31573
- import { useState as useState78, useEffect as useEffect51, useRef as useRef27 } from "react";
31685
+ import { useState as useState79, useEffect as useEffect52, useRef as useRef27 } from "react";
31574
31686
  import {
31575
31687
  Modal as Modal22,
31576
31688
  Input as Input16,
@@ -31959,7 +32071,7 @@ var SettingsModal = ({
31959
32071
  }) => {
31960
32072
  const { styles } = useStyles23();
31961
32073
  const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
31962
- const [connections, setConnections] = useState78(() => {
32074
+ const [connections, setConnections] = useState79(() => {
31963
32075
  if (typeof window !== "undefined") {
31964
32076
  try {
31965
32077
  const stored = localStorage.getItem("lattice_server_connections");
@@ -31982,21 +32094,21 @@ var SettingsModal = ({
31982
32094
  }
31983
32095
  return [];
31984
32096
  });
31985
- const [serverConfigs, setServerConfigs] = useState78({});
32097
+ const [serverConfigs, setServerConfigs] = useState79({});
31986
32098
  const connectionsRef = useRef27(connections);
31987
- useEffect51(() => {
32099
+ useEffect52(() => {
31988
32100
  connectionsRef.current = connections;
31989
32101
  }, [connections]);
31990
- const [activeTabKey, setActiveTabKey] = useState78(
32102
+ const [activeTabKey, setActiveTabKey] = useState79(
31991
32103
  connections.length > 0 ? connections[0].id : ""
31992
32104
  );
31993
- const [activeMenu, setActiveMenu] = useState78("environment");
31994
- const [loading, setLoading] = useState78(false);
31995
- const [showAddServerModal, setShowAddServerModal] = useState78(false);
31996
- const [newServerUrl, setNewServerUrl] = useState78("");
31997
- const [newServerName, setNewServerName] = useState78("");
31998
- const [newServerApiKey, setNewServerApiKey] = useState78("");
31999
- const [addingServer, setAddingServer] = useState78(false);
32105
+ const [activeMenu, setActiveMenu] = useState79("environment");
32106
+ const [loading, setLoading] = useState79(false);
32107
+ const [showAddServerModal, setShowAddServerModal] = useState79(false);
32108
+ const [newServerUrl, setNewServerUrl] = useState79("");
32109
+ const [newServerName, setNewServerName] = useState79("");
32110
+ const [newServerApiKey, setNewServerApiKey] = useState79("");
32111
+ const [addingServer, setAddingServer] = useState79(false);
32000
32112
  const saveConnections = (newConnections) => {
32001
32113
  setConnections(newConnections);
32002
32114
  if (typeof window !== "undefined") {
@@ -32186,7 +32298,7 @@ var SettingsModal = ({
32186
32298
  console.error("Failed to load models configuration:", error);
32187
32299
  }
32188
32300
  };
32189
- useEffect51(() => {
32301
+ useEffect52(() => {
32190
32302
  if (open && activeTabKey) {
32191
32303
  initializeServerConfig(activeTabKey);
32192
32304
  const connection = connections.find((c) => c.id === activeTabKey);
@@ -32195,7 +32307,7 @@ var SettingsModal = ({
32195
32307
  }
32196
32308
  }
32197
32309
  }, [open, activeTabKey]);
32198
- useEffect51(() => {
32310
+ useEffect52(() => {
32199
32311
  if (open && activeTabKey) {
32200
32312
  const connection = connections.find((c) => c.id === activeTabKey);
32201
32313
  if (connection?.connected) {
@@ -32975,7 +33087,7 @@ var LatticeChatShell = (props) => {
32975
33087
  };
32976
33088
 
32977
33089
  // src/components/Chat/ChannelInstallationsDrawerContent.tsx
32978
- import { useEffect as useEffect52, useState as useState79 } from "react";
33090
+ import { useEffect as useEffect53, useState as useState80 } from "react";
32979
33091
  import {
32980
33092
  Button as Button58,
32981
33093
  Card as Card30,
@@ -32993,10 +33105,10 @@ import { jsx as jsx126, jsxs as jsxs91 } from "react/jsx-runtime";
32993
33105
  var { Text: Text47, Title: Title17 } = Typography58;
32994
33106
  var ChannelInstallationsDrawerContent = () => {
32995
33107
  const { get, post, put, del } = useApi();
32996
- const [installations, setInstallations] = useState79([]);
32997
- const [loading, setLoading] = useState79(false);
32998
- const [formModalOpen, setFormModalOpen] = useState79(false);
32999
- const [editingInstallation, setEditingInstallation] = useState79(null);
33108
+ const [installations, setInstallations] = useState80([]);
33109
+ const [loading, setLoading] = useState80(false);
33110
+ const [formModalOpen, setFormModalOpen] = useState80(false);
33111
+ const [editingInstallation, setEditingInstallation] = useState80(null);
33000
33112
  const loadInstallations = async () => {
33001
33113
  setLoading(true);
33002
33114
  try {
@@ -33017,7 +33129,7 @@ var ChannelInstallationsDrawerContent = () => {
33017
33129
  setLoading(false);
33018
33130
  }
33019
33131
  };
33020
- useEffect52(() => {
33132
+ useEffect53(() => {
33021
33133
  loadInstallations();
33022
33134
  }, []);
33023
33135
  const handleDelete = async (installation) => {
@@ -33165,7 +33277,7 @@ var ChannelInstallationsDrawerContent = () => {
33165
33277
  };
33166
33278
  var LarkChannelInstallationFormModal = ({ installation, open, post, put, onCancel, onSave }) => {
33167
33279
  const [form] = Form9.useForm();
33168
- useEffect52(() => {
33280
+ useEffect53(() => {
33169
33281
  if (installation) {
33170
33282
  const config = installation.config;
33171
33283
  form.setFieldsValue({