@axiom-lattice/react-sdk 2.1.16 → 2.1.17

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
@@ -1283,92 +1283,67 @@ import { Button, Space, Typography } from "antd";
1283
1283
  import { useState as useState8 } from "react";
1284
1284
 
1285
1285
  // src/components/GenUI/MDResponse.tsx
1286
- import ReactMarkdown from "react-markdown";
1287
- import { Prism } from "react-syntax-highlighter";
1288
- import { dark } from "react-syntax-highlighter/dist/cjs/styles/prism";
1289
- import remarkGfm from "remark-gfm";
1290
- import { useMemo as useMemo2, useRef as useRef5, useState as useState7 } from "react";
1286
+ import XMarkdown from "@ant-design/x-markdown";
1287
+ import { useRef as useRef5, useState as useState7 } from "react";
1291
1288
  import { createStyles as createStyles2 } from "antd-style";
1292
- import rehypeRaw from "rehype-raw";
1293
1289
 
1294
- // src/components/GenUI/MDMermaid.tsx
1295
- import mermaid from "mermaid";
1296
- import { useEffect as useEffect5, useRef as useRef4 } from "react";
1297
- import { v4 } from "uuid";
1290
+ // src/components/GenUI/Code.tsx
1291
+ import { CodeHighlighter, Mermaid } from "@ant-design/x";
1292
+
1293
+ // src/components/GenUI/ReactInfographic.tsx
1294
+ import { Infographic } from "@antv/infographic";
1295
+ import { useRef as useRef4, useEffect as useEffect5 } from "react";
1298
1296
  import { jsx as jsx5 } from "react/jsx-runtime";
1299
- var MDMermaid = ({ children = [] }) => {
1300
- const domId = useRef4(`dom${v4()}`);
1301
- const code = String(children);
1302
- const target = useRef4(null);
1303
- const targetInternal = useRef4(null);
1297
+ var ReactInfographic = (props) => {
1298
+ const { children } = props;
1299
+ const $container = useRef4(null);
1300
+ let infographicInstance = useRef4(null);
1304
1301
  useEffect5(() => {
1305
- if (target.current && code) {
1306
- mermaid.initialize({
1307
- startOnLoad: true,
1308
- theme: "default",
1309
- securityLevel: "loose",
1310
- themeCSS: `
1311
- g.classGroup rect {
1312
- fill: #282a36;
1313
- stroke: #6272a4;
1314
- }
1315
- g.classGroup text {
1316
- fill: #f8f8f2;
1317
- }
1318
- g.classGroup line {
1319
- stroke: #f8f8f2;
1320
- stroke-width: 0.5;
1321
- }
1322
- .classLabel .box {
1323
- stroke: #21222c;
1324
- stroke-width: 3;
1325
- fill: #21222c;
1326
- opacity: 1;
1327
- }
1328
- .classLabel .label {
1329
- fill: #f1fa8c;
1330
- }
1331
- .relation {
1332
- stroke: #ff79c6;
1333
- stroke-width: 1;
1334
- }
1335
- #compositionStart, #compositionEnd {
1336
- fill: #bd93f9;
1337
- stroke: #bd93f9;
1338
- stroke-width: 1;
1339
- }
1340
- #aggregationEnd, #aggregationStart {
1341
- fill: #21222c;
1342
- stroke: #50fa7b;
1343
- stroke-width: 1;
1344
- }
1345
- #dependencyStart, #dependencyEnd {
1346
- fill: #00bcd4;
1347
- stroke: #00bcd4;
1348
- stroke-width: 1;
1349
- }
1350
- #extensionStart, #extensionEnd {
1351
- fill: #f8f8f2;
1352
- stroke: #f8f8f2;
1353
- stroke-width: 1;
1354
- }
1355
- `,
1356
- fontFamily: "Fira Code",
1357
- sequence: { showSequenceNumbers: true }
1358
- });
1359
- mermaid.render(domId.current, code, target.current).then((result) => {
1360
- target.current.innerHTML = result.svg;
1361
- }).catch((error) => {
1362
- console.log(error);
1302
+ if ($container.current) {
1303
+ infographicInstance.current = new Infographic({
1304
+ container: $container.current
1363
1305
  });
1364
1306
  }
1365
- }, [code]);
1366
- return /* @__PURE__ */ jsx5("div", { style: { minWidth: 750 }, ref: target, children: /* @__PURE__ */ jsx5("code", { id: domId.current, style: { display: "none" } }) });
1307
+ return () => {
1308
+ infographicInstance.current?.destroy();
1309
+ };
1310
+ }, []);
1311
+ useEffect5(() => {
1312
+ infographicInstance.current?.render(children);
1313
+ }, [children]);
1314
+ return /* @__PURE__ */ jsx5("div", { ref: $container });
1367
1315
  };
1368
1316
 
1369
- // src/components/GenUI/MDResponse.tsx
1317
+ // src/components/GenUI/Code.tsx
1370
1318
  import { jsx as jsx6 } from "react/jsx-runtime";
1371
- var SyntaxHighlighter = Prism;
1319
+ var Code = (props) => {
1320
+ const { className, children } = props;
1321
+ const language = className?.match(/language-(\w+)/)?.[1] || "";
1322
+ if (typeof children !== "string") return null;
1323
+ if (language) {
1324
+ const Element = getElement(language)?.card_view;
1325
+ if (Element) {
1326
+ let childrenData;
1327
+ try {
1328
+ childrenData = JSON.parse(children);
1329
+ } catch (error) {
1330
+ }
1331
+ return /* @__PURE__ */ jsx6(Element, { component_key: language, data: childrenData });
1332
+ }
1333
+ switch (language) {
1334
+ case "infographic":
1335
+ return /* @__PURE__ */ jsx6(ReactInfographic, { children });
1336
+ case "mermaid":
1337
+ return /* @__PURE__ */ jsx6(Mermaid, { children });
1338
+ default:
1339
+ return /* @__PURE__ */ jsx6(CodeHighlighter, { lang: language, children });
1340
+ }
1341
+ }
1342
+ return /* @__PURE__ */ jsx6(CodeHighlighter, { lang: language, children });
1343
+ };
1344
+
1345
+ // src/components/GenUI/MDResponse.tsx
1346
+ import { jsx as jsx7 } from "react/jsx-runtime";
1372
1347
  var useStyles = createStyles2(({ token, css }) => ({
1373
1348
  markdownTableContainer: css`
1374
1349
  overflow-x: auto;
@@ -1458,105 +1433,14 @@ var MDResponse = ({
1458
1433
  noGenUI
1459
1434
  }) => {
1460
1435
  const { styles } = useStyles();
1461
- const config = useMemo2(
1462
- () => ({
1463
- components: {
1464
- a({ node, ...props }) {
1465
- if (embeddedLink) {
1466
- return /* @__PURE__ */ jsx6(IFrameCard, { src: props.href });
1467
- } else return /* @__PURE__ */ jsx6("a", { ...props });
1468
- },
1469
- table({ node, ...props }) {
1470
- return /* @__PURE__ */ jsx6("div", { className: styles.markdownTableContainer, children: /* @__PURE__ */ jsx6("table", { className: styles.markdownTable, ...props }) });
1471
- },
1472
- th({ node, ...props }) {
1473
- return /* @__PURE__ */ jsx6("th", { className: styles.markdownTh, ...props });
1474
- },
1475
- td({ node, ...props }) {
1476
- return /* @__PURE__ */ jsx6("td", { className: styles.markdownTd, ...props });
1477
- },
1478
- tr({ node, ...props }) {
1479
- return /* @__PURE__ */ jsx6("tr", { className: styles.markdownTr, ...props });
1480
- },
1481
- code({ children, className, node, ...rest }) {
1482
- const match = /language-(\w+)/.exec(className || "");
1483
- const language = match?.[1];
1484
- if (language) {
1485
- const Element = getElement(language)?.card_view;
1486
- if (Element) {
1487
- let childrenData;
1488
- try {
1489
- childrenData = JSON.parse(children);
1490
- } catch (error) {
1491
- }
1492
- return /* @__PURE__ */ jsx6(
1493
- Element,
1494
- {
1495
- context,
1496
- interactive,
1497
- component_key: language,
1498
- data: childrenData
1499
- }
1500
- );
1501
- }
1502
- switch (language) {
1503
- case "mermaid":
1504
- return /* @__PURE__ */ jsx6(MDMermaid, { children });
1505
- default:
1506
- return /* @__PURE__ */ jsx6(
1507
- SyntaxHighlighter,
1508
- {
1509
- ...rest,
1510
- PreTag: "div",
1511
- language,
1512
- style: dark,
1513
- children: String(children).replace(/\n$/, "")
1514
- }
1515
- );
1516
- }
1517
- } else {
1518
- return /* @__PURE__ */ jsx6("code", { ...rest, className, children });
1519
- }
1520
- }
1521
- },
1522
- remarkPlugins: [remarkGfm],
1523
- rehypePlugins: [rehypeRaw]
1524
- }),
1525
- [userData, interactive, embeddedLink, styles]
1526
- );
1527
- return /* @__PURE__ */ jsx6("div", { className: styles.markdownContainer, children: /* @__PURE__ */ jsx6(ReactMarkdown, { ...config, children: content }) });
1436
+ return /* @__PURE__ */ jsx7("div", { className: styles.markdownContainer, children: /* @__PURE__ */ jsx7(XMarkdown, { components: { code: Code }, paragraphTag: "div", children: content }) });
1528
1437
  };
1529
1438
  var MDViewFormItem = ({ value }) => {
1530
- return /* @__PURE__ */ jsx6(MDResponse, { content: value || "" });
1531
- };
1532
- var IFrameCard = ({ src }) => {
1533
- const containerRef = useRef5(null);
1534
- const [width, setWidth] = useState7("640px");
1535
- const [height, setHeight] = useState7("320px");
1536
- const valid_images = [
1537
- "jpg",
1538
- "jpeg",
1539
- "png",
1540
- "gif",
1541
- "bmp",
1542
- "svg",
1543
- "tif",
1544
- "tiff",
1545
- "webp"
1546
- ];
1547
- if (!src) {
1548
- return null;
1549
- }
1550
- const spitedSrc = src.split(".");
1551
- if (valid_images.includes(spitedSrc[spitedSrc.length - 1].toLowerCase())) {
1552
- return /* @__PURE__ */ jsx6("div", { children: /* @__PURE__ */ jsx6("img", { src, style: { width: "100%" } }) });
1553
- } else {
1554
- return /* @__PURE__ */ jsx6("div", { children: /* @__PURE__ */ jsx6("a", { href: src, target: "_black", children: src }) });
1555
- }
1439
+ return /* @__PURE__ */ jsx7(MDResponse, { content: value || "" });
1556
1440
  };
1557
1441
 
1558
1442
  // src/components/GenUI/elements/confirm_feedback.tsx
1559
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
1443
+ import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
1560
1444
  var { Text } = Typography;
1561
1445
  var ConfirmFeedback = ({
1562
1446
  data,
@@ -1566,8 +1450,8 @@ var ConfirmFeedback = ({
1566
1450
  const { sendMessage } = useAgentChat();
1567
1451
  const [clicked, setClicked] = useState8(false);
1568
1452
  return /* @__PURE__ */ jsxs2(Space, { direction: "vertical", style: { width: "100%" }, children: [
1569
- /* @__PURE__ */ jsx7(MDResponse, { content: message5 }),
1570
- options ? /* @__PURE__ */ jsx7(Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx7(
1453
+ /* @__PURE__ */ jsx8(MDResponse, { content: message5 }),
1454
+ options ? /* @__PURE__ */ jsx8(Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx8(
1571
1455
  Button,
1572
1456
  {
1573
1457
  title: option.description,
@@ -1591,7 +1475,7 @@ var ConfirmFeedback = ({
1591
1475
  },
1592
1476
  option.value
1593
1477
  )) }) : /* @__PURE__ */ jsxs2(Space, { style: { justifyContent: "flex-end", width: "100%" }, children: [
1594
- /* @__PURE__ */ jsx7(
1478
+ /* @__PURE__ */ jsx8(
1595
1479
  Button,
1596
1480
  {
1597
1481
  disabled: !interactive || clicked || feedback,
@@ -1614,7 +1498,7 @@ var ConfirmFeedback = ({
1614
1498
  children: "\u786E\u8BA4"
1615
1499
  }
1616
1500
  ),
1617
- /* @__PURE__ */ jsx7(
1501
+ /* @__PURE__ */ jsx8(
1618
1502
  Button,
1619
1503
  {
1620
1504
  disabled: !interactive || clicked || feedback,
@@ -1645,7 +1529,7 @@ var ConfirmFeedback = ({
1645
1529
  import { Table, Typography as Typography2, Button as Button2, Flex, Space as Space2 } from "antd";
1646
1530
  import { useState as useState9 } from "react";
1647
1531
  import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
1648
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1532
+ import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
1649
1533
  var { Text: Text2 } = Typography2;
1650
1534
  var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
1651
1535
  const { dataSource, message: message5 } = data ?? {};
@@ -1701,12 +1585,12 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
1701
1585
  }
1702
1586
  return /* @__PURE__ */ jsxs3("div", { style: { padding: "16px" }, children: [
1703
1587
  expandItem.content && /* @__PURE__ */ jsxs3("div", { style: { marginBottom: "16px" }, children: [
1704
- /* @__PURE__ */ jsx8(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u8BE6\u7EC6\u4FE1\u606F:" }),
1705
- /* @__PURE__ */ jsx8(MDResponse, { content: expandItem.content })
1588
+ /* @__PURE__ */ jsx9(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u8BE6\u7EC6\u4FE1\u606F:" }),
1589
+ /* @__PURE__ */ jsx9(MDResponse, { content: expandItem.content })
1706
1590
  ] }),
1707
1591
  expandItem.dataSource && expandItem.dataSource.length > 0 && /* @__PURE__ */ jsxs3("div", { children: [
1708
- /* @__PURE__ */ jsx8(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u5B50\u8868\u6570\u636E:" }),
1709
- /* @__PURE__ */ jsx8(
1592
+ /* @__PURE__ */ jsx9(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u5B50\u8868\u6570\u636E:" }),
1593
+ /* @__PURE__ */ jsx9(
1710
1594
  GenericDataTable,
1711
1595
  {
1712
1596
  component_key: `nested_${record.key}`,
@@ -1727,19 +1611,19 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
1727
1611
  );
1728
1612
  };
1729
1613
  const hasExpandableRows = processedData.some((item) => item.expandItem);
1730
- return /* @__PURE__ */ jsx8(
1614
+ return /* @__PURE__ */ jsx9(
1731
1615
  Table,
1732
1616
  {
1733
1617
  size: "small",
1734
1618
  title: () => /* @__PURE__ */ jsxs3(Flex, { justify: "space-between", align: "center", children: [
1735
- /* @__PURE__ */ jsx8(Space2, { children: /* @__PURE__ */ jsx8(Text2, { strong: true, style: { fontSize: 16 }, children: message5 || "" }) }),
1619
+ /* @__PURE__ */ jsx9(Space2, { children: /* @__PURE__ */ jsx9(Text2, { strong: true, style: { fontSize: 16 }, children: message5 || "" }) }),
1736
1620
  /* @__PURE__ */ jsxs3(Space2, { children: [
1737
- /* @__PURE__ */ jsx8(
1621
+ /* @__PURE__ */ jsx9(
1738
1622
  Button2,
1739
1623
  {
1740
1624
  type: "text",
1741
1625
  size: "small",
1742
- icon: /* @__PURE__ */ jsx8(DownloadOutlined, {}),
1626
+ icon: /* @__PURE__ */ jsx9(DownloadOutlined, {}),
1743
1627
  onClick: exportToExcel,
1744
1628
  disabled: !processedData || processedData.length === 0,
1745
1629
  children: "\u5BFC\u51FAExcel"
@@ -1758,7 +1642,7 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
1758
1642
  });
1759
1643
  },
1760
1644
  children: [
1761
- /* @__PURE__ */ jsx8(ExpandAltOutlined, {}),
1645
+ /* @__PURE__ */ jsx9(ExpandAltOutlined, {}),
1762
1646
  "\u5C55\u5F00"
1763
1647
  ]
1764
1648
  }
@@ -1787,9 +1671,9 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
1787
1671
  };
1788
1672
 
1789
1673
  // src/components/GenUI/elements/generic_data_table_side_app.tsx
1790
- import { jsx as jsx9 } from "react/jsx-runtime";
1674
+ import { jsx as jsx10 } from "react/jsx-runtime";
1791
1675
  var GenericDataTableSideApp = (props) => {
1792
- return /* @__PURE__ */ jsx9(GenericDataTable, { ...props, default_open_in_side_app: false });
1676
+ return /* @__PURE__ */ jsx10(GenericDataTable, { ...props, default_open_in_side_app: false });
1793
1677
  };
1794
1678
 
1795
1679
  // src/components/GenUI/elements/ToolCall.tsx
@@ -1805,7 +1689,7 @@ import {
1805
1689
  import { Card as Card2, Typography as Typography3, Space as Space3, Tag } from "antd";
1806
1690
  import { createStyles as createStyles3 } from "antd-style";
1807
1691
  import { ToolOutlined, CodeOutlined } from "@ant-design/icons";
1808
- import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
1692
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
1809
1693
  var { Text: Text3, Title } = Typography3;
1810
1694
  var useStyle2 = createStyles3(({ token, css }) => ({
1811
1695
  card: css`
@@ -1875,7 +1759,7 @@ var ToolCard = ({
1875
1759
  }) => {
1876
1760
  const { styles } = useStyle2();
1877
1761
  if (!data || !data.name) {
1878
- return /* @__PURE__ */ jsx10(Card2, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ jsx10(Text3, { type: "secondary", children: "Invalid tool data" }) });
1762
+ return /* @__PURE__ */ jsx11(Card2, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ jsx11(Text3, { type: "secondary", children: "Invalid tool data" }) });
1879
1763
  }
1880
1764
  const formatToolName = (name) => {
1881
1765
  return name.replace(/([a-z])([A-Z])/g, "$1 $2").split(/[_-]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
@@ -1928,11 +1812,11 @@ var ToolCard = ({
1928
1812
  children: [
1929
1813
  /* @__PURE__ */ jsxs4("div", { className: styles.header, children: [
1930
1814
  /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1931
- /* @__PURE__ */ jsx10(ToolOutlined, { style: { color: "#1890ff", fontSize: "18px" } }),
1932
- /* @__PURE__ */ jsx10(Title, { level: 5, className: styles.toolName, style: { margin: 0 }, children: formatToolName(data.name) }),
1933
- data.type && /* @__PURE__ */ jsx10(Tag, { color: "blue", className: styles.typeTag, children: data.type })
1815
+ /* @__PURE__ */ jsx11(ToolOutlined, { style: { color: "#1890ff", fontSize: "18px" } }),
1816
+ /* @__PURE__ */ jsx11(Title, { level: 5, className: styles.toolName, style: { margin: 0 }, children: formatToolName(data.name) }),
1817
+ data.type && /* @__PURE__ */ jsx11(Tag, { color: "blue", className: styles.typeTag, children: data.type })
1934
1818
  ] }),
1935
- data.description && /* @__PURE__ */ jsx10(
1819
+ data.description && /* @__PURE__ */ jsx11(
1936
1820
  Text3,
1937
1821
  {
1938
1822
  type: "secondary",
@@ -1943,17 +1827,17 @@ var ToolCard = ({
1943
1827
  ] }),
1944
1828
  hasParameters ? /* @__PURE__ */ jsxs4("div", { children: [
1945
1829
  /* @__PURE__ */ jsxs4(Space3, { align: "center", style: { marginBottom: "12px" }, children: [
1946
- /* @__PURE__ */ jsx10(CodeOutlined, { style: { color: "#52c41a", fontSize: "14px" } }),
1830
+ /* @__PURE__ */ jsx11(CodeOutlined, { style: { color: "#52c41a", fontSize: "14px" } }),
1947
1831
  /* @__PURE__ */ jsxs4(Text3, { strong: true, style: { fontSize: "14px" }, children: [
1948
1832
  "Parameters (",
1949
1833
  Object.keys(data.parameters).length,
1950
1834
  ")"
1951
1835
  ] })
1952
1836
  ] }),
1953
- /* @__PURE__ */ jsx10("div", { className: styles.parameterGrid, children: Object.entries(data.parameters).map(([key, value], index) => /* @__PURE__ */ jsxs4("div", { className: styles.parameterItem, children: [
1954
- /* @__PURE__ */ jsx10("div", { className: styles.parameterName, children: /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1955
- /* @__PURE__ */ jsx10("span", { children: key }),
1956
- /* @__PURE__ */ jsx10(
1837
+ /* @__PURE__ */ jsx11("div", { className: styles.parameterGrid, children: Object.entries(data.parameters).map(([key, value], index) => /* @__PURE__ */ jsxs4("div", { className: styles.parameterItem, children: [
1838
+ /* @__PURE__ */ jsx11("div", { className: styles.parameterName, children: /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1839
+ /* @__PURE__ */ jsx11("span", { children: key }),
1840
+ /* @__PURE__ */ jsx11(
1957
1841
  Tag,
1958
1842
  {
1959
1843
  color: getTypeColor(value),
@@ -1962,11 +1846,11 @@ var ToolCard = ({
1962
1846
  }
1963
1847
  )
1964
1848
  ] }) }),
1965
- /* @__PURE__ */ jsx10("div", { className: styles.parameterValue, children: formatParameterValue(value) })
1849
+ /* @__PURE__ */ jsx11("div", { className: styles.parameterValue, children: formatParameterValue(value) })
1966
1850
  ] }, index)) })
1967
1851
  ] }) : /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1968
- /* @__PURE__ */ jsx10(CodeOutlined, { style: { color: "#d9d9d9", fontSize: "14px" } }),
1969
- /* @__PURE__ */ jsx10(Text3, { type: "secondary", style: { fontSize: "13px" }, children: "No parameters" })
1852
+ /* @__PURE__ */ jsx11(CodeOutlined, { style: { color: "#d9d9d9", fontSize: "14px" } }),
1853
+ /* @__PURE__ */ jsx11(Text3, { type: "secondary", style: { fontSize: "13px" }, children: "No parameters" })
1970
1854
  ] })
1971
1855
  ]
1972
1856
  }
@@ -1974,15 +1858,15 @@ var ToolCard = ({
1974
1858
  };
1975
1859
 
1976
1860
  // src/components/GenUI/elements/ToolCall.tsx
1977
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1861
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1978
1862
  function getStatusIcon(status) {
1979
1863
  switch (status) {
1980
1864
  case "success":
1981
- return /* @__PURE__ */ jsx11(CheckCircleOutlined, { style: { color: "#52c41a" } });
1865
+ return /* @__PURE__ */ jsx12(CheckCircleOutlined, { style: { color: "#52c41a" } });
1982
1866
  case "error":
1983
- return /* @__PURE__ */ jsx11(InfoCircleOutlined, { style: { color: "#ff4d4f" } });
1867
+ return /* @__PURE__ */ jsx12(InfoCircleOutlined, { style: { color: "#ff4d4f" } });
1984
1868
  default:
1985
- return /* @__PURE__ */ jsx11(LoadingOutlined, { style: { color: "#1890ff" } });
1869
+ return /* @__PURE__ */ jsx12(LoadingOutlined, { style: { color: "#1890ff" } });
1986
1870
  }
1987
1871
  }
1988
1872
  var ToolCall = ({ data }) => {
@@ -2006,8 +1890,8 @@ var ToolCall = ({ data }) => {
2006
1890
  }
2007
1891
  };
2008
1892
  const header = /* @__PURE__ */ jsxs5(Flex2, { align: "center", wrap: "wrap", children: [
2009
- /* @__PURE__ */ jsx11(Typography4.Text, { strong: true, children: formatToolName(toolCallData.name) }),
2010
- /* @__PURE__ */ jsx11(
1893
+ /* @__PURE__ */ jsx12(Typography4.Text, { strong: true, children: formatToolName(toolCallData.name) }),
1894
+ /* @__PURE__ */ jsx12(
2011
1895
  Typography4.Text,
2012
1896
  {
2013
1897
  type: "secondary",
@@ -2022,7 +1906,7 @@ var ToolCall = ({ data }) => {
2022
1906
  type: "tool_call"
2023
1907
  };
2024
1908
  const content = /* @__PURE__ */ jsxs5("div", { style: { marginTop: "8px" }, children: [
2025
- /* @__PURE__ */ jsx11(
1909
+ /* @__PURE__ */ jsx12(
2026
1910
  ToolCard,
2027
1911
  {
2028
1912
  data: toolCardData,
@@ -2031,7 +1915,7 @@ var ToolCall = ({ data }) => {
2031
1915
  }
2032
1916
  ),
2033
1917
  toolCallData.response && /* @__PURE__ */ jsxs5("div", { style: { marginTop: "12px" }, children: [
2034
- /* @__PURE__ */ jsx11(
1918
+ /* @__PURE__ */ jsx12(
2035
1919
  Typography4.Text,
2036
1920
  {
2037
1921
  strong: true,
@@ -2039,7 +1923,7 @@ var ToolCall = ({ data }) => {
2039
1923
  children: "Response:"
2040
1924
  }
2041
1925
  ),
2042
- /* @__PURE__ */ jsx11(MDResponse, { content: toolCallData.response })
1926
+ /* @__PURE__ */ jsx12(MDResponse, { content: toolCallData.response })
2043
1927
  ] })
2044
1928
  ] });
2045
1929
  const expandIcon = ({ isActive }) => {
@@ -2052,14 +1936,14 @@ var ToolCall = ({ data }) => {
2052
1936
  component_key: toolCallData.id
2053
1937
  });
2054
1938
  }
2055
- return /* @__PURE__ */ jsx11(
1939
+ return /* @__PURE__ */ jsx12(
2056
1940
  Collapse,
2057
1941
  {
2058
1942
  size: "small",
2059
1943
  bordered: false,
2060
1944
  defaultActiveKey: [],
2061
1945
  expandIcon,
2062
- children: /* @__PURE__ */ jsx11(
1946
+ children: /* @__PURE__ */ jsx12(
2063
1947
  CollapsePanel,
2064
1948
  {
2065
1949
  header,
@@ -2080,7 +1964,7 @@ import {
2080
1964
  CheckCircleOutlined as CheckCircleOutlined2,
2081
1965
  ClockCircleOutlined
2082
1966
  } from "@ant-design/icons";
2083
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1967
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
2084
1968
  var { Text: Text4 } = Typography5;
2085
1969
  var useStyle3 = createStyles4(({ token, css }) => ({
2086
1970
  card: css`
@@ -2117,11 +2001,11 @@ var Todo = ({
2117
2001
  const getStatusIcon2 = (status) => {
2118
2002
  switch (status) {
2119
2003
  case "completed":
2120
- return /* @__PURE__ */ jsx12(CheckCircleOutlined2, { style: { color: "#52c41a" } });
2004
+ return /* @__PURE__ */ jsx13(CheckCircleOutlined2, { style: { color: "#52c41a" } });
2121
2005
  case "in_progress":
2122
- return /* @__PURE__ */ jsx12(ArrowRightOutlined, { style: { fontWeight: "500" } });
2006
+ return /* @__PURE__ */ jsx13(ArrowRightOutlined, { style: { fontWeight: "500" } });
2123
2007
  case "pending":
2124
- return /* @__PURE__ */ jsx12(ClockCircleOutlined, { style: { color: "gray" } });
2008
+ return /* @__PURE__ */ jsx13(ClockCircleOutlined, { style: { color: "gray" } });
2125
2009
  default:
2126
2010
  return null;
2127
2011
  }
@@ -2163,29 +2047,29 @@ var Todo = ({
2163
2047
  }
2164
2048
  };
2165
2049
  if (!data || !Array.isArray(data)) {
2166
- return /* @__PURE__ */ jsx12(
2050
+ return /* @__PURE__ */ jsx13(
2167
2051
  Card3,
2168
2052
  {
2169
2053
  size: "small",
2170
2054
  className: `shadow-sm ${styles.card}`,
2171
2055
  bordered: false,
2172
- children: /* @__PURE__ */ jsx12(Text4, { type: "secondary", children: "No todo items available" })
2056
+ children: /* @__PURE__ */ jsx13(Text4, { type: "secondary", children: "No todo items available" })
2173
2057
  }
2174
2058
  );
2175
2059
  }
2176
- return /* @__PURE__ */ jsx12(Card3, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ jsxs6(Space5, { direction: "vertical", style: { width: "100%" }, children: [
2177
- /* @__PURE__ */ jsx12(
2060
+ return /* @__PURE__ */ jsx13(Card3, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ jsxs6(Space5, { direction: "vertical", style: { width: "100%" }, children: [
2061
+ /* @__PURE__ */ jsx13(
2178
2062
  List,
2179
2063
  {
2180
2064
  size: "small",
2181
2065
  dataSource: data,
2182
- renderItem: (item, index) => /* @__PURE__ */ jsx12(
2066
+ renderItem: (item, index) => /* @__PURE__ */ jsx13(
2183
2067
  List.Item,
2184
2068
  {
2185
2069
  className: `${styles.todoItem} ${getItemClassName(item.status)}`,
2186
2070
  children: /* @__PURE__ */ jsxs6(Space5, { align: "center", style: { width: "100%" }, children: [
2187
2071
  getStatusIcon2(item.status),
2188
- /* @__PURE__ */ jsx12(Text4, { style: { flex: 1 }, children: item.content })
2072
+ /* @__PURE__ */ jsx13(Text4, { style: { flex: 1 }, children: item.content })
2189
2073
  ] })
2190
2074
  }
2191
2075
  )
@@ -2210,7 +2094,7 @@ var Todo = ({
2210
2094
  import { Space as Space6, Collapse as Collapse2, Typography as Typography6 } from "antd";
2211
2095
  import { UnorderedListOutlined } from "@ant-design/icons";
2212
2096
  import CollapsePanel2 from "antd/es/collapse/CollapsePanel";
2213
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2097
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
2214
2098
  var { Text: Text5 } = Typography6;
2215
2099
  var WriteTodos = ({
2216
2100
  data,
@@ -2224,10 +2108,10 @@ var WriteTodos = ({
2224
2108
  (item) => item.status === "completed"
2225
2109
  ).length;
2226
2110
  const expandIcon = () => {
2227
- return /* @__PURE__ */ jsx13(UnorderedListOutlined, {});
2111
+ return /* @__PURE__ */ jsx14(UnorderedListOutlined, {});
2228
2112
  };
2229
2113
  const header = /* @__PURE__ */ jsxs7(Space6, { children: [
2230
- /* @__PURE__ */ jsx13(Text5, { strong: true, children: "Todos" }),
2114
+ /* @__PURE__ */ jsx14(Text5, { strong: true, children: "Todos" }),
2231
2115
  /* @__PURE__ */ jsxs7(Text5, { style: { fontSize: 12 }, type: "secondary", children: [
2232
2116
  completedCount,
2233
2117
  "/",
@@ -2238,19 +2122,19 @@ var WriteTodos = ({
2238
2122
  if (!toolCallData) {
2239
2123
  return null;
2240
2124
  }
2241
- return /* @__PURE__ */ jsx13(
2125
+ return /* @__PURE__ */ jsx14(
2242
2126
  Collapse2,
2243
2127
  {
2244
2128
  size: "small",
2245
2129
  bordered: false,
2246
2130
  defaultActiveKey: [toolCallData.id],
2247
2131
  expandIcon,
2248
- children: /* @__PURE__ */ jsx13(
2132
+ children: /* @__PURE__ */ jsx14(
2249
2133
  CollapsePanel2,
2250
2134
  {
2251
2135
  header,
2252
2136
  style: { minWidth: 400 },
2253
- children: /* @__PURE__ */ jsx13(
2137
+ children: /* @__PURE__ */ jsx14(
2254
2138
  Todo,
2255
2139
  {
2256
2140
  data: data.args.todos,
@@ -2266,7 +2150,7 @@ var WriteTodos = ({
2266
2150
  };
2267
2151
 
2268
2152
  // src/components/GenUI/FileExplorer.tsx
2269
- import { useState as useState10, useEffect as useEffect6, useMemo as useMemo3 } from "react";
2153
+ import { useState as useState10, useEffect as useEffect6, useMemo as useMemo2 } from "react";
2270
2154
  import { Splitter, Tree, Empty, Button as Button3, Tooltip, message } from "antd";
2271
2155
  import {
2272
2156
  FolderOutlined,
@@ -2287,40 +2171,40 @@ import {
2287
2171
  FileUnknownOutlined,
2288
2172
  Html5Outlined
2289
2173
  } from "@ant-design/icons";
2290
- import { jsx as jsx14 } from "react/jsx-runtime";
2174
+ import { jsx as jsx15 } from "react/jsx-runtime";
2291
2175
  var getFileIcon = (filename) => {
2292
2176
  const ext = filename?.split(".")?.pop()?.toLowerCase();
2293
2177
  const iconStyle = { fontSize: 14, marginRight: 4, verticalAlign: "middle" };
2294
2178
  switch (ext) {
2295
2179
  case "ts":
2296
2180
  case "tsx":
2297
- return /* @__PURE__ */ jsx14(CodeOutlined2, { style: { ...iconStyle, color: "#3178c6" } });
2181
+ return /* @__PURE__ */ jsx15(CodeOutlined2, { style: { ...iconStyle, color: "#3178c6" } });
2298
2182
  case "js":
2299
2183
  case "jsx":
2300
- return /* @__PURE__ */ jsx14(CodeOutlined2, { style: { ...iconStyle, color: "#f7df1e" } });
2184
+ return /* @__PURE__ */ jsx15(CodeOutlined2, { style: { ...iconStyle, color: "#f7df1e" } });
2301
2185
  case "html":
2302
- return /* @__PURE__ */ jsx14(Html5Outlined, { style: { ...iconStyle, color: "#e34c26" } });
2186
+ return /* @__PURE__ */ jsx15(Html5Outlined, { style: { ...iconStyle, color: "#e34c26" } });
2303
2187
  case "css":
2304
2188
  case "less":
2305
2189
  case "scss":
2306
- return /* @__PURE__ */ jsx14(FileUnknownOutlined, { style: { ...iconStyle, color: "#563d7c" } });
2190
+ return /* @__PURE__ */ jsx15(FileUnknownOutlined, { style: { ...iconStyle, color: "#563d7c" } });
2307
2191
  case "md":
2308
- return /* @__PURE__ */ jsx14(FileMarkdownOutlined, { style: { ...iconStyle, color: "#083fa1" } });
2192
+ return /* @__PURE__ */ jsx15(FileMarkdownOutlined, { style: { ...iconStyle, color: "#083fa1" } });
2309
2193
  case "json":
2310
- return /* @__PURE__ */ jsx14(FileTextOutlined, { style: { ...iconStyle, color: "#fbc02d" } });
2194
+ return /* @__PURE__ */ jsx15(FileTextOutlined, { style: { ...iconStyle, color: "#fbc02d" } });
2311
2195
  case "png":
2312
2196
  case "jpg":
2313
2197
  case "jpeg":
2314
2198
  case "gif":
2315
2199
  case "svg":
2316
- return /* @__PURE__ */ jsx14(FileImageOutlined, { style: { ...iconStyle, color: "#4caf50" } });
2200
+ return /* @__PURE__ */ jsx15(FileImageOutlined, { style: { ...iconStyle, color: "#4caf50" } });
2317
2201
  default:
2318
- return /* @__PURE__ */ jsx14(FileOutlined, { style: { ...iconStyle, color: "#9e9e9e" } });
2202
+ return /* @__PURE__ */ jsx15(FileOutlined, { style: { ...iconStyle, color: "#9e9e9e" } });
2319
2203
  }
2320
2204
  };
2321
2205
 
2322
2206
  // src/components/GenUI/FileExplorer.tsx
2323
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2207
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
2324
2208
  var useStyles2 = createStyles5(({ token, css }) => ({
2325
2209
  container: css`
2326
2210
  height: 100%;
@@ -2452,7 +2336,7 @@ var getFolderIcon = (expanded) => {
2452
2336
  color: "#dcb67a",
2453
2337
  verticalAlign: "middle"
2454
2338
  };
2455
- return expanded ? /* @__PURE__ */ jsx15(FolderOpenOutlined, { style: iconStyle }) : /* @__PURE__ */ jsx15(FolderOutlined, { style: iconStyle });
2339
+ return expanded ? /* @__PURE__ */ jsx16(FolderOpenOutlined, { style: iconStyle }) : /* @__PURE__ */ jsx16(FolderOutlined, { style: iconStyle });
2456
2340
  };
2457
2341
  var sortTreeNodes = (nodes) => {
2458
2342
  return nodes.sort((a, b) => {
@@ -2477,7 +2361,7 @@ var buildTreeData = (files, expandedKeys) => {
2477
2361
  const key = parts.slice(0, index + 1).join("/");
2478
2362
  let existingNode = currentLevel.find((node) => node.key === key);
2479
2363
  if (!existingNode) {
2480
- const title = part === "" && index === 0 ? /* @__PURE__ */ jsx15(
2364
+ const title = part === "" && index === 0 ? /* @__PURE__ */ jsx16(
2481
2365
  "span",
2482
2366
  {
2483
2367
  style: {
@@ -2538,7 +2422,7 @@ var FileExplorer = ({
2538
2422
  setSelectedKey(list[0].name);
2539
2423
  }
2540
2424
  }, [files]);
2541
- const treeData = useMemo3(
2425
+ const treeData = useMemo2(
2542
2426
  () => buildTreeData(fileList, expandedKeys),
2543
2427
  [fileList, expandedKeys]
2544
2428
  );
@@ -2559,7 +2443,7 @@ var FileExplorer = ({
2559
2443
  setExpandedKeys(getAllKeys(treeData));
2560
2444
  }
2561
2445
  }, [treeData.length]);
2562
- const selectedFile = useMemo3(() => {
2446
+ const selectedFile = useMemo2(() => {
2563
2447
  return fileList.find((f) => f.name === selectedKey);
2564
2448
  }, [fileList, selectedKey]);
2565
2449
  const handleCopy = () => {
@@ -2586,7 +2470,7 @@ var FileExplorer = ({
2586
2470
  };
2587
2471
  const renderContent = () => {
2588
2472
  if (!selectedFile) {
2589
- return /* @__PURE__ */ jsx15("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx15(
2473
+ return /* @__PURE__ */ jsx16("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx16(
2590
2474
  Empty,
2591
2475
  {
2592
2476
  description: "Select a file to preview",
@@ -2601,32 +2485,32 @@ var FileExplorer = ({
2601
2485
  style: { minHeight: "100%", display: "flex", flexDirection: "column" },
2602
2486
  children: [
2603
2487
  /* @__PURE__ */ jsxs8("div", { className: styles.header, children: [
2604
- /* @__PURE__ */ jsx15(Tooltip, { title: "Copy Content", children: /* @__PURE__ */ jsx15(
2488
+ /* @__PURE__ */ jsx16(Tooltip, { title: "Copy Content", children: /* @__PURE__ */ jsx16(
2605
2489
  Button3,
2606
2490
  {
2607
2491
  type: "text",
2608
- icon: copied ? /* @__PURE__ */ jsx15(CheckOutlined, {}) : /* @__PURE__ */ jsx15(CopyOutlined, {}),
2492
+ icon: copied ? /* @__PURE__ */ jsx16(CheckOutlined, {}) : /* @__PURE__ */ jsx16(CopyOutlined, {}),
2609
2493
  onClick: handleCopy,
2610
2494
  size: "small"
2611
2495
  }
2612
2496
  ) }),
2613
- /* @__PURE__ */ jsx15(Tooltip, { title: "Download File", children: /* @__PURE__ */ jsx15(
2497
+ /* @__PURE__ */ jsx16(Tooltip, { title: "Download File", children: /* @__PURE__ */ jsx16(
2614
2498
  Button3,
2615
2499
  {
2616
2500
  type: "text",
2617
- icon: /* @__PURE__ */ jsx15(DownloadOutlined2, {}),
2501
+ icon: /* @__PURE__ */ jsx16(DownloadOutlined2, {}),
2618
2502
  onClick: handleDownload,
2619
2503
  size: "small"
2620
2504
  }
2621
2505
  ) })
2622
2506
  ] }),
2623
- /* @__PURE__ */ jsx15("div", { className: styles.contentBody, children: /* @__PURE__ */ jsx15(MDResponse, { content }) })
2507
+ /* @__PURE__ */ jsx16("div", { className: styles.contentBody, children: /* @__PURE__ */ jsx16(MDResponse, { content }) })
2624
2508
  ]
2625
2509
  }
2626
2510
  );
2627
2511
  };
2628
- return /* @__PURE__ */ jsx15("div", { className: styles.container, children: /* @__PURE__ */ jsxs8(Splitter, { className: styles.splitter, children: [
2629
- /* @__PURE__ */ jsx15(Splitter.Panel, { defaultSize: "25%", min: "15%", max: "40%", children: /* @__PURE__ */ jsx15("div", { className: styles.leftPanel, children: /* @__PURE__ */ jsx15(
2512
+ return /* @__PURE__ */ jsx16("div", { className: styles.container, children: /* @__PURE__ */ jsxs8(Splitter, { className: styles.splitter, children: [
2513
+ /* @__PURE__ */ jsx16(Splitter.Panel, { defaultSize: "25%", min: "15%", max: "40%", children: /* @__PURE__ */ jsx16("div", { className: styles.leftPanel, children: /* @__PURE__ */ jsx16(
2630
2514
  Tree,
2631
2515
  {
2632
2516
  showIcon: true,
@@ -2664,7 +2548,7 @@ var FileExplorer = ({
2664
2548
  }
2665
2549
  }
2666
2550
  ) }) }),
2667
- /* @__PURE__ */ jsx15(Splitter.Panel, { children: /* @__PURE__ */ jsx15("div", { className: styles.rightPanel, children: renderContent() }) })
2551
+ /* @__PURE__ */ jsx16(Splitter.Panel, { children: /* @__PURE__ */ jsx16("div", { className: styles.rightPanel, children: renderContent() }) })
2668
2552
  ] }) });
2669
2553
  };
2670
2554
 
@@ -2681,7 +2565,7 @@ import {
2681
2565
  } from "antd";
2682
2566
  import dayjs from "dayjs";
2683
2567
  import { useState as useState11 } from "react";
2684
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
2568
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
2685
2569
  var AttachmentsCard = ({
2686
2570
  data,
2687
2571
  component_key,
@@ -2749,7 +2633,7 @@ var AttachmentsCard = ({
2749
2633
  };
2750
2634
  const DownloadButton = ({ item }) => {
2751
2635
  if (!showDownloadButton) return null;
2752
- return /* @__PURE__ */ jsx16(
2636
+ return /* @__PURE__ */ jsx17(
2753
2637
  "div",
2754
2638
  {
2755
2639
  style: {
@@ -2763,7 +2647,7 @@ var AttachmentsCard = ({
2763
2647
  }
2764
2648
  );
2765
2649
  };
2766
- const renderFileDescription = (item) => /* @__PURE__ */ jsx16(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx16(Space7, { children: /* @__PURE__ */ jsx16(
2650
+ const renderFileDescription = (item) => /* @__PURE__ */ jsx17(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx17(Space7, { children: /* @__PURE__ */ jsx17(
2767
2651
  Text13,
2768
2652
  {
2769
2653
  type: "secondary",
@@ -2778,7 +2662,7 @@ var AttachmentsCard = ({
2778
2662
  const shouldShowViewMore2 = displayData2.length > 4;
2779
2663
  const visibleData2 = showAll ? displayData2 : displayData2.slice(0, 4);
2780
2664
  return /* @__PURE__ */ jsxs9(Flex3, { vertical: true, gap: "small", children: [
2781
- /* @__PURE__ */ jsx16(Row, { gutter: [8, 8], children: visibleData2.map((item) => /* @__PURE__ */ jsx16(Col, { span: 24 / columns, children: /* @__PURE__ */ jsx16(
2665
+ /* @__PURE__ */ jsx17(Row, { gutter: [8, 8], children: visibleData2.map((item) => /* @__PURE__ */ jsx17(Col, { span: 24 / columns, children: /* @__PURE__ */ jsx17(
2782
2666
  "div",
2783
2667
  {
2784
2668
  onClick: (evt) => {
@@ -2786,8 +2670,8 @@ var AttachmentsCard = ({
2786
2670
  handleItemClick(item);
2787
2671
  },
2788
2672
  children: /* @__PURE__ */ jsxs9(Card4, { size: styles.cardSize, style: getCardStyle(item), children: [
2789
- /* @__PURE__ */ jsx16(DownloadButton, { item }),
2790
- /* @__PURE__ */ jsx16(
2673
+ /* @__PURE__ */ jsx17(DownloadButton, { item }),
2674
+ /* @__PURE__ */ jsx17(
2791
2675
  FileCard,
2792
2676
  {
2793
2677
  style: getFileCardStyle(item),
@@ -2796,7 +2680,7 @@ var AttachmentsCard = ({
2796
2680
  description: renderFileDescription(item)
2797
2681
  }
2798
2682
  ),
2799
- item.files && /* @__PURE__ */ jsx16(
2683
+ item.files && /* @__PURE__ */ jsx17(
2800
2684
  AttachmentsCard,
2801
2685
  {
2802
2686
  data: item.files,
@@ -2809,7 +2693,7 @@ var AttachmentsCard = ({
2809
2693
  ] })
2810
2694
  }
2811
2695
  ) }, item.id)) }),
2812
- shouldShowViewMore2 && /* @__PURE__ */ jsx16(
2696
+ shouldShowViewMore2 && /* @__PURE__ */ jsx17(
2813
2697
  Button4,
2814
2698
  {
2815
2699
  type: "link",
@@ -2824,9 +2708,9 @@ var AttachmentsCard = ({
2824
2708
  const shouldShowViewMore = displayData.length > 4;
2825
2709
  const visibleData = showAll ? displayData : displayData.slice(0, 4);
2826
2710
  return /* @__PURE__ */ jsxs9(Flex3, { vertical: true, gap: size === "small" ? "small" : "middle", children: [
2827
- visibleData.map((item) => /* @__PURE__ */ jsx16("div", { onClick: () => handleItemClick(item), children: /* @__PURE__ */ jsxs9(Card4, { size: styles.cardSize, style: getCardStyle(item), children: [
2828
- /* @__PURE__ */ jsx16(DownloadButton, { item }),
2829
- /* @__PURE__ */ jsx16(
2711
+ visibleData.map((item) => /* @__PURE__ */ jsx17("div", { onClick: () => handleItemClick(item), children: /* @__PURE__ */ jsxs9(Card4, { size: styles.cardSize, style: getCardStyle(item), children: [
2712
+ /* @__PURE__ */ jsx17(DownloadButton, { item }),
2713
+ /* @__PURE__ */ jsx17(
2830
2714
  FileCard,
2831
2715
  {
2832
2716
  style: getFileCardStyle(item),
@@ -2841,7 +2725,7 @@ var AttachmentsCard = ({
2841
2725
  item.files.length,
2842
2726
  ")"
2843
2727
  ] }),
2844
- /* @__PURE__ */ jsx16(
2728
+ /* @__PURE__ */ jsx17(
2845
2729
  AttachmentsCard,
2846
2730
  {
2847
2731
  data: item.files,
@@ -2853,7 +2737,7 @@ var AttachmentsCard = ({
2853
2737
  )
2854
2738
  ] })
2855
2739
  ] }) }, item.id)),
2856
- shouldShowViewMore && /* @__PURE__ */ jsx16(
2740
+ shouldShowViewMore && /* @__PURE__ */ jsx17(
2857
2741
  Button4,
2858
2742
  {
2859
2743
  type: "link",
@@ -2872,7 +2756,7 @@ var AttachmentsCard = ({
2872
2756
  // src/components/GenUI/elements/attachments_viewer_side_app.tsx
2873
2757
  import { Button as Button5, Empty as Empty2, Skeleton } from "antd";
2874
2758
  import { useState as useState12 } from "react";
2875
- import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
2759
+ import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
2876
2760
  function AttachmentsViewerSideApp({
2877
2761
  data,
2878
2762
  component_key
@@ -2881,7 +2765,7 @@ function AttachmentsViewerSideApp({
2881
2765
  const [loading, setLoading] = useState12(true);
2882
2766
  const { file_id } = data ?? {};
2883
2767
  if (loading) {
2884
- return /* @__PURE__ */ jsx17(Skeleton, { active: true });
2768
+ return /* @__PURE__ */ jsx18(Skeleton, { active: true });
2885
2769
  }
2886
2770
  const canPreviewInIframe = (fileName) => {
2887
2771
  if (!fileName) return false;
@@ -2916,17 +2800,17 @@ function AttachmentsViewerSideApp({
2916
2800
  return previewableExtensions.includes(extension);
2917
2801
  };
2918
2802
  const isPreviewable = fileUri?.fileName ? canPreviewInIframe(fileUri.fileName) : false;
2919
- return isPreviewable ? /* @__PURE__ */ jsx17(
2803
+ return isPreviewable ? /* @__PURE__ */ jsx18(
2920
2804
  "iframe",
2921
2805
  {
2922
2806
  style: { width: "100%", height: "100%", border: 0 },
2923
2807
  src: fileUri?.url
2924
2808
  }
2925
- ) : /* @__PURE__ */ jsx17(
2809
+ ) : /* @__PURE__ */ jsx18(
2926
2810
  Empty2,
2927
2811
  {
2928
2812
  description: /* @__PURE__ */ jsxs10(Fragment2, { children: [
2929
- /* @__PURE__ */ jsx17("div", { children: "\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u540E\u67E5\u770B\u3002" }),
2813
+ /* @__PURE__ */ jsx18("div", { children: "\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u540E\u67E5\u770B\u3002" }),
2930
2814
  /* @__PURE__ */ jsxs10(Button5, { type: "link", href: fileUri?.url, download: fileUri?.fileName, children: [
2931
2815
  "\u4E0B\u8F7D",
2932
2816
  fileUri?.fileName
@@ -2946,7 +2830,7 @@ import { Collapse as Collapse4 } from "antd";
2946
2830
  import { createStyles as createStyles6 } from "antd-style";
2947
2831
  import { DownOutlined as DownOutlined2, UpOutlined } from "@ant-design/icons";
2948
2832
  import CollapsePanel3 from "antd/es/collapse/CollapsePanel";
2949
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
2833
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
2950
2834
  var DEFAULT_COLLAPSED_MAX_HEIGHT = 180;
2951
2835
  var DEFAULT_EXPANDED_MAX_HEIGHT = 500;
2952
2836
  var useStyle4 = createStyles6(
@@ -3038,7 +2922,7 @@ var ContentPreviewCollapse = ({
3038
2922
  e.stopPropagation();
3039
2923
  setShowFullContent(!showFullContent);
3040
2924
  };
3041
- return /* @__PURE__ */ jsx18(
2925
+ return /* @__PURE__ */ jsx19(
3042
2926
  Collapse4,
3043
2927
  {
3044
2928
  className: styles.collapse,
@@ -3053,22 +2937,22 @@ var ContentPreviewCollapse = ({
3053
2937
  extra,
3054
2938
  style: { minWidth },
3055
2939
  children: [
3056
- /* @__PURE__ */ jsx18(
2940
+ /* @__PURE__ */ jsx19(
3057
2941
  "div",
3058
2942
  {
3059
2943
  className: cx(styles.contentContainer, showFullContent && "expanded"),
3060
2944
  style: {
3061
2945
  maxHeight: showFullContent ? expandedMaxHeight : collapsedMaxHeight
3062
2946
  },
3063
- children: /* @__PURE__ */ jsx18("div", { ref: contentRef, className: styles.content, children })
2947
+ children: /* @__PURE__ */ jsx19("div", { ref: contentRef, className: styles.content, children })
3064
2948
  }
3065
2949
  ),
3066
- isOverflowing && /* @__PURE__ */ jsx18("div", { className: styles.toggleButton, onClick: handleToggleContent, children: showFullContent ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
3067
- /* @__PURE__ */ jsx18(UpOutlined, { style: { fontSize: 10 } }),
3068
- /* @__PURE__ */ jsx18("span", { children: showLessText })
2950
+ isOverflowing && /* @__PURE__ */ jsx19("div", { className: styles.toggleButton, onClick: handleToggleContent, children: showFullContent ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
2951
+ /* @__PURE__ */ jsx19(UpOutlined, { style: { fontSize: 10 } }),
2952
+ /* @__PURE__ */ jsx19("span", { children: showLessText })
3069
2953
  ] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
3070
- /* @__PURE__ */ jsx18(DownOutlined2, { style: { fontSize: 10 } }),
3071
- /* @__PURE__ */ jsx18("span", { children: showAllText })
2954
+ /* @__PURE__ */ jsx19(DownOutlined2, { style: { fontSize: 10 } }),
2955
+ /* @__PURE__ */ jsx19("span", { children: showAllText })
3072
2956
  ] }) })
3073
2957
  ]
3074
2958
  },
@@ -3079,7 +2963,7 @@ var ContentPreviewCollapse = ({
3079
2963
  };
3080
2964
 
3081
2965
  // src/components/GenUI/elements/WriteFile.tsx
3082
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
2966
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
3083
2967
  var { Text: Text6 } = Typography8;
3084
2968
  var WriteFile = ({
3085
2969
  data,
@@ -3094,8 +2978,8 @@ var WriteFile = ({
3094
2978
  }
3095
2979
  const expandIcon = () => getFileIcon(file_path);
3096
2980
  const header = /* @__PURE__ */ jsxs12(Space8, { children: [
3097
- /* @__PURE__ */ jsx19(Text6, { strong: true, children: "New" }),
3098
- /* @__PURE__ */ jsx19(Text6, { title: file_path, children: file_path?.split("/")?.pop() || "" })
2981
+ /* @__PURE__ */ jsx20(Text6, { strong: true, children: "New" }),
2982
+ /* @__PURE__ */ jsx20(Text6, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3099
2983
  ] });
3100
2984
  const handleItemClick = (toolCallData2) => {
3101
2985
  openSideApp({
@@ -3107,13 +2991,13 @@ var WriteFile = ({
3107
2991
  }
3108
2992
  });
3109
2993
  };
3110
- return /* @__PURE__ */ jsx19(
2994
+ return /* @__PURE__ */ jsx20(
3111
2995
  ContentPreviewCollapse,
3112
2996
  {
3113
2997
  panelKey: toolCallData.id,
3114
2998
  header,
3115
2999
  expandIcon,
3116
- extra: /* @__PURE__ */ jsx19(
3000
+ extra: /* @__PURE__ */ jsx20(
3117
3001
  Button6,
3118
3002
  {
3119
3003
  type: "link",
@@ -3125,7 +3009,7 @@ var WriteFile = ({
3125
3009
  children: "Diff View"
3126
3010
  }
3127
3011
  ),
3128
- children: /* @__PURE__ */ jsx19(MDResponse, { content })
3012
+ children: /* @__PURE__ */ jsx20(MDResponse, { content })
3129
3013
  }
3130
3014
  );
3131
3015
  };
@@ -3133,10 +3017,10 @@ var WriteFile = ({
3133
3017
  // src/components/GenUI/elements/file_content_diff_view.tsx
3134
3018
  import ReactDiffViewer from "@alexbruf/react-diff-viewer";
3135
3019
  import "@alexbruf/react-diff-viewer/index.css";
3136
- import { jsx as jsx20 } from "react/jsx-runtime";
3020
+ import { jsx as jsx21 } from "react/jsx-runtime";
3137
3021
  var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app = true }) => {
3138
3022
  const { old_code, new_code } = data;
3139
- return /* @__PURE__ */ jsx20(
3023
+ return /* @__PURE__ */ jsx21(
3140
3024
  ReactDiffViewer,
3141
3025
  {
3142
3026
  oldValue: old_code,
@@ -3148,7 +3032,7 @@ var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app
3148
3032
 
3149
3033
  // src/components/GenUI/elements/EditFile.tsx
3150
3034
  import { Button as Button7, Space as Space9, Typography as Typography9 } from "antd";
3151
- import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
3035
+ import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
3152
3036
  var { Text: Text7 } = Typography9;
3153
3037
  var EditFile = ({
3154
3038
  data,
@@ -3163,8 +3047,8 @@ var EditFile = ({
3163
3047
  }
3164
3048
  const expandIcon = () => getFileIcon(file_path);
3165
3049
  const header = /* @__PURE__ */ jsxs13(Space9, { children: [
3166
- /* @__PURE__ */ jsx21(Text7, { strong: true, children: "Edit" }),
3167
- /* @__PURE__ */ jsx21(Text7, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3050
+ /* @__PURE__ */ jsx22(Text7, { strong: true, children: "Edit" }),
3051
+ /* @__PURE__ */ jsx22(Text7, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3168
3052
  ] });
3169
3053
  const handleItemClick = (toolCallData2) => {
3170
3054
  openSideApp({
@@ -3176,13 +3060,13 @@ var EditFile = ({
3176
3060
  }
3177
3061
  });
3178
3062
  };
3179
- return /* @__PURE__ */ jsx21(
3063
+ return /* @__PURE__ */ jsx22(
3180
3064
  ContentPreviewCollapse,
3181
3065
  {
3182
3066
  panelKey: toolCallData.id,
3183
3067
  header,
3184
3068
  expandIcon,
3185
- extra: /* @__PURE__ */ jsx21(
3069
+ extra: /* @__PURE__ */ jsx22(
3186
3070
  Button7,
3187
3071
  {
3188
3072
  type: "link",
@@ -3194,7 +3078,7 @@ var EditFile = ({
3194
3078
  children: "Diff View"
3195
3079
  }
3196
3080
  ),
3197
- children: /* @__PURE__ */ jsx21(MDResponse, { content: new_string })
3081
+ children: /* @__PURE__ */ jsx22(MDResponse, { content: new_string })
3198
3082
  }
3199
3083
  );
3200
3084
  };
@@ -3210,7 +3094,7 @@ import {
3210
3094
  RightOutlined as RightOutlined2,
3211
3095
  CarryOutOutlined
3212
3096
  } from "@ant-design/icons";
3213
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
3097
+ import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
3214
3098
  var { Text: Text8 } = Typography10;
3215
3099
  var useStyle5 = createStyles7(({ token, css }) => ({
3216
3100
  card: css`
@@ -3378,14 +3262,14 @@ var TaskCard = ({
3378
3262
  switch (status2) {
3379
3263
  case "success":
3380
3264
  return {
3381
- icon: /* @__PURE__ */ jsx22(CheckCircleOutlined3, { style: { fontSize: 16 } }),
3265
+ icon: /* @__PURE__ */ jsx23(CheckCircleOutlined3, { style: { fontSize: 16 } }),
3382
3266
  color: "success",
3383
3267
  text: "Completed",
3384
3268
  bgColor: "rgba(82, 196, 26, 0.1)"
3385
3269
  };
3386
3270
  case "error":
3387
3271
  return {
3388
- icon: /* @__PURE__ */ jsx22(CloseCircleOutlined, { style: { fontSize: 16 } }),
3272
+ icon: /* @__PURE__ */ jsx23(CloseCircleOutlined, { style: { fontSize: 16 } }),
3389
3273
  color: "error",
3390
3274
  text: "Failed",
3391
3275
  bgColor: "rgba(255, 77, 79, 0.1)"
@@ -3393,7 +3277,7 @@ var TaskCard = ({
3393
3277
  case "pending":
3394
3278
  default:
3395
3279
  return {
3396
- icon: /* @__PURE__ */ jsx22(LoadingOutlined2, { style: { fontSize: 16 } }),
3280
+ icon: /* @__PURE__ */ jsx23(LoadingOutlined2, { style: { fontSize: 16 } }),
3397
3281
  color: "processing",
3398
3282
  text: "In Progress",
3399
3283
  bgColor: "rgba(24, 144, 255, 0.1)"
@@ -3413,7 +3297,7 @@ var TaskCard = ({
3413
3297
  }
3414
3298
  });
3415
3299
  };
3416
- return /* @__PURE__ */ jsx22(
3300
+ return /* @__PURE__ */ jsx23(
3417
3301
  Card5,
3418
3302
  {
3419
3303
  size: "small",
@@ -3423,27 +3307,27 @@ var TaskCard = ({
3423
3307
  hoverable: interactive,
3424
3308
  bodyStyle: { padding: 0 },
3425
3309
  children: /* @__PURE__ */ jsxs14("div", { className: styles.cardBody, children: [
3426
- /* @__PURE__ */ jsx22("div", { className: styles.header, children: /* @__PURE__ */ jsxs14("div", { className: styles.titleSection, children: [
3427
- /* @__PURE__ */ jsx22("div", { className: styles.iconWrapper, children: /* @__PURE__ */ jsx22(CarryOutOutlined, { style: { fontSize: 20, color: "#1890ff" } }) }),
3310
+ /* @__PURE__ */ jsx23("div", { className: styles.header, children: /* @__PURE__ */ jsxs14("div", { className: styles.titleSection, children: [
3311
+ /* @__PURE__ */ jsx23("div", { className: styles.iconWrapper, children: /* @__PURE__ */ jsx23(CarryOutOutlined, { style: { fontSize: 20, color: "#1890ff" } }) }),
3428
3312
  /* @__PURE__ */ jsxs14("div", { className: styles.titleContent, children: [
3429
- subagent_type && /* @__PURE__ */ jsx22("div", { className: styles.taskType, children: subagent_type }),
3430
- description && /* @__PURE__ */ jsx22(Text8, { className: styles.description, children: description })
3313
+ subagent_type && /* @__PURE__ */ jsx23("div", { className: styles.taskType, children: subagent_type }),
3314
+ description && /* @__PURE__ */ jsx23(Text8, { className: styles.description, children: description })
3431
3315
  ] })
3432
3316
  ] }) }),
3433
3317
  /* @__PURE__ */ jsxs14("div", { className: styles.footer, children: [
3434
3318
  /* @__PURE__ */ jsxs14("div", { className: styles.footerLeft, children: [
3435
3319
  assignee && /* @__PURE__ */ jsxs14("div", { className: styles.assigneeContainer, children: [
3436
- /* @__PURE__ */ jsx22(
3320
+ /* @__PURE__ */ jsx23(
3437
3321
  Avatar,
3438
3322
  {
3439
3323
  size: 24,
3440
- icon: /* @__PURE__ */ jsx22(UserOutlined, {}),
3324
+ icon: /* @__PURE__ */ jsx23(UserOutlined, {}),
3441
3325
  className: styles.assigneeAvatar
3442
3326
  }
3443
3327
  ),
3444
- /* @__PURE__ */ jsx22(Text8, { className: styles.assigneeName, children: assignee })
3328
+ /* @__PURE__ */ jsx23(Text8, { className: styles.assigneeName, children: assignee })
3445
3329
  ] }),
3446
- /* @__PURE__ */ jsx22(
3330
+ /* @__PURE__ */ jsx23(
3447
3331
  Tag3,
3448
3332
  {
3449
3333
  icon: statusConfig.icon,
@@ -3461,7 +3345,7 @@ var TaskCard = ({
3461
3345
  }
3462
3346
  )
3463
3347
  ] }),
3464
- interactive && /* @__PURE__ */ jsx22(RightOutlined2, { className: styles.actionIcon })
3348
+ interactive && /* @__PURE__ */ jsx23(RightOutlined2, { className: styles.actionIcon })
3465
3349
  ] }),
3466
3350
  showResponse && /* @__PURE__ */ jsxs14(
3467
3351
  "div",
@@ -3469,8 +3353,8 @@ var TaskCard = ({
3469
3353
  className: styles.responseSection,
3470
3354
  onClick: (e) => e.stopPropagation(),
3471
3355
  children: [
3472
- /* @__PURE__ */ jsx22(Text8, { className: styles.responseHeader, children: "Response" }),
3473
- /* @__PURE__ */ jsx22("div", { className: styles.responseContent, children: /* @__PURE__ */ jsx22(MDResponse, { content: response }) })
3356
+ /* @__PURE__ */ jsx23(Text8, { className: styles.responseHeader, children: "Response" }),
3357
+ /* @__PURE__ */ jsx23("div", { className: styles.responseContent, children: /* @__PURE__ */ jsx23(MDResponse, { content: response }) })
3474
3358
  ]
3475
3359
  }
3476
3360
  )
@@ -3502,11 +3386,11 @@ import {
3502
3386
  memo,
3503
3387
  useCallback as useCallback7,
3504
3388
  useEffect as useEffect9,
3505
- useMemo as useMemo4,
3389
+ useMemo as useMemo3,
3506
3390
  useRef as useRef7,
3507
3391
  useState as useState14
3508
3392
  } from "react";
3509
- import { jsx as jsx23 } from "react/jsx-runtime";
3393
+ import { jsx as jsx24 } from "react/jsx-runtime";
3510
3394
  var LazyBubble = ({
3511
3395
  message: message5,
3512
3396
  renderContent,
@@ -3540,16 +3424,16 @@ var LazyBubble = ({
3540
3424
  }, []);
3541
3425
  const getPlaceholder = () => {
3542
3426
  const estimatedHeight = message5.content ? Math.min(100, message5.content.length / 5) : 100;
3543
- return /* @__PURE__ */ jsx23("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
3427
+ return /* @__PURE__ */ jsx24("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
3544
3428
  };
3545
- return /* @__PURE__ */ jsx23(ErrorBoundary, { children: /* @__PURE__ */ jsx23("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message5) : getPlaceholder() }) });
3429
+ return /* @__PURE__ */ jsx24(ErrorBoundary, { children: /* @__PURE__ */ jsx24("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message5) : getPlaceholder() }) });
3546
3430
  };
3547
3431
  var MemoizedBubbleList = memo(
3548
3432
  ({
3549
3433
  items,
3550
3434
  role,
3551
3435
  className
3552
- }) => /* @__PURE__ */ jsx23(
3436
+ }) => /* @__PURE__ */ jsx24(
3553
3437
  Bubble.List,
3554
3438
  {
3555
3439
  autoScroll: true,
@@ -3578,7 +3462,7 @@ var MessageList = ({
3578
3462
  try {
3579
3463
  const json = JSON.parse(content);
3580
3464
  if (json.action && json.message) {
3581
- return /* @__PURE__ */ jsx23(MDResponse, { content: json.message });
3465
+ return /* @__PURE__ */ jsx24(MDResponse, { content: json.message });
3582
3466
  }
3583
3467
  } catch (error) {
3584
3468
  }
@@ -3588,14 +3472,14 @@ ${JSON.stringify(tool_call)}
3588
3472
  \`\`\``;
3589
3473
  }) || [];
3590
3474
  const content_md = [content, ...tool_calls_md].join("\n");
3591
- return /* @__PURE__ */ jsx23(Space10, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ jsx23(MDResponse, { content: content_md }) });
3475
+ return /* @__PURE__ */ jsx24(Space10, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ jsx24(MDResponse, { content: content_md }) });
3592
3476
  }, []);
3593
- const items = useMemo4(
3477
+ const items = useMemo3(
3594
3478
  () => messages.map((message5, index) => ({
3595
3479
  key: message5.id,
3596
3480
  role: message5.role,
3597
3481
  typing: false,
3598
- content: /* @__PURE__ */ jsx23(
3482
+ content: /* @__PURE__ */ jsx24(
3599
3483
  LazyBubble,
3600
3484
  {
3601
3485
  message: message5,
@@ -3655,9 +3539,9 @@ ${JSON.stringify(tool_call)}
3655
3539
  }
3656
3540
  };
3657
3541
  if (items.length === 0) {
3658
- return /* @__PURE__ */ jsx23("div", { style: { flex: 1 } });
3542
+ return /* @__PURE__ */ jsx24("div", { style: { flex: 1 } });
3659
3543
  }
3660
- return /* @__PURE__ */ jsx23(
3544
+ return /* @__PURE__ */ jsx24(
3661
3545
  MemoizedBubbleList,
3662
3546
  {
3663
3547
  items,
@@ -3685,7 +3569,7 @@ import {
3685
3569
  } from "antd";
3686
3570
  import { createStyles as createStyles8 } from "antd-style";
3687
3571
  import CollapsePanel4 from "antd/es/collapse/CollapsePanel";
3688
- import { jsx as jsx24 } from "react/jsx-runtime";
3572
+ import { jsx as jsx25 } from "react/jsx-runtime";
3689
3573
  var { Text: Text9 } = Typography11;
3690
3574
  var useStyle6 = createStyles8(({ token, css }) => ({
3691
3575
  card: css`
@@ -3701,18 +3585,18 @@ var useStyle6 = createStyles8(({ token, css }) => ({
3701
3585
  var HITLContainer = () => {
3702
3586
  const { styles } = useStyle6();
3703
3587
  const { interrupts } = useAgentChat();
3704
- return interrupts && interrupts.length > 0 ? /* @__PURE__ */ jsx24(
3588
+ return interrupts && interrupts.length > 0 ? /* @__PURE__ */ jsx25(
3705
3589
  Collapse5,
3706
3590
  {
3707
3591
  className: styles.card,
3708
3592
  size: "small",
3709
3593
  bordered: false,
3710
3594
  defaultActiveKey: ["hitl"],
3711
- children: /* @__PURE__ */ jsx24(
3595
+ children: /* @__PURE__ */ jsx25(
3712
3596
  CollapsePanel4,
3713
3597
  {
3714
3598
  showArrow: false,
3715
- header: /* @__PURE__ */ jsx24(
3599
+ header: /* @__PURE__ */ jsx25(
3716
3600
  Tag4,
3717
3601
  {
3718
3602
  bordered: false,
@@ -3727,7 +3611,7 @@ var HITLContainer = () => {
3727
3611
  children: "\u7B49\u5F85\u53CD\u9988"
3728
3612
  }
3729
3613
  ),
3730
- children: /* @__PURE__ */ jsx24(Space11, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ jsx24(MDResponse, { content: interrupt.value }, interrupt.id)) })
3614
+ children: /* @__PURE__ */ jsx25(Space11, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ jsx25(MDResponse, { content: interrupt.value }, interrupt.id)) })
3731
3615
  },
3732
3616
  "hitl"
3733
3617
  )
@@ -3740,7 +3624,7 @@ import { Avatar as Avatar2, Space as Space12, Typography as Typography12 } from
3740
3624
 
3741
3625
  // src/components/Chat/TodoProgress.tsx
3742
3626
  import { Popover, Tooltip as Tooltip2, Progress } from "antd";
3743
- import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
3627
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3744
3628
  var TodoProgress = ({}) => {
3745
3629
  const { openSideApp } = useChatUIContext();
3746
3630
  const { todos } = useAgentChat();
@@ -3753,14 +3637,14 @@ var TodoProgress = ({}) => {
3753
3637
  const totalCount = todos.length;
3754
3638
  const hasInProgress = todos.some((item) => item.status === "in_progress");
3755
3639
  const percent = Math.round(completedCount / totalCount * 100);
3756
- return /* @__PURE__ */ jsx25(
3640
+ return /* @__PURE__ */ jsx26(
3757
3641
  Popover,
3758
3642
  {
3759
- content: /* @__PURE__ */ jsx25("div", { style: { width: 400 }, children: /* @__PURE__ */ jsx25(Todo, { data: todos, component_key: "header_todos" }) }),
3643
+ content: /* @__PURE__ */ jsx26("div", { style: { width: 400 }, children: /* @__PURE__ */ jsx26(Todo, { data: todos, component_key: "header_todos" }) }),
3760
3644
  title: "Todos",
3761
3645
  trigger: "click",
3762
3646
  placement: "bottomRight",
3763
- children: /* @__PURE__ */ jsx25(Tooltip2, { title: `${completedCount} / ${totalCount} tasks completed`, children: /* @__PURE__ */ jsx25("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ jsx25(
3647
+ children: /* @__PURE__ */ jsx26(Tooltip2, { title: `${completedCount} / ${totalCount} tasks completed`, children: /* @__PURE__ */ jsx26("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ jsx26(
3764
3648
  Progress,
3765
3649
  {
3766
3650
  type: "circle",
@@ -3771,7 +3655,7 @@ var TodoProgress = ({}) => {
3771
3655
  percent,
3772
3656
  status: hasInProgress ? "active" : "normal",
3773
3657
  width: 30,
3774
- format: () => /* @__PURE__ */ jsx25(
3658
+ format: () => /* @__PURE__ */ jsx26(
3775
3659
  "div",
3776
3660
  {
3777
3661
  style: {
@@ -3796,7 +3680,7 @@ var TodoProgress = ({}) => {
3796
3680
  // src/components/Chat/FileExplorerButton.tsx
3797
3681
  import { Tooltip as Tooltip3, Badge, Button as Button9 } from "antd";
3798
3682
  import { FileTextOutlined as FileTextOutlined4 } from "@ant-design/icons";
3799
- import { jsx as jsx26 } from "react/jsx-runtime";
3683
+ import { jsx as jsx27 } from "react/jsx-runtime";
3800
3684
  var FileExplorerButton = ({}) => {
3801
3685
  const { agentState } = useAgentChat();
3802
3686
  const { openSideApp } = useChatUIContext();
@@ -3805,11 +3689,11 @@ var FileExplorerButton = ({}) => {
3805
3689
  return null;
3806
3690
  }
3807
3691
  const fileCount = Object.keys(files).length;
3808
- return /* @__PURE__ */ jsx26(Tooltip3, { title: "File Explorer", children: /* @__PURE__ */ jsx26(Badge, { count: fileCount, size: "small", color: "blue", children: /* @__PURE__ */ jsx26(
3692
+ return /* @__PURE__ */ jsx27(Tooltip3, { title: "File Explorer", children: /* @__PURE__ */ jsx27(Badge, { count: fileCount, size: "small", color: "blue", children: /* @__PURE__ */ jsx27(
3809
3693
  Button9,
3810
3694
  {
3811
3695
  type: "text",
3812
- icon: /* @__PURE__ */ jsx26(FileTextOutlined4, {}),
3696
+ icon: /* @__PURE__ */ jsx27(FileTextOutlined4, {}),
3813
3697
  onClick: () => openSideApp({
3814
3698
  component_key: "file_explorer",
3815
3699
  message: "File Explorer",
@@ -3821,12 +3705,12 @@ var FileExplorerButton = ({}) => {
3821
3705
 
3822
3706
  // src/components/Chat/AgentHeader.tsx
3823
3707
  import { Welcome } from "@ant-design/x";
3824
- import { useMemo as useMemo5 } from "react";
3825
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
3708
+ import { useMemo as useMemo4 } from "react";
3709
+ import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
3826
3710
  var { Text: Text10 } = Typography12;
3827
3711
  var AgentHeader = (props) => {
3828
3712
  const { description, avatar, name, extra, extraMeta } = props;
3829
- const extraMetaComponents = useMemo5(() => {
3713
+ const extraMetaComponents = useMemo4(() => {
3830
3714
  if (extraMeta && extraMeta.length > 0) {
3831
3715
  return extraMeta.map((meta) => {
3832
3716
  const Element = getElement(meta.id)?.card_view;
@@ -3835,7 +3719,7 @@ var AgentHeader = (props) => {
3835
3719
  try {
3836
3720
  } catch (error) {
3837
3721
  }
3838
- return /* @__PURE__ */ jsx27(
3722
+ return /* @__PURE__ */ jsx28(
3839
3723
  Element,
3840
3724
  {
3841
3725
  component_key: meta.id,
@@ -3849,23 +3733,23 @@ var AgentHeader = (props) => {
3849
3733
  return void 0;
3850
3734
  }, [extraMeta]);
3851
3735
  return /* @__PURE__ */ jsxs16("div", { children: [
3852
- /* @__PURE__ */ jsx27(
3736
+ /* @__PURE__ */ jsx28(
3853
3737
  Welcome,
3854
3738
  {
3855
3739
  style: { padding: 8 },
3856
3740
  variant: "borderless",
3857
- description: description ? /* @__PURE__ */ jsx27(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
3858
- icon: avatar ? /* @__PURE__ */ jsx27(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx27(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() }),
3741
+ description: description ? /* @__PURE__ */ jsx28(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
3742
+ icon: avatar ? /* @__PURE__ */ jsx28(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx28(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() }),
3859
3743
  title: name ? name : void 0,
3860
3744
  extra: /* @__PURE__ */ jsxs16(Space12, { children: [
3861
3745
  extra,
3862
- /* @__PURE__ */ jsx27(TodoProgress, {}),
3863
- /* @__PURE__ */ jsx27(FileExplorerButton, {}),
3864
- extraMetaComponents && /* @__PURE__ */ jsx27(Space12, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3746
+ /* @__PURE__ */ jsx28(TodoProgress, {}),
3747
+ /* @__PURE__ */ jsx28(FileExplorerButton, {}),
3748
+ extraMetaComponents && /* @__PURE__ */ jsx28(Space12, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3865
3749
  ] })
3866
3750
  }
3867
3751
  ),
3868
- /* @__PURE__ */ jsx27(
3752
+ /* @__PURE__ */ jsx28(
3869
3753
  "div",
3870
3754
  {
3871
3755
  style: {
@@ -3877,7 +3761,7 @@ var AgentHeader = (props) => {
3877
3761
  };
3878
3762
 
3879
3763
  // src/components/Chat/Chating.tsx
3880
- import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
3764
+ import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
3881
3765
  var Chating = ({
3882
3766
  avatar,
3883
3767
  name,
@@ -3995,15 +3879,15 @@ var Chating = ({
3995
3879
  }
3996
3880
  return true;
3997
3881
  };
3998
- const attachmentsNode = /* @__PURE__ */ jsx28(Badge2, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx28(
3882
+ const attachmentsNode = /* @__PURE__ */ jsx29(Badge2, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx29(
3999
3883
  Button10,
4000
3884
  {
4001
3885
  type: "text",
4002
- icon: /* @__PURE__ */ jsx28(PaperClipOutlined, {}),
3886
+ icon: /* @__PURE__ */ jsx29(PaperClipOutlined, {}),
4003
3887
  onClick: () => setHeaderOpen(!headerOpen)
4004
3888
  }
4005
3889
  ) });
4006
- const senderHeader = /* @__PURE__ */ jsx28(
3890
+ const senderHeader = /* @__PURE__ */ jsx29(
4007
3891
  Sender.Header,
4008
3892
  {
4009
3893
  title: "Attachments",
@@ -4015,7 +3899,7 @@ var Chating = ({
4015
3899
  }
4016
3900
  },
4017
3901
  forceRender: true,
4018
- children: /* @__PURE__ */ jsx28(
3902
+ children: /* @__PURE__ */ jsx29(
4019
3903
  Attachments,
4020
3904
  {
4021
3905
  ref: attachmentsRef,
@@ -4037,7 +3921,7 @@ var Chating = ({
4037
3921
  multiple: true,
4038
3922
  maxCount: 10,
4039
3923
  placeholder: (type) => ({
4040
- icon: /* @__PURE__ */ jsx28(CloudUploadOutlined, {}),
3924
+ icon: /* @__PURE__ */ jsx29(CloudUploadOutlined, {}),
4041
3925
  title: "\u4E0A\u4F20\u6587\u4EF6",
4042
3926
  description: attachment_placeholder
4043
3927
  })
@@ -4045,11 +3929,11 @@ var Chating = ({
4045
3929
  )
4046
3930
  }
4047
3931
  );
4048
- const refreshButton = /* @__PURE__ */ jsx28(
3932
+ const refreshButton = /* @__PURE__ */ jsx29(
4049
3933
  Button10,
4050
3934
  {
4051
3935
  type: "text",
4052
- icon: /* @__PURE__ */ jsx28(ReloadOutlined, {}),
3936
+ icon: /* @__PURE__ */ jsx29(ReloadOutlined, {}),
4053
3937
  onClick: () => {
4054
3938
  loadMessages();
4055
3939
  }
@@ -4057,7 +3941,7 @@ var Chating = ({
4057
3941
  );
4058
3942
  const headerExtra = showRefreshButton ? [refreshButton] : [];
4059
3943
  return /* @__PURE__ */ jsxs17(Fragment4, { children: [
4060
- /* @__PURE__ */ jsx28("div", { children: showHeader && /* @__PURE__ */ jsx28(
3944
+ /* @__PURE__ */ jsx29("div", { children: showHeader && /* @__PURE__ */ jsx29(
4061
3945
  AgentHeader,
4062
3946
  {
4063
3947
  description,
@@ -4067,9 +3951,9 @@ var Chating = ({
4067
3951
  extraMeta
4068
3952
  }
4069
3953
  ) }),
4070
- /* @__PURE__ */ jsx28(MessageList, { messages, className: styles.messages }),
4071
- isLoading ? /* @__PURE__ */ jsx28("div", {}) : /* @__PURE__ */ jsx28(Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
4072
- error && /* @__PURE__ */ jsx28("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ jsx28(
3954
+ /* @__PURE__ */ jsx29(MessageList, { messages, className: styles.messages }),
3955
+ isLoading ? /* @__PURE__ */ jsx29("div", {}) : /* @__PURE__ */ jsx29(Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
3956
+ error && /* @__PURE__ */ jsx29("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ jsx29(
4073
3957
  Alert2,
4074
3958
  {
4075
3959
  type: "error",
@@ -4079,8 +3963,8 @@ var Chating = ({
4079
3963
  message: `${error.message}`
4080
3964
  }
4081
3965
  ) }),
4082
- showHITL && /* @__PURE__ */ jsx28(HITLContainer, {}),
4083
- showSender && /* @__PURE__ */ jsx28(
3966
+ showHITL && /* @__PURE__ */ jsx29(HITLContainer, {}),
3967
+ showSender && /* @__PURE__ */ jsx29(
4084
3968
  Sender,
4085
3969
  {
4086
3970
  disabled: interrupts && interrupts.length > 0,
@@ -4106,11 +3990,11 @@ var Chating = ({
4106
3990
  };
4107
3991
 
4108
3992
  // src/components/GenUI/elements/task_detail.tsx
4109
- import { jsx as jsx29 } from "react/jsx-runtime";
3993
+ import { jsx as jsx30 } from "react/jsx-runtime";
4110
3994
  var { Text: Text11 } = Typography13;
4111
3995
  var TaskDetail = ({ data, component_key, interactive = true }) => {
4112
3996
  const { description, subagent_type, thread_id } = data || {};
4113
- return /* @__PURE__ */ jsx29(
3997
+ return /* @__PURE__ */ jsx30(
4114
3998
  AgentThreadProvider,
4115
3999
  {
4116
4000
  threadId: thread_id,
@@ -4120,7 +4004,7 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
4120
4004
  enableReturnStateWhenStreamCompleted: true,
4121
4005
  enableResumeStream: true
4122
4006
  },
4123
- children: /* @__PURE__ */ jsx29("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx29(
4007
+ children: /* @__PURE__ */ jsx30("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx30(
4124
4008
  Chating,
4125
4009
  {
4126
4010
  showRefreshButton: true,
@@ -4202,7 +4086,7 @@ var regsiterElement = (language, ElementMeta) => {
4202
4086
  import { Button as Button11, Tabs } from "antd";
4203
4087
  import { createStyles as createStyles9 } from "antd-style";
4204
4088
  import { useEffect as useEffect11, useState as useState16 } from "react";
4205
- import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
4089
+ import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
4206
4090
  var useStyle7 = createStyles9(({ token, css }) => {
4207
4091
  return {
4208
4092
  tabContainer: css`
@@ -4223,8 +4107,8 @@ var useStyle7 = createStyles9(({ token, css }) => {
4223
4107
  });
4224
4108
  var EmptySideAppView = ({ component_key, data }) => {
4225
4109
  return /* @__PURE__ */ jsxs18("div", { children: [
4226
- /* @__PURE__ */ jsx30("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
4227
- /* @__PURE__ */ jsx30("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
4110
+ /* @__PURE__ */ jsx31("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
4111
+ /* @__PURE__ */ jsx31("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
4228
4112
  ] });
4229
4113
  };
4230
4114
  var SideAppViewBrowser = () => {
@@ -4285,7 +4169,7 @@ var SideAppViewBrowser = () => {
4285
4169
  add(
4286
4170
  key,
4287
4171
  sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
4288
- /* @__PURE__ */ jsx30(
4172
+ /* @__PURE__ */ jsx31(
4289
4173
  SideAppView,
4290
4174
  {
4291
4175
  component_key: sideAppSelectedCard?.component_key || "",
@@ -4326,16 +4210,16 @@ var SideAppViewBrowser = () => {
4326
4210
  const getSizeIcon = (size) => {
4327
4211
  switch (size) {
4328
4212
  case "middle":
4329
- return /* @__PURE__ */ jsx30(CompressOutlined, {});
4213
+ return /* @__PURE__ */ jsx31(CompressOutlined, {});
4330
4214
  case "large":
4331
- return /* @__PURE__ */ jsx30(ExpandOutlined, {});
4215
+ return /* @__PURE__ */ jsx31(ExpandOutlined, {});
4332
4216
  case "full":
4333
- return /* @__PURE__ */ jsx30(FullscreenOutlined, {});
4217
+ return /* @__PURE__ */ jsx31(FullscreenOutlined, {});
4334
4218
  default:
4335
- return /* @__PURE__ */ jsx30(ExpandOutlined, {});
4219
+ return /* @__PURE__ */ jsx31(ExpandOutlined, {});
4336
4220
  }
4337
4221
  };
4338
- return /* @__PURE__ */ jsx30(
4222
+ return /* @__PURE__ */ jsx31(
4339
4223
  Tabs,
4340
4224
  {
4341
4225
  className: styles.tabContainer,
@@ -4344,7 +4228,7 @@ var SideAppViewBrowser = () => {
4344
4228
  hideAdd: true,
4345
4229
  tabBarExtraContent: {
4346
4230
  right: /* @__PURE__ */ jsxs18("div", { style: { display: "flex", gap: "4px" }, children: [
4347
- /* @__PURE__ */ jsx30(
4231
+ /* @__PURE__ */ jsx31(
4348
4232
  Button11,
4349
4233
  {
4350
4234
  style: { margin: "8px 0" },
@@ -4355,13 +4239,13 @@ var SideAppViewBrowser = () => {
4355
4239
  title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
4356
4240
  }
4357
4241
  ),
4358
- /* @__PURE__ */ jsx30(
4242
+ /* @__PURE__ */ jsx31(
4359
4243
  Button11,
4360
4244
  {
4361
4245
  style: { margin: "8px 0" },
4362
4246
  size: "large",
4363
4247
  type: "text",
4364
- icon: /* @__PURE__ */ jsx30(CloseOutlined, {}),
4248
+ icon: /* @__PURE__ */ jsx31(CloseOutlined, {}),
4365
4249
  onClick: () => {
4366
4250
  closeSideApp();
4367
4251
  }
@@ -4378,10 +4262,10 @@ var SideAppViewBrowser = () => {
4378
4262
  };
4379
4263
 
4380
4264
  // src/components/Chat/LatticeChat.tsx
4381
- import { jsx as jsx31 } from "react/jsx-runtime";
4265
+ import { jsx as jsx32 } from "react/jsx-runtime";
4382
4266
  var LatticeChat = (props) => {
4383
4267
  const { assistant_id, thread_id = "", menu, ...chatingProps } = props;
4384
- return /* @__PURE__ */ jsx31(
4268
+ return /* @__PURE__ */ jsx32(
4385
4269
  AgentThreadProvider,
4386
4270
  {
4387
4271
  assistantId: assistant_id,
@@ -4391,12 +4275,12 @@ var LatticeChat = (props) => {
4391
4275
  enableReturnStateWhenStreamCompleted: true,
4392
4276
  enableResumeStream: true
4393
4277
  },
4394
- children: /* @__PURE__ */ jsx31(ChatUIContextProvider, { children: /* @__PURE__ */ jsx31(
4278
+ children: /* @__PURE__ */ jsx32(ChatUIContextProvider, { children: /* @__PURE__ */ jsx32(
4395
4279
  ColumnLayout,
4396
4280
  {
4397
4281
  menu,
4398
- left: thread_id ? /* @__PURE__ */ jsx31(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx31("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4399
- right: /* @__PURE__ */ jsx31(SideAppViewBrowser, {})
4282
+ left: thread_id ? /* @__PURE__ */ jsx32(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx32("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4283
+ right: /* @__PURE__ */ jsx32(SideAppViewBrowser, {})
4400
4284
  }
4401
4285
  ) })
4402
4286
  }
@@ -4409,7 +4293,7 @@ import {
4409
4293
  useCallback as useCallback10,
4410
4294
  useContext as useContext6,
4411
4295
  useEffect as useEffect13,
4412
- useMemo as useMemo7,
4296
+ useMemo as useMemo6,
4413
4297
  useRef as useRef10,
4414
4298
  useState as useState19
4415
4299
  } from "react";
@@ -4420,7 +4304,7 @@ import {
4420
4304
  useCallback as useCallback9,
4421
4305
  useContext as useContext5,
4422
4306
  useEffect as useEffect12,
4423
- useMemo as useMemo6,
4307
+ useMemo as useMemo5,
4424
4308
  useRef as useRef9,
4425
4309
  useState as useState18
4426
4310
  } from "react";
@@ -4435,7 +4319,7 @@ import {
4435
4319
  useContext as useContext4,
4436
4320
  useState as useState17
4437
4321
  } from "react";
4438
- import { jsx as jsx32 } from "react/jsx-runtime";
4322
+ import { jsx as jsx33 } from "react/jsx-runtime";
4439
4323
  var DEFAULT_CONFIG = {
4440
4324
  baseURL: "http://localhost:4001",
4441
4325
  apiKey: "",
@@ -4514,7 +4398,7 @@ var LatticeChatShellContextProvider = ({
4514
4398
  setConfig(defaultConfig);
4515
4399
  saveToLocalStorage(defaultConfig);
4516
4400
  }, [initialConfig, saveToLocalStorage]);
4517
- return /* @__PURE__ */ jsx32(
4401
+ return /* @__PURE__ */ jsx33(
4518
4402
  LatticeChatShellContext.Provider,
4519
4403
  {
4520
4404
  value: {
@@ -4540,7 +4424,7 @@ var useLatticeChatShellContext = () => {
4540
4424
  };
4541
4425
 
4542
4426
  // src/components/Chat/AssistantContext.tsx
4543
- import { jsx as jsx33 } from "react/jsx-runtime";
4427
+ import { jsx as jsx34 } from "react/jsx-runtime";
4544
4428
  var AssistantContext = createContext5({
4545
4429
  assistants: [],
4546
4430
  currentAssistant: null,
@@ -4574,7 +4458,7 @@ var AssistantContextProvider = ({
4574
4458
  const {
4575
4459
  config: { baseURL, apiKey = "", transport = "sse" }
4576
4460
  } = useLatticeChatShellContext();
4577
- const client = useMemo6(
4461
+ const client = useMemo5(
4578
4462
  () => new Client2({
4579
4463
  baseURL,
4580
4464
  apiKey,
@@ -4775,7 +4659,7 @@ var AssistantContextProvider = ({
4775
4659
  }
4776
4660
  }
4777
4661
  }, [initialAssistantId, state.assistants, state.currentAssistant]);
4778
- return /* @__PURE__ */ jsx33(
4662
+ return /* @__PURE__ */ jsx34(
4779
4663
  AssistantContext.Provider,
4780
4664
  {
4781
4665
  value: {
@@ -4805,7 +4689,7 @@ var useAssistantContext = () => {
4805
4689
 
4806
4690
  // src/components/Chat/ConversationContext.tsx
4807
4691
  import { Client as Client3 } from "@axiom-lattice/client-sdk";
4808
- import { jsx as jsx34 } from "react/jsx-runtime";
4692
+ import { jsx as jsx35 } from "react/jsx-runtime";
4809
4693
  var ConversationContext = createContext6({
4810
4694
  assistantId: null,
4811
4695
  thread: null,
@@ -4848,7 +4732,7 @@ var ConversationContextProvider = ({
4848
4732
  const {
4849
4733
  config: { baseURL, apiKey = "", transport = "sse" }
4850
4734
  } = useLatticeChatShellContext();
4851
- const client = useMemo7(
4735
+ const client = useMemo6(
4852
4736
  () => new Client3({
4853
4737
  baseURL,
4854
4738
  apiKey,
@@ -4946,7 +4830,7 @@ var ConversationContextProvider = ({
4946
4830
  prevAssistantIdRef.current = null;
4947
4831
  }
4948
4832
  }, [assistantId, loadThreads]);
4949
- const thread = useMemo7(() => {
4833
+ const thread = useMemo6(() => {
4950
4834
  if (!assistantId || !threadId) {
4951
4835
  return null;
4952
4836
  }
@@ -5068,7 +4952,7 @@ var ConversationContextProvider = ({
5068
4952
  const clearThread = useCallback10(() => {
5069
4953
  setThreadId(null);
5070
4954
  }, []);
5071
- return /* @__PURE__ */ jsx34(
4955
+ return /* @__PURE__ */ jsx35(
5072
4956
  ConversationContext.Provider,
5073
4957
  {
5074
4958
  value: {
@@ -5105,8 +4989,8 @@ var useConversationContext = () => {
5105
4989
  // src/components/Chat/AgentConversations.tsx
5106
4990
  import { Conversations } from "@ant-design/x";
5107
4991
  import { theme } from "antd";
5108
- import { useMemo as useMemo8 } from "react";
5109
- import { jsx as jsx35 } from "react/jsx-runtime";
4992
+ import { useMemo as useMemo7 } from "react";
4993
+ import { jsx as jsx36 } from "react/jsx-runtime";
5110
4994
  var AgentConversations = () => {
5111
4995
  const { token } = theme.useToken();
5112
4996
  const { currentAssistant } = useAssistantContext();
@@ -5123,7 +5007,7 @@ var AgentConversations = () => {
5123
5007
  background: "transparent",
5124
5008
  borderRadius: token.borderRadius
5125
5009
  };
5126
- const threadItems = useMemo8(() => {
5010
+ const threadItems = useMemo7(() => {
5127
5011
  return threads || [];
5128
5012
  }, [threads]);
5129
5013
  const items = threadItems.map((thread2) => ({
@@ -5136,7 +5020,7 @@ var AgentConversations = () => {
5136
5020
  }
5137
5021
  await createThread();
5138
5022
  };
5139
- return /* @__PURE__ */ jsx35(
5023
+ return /* @__PURE__ */ jsx36(
5140
5024
  Conversations,
5141
5025
  {
5142
5026
  creation: {
@@ -5165,7 +5049,7 @@ import {
5165
5049
  // src/components/Chat/AssistantList.tsx
5166
5050
  import { Conversations as Conversations2 } from "@ant-design/x";
5167
5051
  import { Avatar as Avatar3, theme as theme2 } from "antd";
5168
- import { jsx as jsx36 } from "react/jsx-runtime";
5052
+ import { jsx as jsx37 } from "react/jsx-runtime";
5169
5053
  var AssistantList = () => {
5170
5054
  const { token } = theme2.useToken();
5171
5055
  const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
@@ -5177,7 +5061,7 @@ var AssistantList = () => {
5177
5061
  const items = assistants.map((assistant) => ({
5178
5062
  key: assistant.id,
5179
5063
  label: assistant.name,
5180
- icon: /* @__PURE__ */ jsx36(
5064
+ icon: /* @__PURE__ */ jsx37(
5181
5065
  Avatar3,
5182
5066
  {
5183
5067
  size: "small",
@@ -5189,7 +5073,7 @@ var AssistantList = () => {
5189
5073
  }
5190
5074
  )
5191
5075
  }));
5192
- return /* @__PURE__ */ jsx36(
5076
+ return /* @__PURE__ */ jsx37(
5193
5077
  Conversations2,
5194
5078
  {
5195
5079
  items,
@@ -5204,7 +5088,7 @@ var AssistantList = () => {
5204
5088
 
5205
5089
  // src/components/Chat/ChatSidebar.tsx
5206
5090
  import { createStyles as createStyles10 } from "antd-style";
5207
- import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
5091
+ import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
5208
5092
  var useStyles3 = createStyles10(({ token, css }) => ({
5209
5093
  sidebar: css`
5210
5094
  display: flex;
@@ -5400,7 +5284,7 @@ var ChatSidebar = ({
5400
5284
  setIsHovered(false);
5401
5285
  };
5402
5286
  return /* @__PURE__ */ jsxs19(Fragment5, { children: [
5403
- /* @__PURE__ */ jsx37(
5287
+ /* @__PURE__ */ jsx38(
5404
5288
  "div",
5405
5289
  {
5406
5290
  className: styles.sidebar,
@@ -5409,34 +5293,34 @@ var ChatSidebar = ({
5409
5293
  children: !isCollapsed && /* @__PURE__ */ jsxs19(Fragment5, { children: [
5410
5294
  /* @__PURE__ */ jsxs19("div", { className: styles.content, children: [
5411
5295
  /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5412
- /* @__PURE__ */ jsx37("div", { className: styles.sectionTitle, children: "Assistants" }),
5413
- /* @__PURE__ */ jsx37(AssistantList, {})
5296
+ /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Assistants" }),
5297
+ /* @__PURE__ */ jsx38(AssistantList, {})
5414
5298
  ] }),
5415
- /* @__PURE__ */ jsx37(Divider2, { className: styles.divider }),
5299
+ /* @__PURE__ */ jsx38(Divider2, { className: styles.divider }),
5416
5300
  /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5417
- /* @__PURE__ */ jsx37("div", { className: styles.sectionTitle, children: "Threads" }),
5418
- /* @__PURE__ */ jsx37(AgentConversations, {})
5301
+ /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Threads" }),
5302
+ /* @__PURE__ */ jsx38(AgentConversations, {})
5419
5303
  ] })
5420
5304
  ] }),
5421
5305
  /* @__PURE__ */ jsxs19("div", { className: styles.footer, children: [
5422
- /* @__PURE__ */ jsx37(
5306
+ /* @__PURE__ */ jsx38(
5423
5307
  "button",
5424
5308
  {
5425
5309
  className: styles.actionButton,
5426
5310
  onClick: handleToggleCollapse,
5427
5311
  title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5428
5312
  "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5429
- children: isCollapsed ? /* @__PURE__ */ jsx37(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx37(MenuFoldOutlined, {})
5313
+ children: isCollapsed ? /* @__PURE__ */ jsx38(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx38(MenuFoldOutlined, {})
5430
5314
  }
5431
5315
  ),
5432
- /* @__PURE__ */ jsx37(
5316
+ /* @__PURE__ */ jsx38(
5433
5317
  "button",
5434
5318
  {
5435
5319
  className: styles.actionButton,
5436
5320
  onClick: handleSettingsClick,
5437
5321
  title: "Settings",
5438
5322
  "aria-label": "Settings",
5439
- children: /* @__PURE__ */ jsx37(SettingOutlined, {})
5323
+ children: /* @__PURE__ */ jsx38(SettingOutlined, {})
5440
5324
  }
5441
5325
  )
5442
5326
  ] })
@@ -5452,34 +5336,34 @@ var ChatSidebar = ({
5452
5336
  children: [
5453
5337
  /* @__PURE__ */ jsxs19("div", { className: styles.hoverContent, children: [
5454
5338
  /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5455
- /* @__PURE__ */ jsx37("div", { className: styles.sectionTitle, children: "Assistants" }),
5456
- /* @__PURE__ */ jsx37(AssistantList, {})
5339
+ /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Assistants" }),
5340
+ /* @__PURE__ */ jsx38(AssistantList, {})
5457
5341
  ] }),
5458
- /* @__PURE__ */ jsx37(Divider2, { className: styles.divider }),
5342
+ /* @__PURE__ */ jsx38(Divider2, { className: styles.divider }),
5459
5343
  /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5460
- /* @__PURE__ */ jsx37("div", { className: styles.sectionTitle, children: "Threads" }),
5461
- /* @__PURE__ */ jsx37(AgentConversations, {})
5344
+ /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Threads" }),
5345
+ /* @__PURE__ */ jsx38(AgentConversations, {})
5462
5346
  ] })
5463
5347
  ] }),
5464
5348
  /* @__PURE__ */ jsxs19("div", { className: styles.footer, children: [
5465
- /* @__PURE__ */ jsx37(
5349
+ /* @__PURE__ */ jsx38(
5466
5350
  "button",
5467
5351
  {
5468
5352
  className: styles.actionButton,
5469
5353
  onClick: handleToggleCollapse,
5470
5354
  title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5471
5355
  "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5472
- children: isCollapsed ? /* @__PURE__ */ jsx37(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx37(MenuFoldOutlined, {})
5356
+ children: isCollapsed ? /* @__PURE__ */ jsx38(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx38(MenuFoldOutlined, {})
5473
5357
  }
5474
5358
  ),
5475
- /* @__PURE__ */ jsx37(
5359
+ /* @__PURE__ */ jsx38(
5476
5360
  "button",
5477
5361
  {
5478
5362
  className: styles.actionButton,
5479
5363
  onClick: handleSettingsClick,
5480
5364
  title: "Settings",
5481
5365
  "aria-label": "Settings",
5482
- children: /* @__PURE__ */ jsx37(SettingOutlined, {})
5366
+ children: /* @__PURE__ */ jsx38(SettingOutlined, {})
5483
5367
  }
5484
5368
  )
5485
5369
  ] })
@@ -5490,14 +5374,14 @@ var ChatSidebar = ({
5490
5374
  };
5491
5375
 
5492
5376
  // src/components/Chat/LatticeChatView.tsx
5493
- import { jsx as jsx38 } from "react/jsx-runtime";
5377
+ import { jsx as jsx39 } from "react/jsx-runtime";
5494
5378
  var LatticeChatView = (props) => {
5495
5379
  const { assistantId, thread } = useConversationContext();
5496
5380
  const { currentAssistant } = useAssistantContext();
5497
5381
  const {
5498
5382
  config: { baseURL }
5499
5383
  } = useLatticeChatShellContext();
5500
- return assistantId && thread ? /* @__PURE__ */ jsx38(
5384
+ return assistantId && thread ? /* @__PURE__ */ jsx39(
5501
5385
  AxiomLatticeProvider,
5502
5386
  {
5503
5387
  config: {
@@ -5506,14 +5390,14 @@ var LatticeChatView = (props) => {
5506
5390
  assistantId,
5507
5391
  transport: "sse"
5508
5392
  },
5509
- children: /* @__PURE__ */ jsx38(
5393
+ children: /* @__PURE__ */ jsx39(
5510
5394
  LatticeChat,
5511
5395
  {
5512
5396
  thread_id: thread?.id,
5513
5397
  assistant_id: assistantId,
5514
5398
  name: currentAssistant?.name,
5515
5399
  description: currentAssistant?.description,
5516
- menu: /* @__PURE__ */ jsx38(ChatSidebar, {})
5400
+ menu: /* @__PURE__ */ jsx39(ChatSidebar, {})
5517
5401
  }
5518
5402
  )
5519
5403
  }
@@ -5547,7 +5431,7 @@ import {
5547
5431
  CloudServerOutlined
5548
5432
  } from "@ant-design/icons";
5549
5433
  import { createStyles as createStyles11 } from "antd-style";
5550
- import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
5434
+ import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
5551
5435
  var { Text: Text12, Title: Title2 } = Typography14;
5552
5436
  var { TextArea } = Input;
5553
5437
  var useStyles4 = createStyles11(({ token, css }) => ({
@@ -5896,12 +5780,12 @@ var SETTINGS_MENU_ITEMS = [
5896
5780
  {
5897
5781
  key: "environment",
5898
5782
  label: "Environment Variables",
5899
- icon: /* @__PURE__ */ jsx39(EnvironmentOutlined, {})
5783
+ icon: /* @__PURE__ */ jsx40(EnvironmentOutlined, {})
5900
5784
  },
5901
5785
  {
5902
5786
  key: "models",
5903
5787
  label: "Model Configuration",
5904
- icon: /* @__PURE__ */ jsx39(ApiOutlined, {})
5788
+ icon: /* @__PURE__ */ jsx40(ApiOutlined, {})
5905
5789
  }
5906
5790
  ];
5907
5791
  var SettingsModal = ({
@@ -6348,24 +6232,24 @@ var SettingsModal = ({
6348
6232
  }));
6349
6233
  };
6350
6234
  return /* @__PURE__ */ jsxs20("div", { className: styles.formContainer, children: [
6351
- /* @__PURE__ */ jsx39(
6235
+ /* @__PURE__ */ jsx40(
6352
6236
  Alert3,
6353
6237
  {
6354
6238
  message: "Configuration Effect",
6355
6239
  description: /* @__PURE__ */ jsxs20("div", { children: [
6356
6240
  /* @__PURE__ */ jsxs20("div", { style: { marginBottom: 8 }, children: [
6357
- /* @__PURE__ */ jsx39(
6241
+ /* @__PURE__ */ jsx40(
6358
6242
  CheckCircleOutlined4,
6359
6243
  {
6360
6244
  style: { color: "#52c41a", marginRight: 8 }
6361
6245
  }
6362
6246
  ),
6363
- /* @__PURE__ */ jsx39("strong", { children: "Immediately effective:" }),
6247
+ /* @__PURE__ */ jsx40("strong", { children: "Immediately effective:" }),
6364
6248
  " QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
6365
6249
  ] }),
6366
6250
  /* @__PURE__ */ jsxs20("div", { children: [
6367
- /* @__PURE__ */ jsx39(ReloadOutlined2, { style: { color: "#faad14", marginRight: 8 } }),
6368
- /* @__PURE__ */ jsx39("strong", { children: "Requires restart:" }),
6251
+ /* @__PURE__ */ jsx40(ReloadOutlined2, { style: { color: "#faad14", marginRight: 8 } }),
6252
+ /* @__PURE__ */ jsx40("strong", { children: "Requires restart:" }),
6369
6253
  " PORT (server must be restarted to change port)"
6370
6254
  ] })
6371
6255
  ] }),
@@ -6374,8 +6258,8 @@ var SettingsModal = ({
6374
6258
  className: styles.alertCard
6375
6259
  }
6376
6260
  ),
6377
- /* @__PURE__ */ jsx39("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx39(Text12, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure environment variables in .env format (key=value). One variable per line. Leave password fields empty to keep current values." }) }),
6378
- /* @__PURE__ */ jsx39(
6261
+ /* @__PURE__ */ jsx40("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure environment variables in .env format (key=value). One variable per line. Leave password fields empty to keep current values." }) }),
6262
+ /* @__PURE__ */ jsx40(
6379
6263
  TextArea,
6380
6264
  {
6381
6265
  value: config.envText,
@@ -6453,7 +6337,7 @@ QUEUE_NAME=tasks`,
6453
6337
  }
6454
6338
  };
6455
6339
  return /* @__PURE__ */ jsxs20("div", { className: styles.formContainer, children: [
6456
- /* @__PURE__ */ jsx39("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx39(Text12, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure model lattices. Each model will be registered with the provided key and can be used by agents." }) }),
6340
+ /* @__PURE__ */ jsx40("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure model lattices. Each model will be registered with the provided key and can be used by agents." }) }),
6457
6341
  config.models.map((model, index) => /* @__PURE__ */ jsxs20("div", { className: styles.card, children: [
6458
6342
  /* @__PURE__ */ jsxs20(
6459
6343
  "div",
@@ -6485,7 +6369,7 @@ QUEUE_NAME=tasks`,
6485
6369
  }
6486
6370
  )
6487
6371
  ] }),
6488
- config.models.length > 1 && /* @__PURE__ */ jsx39(
6372
+ config.models.length > 1 && /* @__PURE__ */ jsx40(
6489
6373
  Button12,
6490
6374
  {
6491
6375
  type: "text",
@@ -6504,8 +6388,8 @@ QUEUE_NAME=tasks`,
6504
6388
  ),
6505
6389
  /* @__PURE__ */ jsxs20(Space13, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6506
6390
  /* @__PURE__ */ jsxs20("div", { children: [
6507
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Key *" }),
6508
- /* @__PURE__ */ jsx39(
6391
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Key *" }),
6392
+ /* @__PURE__ */ jsx40(
6509
6393
  Input,
6510
6394
  {
6511
6395
  placeholder: "e.g., default, gpt-4, claude",
@@ -6514,11 +6398,11 @@ QUEUE_NAME=tasks`,
6514
6398
  style: { height: 40 }
6515
6399
  }
6516
6400
  ),
6517
- /* @__PURE__ */ jsx39(Text12, { className: styles.formDescription, children: "Unique identifier for this model" })
6401
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "Unique identifier for this model" })
6518
6402
  ] }),
6519
6403
  /* @__PURE__ */ jsxs20("div", { children: [
6520
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Provider *" }),
6521
- /* @__PURE__ */ jsx39(
6404
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Provider *" }),
6405
+ /* @__PURE__ */ jsx40(
6522
6406
  Select,
6523
6407
  {
6524
6408
  style: { width: "100%", height: 40 },
@@ -6535,8 +6419,8 @@ QUEUE_NAME=tasks`,
6535
6419
  )
6536
6420
  ] }),
6537
6421
  /* @__PURE__ */ jsxs20("div", { children: [
6538
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Model Name *" }),
6539
- /* @__PURE__ */ jsx39(
6422
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Model Name *" }),
6423
+ /* @__PURE__ */ jsx40(
6540
6424
  Input,
6541
6425
  {
6542
6426
  placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
@@ -6547,8 +6431,8 @@ QUEUE_NAME=tasks`,
6547
6431
  )
6548
6432
  ] }),
6549
6433
  /* @__PURE__ */ jsxs20("div", { children: [
6550
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "API Key" }),
6551
- /* @__PURE__ */ jsx39(
6434
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "API Key" }),
6435
+ /* @__PURE__ */ jsx40(
6552
6436
  Input.Password,
6553
6437
  {
6554
6438
  placeholder: "Enter your API key",
@@ -6557,11 +6441,11 @@ QUEUE_NAME=tasks`,
6557
6441
  style: { height: 40 }
6558
6442
  }
6559
6443
  ),
6560
- /* @__PURE__ */ jsx39(Text12, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
6444
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
6561
6445
  ] }),
6562
6446
  /* @__PURE__ */ jsxs20("div", { children: [
6563
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Base URL" }),
6564
- /* @__PURE__ */ jsx39(
6447
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Base URL" }),
6448
+ /* @__PURE__ */ jsx40(
6565
6449
  Input,
6566
6450
  {
6567
6451
  placeholder: "e.g., https://api.openai.com/v1",
@@ -6570,22 +6454,22 @@ QUEUE_NAME=tasks`,
6570
6454
  style: { height: 40 }
6571
6455
  }
6572
6456
  ),
6573
- /* @__PURE__ */ jsx39(Text12, { className: styles.formDescription, children: "Optional custom base URL for the API" })
6457
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "Optional custom base URL for the API" })
6574
6458
  ] }),
6575
- /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsxs20(Space13, { children: [
6576
- /* @__PURE__ */ jsx39(
6459
+ /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsxs20(Space13, { children: [
6460
+ /* @__PURE__ */ jsx40(
6577
6461
  Switch,
6578
6462
  {
6579
6463
  checked: model.streaming,
6580
6464
  onChange: (checked) => handleModelChange(index, "streaming", checked)
6581
6465
  }
6582
6466
  ),
6583
- /* @__PURE__ */ jsx39(Text12, { children: "Enable Streaming" })
6467
+ /* @__PURE__ */ jsx40(Text12, { children: "Enable Streaming" })
6584
6468
  ] }) }),
6585
6469
  /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: 20 }, children: [
6586
6470
  /* @__PURE__ */ jsxs20("div", { style: { flex: 1 }, children: [
6587
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Max Tokens" }),
6588
- /* @__PURE__ */ jsx39(
6471
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Max Tokens" }),
6472
+ /* @__PURE__ */ jsx40(
6589
6473
  Input,
6590
6474
  {
6591
6475
  type: "number",
@@ -6601,8 +6485,8 @@ QUEUE_NAME=tasks`,
6601
6485
  )
6602
6486
  ] }),
6603
6487
  /* @__PURE__ */ jsxs20("div", { style: { flex: 1 }, children: [
6604
- /* @__PURE__ */ jsx39(Text12, { className: styles.formLabel, children: "Temperature" }),
6605
- /* @__PURE__ */ jsx39(
6488
+ /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Temperature" }),
6489
+ /* @__PURE__ */ jsx40(
6606
6490
  Input,
6607
6491
  {
6608
6492
  type: "number",
@@ -6621,7 +6505,7 @@ QUEUE_NAME=tasks`,
6621
6505
  ] })
6622
6506
  ] })
6623
6507
  ] }, index)),
6624
- /* @__PURE__ */ jsx39(
6508
+ /* @__PURE__ */ jsx40(
6625
6509
  Button12,
6626
6510
  {
6627
6511
  type: "dashed",
@@ -6650,7 +6534,7 @@ QUEUE_NAME=tasks`,
6650
6534
  const currentConnection = connections.find((c) => c.id === activeTabKey);
6651
6535
  const renderTabLabel = (connection) => {
6652
6536
  return /* @__PURE__ */ jsxs20("div", { style: { display: "flex", alignItems: "center" }, children: [
6653
- /* @__PURE__ */ jsx39(
6537
+ /* @__PURE__ */ jsx40(
6654
6538
  CloudServerOutlined,
6655
6539
  {
6656
6540
  style: {
@@ -6659,14 +6543,14 @@ QUEUE_NAME=tasks`,
6659
6543
  }
6660
6544
  }
6661
6545
  ),
6662
- /* @__PURE__ */ jsx39("span", { children: connection.name }),
6663
- connection.connected && /* @__PURE__ */ jsx39(
6546
+ /* @__PURE__ */ jsx40("span", { children: connection.name }),
6547
+ connection.connected && /* @__PURE__ */ jsx40(
6664
6548
  CheckCircleFilled,
6665
6549
  {
6666
6550
  style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
6667
6551
  }
6668
6552
  ),
6669
- connection.error && !connection.connecting && /* @__PURE__ */ jsx39(
6553
+ connection.error && !connection.connecting && /* @__PURE__ */ jsx40(
6670
6554
  CloseCircleFilled,
6671
6555
  {
6672
6556
  style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
@@ -6677,15 +6561,15 @@ QUEUE_NAME=tasks`,
6677
6561
  const tabItems = connections.map((connection) => ({
6678
6562
  key: connection.id,
6679
6563
  label: renderTabLabel(connection),
6680
- children: /* @__PURE__ */ jsx39("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx39(Fragment6, { children: /* @__PURE__ */ jsxs20("div", { style: { display: "flex", height: "100%" }, children: [
6681
- /* @__PURE__ */ jsx39("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs20(
6564
+ children: /* @__PURE__ */ jsx40("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx40(Fragment6, { children: /* @__PURE__ */ jsxs20("div", { style: { display: "flex", height: "100%" }, children: [
6565
+ /* @__PURE__ */ jsx40("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs20(
6682
6566
  "div",
6683
6567
  {
6684
6568
  className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
6685
6569
  onClick: () => setActiveMenu(item.key),
6686
6570
  children: [
6687
- /* @__PURE__ */ jsx39("span", { className: styles.menuItemIcon, children: item.icon }),
6688
- /* @__PURE__ */ jsx39("span", { className: styles.menuItemText, children: item.label })
6571
+ /* @__PURE__ */ jsx40("span", { className: styles.menuItemIcon, children: item.icon }),
6572
+ /* @__PURE__ */ jsx40("span", { className: styles.menuItemText, children: item.label })
6689
6573
  ]
6690
6574
  },
6691
6575
  item.key
@@ -6693,19 +6577,19 @@ QUEUE_NAME=tasks`,
6693
6577
  /* @__PURE__ */ jsxs20("div", { className: styles.content, children: [
6694
6578
  /* @__PURE__ */ jsxs20("div", { className: styles.contentHeader, children: [
6695
6579
  /* @__PURE__ */ jsxs20("div", { className: styles.contentHeaderLeft, children: [
6696
- /* @__PURE__ */ jsx39(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
6580
+ /* @__PURE__ */ jsx40(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
6697
6581
  /* @__PURE__ */ jsxs20(Text12, { className: styles.contentDescription, children: [
6698
6582
  activeMenu === "environment" && "Manage environment variables for the gateway server",
6699
6583
  activeMenu === "models" && "Configure and register model lattices for use by agents"
6700
6584
  ] })
6701
6585
  ] }),
6702
6586
  /* @__PURE__ */ jsxs20("div", { className: styles.contentHeaderRight, children: [
6703
- /* @__PURE__ */ jsx39(Button12, { onClick: onClose, children: "Cancel" }),
6704
- /* @__PURE__ */ jsx39(
6587
+ /* @__PURE__ */ jsx40(Button12, { onClick: onClose, children: "Cancel" }),
6588
+ /* @__PURE__ */ jsx40(
6705
6589
  Button12,
6706
6590
  {
6707
6591
  type: "primary",
6708
- icon: /* @__PURE__ */ jsx39(SaveOutlined, {}),
6592
+ icon: /* @__PURE__ */ jsx40(SaveOutlined, {}),
6709
6593
  onClick: handleSave,
6710
6594
  loading,
6711
6595
  children: "Save Configuration"
@@ -6713,9 +6597,9 @@ QUEUE_NAME=tasks`,
6713
6597
  )
6714
6598
  ] })
6715
6599
  ] }),
6716
- /* @__PURE__ */ jsx39("div", { className: styles.contentBody, children: renderContent(connection.id) })
6600
+ /* @__PURE__ */ jsx40("div", { className: styles.contentBody, children: renderContent(connection.id) })
6717
6601
  ] })
6718
- ] }) }) : /* @__PURE__ */ jsx39(
6602
+ ] }) }) : /* @__PURE__ */ jsx40(
6719
6603
  "div",
6720
6604
  {
6721
6605
  style: {
@@ -6728,16 +6612,16 @@ QUEUE_NAME=tasks`,
6728
6612
  padding: 48
6729
6613
  },
6730
6614
  children: connection.connecting ? /* @__PURE__ */ jsxs20(Fragment6, { children: [
6731
- /* @__PURE__ */ jsx39(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
6732
- /* @__PURE__ */ jsx39(Title2, { level: 4, children: "Connecting..." }),
6615
+ /* @__PURE__ */ jsx40(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
6616
+ /* @__PURE__ */ jsx40(Title2, { level: 4, children: "Connecting..." }),
6733
6617
  /* @__PURE__ */ jsxs20(Text12, { type: "secondary", style: { textAlign: "center" }, children: [
6734
6618
  "Connecting to ",
6735
6619
  connection.url
6736
6620
  ] })
6737
6621
  ] }) : /* @__PURE__ */ jsxs20(Fragment6, { children: [
6738
- /* @__PURE__ */ jsx39(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
6739
- /* @__PURE__ */ jsx39(Title2, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
6740
- /* @__PURE__ */ jsx39(
6622
+ /* @__PURE__ */ jsx40(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
6623
+ /* @__PURE__ */ jsx40(Title2, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
6624
+ /* @__PURE__ */ jsx40(
6741
6625
  Text12,
6742
6626
  {
6743
6627
  type: "secondary",
@@ -6745,11 +6629,11 @@ QUEUE_NAME=tasks`,
6745
6629
  children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
6746
6630
  }
6747
6631
  ),
6748
- /* @__PURE__ */ jsx39(
6632
+ /* @__PURE__ */ jsx40(
6749
6633
  Button12,
6750
6634
  {
6751
6635
  type: "primary",
6752
- icon: /* @__PURE__ */ jsx39(LinkOutlined, {}),
6636
+ icon: /* @__PURE__ */ jsx40(LinkOutlined, {}),
6753
6637
  onClick: () => checkConnection(connection.id),
6754
6638
  loading: connection.connecting,
6755
6639
  style: { marginTop: 16 },
@@ -6762,7 +6646,7 @@ QUEUE_NAME=tasks`,
6762
6646
  closable: connections.length > 1
6763
6647
  }));
6764
6648
  return /* @__PURE__ */ jsxs20(Fragment6, { children: [
6765
- /* @__PURE__ */ jsx39(
6649
+ /* @__PURE__ */ jsx40(
6766
6650
  Modal,
6767
6651
  {
6768
6652
  open,
@@ -6771,7 +6655,7 @@ QUEUE_NAME=tasks`,
6771
6655
  width: "80%",
6772
6656
  footer: null,
6773
6657
  title: "Settings",
6774
- children: /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39(
6658
+ children: /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(
6775
6659
  Tabs2,
6776
6660
  {
6777
6661
  activeKey: activeTabKey,
@@ -6795,8 +6679,8 @@ QUEUE_NAME=tasks`,
6795
6679
  padding: "4px 8px"
6796
6680
  },
6797
6681
  children: [
6798
- /* @__PURE__ */ jsx39(PlusOutlined, {}),
6799
- /* @__PURE__ */ jsx39("span", { children: "Add Server" })
6682
+ /* @__PURE__ */ jsx40(PlusOutlined, {}),
6683
+ /* @__PURE__ */ jsx40("span", { children: "Add Server" })
6800
6684
  ]
6801
6685
  }
6802
6686
  )
@@ -6804,7 +6688,7 @@ QUEUE_NAME=tasks`,
6804
6688
  ) })
6805
6689
  }
6806
6690
  ),
6807
- /* @__PURE__ */ jsx39(
6691
+ /* @__PURE__ */ jsx40(
6808
6692
  Modal,
6809
6693
  {
6810
6694
  title: "Add New Server",
@@ -6820,8 +6704,8 @@ QUEUE_NAME=tasks`,
6820
6704
  className: styles.addServerModal,
6821
6705
  children: /* @__PURE__ */ jsxs20(Space13, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6822
6706
  /* @__PURE__ */ jsxs20("div", { children: [
6823
- /* @__PURE__ */ jsx39(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
6824
- /* @__PURE__ */ jsx39(
6707
+ /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
6708
+ /* @__PURE__ */ jsx40(
6825
6709
  Input,
6826
6710
  {
6827
6711
  placeholder: "e.g., Production Server",
@@ -6830,11 +6714,11 @@ QUEUE_NAME=tasks`,
6830
6714
  onPressEnter: handleAddServer
6831
6715
  }
6832
6716
  ),
6833
- /* @__PURE__ */ jsx39(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
6717
+ /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
6834
6718
  ] }),
6835
6719
  /* @__PURE__ */ jsxs20("div", { children: [
6836
- /* @__PURE__ */ jsx39(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
6837
- /* @__PURE__ */ jsx39(
6720
+ /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
6721
+ /* @__PURE__ */ jsx40(
6838
6722
  Input,
6839
6723
  {
6840
6724
  placeholder: "e.g., http://localhost:4001",
@@ -6843,11 +6727,11 @@ QUEUE_NAME=tasks`,
6843
6727
  onPressEnter: handleAddServer
6844
6728
  }
6845
6729
  ),
6846
- /* @__PURE__ */ jsx39(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
6730
+ /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
6847
6731
  ] }),
6848
6732
  /* @__PURE__ */ jsxs20("div", { children: [
6849
- /* @__PURE__ */ jsx39(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
6850
- /* @__PURE__ */ jsx39(
6733
+ /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
6734
+ /* @__PURE__ */ jsx40(
6851
6735
  Input.Password,
6852
6736
  {
6853
6737
  placeholder: "Optional: Enter API key for authentication",
@@ -6856,7 +6740,7 @@ QUEUE_NAME=tasks`,
6856
6740
  onPressEnter: handleAddServer
6857
6741
  }
6858
6742
  ),
6859
- /* @__PURE__ */ jsx39(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
6743
+ /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
6860
6744
  ] })
6861
6745
  ] })
6862
6746
  }
@@ -6865,10 +6749,10 @@ QUEUE_NAME=tasks`,
6865
6749
  };
6866
6750
 
6867
6751
  // src/components/Chat/AgentServerSetting.tsx
6868
- import { jsx as jsx40 } from "react/jsx-runtime";
6752
+ import { jsx as jsx41 } from "react/jsx-runtime";
6869
6753
  var AgentServerSetting = () => {
6870
6754
  const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
6871
- return /* @__PURE__ */ jsx40(
6755
+ return /* @__PURE__ */ jsx41(
6872
6756
  SettingsModal,
6873
6757
  {
6874
6758
  open: settingsModalOpen,
@@ -6878,11 +6762,11 @@ var AgentServerSetting = () => {
6878
6762
  };
6879
6763
 
6880
6764
  // src/components/Chat/LatticeChatShell.tsx
6881
- import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
6765
+ import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
6882
6766
  var LatticeChatShell = (props) => {
6883
6767
  return /* @__PURE__ */ jsxs21(LatticeChatShellContextProvider, { ...props, children: [
6884
- /* @__PURE__ */ jsx41(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx41(ConversationContextProvider, { children: /* @__PURE__ */ jsx41(LatticeChatView, {}) }) }),
6885
- /* @__PURE__ */ jsx41(AgentServerSetting, {})
6768
+ /* @__PURE__ */ jsx42(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx42(ConversationContextProvider, { children: /* @__PURE__ */ jsx42(LatticeChatView, {}) }) }),
6769
+ /* @__PURE__ */ jsx42(AgentServerSetting, {})
6886
6770
  ] });
6887
6771
  };
6888
6772
  export {
@@ -6902,7 +6786,6 @@ export {
6902
6786
  LatticeChatShell,
6903
6787
  LatticeChatShellContext,
6904
6788
  LatticeChatShellContextProvider,
6905
- MDMermaid,
6906
6789
  MDResponse,
6907
6790
  MDViewFormItem,
6908
6791
  SideAppViewBrowser,