@axiom-lattice/react-sdk 2.1.17 → 2.1.18

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
@@ -585,7 +585,7 @@ function AgentThreadProvider({
585
585
  }
586
586
  }, []);
587
587
  const resumeStream = useCallback2(
588
- (messageId) => {
588
+ (messageId, onMessageChunk) => {
589
589
  if (!threadId) {
590
590
  throw new Error("Thread ID is required to resume stream");
591
591
  }
@@ -619,7 +619,10 @@ function AgentThreadProvider({
619
619
  };
620
620
  const stopResumeStream = client.resumeStream(
621
621
  resumeStreamOptions,
622
- handleStreamEvent,
622
+ (chunk) => {
623
+ onMessageChunk?.(chunk);
624
+ handleStreamEvent(chunk);
625
+ },
623
626
  async () => {
624
627
  setState((prev) => ({
625
628
  ...prev,
@@ -669,7 +672,6 @@ function AgentThreadProvider({
669
672
  lastAgentStateCreatedAtRef.current = currentCreatedAt;
670
673
  }
671
674
  let needUpdateFields = {};
672
- let fetchedMessages = [];
673
675
  needUpdateFields.agentState = agentState;
674
676
  needUpdateFields.todos = agentState?.values?.todos;
675
677
  const interrupts = agentState?.tasks?.flatMap(
@@ -685,19 +687,24 @@ function AgentThreadProvider({
685
687
  }
686
688
  );
687
689
  needUpdateFields.interrupts = interrupts;
688
- fetchedMessages = await client.getMessages({ threadId });
689
- needUpdateFields.messages = fetchedMessages;
690
+ const fetchedMessages = await client.getMessages({ threadId });
690
691
  chunkMessageMerger.current.reset();
691
692
  chunkMessageMerger.current.initialMessages(fetchedMessages);
693
+ needUpdateFields.messages = chunkMessageMerger.current.getMessages();
692
694
  setState((prev) => ({
693
695
  ...prev,
694
696
  ...needUpdateFields,
695
697
  isLoading: false
696
698
  }));
697
- if (options.enableResumeStream && fetchedMessages.length > 0) {
698
- const lastMessage = fetchedMessages[fetchedMessages.length - 1];
699
- chunkMessageMerger.current.removeMessageById(lastMessage.id);
700
- resumeStream(lastMessage.id);
699
+ if (options.enableResumeStream && needUpdateFields.messages.length > 0) {
700
+ const lastMessage = needUpdateFields.messages[needUpdateFields.messages.length - 1];
701
+ let lastMessageIsRemoved = false;
702
+ resumeStream(lastMessage.id, (chunk) => {
703
+ if (!lastMessageIsRemoved) {
704
+ chunkMessageMerger.current.removeMessageById(lastMessage.id);
705
+ lastMessageIsRemoved = true;
706
+ }
707
+ });
701
708
  }
702
709
  } catch (error) {
703
710
  setState((prev) => ({
@@ -1279,12 +1286,12 @@ import {
1279
1286
  } from "@ant-design/icons";
1280
1287
 
1281
1288
  // src/components/GenUI/elements/confirm_feedback.tsx
1282
- import { Button, Space, Typography } from "antd";
1283
- import { useState as useState8 } from "react";
1289
+ import { Button as Button2, Space as Space2, Typography as Typography2 } from "antd";
1290
+ import { useState as useState9 } from "react";
1284
1291
 
1285
1292
  // src/components/GenUI/MDResponse.tsx
1286
1293
  import XMarkdown from "@ant-design/x-markdown";
1287
- import { useRef as useRef5, useState as useState7 } from "react";
1294
+ import { useRef as useRef5, useState as useState8 } from "react";
1288
1295
  import { createStyles as createStyles2 } from "antd-style";
1289
1296
 
1290
1297
  // src/components/GenUI/Code.tsx
@@ -1319,13 +1326,19 @@ import { jsx as jsx6 } from "react/jsx-runtime";
1319
1326
  var Code = (props) => {
1320
1327
  const { className, children } = props;
1321
1328
  const language = className?.match(/language-(\w+)/)?.[1] || "";
1322
- if (typeof children !== "string") return null;
1329
+ let childrenStr;
1330
+ if (typeof children === "string") {
1331
+ childrenStr = children;
1332
+ }
1333
+ if (Array.isArray(children)) {
1334
+ childrenStr = children.join("");
1335
+ }
1323
1336
  if (language) {
1324
1337
  const Element = getElement(language)?.card_view;
1325
1338
  if (Element) {
1326
1339
  let childrenData;
1327
1340
  try {
1328
- childrenData = JSON.parse(children);
1341
+ childrenData = JSON.parse(childrenStr);
1329
1342
  } catch (error) {
1330
1343
  }
1331
1344
  return /* @__PURE__ */ jsx6(Element, { component_key: language, data: childrenData });
@@ -1342,8 +1355,172 @@ var Code = (props) => {
1342
1355
  return /* @__PURE__ */ jsx6(CodeHighlighter, { lang: language, children });
1343
1356
  };
1344
1357
 
1345
- // src/components/GenUI/MDResponse.tsx
1358
+ // src/components/GenUI/MDComponentWrap.tsx
1346
1359
  import { jsx as jsx7 } from "react/jsx-runtime";
1360
+ var MDComponentWrap = (Element) => {
1361
+ return (props) => {
1362
+ return /* @__PURE__ */ jsx7(Element, { ...props });
1363
+ };
1364
+ };
1365
+
1366
+ // src/components/GenUI/elements/generic_data_table.tsx
1367
+ import { Table, Typography, Button, Flex, Space } from "antd";
1368
+ import { useState as useState7 } from "react";
1369
+ import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
1370
+ import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
1371
+ var { Text } = Typography;
1372
+ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
1373
+ const { dataSource, message: message5 } = data ?? {};
1374
+ const [expandedRowKeys, setExpandedRowKeys] = useState7([]);
1375
+ const { openSideApp } = useChatUIContext();
1376
+ const processedData = dataSource?.map((item, index) => ({
1377
+ ...item,
1378
+ key: `${index}_${JSON.stringify(item).slice(0, 20)}`
1379
+ })) || [];
1380
+ const generateColumns = (dataItem) => {
1381
+ if (!dataItem || typeof dataItem !== "object") {
1382
+ return [];
1383
+ }
1384
+ return Object.keys(dataItem).filter((key) => key !== "key" && key !== "expandItem").map((key) => ({
1385
+ title: formatColumnTitle(key),
1386
+ dataIndex: key,
1387
+ key,
1388
+ width: 150,
1389
+ sorter: (a, b) => {
1390
+ const aVal = a[key];
1391
+ const bVal = b[key];
1392
+ if (aVal === null || aVal === void 0) return 1;
1393
+ if (bVal === null || bVal === void 0) return -1;
1394
+ if (typeof aVal === "number" && typeof bVal === "number") {
1395
+ return aVal - bVal;
1396
+ }
1397
+ const aDate = new Date(aVal);
1398
+ const bDate = new Date(bVal);
1399
+ if (!isNaN(aDate.getTime()) && !isNaN(bDate.getTime())) {
1400
+ return aDate.getTime() - bDate.getTime();
1401
+ }
1402
+ return String(aVal).localeCompare(String(bVal), "zh-CN");
1403
+ },
1404
+ render: (value) => {
1405
+ if (value === null || value === void 0) {
1406
+ return "-";
1407
+ }
1408
+ if (typeof value === "object") {
1409
+ return JSON.stringify(value);
1410
+ }
1411
+ return String(value);
1412
+ }
1413
+ }));
1414
+ };
1415
+ const formatColumnTitle = (key) => {
1416
+ return key.replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/^./, (str) => str.toUpperCase()).trim();
1417
+ };
1418
+ const columns = processedData.length > 0 ? generateColumns(processedData[0]) : [];
1419
+ const expandedRowRender = (record) => {
1420
+ const expandItem = record.expandItem;
1421
+ if (!expandItem) {
1422
+ return null;
1423
+ }
1424
+ return /* @__PURE__ */ jsxs2("div", { style: { padding: "16px" }, children: [
1425
+ expandItem.content && /* @__PURE__ */ jsxs2("div", { style: { marginBottom: "16px" }, children: [
1426
+ /* @__PURE__ */ jsx8(Text, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u8BE6\u7EC6\u4FE1\u606F:" }),
1427
+ /* @__PURE__ */ jsx8(MDResponse, { content: expandItem.content })
1428
+ ] }),
1429
+ expandItem.dataSource && expandItem.dataSource.length > 0 && /* @__PURE__ */ jsxs2("div", { children: [
1430
+ /* @__PURE__ */ jsx8(Text, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u5B50\u8868\u6570\u636E:" }),
1431
+ /* @__PURE__ */ jsx8(
1432
+ GenericDataTable,
1433
+ {
1434
+ component_key: `nested_${record.key}`,
1435
+ data: {
1436
+ dataSource: expandItem.dataSource,
1437
+ message: void 0
1438
+ },
1439
+ interactive
1440
+ }
1441
+ )
1442
+ ] })
1443
+ ] });
1444
+ };
1445
+ const exportToExcel = () => {
1446
+ if (!processedData || processedData.length === 0) return;
1447
+ console.warn(
1448
+ "Export to Excel not implemented in SDK yet (requires xlsx dependency)"
1449
+ );
1450
+ };
1451
+ const hasExpandableRows = processedData.some((item) => item.expandItem);
1452
+ return /* @__PURE__ */ jsx8(
1453
+ Table,
1454
+ {
1455
+ size: "small",
1456
+ title: () => /* @__PURE__ */ jsxs2(Flex, { justify: "space-between", align: "center", children: [
1457
+ /* @__PURE__ */ jsx8(Space, { children: /* @__PURE__ */ jsx8(Text, { strong: true, style: { fontSize: 16 }, children: message5 || "" }) }),
1458
+ /* @__PURE__ */ jsxs2(Space, { children: [
1459
+ /* @__PURE__ */ jsx8(
1460
+ Button,
1461
+ {
1462
+ type: "text",
1463
+ size: "small",
1464
+ icon: /* @__PURE__ */ jsx8(DownloadOutlined, {}),
1465
+ onClick: exportToExcel,
1466
+ disabled: !processedData || processedData.length === 0,
1467
+ children: "\u5BFC\u51FAExcel"
1468
+ }
1469
+ ),
1470
+ default_open_in_side_app && /* @__PURE__ */ jsxs2(
1471
+ Button,
1472
+ {
1473
+ type: "link",
1474
+ size: "small",
1475
+ onClick: () => {
1476
+ openSideApp({
1477
+ component_key: "generic_data_table",
1478
+ message: message5 || "",
1479
+ data: { dataSource, message: message5 }
1480
+ });
1481
+ },
1482
+ children: [
1483
+ /* @__PURE__ */ jsx8(ExpandAltOutlined, {}),
1484
+ "\u5C55\u5F00"
1485
+ ]
1486
+ }
1487
+ )
1488
+ ] })
1489
+ ] }),
1490
+ dataSource: processedData,
1491
+ columns,
1492
+ pagination: {
1493
+ pageSize: 10,
1494
+ showSizeChanger: true,
1495
+ showQuickJumper: true,
1496
+ showTotal: (total, range) => `\u7B2C ${range[0]}-${range[1]} \u6761/\u5171 ${total} \u6761`
1497
+ },
1498
+ scroll: { x: "max-content" },
1499
+ expandable: hasExpandableRows ? {
1500
+ expandedRowRender,
1501
+ expandedRowKeys,
1502
+ onExpandedRowsChange: (keys) => setExpandedRowKeys(keys),
1503
+ rowExpandable: (record) => !!record.expandItem
1504
+ } : void 0,
1505
+ rowKey: "key",
1506
+ bordered: true
1507
+ }
1508
+ );
1509
+ };
1510
+
1511
+ // src/components/GenUI/mdComponents.tsx
1512
+ var genericdatatable = MDComponentWrap(GenericDataTable);
1513
+ var mdComponents = {
1514
+ code: Code,
1515
+ genericdatatable
1516
+ // row: Row,
1517
+ // col: Col,
1518
+ // input: Input,
1519
+ // button: Button,
1520
+ };
1521
+
1522
+ // src/components/GenUI/MDResponse.tsx
1523
+ import { jsx as jsx9 } from "react/jsx-runtime";
1347
1524
  var useStyles = createStyles2(({ token, css }) => ({
1348
1525
  markdownTableContainer: css`
1349
1526
  overflow-x: auto;
@@ -1433,26 +1610,33 @@ var MDResponse = ({
1433
1610
  noGenUI
1434
1611
  }) => {
1435
1612
  const { styles } = useStyles();
1436
- return /* @__PURE__ */ jsx7("div", { className: styles.markdownContainer, children: /* @__PURE__ */ jsx7(XMarkdown, { components: { code: Code }, paragraphTag: "div", children: content }) });
1613
+ return /* @__PURE__ */ jsx9("div", { className: styles.markdownContainer, children: /* @__PURE__ */ jsx9(
1614
+ XMarkdown,
1615
+ {
1616
+ components: mdComponents,
1617
+ content,
1618
+ paragraphTag: "div"
1619
+ }
1620
+ ) });
1437
1621
  };
1438
1622
  var MDViewFormItem = ({ value }) => {
1439
- return /* @__PURE__ */ jsx7(MDResponse, { content: value || "" });
1623
+ return /* @__PURE__ */ jsx9(MDResponse, { content: value || "" });
1440
1624
  };
1441
1625
 
1442
1626
  // src/components/GenUI/elements/confirm_feedback.tsx
1443
- import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
1444
- var { Text } = Typography;
1627
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
1628
+ var { Text: Text2 } = Typography2;
1445
1629
  var ConfirmFeedback = ({
1446
1630
  data,
1447
1631
  interactive = true
1448
1632
  }) => {
1449
1633
  const { message: message5, type, config, feedback, options } = data ?? {};
1450
1634
  const { sendMessage } = useAgentChat();
1451
- const [clicked, setClicked] = useState8(false);
1452
- return /* @__PURE__ */ jsxs2(Space, { direction: "vertical", style: { width: "100%" }, children: [
1453
- /* @__PURE__ */ jsx8(MDResponse, { content: message5 }),
1454
- options ? /* @__PURE__ */ jsx8(Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx8(
1455
- Button,
1635
+ const [clicked, setClicked] = useState9(false);
1636
+ return /* @__PURE__ */ jsxs3(Space2, { direction: "vertical", style: { width: "100%" }, children: [
1637
+ /* @__PURE__ */ jsx10(MDResponse, { content: message5 }),
1638
+ options ? /* @__PURE__ */ jsx10(Space2, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ jsx10(
1639
+ Button2,
1456
1640
  {
1457
1641
  title: option.description,
1458
1642
  disabled: !interactive || clicked || feedback,
@@ -1474,9 +1658,9 @@ var ConfirmFeedback = ({
1474
1658
  children: option.label
1475
1659
  },
1476
1660
  option.value
1477
- )) }) : /* @__PURE__ */ jsxs2(Space, { style: { justifyContent: "flex-end", width: "100%" }, children: [
1478
- /* @__PURE__ */ jsx8(
1479
- Button,
1661
+ )) }) : /* @__PURE__ */ jsxs3(Space2, { style: { justifyContent: "flex-end", width: "100%" }, children: [
1662
+ /* @__PURE__ */ jsx10(
1663
+ Button2,
1480
1664
  {
1481
1665
  disabled: !interactive || clicked || feedback,
1482
1666
  style: {
@@ -1498,8 +1682,8 @@ var ConfirmFeedback = ({
1498
1682
  children: "\u786E\u8BA4"
1499
1683
  }
1500
1684
  ),
1501
- /* @__PURE__ */ jsx8(
1502
- Button,
1685
+ /* @__PURE__ */ jsx10(
1686
+ Button2,
1503
1687
  {
1504
1688
  disabled: !interactive || clicked || feedback,
1505
1689
  type: "default",
@@ -1525,155 +1709,10 @@ var ConfirmFeedback = ({
1525
1709
  ] });
1526
1710
  };
1527
1711
 
1528
- // src/components/GenUI/elements/generic_data_table.tsx
1529
- import { Table, Typography as Typography2, Button as Button2, Flex, Space as Space2 } from "antd";
1530
- import { useState as useState9 } from "react";
1531
- import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
1532
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
1533
- var { Text: Text2 } = Typography2;
1534
- var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
1535
- const { dataSource, message: message5 } = data ?? {};
1536
- const [expandedRowKeys, setExpandedRowKeys] = useState9([]);
1537
- const { openSideApp } = useChatUIContext();
1538
- const processedData = dataSource?.map((item, index) => ({
1539
- ...item,
1540
- key: `${index}_${JSON.stringify(item).slice(0, 20)}`
1541
- })) || [];
1542
- const generateColumns = (dataItem) => {
1543
- if (!dataItem || typeof dataItem !== "object") {
1544
- return [];
1545
- }
1546
- return Object.keys(dataItem).filter((key) => key !== "key" && key !== "expandItem").map((key) => ({
1547
- title: formatColumnTitle(key),
1548
- dataIndex: key,
1549
- key,
1550
- width: 150,
1551
- sorter: (a, b) => {
1552
- const aVal = a[key];
1553
- const bVal = b[key];
1554
- if (aVal === null || aVal === void 0) return 1;
1555
- if (bVal === null || bVal === void 0) return -1;
1556
- if (typeof aVal === "number" && typeof bVal === "number") {
1557
- return aVal - bVal;
1558
- }
1559
- const aDate = new Date(aVal);
1560
- const bDate = new Date(bVal);
1561
- if (!isNaN(aDate.getTime()) && !isNaN(bDate.getTime())) {
1562
- return aDate.getTime() - bDate.getTime();
1563
- }
1564
- return String(aVal).localeCompare(String(bVal), "zh-CN");
1565
- },
1566
- render: (value) => {
1567
- if (value === null || value === void 0) {
1568
- return "-";
1569
- }
1570
- if (typeof value === "object") {
1571
- return JSON.stringify(value);
1572
- }
1573
- return String(value);
1574
- }
1575
- }));
1576
- };
1577
- const formatColumnTitle = (key) => {
1578
- return key.replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/^./, (str) => str.toUpperCase()).trim();
1579
- };
1580
- const columns = processedData.length > 0 ? generateColumns(processedData[0]) : [];
1581
- const expandedRowRender = (record) => {
1582
- const expandItem = record.expandItem;
1583
- if (!expandItem) {
1584
- return null;
1585
- }
1586
- return /* @__PURE__ */ jsxs3("div", { style: { padding: "16px" }, children: [
1587
- expandItem.content && /* @__PURE__ */ jsxs3("div", { style: { marginBottom: "16px" }, children: [
1588
- /* @__PURE__ */ jsx9(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u8BE6\u7EC6\u4FE1\u606F:" }),
1589
- /* @__PURE__ */ jsx9(MDResponse, { content: expandItem.content })
1590
- ] }),
1591
- expandItem.dataSource && expandItem.dataSource.length > 0 && /* @__PURE__ */ jsxs3("div", { children: [
1592
- /* @__PURE__ */ jsx9(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u5B50\u8868\u6570\u636E:" }),
1593
- /* @__PURE__ */ jsx9(
1594
- GenericDataTable,
1595
- {
1596
- component_key: `nested_${record.key}`,
1597
- data: {
1598
- dataSource: expandItem.dataSource,
1599
- message: void 0
1600
- },
1601
- interactive
1602
- }
1603
- )
1604
- ] })
1605
- ] });
1606
- };
1607
- const exportToExcel = () => {
1608
- if (!processedData || processedData.length === 0) return;
1609
- console.warn(
1610
- "Export to Excel not implemented in SDK yet (requires xlsx dependency)"
1611
- );
1612
- };
1613
- const hasExpandableRows = processedData.some((item) => item.expandItem);
1614
- return /* @__PURE__ */ jsx9(
1615
- Table,
1616
- {
1617
- size: "small",
1618
- title: () => /* @__PURE__ */ jsxs3(Flex, { justify: "space-between", align: "center", children: [
1619
- /* @__PURE__ */ jsx9(Space2, { children: /* @__PURE__ */ jsx9(Text2, { strong: true, style: { fontSize: 16 }, children: message5 || "" }) }),
1620
- /* @__PURE__ */ jsxs3(Space2, { children: [
1621
- /* @__PURE__ */ jsx9(
1622
- Button2,
1623
- {
1624
- type: "text",
1625
- size: "small",
1626
- icon: /* @__PURE__ */ jsx9(DownloadOutlined, {}),
1627
- onClick: exportToExcel,
1628
- disabled: !processedData || processedData.length === 0,
1629
- children: "\u5BFC\u51FAExcel"
1630
- }
1631
- ),
1632
- default_open_in_side_app && /* @__PURE__ */ jsxs3(
1633
- Button2,
1634
- {
1635
- type: "link",
1636
- size: "small",
1637
- onClick: () => {
1638
- openSideApp({
1639
- component_key: "generic_data_table",
1640
- message: message5 || "",
1641
- data: { dataSource, message: message5 }
1642
- });
1643
- },
1644
- children: [
1645
- /* @__PURE__ */ jsx9(ExpandAltOutlined, {}),
1646
- "\u5C55\u5F00"
1647
- ]
1648
- }
1649
- )
1650
- ] })
1651
- ] }),
1652
- dataSource: processedData,
1653
- columns,
1654
- pagination: {
1655
- pageSize: 10,
1656
- showSizeChanger: true,
1657
- showQuickJumper: true,
1658
- showTotal: (total, range) => `\u7B2C ${range[0]}-${range[1]} \u6761/\u5171 ${total} \u6761`
1659
- },
1660
- scroll: { x: "max-content" },
1661
- expandable: hasExpandableRows ? {
1662
- expandedRowRender,
1663
- expandedRowKeys,
1664
- onExpandedRowsChange: (keys) => setExpandedRowKeys(keys),
1665
- rowExpandable: (record) => !!record.expandItem
1666
- } : void 0,
1667
- rowKey: "key",
1668
- bordered: true
1669
- }
1670
- );
1671
- };
1672
-
1673
1712
  // src/components/GenUI/elements/generic_data_table_side_app.tsx
1674
- import { jsx as jsx10 } from "react/jsx-runtime";
1713
+ import { jsx as jsx11 } from "react/jsx-runtime";
1675
1714
  var GenericDataTableSideApp = (props) => {
1676
- return /* @__PURE__ */ jsx10(GenericDataTable, { ...props, default_open_in_side_app: false });
1715
+ return /* @__PURE__ */ jsx11(GenericDataTable, { ...props, default_open_in_side_app: false });
1677
1716
  };
1678
1717
 
1679
1718
  // src/components/GenUI/elements/ToolCall.tsx
@@ -1689,7 +1728,7 @@ import {
1689
1728
  import { Card as Card2, Typography as Typography3, Space as Space3, Tag } from "antd";
1690
1729
  import { createStyles as createStyles3 } from "antd-style";
1691
1730
  import { ToolOutlined, CodeOutlined } from "@ant-design/icons";
1692
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
1731
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
1693
1732
  var { Text: Text3, Title } = Typography3;
1694
1733
  var useStyle2 = createStyles3(({ token, css }) => ({
1695
1734
  card: css`
@@ -1759,7 +1798,7 @@ var ToolCard = ({
1759
1798
  }) => {
1760
1799
  const { styles } = useStyle2();
1761
1800
  if (!data || !data.name) {
1762
- return /* @__PURE__ */ jsx11(Card2, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ jsx11(Text3, { type: "secondary", children: "Invalid tool data" }) });
1801
+ return /* @__PURE__ */ jsx12(Card2, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ jsx12(Text3, { type: "secondary", children: "Invalid tool data" }) });
1763
1802
  }
1764
1803
  const formatToolName = (name) => {
1765
1804
  return name.replace(/([a-z])([A-Z])/g, "$1 $2").split(/[_-]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
@@ -1812,11 +1851,11 @@ var ToolCard = ({
1812
1851
  children: [
1813
1852
  /* @__PURE__ */ jsxs4("div", { className: styles.header, children: [
1814
1853
  /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
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 })
1854
+ /* @__PURE__ */ jsx12(ToolOutlined, { style: { color: "#1890ff", fontSize: "18px" } }),
1855
+ /* @__PURE__ */ jsx12(Title, { level: 5, className: styles.toolName, style: { margin: 0 }, children: formatToolName(data.name) }),
1856
+ data.type && /* @__PURE__ */ jsx12(Tag, { color: "blue", className: styles.typeTag, children: data.type })
1818
1857
  ] }),
1819
- data.description && /* @__PURE__ */ jsx11(
1858
+ data.description && /* @__PURE__ */ jsx12(
1820
1859
  Text3,
1821
1860
  {
1822
1861
  type: "secondary",
@@ -1827,17 +1866,17 @@ var ToolCard = ({
1827
1866
  ] }),
1828
1867
  hasParameters ? /* @__PURE__ */ jsxs4("div", { children: [
1829
1868
  /* @__PURE__ */ jsxs4(Space3, { align: "center", style: { marginBottom: "12px" }, children: [
1830
- /* @__PURE__ */ jsx11(CodeOutlined, { style: { color: "#52c41a", fontSize: "14px" } }),
1869
+ /* @__PURE__ */ jsx12(CodeOutlined, { style: { color: "#52c41a", fontSize: "14px" } }),
1831
1870
  /* @__PURE__ */ jsxs4(Text3, { strong: true, style: { fontSize: "14px" }, children: [
1832
1871
  "Parameters (",
1833
1872
  Object.keys(data.parameters).length,
1834
1873
  ")"
1835
1874
  ] })
1836
1875
  ] }),
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(
1876
+ /* @__PURE__ */ jsx12("div", { className: styles.parameterGrid, children: Object.entries(data.parameters).map(([key, value], index) => /* @__PURE__ */ jsxs4("div", { className: styles.parameterItem, children: [
1877
+ /* @__PURE__ */ jsx12("div", { className: styles.parameterName, children: /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1878
+ /* @__PURE__ */ jsx12("span", { children: key }),
1879
+ /* @__PURE__ */ jsx12(
1841
1880
  Tag,
1842
1881
  {
1843
1882
  color: getTypeColor(value),
@@ -1846,11 +1885,11 @@ var ToolCard = ({
1846
1885
  }
1847
1886
  )
1848
1887
  ] }) }),
1849
- /* @__PURE__ */ jsx11("div", { className: styles.parameterValue, children: formatParameterValue(value) })
1888
+ /* @__PURE__ */ jsx12("div", { className: styles.parameterValue, children: formatParameterValue(value) })
1850
1889
  ] }, index)) })
1851
1890
  ] }) : /* @__PURE__ */ jsxs4(Space3, { align: "center", children: [
1852
- /* @__PURE__ */ jsx11(CodeOutlined, { style: { color: "#d9d9d9", fontSize: "14px" } }),
1853
- /* @__PURE__ */ jsx11(Text3, { type: "secondary", style: { fontSize: "13px" }, children: "No parameters" })
1891
+ /* @__PURE__ */ jsx12(CodeOutlined, { style: { color: "#d9d9d9", fontSize: "14px" } }),
1892
+ /* @__PURE__ */ jsx12(Text3, { type: "secondary", style: { fontSize: "13px" }, children: "No parameters" })
1854
1893
  ] })
1855
1894
  ]
1856
1895
  }
@@ -1858,15 +1897,15 @@ var ToolCard = ({
1858
1897
  };
1859
1898
 
1860
1899
  // src/components/GenUI/elements/ToolCall.tsx
1861
- import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1900
+ import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1862
1901
  function getStatusIcon(status) {
1863
1902
  switch (status) {
1864
1903
  case "success":
1865
- return /* @__PURE__ */ jsx12(CheckCircleOutlined, { style: { color: "#52c41a" } });
1904
+ return /* @__PURE__ */ jsx13(CheckCircleOutlined, { style: { color: "#52c41a" } });
1866
1905
  case "error":
1867
- return /* @__PURE__ */ jsx12(InfoCircleOutlined, { style: { color: "#ff4d4f" } });
1906
+ return /* @__PURE__ */ jsx13(InfoCircleOutlined, { style: { color: "#ff4d4f" } });
1868
1907
  default:
1869
- return /* @__PURE__ */ jsx12(LoadingOutlined, { style: { color: "#1890ff" } });
1908
+ return /* @__PURE__ */ jsx13(LoadingOutlined, { style: { color: "#1890ff" } });
1870
1909
  }
1871
1910
  }
1872
1911
  var ToolCall = ({ data }) => {
@@ -1890,8 +1929,8 @@ var ToolCall = ({ data }) => {
1890
1929
  }
1891
1930
  };
1892
1931
  const header = /* @__PURE__ */ jsxs5(Flex2, { align: "center", wrap: "wrap", children: [
1893
- /* @__PURE__ */ jsx12(Typography4.Text, { strong: true, children: formatToolName(toolCallData.name) }),
1894
- /* @__PURE__ */ jsx12(
1932
+ /* @__PURE__ */ jsx13(Typography4.Text, { strong: true, children: formatToolName(toolCallData.name) }),
1933
+ /* @__PURE__ */ jsx13(
1895
1934
  Typography4.Text,
1896
1935
  {
1897
1936
  type: "secondary",
@@ -1906,7 +1945,7 @@ var ToolCall = ({ data }) => {
1906
1945
  type: "tool_call"
1907
1946
  };
1908
1947
  const content = /* @__PURE__ */ jsxs5("div", { style: { marginTop: "8px" }, children: [
1909
- /* @__PURE__ */ jsx12(
1948
+ /* @__PURE__ */ jsx13(
1910
1949
  ToolCard,
1911
1950
  {
1912
1951
  data: toolCardData,
@@ -1915,7 +1954,7 @@ var ToolCall = ({ data }) => {
1915
1954
  }
1916
1955
  ),
1917
1956
  toolCallData.response && /* @__PURE__ */ jsxs5("div", { style: { marginTop: "12px" }, children: [
1918
- /* @__PURE__ */ jsx12(
1957
+ /* @__PURE__ */ jsx13(
1919
1958
  Typography4.Text,
1920
1959
  {
1921
1960
  strong: true,
@@ -1923,7 +1962,7 @@ var ToolCall = ({ data }) => {
1923
1962
  children: "Response:"
1924
1963
  }
1925
1964
  ),
1926
- /* @__PURE__ */ jsx12(MDResponse, { content: toolCallData.response })
1965
+ /* @__PURE__ */ jsx13(MDResponse, { content: toolCallData.response })
1927
1966
  ] })
1928
1967
  ] });
1929
1968
  const expandIcon = ({ isActive }) => {
@@ -1936,14 +1975,14 @@ var ToolCall = ({ data }) => {
1936
1975
  component_key: toolCallData.id
1937
1976
  });
1938
1977
  }
1939
- return /* @__PURE__ */ jsx12(
1978
+ return /* @__PURE__ */ jsx13(
1940
1979
  Collapse,
1941
1980
  {
1942
1981
  size: "small",
1943
1982
  bordered: false,
1944
1983
  defaultActiveKey: [],
1945
1984
  expandIcon,
1946
- children: /* @__PURE__ */ jsx12(
1985
+ children: /* @__PURE__ */ jsx13(
1947
1986
  CollapsePanel,
1948
1987
  {
1949
1988
  header,
@@ -1957,14 +1996,17 @@ var ToolCall = ({ data }) => {
1957
1996
  };
1958
1997
 
1959
1998
  // src/components/GenUI/elements/Todo.tsx
1960
- import { Card as Card3, List, Typography as Typography5, Space as Space5 } from "antd";
1999
+ import { Card as Card3, List, Typography as Typography5, Space as Space5, Button as Button3 } from "antd";
1961
2000
  import { createStyles as createStyles4 } from "antd-style";
1962
2001
  import {
1963
2002
  ArrowRightOutlined,
1964
2003
  CheckCircleOutlined as CheckCircleOutlined2,
1965
- ClockCircleOutlined
2004
+ ClockCircleOutlined,
2005
+ DownOutlined,
2006
+ UpOutlined
1966
2007
  } from "@ant-design/icons";
1967
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
2008
+ import { useState as useState10 } from "react";
2009
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1968
2010
  var { Text: Text4 } = Typography5;
1969
2011
  var useStyle3 = createStyles4(({ token, css }) => ({
1970
2012
  card: css`
@@ -1995,17 +2037,19 @@ var useStyle3 = createStyles4(({ token, css }) => ({
1995
2037
  var Todo = ({
1996
2038
  data,
1997
2039
  component_key,
1998
- interactive = true
2040
+ interactive = true,
2041
+ focusMode = false
1999
2042
  }) => {
2000
2043
  const { styles } = useStyle3();
2044
+ const [isExpanded, setIsExpanded] = useState10(false);
2001
2045
  const getStatusIcon2 = (status) => {
2002
2046
  switch (status) {
2003
2047
  case "completed":
2004
- return /* @__PURE__ */ jsx13(CheckCircleOutlined2, { style: { color: "#52c41a" } });
2048
+ return /* @__PURE__ */ jsx14(CheckCircleOutlined2, { style: { color: "#52c41a" } });
2005
2049
  case "in_progress":
2006
- return /* @__PURE__ */ jsx13(ArrowRightOutlined, { style: { fontWeight: "500" } });
2050
+ return /* @__PURE__ */ jsx14(ArrowRightOutlined, { style: { fontWeight: "500" } });
2007
2051
  case "pending":
2008
- return /* @__PURE__ */ jsx13(ClockCircleOutlined, { style: { color: "gray" } });
2052
+ return /* @__PURE__ */ jsx14(ClockCircleOutlined, { style: { color: "gray" } });
2009
2053
  default:
2010
2054
  return null;
2011
2055
  }
@@ -2046,35 +2090,68 @@ var Todo = ({
2046
2090
  return "";
2047
2091
  }
2048
2092
  };
2093
+ const getFilteredData = () => {
2094
+ if (!data || !Array.isArray(data)) {
2095
+ return [];
2096
+ }
2097
+ if (!focusMode || data.length <= 3) {
2098
+ return data;
2099
+ }
2100
+ const firstInProgressIndex = data.findIndex(
2101
+ (item) => item.status === "in_progress"
2102
+ );
2103
+ if (firstInProgressIndex !== -1) {
2104
+ return data.slice(firstInProgressIndex, firstInProgressIndex + 3);
2105
+ }
2106
+ const allCompleted = data.every((item) => item.status === "completed");
2107
+ if (allCompleted) {
2108
+ return data.slice(-3);
2109
+ }
2110
+ return data.slice(0, 3);
2111
+ };
2049
2112
  if (!data || !Array.isArray(data)) {
2050
- return /* @__PURE__ */ jsx13(
2113
+ return /* @__PURE__ */ jsx14(
2051
2114
  Card3,
2052
2115
  {
2053
2116
  size: "small",
2054
2117
  className: `shadow-sm ${styles.card}`,
2055
2118
  bordered: false,
2056
- children: /* @__PURE__ */ jsx13(Text4, { type: "secondary", children: "No todo items available" })
2119
+ children: /* @__PURE__ */ jsx14(Text4, { type: "secondary", children: "No todo items available" })
2057
2120
  }
2058
2121
  );
2059
2122
  }
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(
2123
+ const filteredData = getFilteredData();
2124
+ const hasMoreItems = filteredData.length < data.length;
2125
+ const displayData = isExpanded ? data : filteredData;
2126
+ return /* @__PURE__ */ jsx14(Card3, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ jsxs6(Space5, { direction: "vertical", style: { width: "100%" }, children: [
2127
+ /* @__PURE__ */ jsx14(
2062
2128
  List,
2063
2129
  {
2064
2130
  size: "small",
2065
- dataSource: data,
2066
- renderItem: (item, index) => /* @__PURE__ */ jsx13(
2131
+ dataSource: displayData,
2132
+ renderItem: (item, index) => /* @__PURE__ */ jsx14(
2067
2133
  List.Item,
2068
2134
  {
2069
2135
  className: `${styles.todoItem} ${getItemClassName(item.status)}`,
2070
2136
  children: /* @__PURE__ */ jsxs6(Space5, { align: "center", style: { width: "100%" }, children: [
2071
2137
  getStatusIcon2(item.status),
2072
- /* @__PURE__ */ jsx13(Text4, { style: { flex: 1 }, children: item.content })
2138
+ /* @__PURE__ */ jsx14(Text4, { style: { flex: 1 }, children: item.content })
2073
2139
  ] })
2074
2140
  }
2075
2141
  )
2076
2142
  }
2077
2143
  ),
2144
+ hasMoreItems && /* @__PURE__ */ jsx14(
2145
+ Button3,
2146
+ {
2147
+ type: "link",
2148
+ size: "small",
2149
+ icon: isExpanded ? /* @__PURE__ */ jsx14(UpOutlined, {}) : /* @__PURE__ */ jsx14(DownOutlined, {}),
2150
+ onClick: () => setIsExpanded(!isExpanded),
2151
+ style: { padding: 0, height: "auto" },
2152
+ children: isExpanded ? "Collapse" : `Show all ${data.length} items (${data.length - filteredData.length} hidden)`
2153
+ }
2154
+ ),
2078
2155
  /* @__PURE__ */ jsxs6(Text4, { type: "secondary", style: { fontSize: 12 }, children: [
2079
2156
  "Total items: ",
2080
2157
  data.length,
@@ -2094,7 +2171,7 @@ var Todo = ({
2094
2171
  import { Space as Space6, Collapse as Collapse2, Typography as Typography6 } from "antd";
2095
2172
  import { UnorderedListOutlined } from "@ant-design/icons";
2096
2173
  import CollapsePanel2 from "antd/es/collapse/CollapsePanel";
2097
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
2174
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
2098
2175
  var { Text: Text5 } = Typography6;
2099
2176
  var WriteTodos = ({
2100
2177
  data,
@@ -2108,10 +2185,10 @@ var WriteTodos = ({
2108
2185
  (item) => item.status === "completed"
2109
2186
  ).length;
2110
2187
  const expandIcon = () => {
2111
- return /* @__PURE__ */ jsx14(UnorderedListOutlined, {});
2188
+ return /* @__PURE__ */ jsx15(UnorderedListOutlined, {});
2112
2189
  };
2113
2190
  const header = /* @__PURE__ */ jsxs7(Space6, { children: [
2114
- /* @__PURE__ */ jsx14(Text5, { strong: true, children: "Todos" }),
2191
+ /* @__PURE__ */ jsx15(Text5, { strong: true, children: "TODOs" }),
2115
2192
  /* @__PURE__ */ jsxs7(Text5, { style: { fontSize: 12 }, type: "secondary", children: [
2116
2193
  completedCount,
2117
2194
  "/",
@@ -2122,24 +2199,25 @@ var WriteTodos = ({
2122
2199
  if (!toolCallData) {
2123
2200
  return null;
2124
2201
  }
2125
- return /* @__PURE__ */ jsx14(
2202
+ return /* @__PURE__ */ jsx15(
2126
2203
  Collapse2,
2127
2204
  {
2128
2205
  size: "small",
2129
2206
  bordered: false,
2130
2207
  defaultActiveKey: [toolCallData.id],
2131
2208
  expandIcon,
2132
- children: /* @__PURE__ */ jsx14(
2209
+ children: /* @__PURE__ */ jsx15(
2133
2210
  CollapsePanel2,
2134
2211
  {
2135
2212
  header,
2136
2213
  style: { minWidth: 400 },
2137
- children: /* @__PURE__ */ jsx14(
2214
+ children: /* @__PURE__ */ jsx15(
2138
2215
  Todo,
2139
2216
  {
2140
2217
  data: data.args.todos,
2141
2218
  component_key,
2142
- interactive
2219
+ interactive,
2220
+ focusMode: true
2143
2221
  }
2144
2222
  )
2145
2223
  },
@@ -2150,8 +2228,8 @@ var WriteTodos = ({
2150
2228
  };
2151
2229
 
2152
2230
  // src/components/GenUI/FileExplorer.tsx
2153
- import { useState as useState10, useEffect as useEffect6, useMemo as useMemo2 } from "react";
2154
- import { Splitter, Tree, Empty, Button as Button3, Tooltip, message } from "antd";
2231
+ import { useState as useState11, useEffect as useEffect6, useMemo as useMemo2 } from "react";
2232
+ import { Splitter, Tree, Empty, Button as Button4, Tooltip, message } from "antd";
2155
2233
  import {
2156
2234
  FolderOutlined,
2157
2235
  FolderOpenOutlined,
@@ -2171,40 +2249,40 @@ import {
2171
2249
  FileUnknownOutlined,
2172
2250
  Html5Outlined
2173
2251
  } from "@ant-design/icons";
2174
- import { jsx as jsx15 } from "react/jsx-runtime";
2252
+ import { jsx as jsx16 } from "react/jsx-runtime";
2175
2253
  var getFileIcon = (filename) => {
2176
2254
  const ext = filename?.split(".")?.pop()?.toLowerCase();
2177
2255
  const iconStyle = { fontSize: 14, marginRight: 4, verticalAlign: "middle" };
2178
2256
  switch (ext) {
2179
2257
  case "ts":
2180
2258
  case "tsx":
2181
- return /* @__PURE__ */ jsx15(CodeOutlined2, { style: { ...iconStyle, color: "#3178c6" } });
2259
+ return /* @__PURE__ */ jsx16(CodeOutlined2, { style: { ...iconStyle, color: "#3178c6" } });
2182
2260
  case "js":
2183
2261
  case "jsx":
2184
- return /* @__PURE__ */ jsx15(CodeOutlined2, { style: { ...iconStyle, color: "#f7df1e" } });
2262
+ return /* @__PURE__ */ jsx16(CodeOutlined2, { style: { ...iconStyle, color: "#f7df1e" } });
2185
2263
  case "html":
2186
- return /* @__PURE__ */ jsx15(Html5Outlined, { style: { ...iconStyle, color: "#e34c26" } });
2264
+ return /* @__PURE__ */ jsx16(Html5Outlined, { style: { ...iconStyle, color: "#e34c26" } });
2187
2265
  case "css":
2188
2266
  case "less":
2189
2267
  case "scss":
2190
- return /* @__PURE__ */ jsx15(FileUnknownOutlined, { style: { ...iconStyle, color: "#563d7c" } });
2268
+ return /* @__PURE__ */ jsx16(FileUnknownOutlined, { style: { ...iconStyle, color: "#563d7c" } });
2191
2269
  case "md":
2192
- return /* @__PURE__ */ jsx15(FileMarkdownOutlined, { style: { ...iconStyle, color: "#083fa1" } });
2270
+ return /* @__PURE__ */ jsx16(FileMarkdownOutlined, { style: { ...iconStyle, color: "#083fa1" } });
2193
2271
  case "json":
2194
- return /* @__PURE__ */ jsx15(FileTextOutlined, { style: { ...iconStyle, color: "#fbc02d" } });
2272
+ return /* @__PURE__ */ jsx16(FileTextOutlined, { style: { ...iconStyle, color: "#fbc02d" } });
2195
2273
  case "png":
2196
2274
  case "jpg":
2197
2275
  case "jpeg":
2198
2276
  case "gif":
2199
2277
  case "svg":
2200
- return /* @__PURE__ */ jsx15(FileImageOutlined, { style: { ...iconStyle, color: "#4caf50" } });
2278
+ return /* @__PURE__ */ jsx16(FileImageOutlined, { style: { ...iconStyle, color: "#4caf50" } });
2201
2279
  default:
2202
- return /* @__PURE__ */ jsx15(FileOutlined, { style: { ...iconStyle, color: "#9e9e9e" } });
2280
+ return /* @__PURE__ */ jsx16(FileOutlined, { style: { ...iconStyle, color: "#9e9e9e" } });
2203
2281
  }
2204
2282
  };
2205
2283
 
2206
2284
  // src/components/GenUI/FileExplorer.tsx
2207
- import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
2285
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
2208
2286
  var useStyles2 = createStyles5(({ token, css }) => ({
2209
2287
  container: css`
2210
2288
  height: 100%;
@@ -2336,7 +2414,7 @@ var getFolderIcon = (expanded) => {
2336
2414
  color: "#dcb67a",
2337
2415
  verticalAlign: "middle"
2338
2416
  };
2339
- return expanded ? /* @__PURE__ */ jsx16(FolderOpenOutlined, { style: iconStyle }) : /* @__PURE__ */ jsx16(FolderOutlined, { style: iconStyle });
2417
+ return expanded ? /* @__PURE__ */ jsx17(FolderOpenOutlined, { style: iconStyle }) : /* @__PURE__ */ jsx17(FolderOutlined, { style: iconStyle });
2340
2418
  };
2341
2419
  var sortTreeNodes = (nodes) => {
2342
2420
  return nodes.sort((a, b) => {
@@ -2361,7 +2439,7 @@ var buildTreeData = (files, expandedKeys) => {
2361
2439
  const key = parts.slice(0, index + 1).join("/");
2362
2440
  let existingNode = currentLevel.find((node) => node.key === key);
2363
2441
  if (!existingNode) {
2364
- const title = part === "" && index === 0 ? /* @__PURE__ */ jsx16(
2442
+ const title = part === "" && index === 0 ? /* @__PURE__ */ jsx17(
2365
2443
  "span",
2366
2444
  {
2367
2445
  style: {
@@ -2396,10 +2474,10 @@ var FileExplorer = ({
2396
2474
  }) => {
2397
2475
  const { files } = data ?? {};
2398
2476
  const { styles, cx } = useStyles2();
2399
- const [fileList, setFileList] = useState10([]);
2400
- const [selectedKey, setSelectedKey] = useState10("");
2401
- const [expandedKeys, setExpandedKeys] = useState10([]);
2402
- const [copied, setCopied] = useState10(false);
2477
+ const [fileList, setFileList] = useState11([]);
2478
+ const [selectedKey, setSelectedKey] = useState11("");
2479
+ const [expandedKeys, setExpandedKeys] = useState11([]);
2480
+ const [copied, setCopied] = useState11(false);
2403
2481
  useEffect6(() => {
2404
2482
  if (copied) {
2405
2483
  const timer = setTimeout(() => setCopied(false), 2e3);
@@ -2470,7 +2548,7 @@ var FileExplorer = ({
2470
2548
  };
2471
2549
  const renderContent = () => {
2472
2550
  if (!selectedFile) {
2473
- return /* @__PURE__ */ jsx16("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx16(
2551
+ return /* @__PURE__ */ jsx17("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx17(
2474
2552
  Empty,
2475
2553
  {
2476
2554
  description: "Select a file to preview",
@@ -2485,32 +2563,32 @@ var FileExplorer = ({
2485
2563
  style: { minHeight: "100%", display: "flex", flexDirection: "column" },
2486
2564
  children: [
2487
2565
  /* @__PURE__ */ jsxs8("div", { className: styles.header, children: [
2488
- /* @__PURE__ */ jsx16(Tooltip, { title: "Copy Content", children: /* @__PURE__ */ jsx16(
2489
- Button3,
2566
+ /* @__PURE__ */ jsx17(Tooltip, { title: "Copy Content", children: /* @__PURE__ */ jsx17(
2567
+ Button4,
2490
2568
  {
2491
2569
  type: "text",
2492
- icon: copied ? /* @__PURE__ */ jsx16(CheckOutlined, {}) : /* @__PURE__ */ jsx16(CopyOutlined, {}),
2570
+ icon: copied ? /* @__PURE__ */ jsx17(CheckOutlined, {}) : /* @__PURE__ */ jsx17(CopyOutlined, {}),
2493
2571
  onClick: handleCopy,
2494
2572
  size: "small"
2495
2573
  }
2496
2574
  ) }),
2497
- /* @__PURE__ */ jsx16(Tooltip, { title: "Download File", children: /* @__PURE__ */ jsx16(
2498
- Button3,
2575
+ /* @__PURE__ */ jsx17(Tooltip, { title: "Download File", children: /* @__PURE__ */ jsx17(
2576
+ Button4,
2499
2577
  {
2500
2578
  type: "text",
2501
- icon: /* @__PURE__ */ jsx16(DownloadOutlined2, {}),
2579
+ icon: /* @__PURE__ */ jsx17(DownloadOutlined2, {}),
2502
2580
  onClick: handleDownload,
2503
2581
  size: "small"
2504
2582
  }
2505
2583
  ) })
2506
2584
  ] }),
2507
- /* @__PURE__ */ jsx16("div", { className: styles.contentBody, children: /* @__PURE__ */ jsx16(MDResponse, { content }) })
2585
+ /* @__PURE__ */ jsx17("div", { className: styles.contentBody, children: /* @__PURE__ */ jsx17(MDResponse, { content }) })
2508
2586
  ]
2509
2587
  }
2510
2588
  );
2511
2589
  };
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(
2590
+ return /* @__PURE__ */ jsx17("div", { className: styles.container, children: /* @__PURE__ */ jsxs8(Splitter, { className: styles.splitter, children: [
2591
+ /* @__PURE__ */ jsx17(Splitter.Panel, { defaultSize: "25%", min: "15%", max: "40%", children: /* @__PURE__ */ jsx17("div", { className: styles.leftPanel, children: /* @__PURE__ */ jsx17(
2514
2592
  Tree,
2515
2593
  {
2516
2594
  showIcon: true,
@@ -2548,7 +2626,7 @@ var FileExplorer = ({
2548
2626
  }
2549
2627
  }
2550
2628
  ) }) }),
2551
- /* @__PURE__ */ jsx16(Splitter.Panel, { children: /* @__PURE__ */ jsx16("div", { className: styles.rightPanel, children: renderContent() }) })
2629
+ /* @__PURE__ */ jsx17(Splitter.Panel, { children: /* @__PURE__ */ jsx17("div", { className: styles.rightPanel, children: renderContent() }) })
2552
2630
  ] }) });
2553
2631
  };
2554
2632
 
@@ -2561,11 +2639,11 @@ import {
2561
2639
  Typography as Typography7,
2562
2640
  Row,
2563
2641
  Col,
2564
- Button as Button4
2642
+ Button as Button5
2565
2643
  } from "antd";
2566
2644
  import dayjs from "dayjs";
2567
- import { useState as useState11 } from "react";
2568
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
2645
+ import { useState as useState12 } from "react";
2646
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
2569
2647
  var AttachmentsCard = ({
2570
2648
  data,
2571
2649
  component_key,
@@ -2573,8 +2651,8 @@ var AttachmentsCard = ({
2573
2651
  columns = 1,
2574
2652
  showDownloadButton = false
2575
2653
  }) => {
2576
- const { Text: Text13 } = Typography7;
2577
- const [showAll, setShowAll] = useState11(false);
2654
+ const { Text: Text14 } = Typography7;
2655
+ const [showAll, setShowAll] = useState12(false);
2578
2656
  const { openSideApp } = useChatUIContext();
2579
2657
  const getStyles = () => {
2580
2658
  switch (size) {
@@ -2633,7 +2711,7 @@ var AttachmentsCard = ({
2633
2711
  };
2634
2712
  const DownloadButton = ({ item }) => {
2635
2713
  if (!showDownloadButton) return null;
2636
- return /* @__PURE__ */ jsx17(
2714
+ return /* @__PURE__ */ jsx18(
2637
2715
  "div",
2638
2716
  {
2639
2717
  style: {
@@ -2647,8 +2725,8 @@ var AttachmentsCard = ({
2647
2725
  }
2648
2726
  );
2649
2727
  };
2650
- const renderFileDescription = (item) => /* @__PURE__ */ jsx17(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx17(Space7, { children: /* @__PURE__ */ jsx17(
2651
- Text13,
2728
+ const renderFileDescription = (item) => /* @__PURE__ */ jsx18(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx18(Space7, { children: /* @__PURE__ */ jsx18(
2729
+ Text14,
2652
2730
  {
2653
2731
  type: "secondary",
2654
2732
  style: {
@@ -2662,7 +2740,7 @@ var AttachmentsCard = ({
2662
2740
  const shouldShowViewMore2 = displayData2.length > 4;
2663
2741
  const visibleData2 = showAll ? displayData2 : displayData2.slice(0, 4);
2664
2742
  return /* @__PURE__ */ jsxs9(Flex3, { vertical: true, gap: "small", children: [
2665
- /* @__PURE__ */ jsx17(Row, { gutter: [8, 8], children: visibleData2.map((item) => /* @__PURE__ */ jsx17(Col, { span: 24 / columns, children: /* @__PURE__ */ jsx17(
2743
+ /* @__PURE__ */ jsx18(Row, { gutter: [8, 8], children: visibleData2.map((item) => /* @__PURE__ */ jsx18(Col, { span: 24 / columns, children: /* @__PURE__ */ jsx18(
2666
2744
  "div",
2667
2745
  {
2668
2746
  onClick: (evt) => {
@@ -2670,8 +2748,8 @@ var AttachmentsCard = ({
2670
2748
  handleItemClick(item);
2671
2749
  },
2672
2750
  children: /* @__PURE__ */ jsxs9(Card4, { size: styles.cardSize, style: getCardStyle(item), children: [
2673
- /* @__PURE__ */ jsx17(DownloadButton, { item }),
2674
- /* @__PURE__ */ jsx17(
2751
+ /* @__PURE__ */ jsx18(DownloadButton, { item }),
2752
+ /* @__PURE__ */ jsx18(
2675
2753
  FileCard,
2676
2754
  {
2677
2755
  style: getFileCardStyle(item),
@@ -2680,7 +2758,7 @@ var AttachmentsCard = ({
2680
2758
  description: renderFileDescription(item)
2681
2759
  }
2682
2760
  ),
2683
- item.files && /* @__PURE__ */ jsx17(
2761
+ item.files && /* @__PURE__ */ jsx18(
2684
2762
  AttachmentsCard,
2685
2763
  {
2686
2764
  data: item.files,
@@ -2693,8 +2771,8 @@ var AttachmentsCard = ({
2693
2771
  ] })
2694
2772
  }
2695
2773
  ) }, item.id)) }),
2696
- shouldShowViewMore2 && /* @__PURE__ */ jsx17(
2697
- Button4,
2774
+ shouldShowViewMore2 && /* @__PURE__ */ jsx18(
2775
+ Button5,
2698
2776
  {
2699
2777
  type: "link",
2700
2778
  onClick: () => setShowAll(!showAll),
@@ -2708,9 +2786,9 @@ var AttachmentsCard = ({
2708
2786
  const shouldShowViewMore = displayData.length > 4;
2709
2787
  const visibleData = showAll ? displayData : displayData.slice(0, 4);
2710
2788
  return /* @__PURE__ */ jsxs9(Flex3, { vertical: true, gap: size === "small" ? "small" : "middle", children: [
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(
2789
+ visibleData.map((item) => /* @__PURE__ */ jsx18("div", { onClick: () => handleItemClick(item), children: /* @__PURE__ */ jsxs9(Card4, { size: styles.cardSize, style: getCardStyle(item), children: [
2790
+ /* @__PURE__ */ jsx18(DownloadButton, { item }),
2791
+ /* @__PURE__ */ jsx18(
2714
2792
  FileCard,
2715
2793
  {
2716
2794
  style: getFileCardStyle(item),
@@ -2720,12 +2798,12 @@ var AttachmentsCard = ({
2720
2798
  }
2721
2799
  ),
2722
2800
  item.files && /* @__PURE__ */ jsxs9("div", { style: { paddingLeft: "12px" }, children: [
2723
- /* @__PURE__ */ jsxs9(Text13, { type: "secondary", style: { fontSize: "12px" }, children: [
2801
+ /* @__PURE__ */ jsxs9(Text14, { type: "secondary", style: { fontSize: "12px" }, children: [
2724
2802
  "\u5305\u542B\u6587\u4EF6(",
2725
2803
  item.files.length,
2726
2804
  ")"
2727
2805
  ] }),
2728
- /* @__PURE__ */ jsx17(
2806
+ /* @__PURE__ */ jsx18(
2729
2807
  AttachmentsCard,
2730
2808
  {
2731
2809
  data: item.files,
@@ -2737,8 +2815,8 @@ var AttachmentsCard = ({
2737
2815
  )
2738
2816
  ] })
2739
2817
  ] }) }, item.id)),
2740
- shouldShowViewMore && /* @__PURE__ */ jsx17(
2741
- Button4,
2818
+ shouldShowViewMore && /* @__PURE__ */ jsx18(
2819
+ Button5,
2742
2820
  {
2743
2821
  type: "link",
2744
2822
  size: "small",
@@ -2754,18 +2832,18 @@ var AttachmentsCard = ({
2754
2832
  };
2755
2833
 
2756
2834
  // src/components/GenUI/elements/attachments_viewer_side_app.tsx
2757
- import { Button as Button5, Empty as Empty2, Skeleton } from "antd";
2758
- import { useState as useState12 } from "react";
2759
- import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
2835
+ import { Button as Button6, Empty as Empty2, Skeleton } from "antd";
2836
+ import { useState as useState13 } from "react";
2837
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
2760
2838
  function AttachmentsViewerSideApp({
2761
2839
  data,
2762
2840
  component_key
2763
2841
  }) {
2764
- const [fileUri, setFileUri] = useState12();
2765
- const [loading, setLoading] = useState12(true);
2766
- const { file_id } = data ?? {};
2842
+ const [fileUri, setFileUri] = useState13();
2843
+ const [loading, setLoading] = useState13(false);
2844
+ const { file_id, url } = data ?? {};
2767
2845
  if (loading) {
2768
- return /* @__PURE__ */ jsx18(Skeleton, { active: true });
2846
+ return /* @__PURE__ */ jsx19(Skeleton, { active: true });
2769
2847
  }
2770
2848
  const canPreviewInIframe = (fileName) => {
2771
2849
  if (!fileName) return false;
@@ -2800,18 +2878,18 @@ function AttachmentsViewerSideApp({
2800
2878
  return previewableExtensions.includes(extension);
2801
2879
  };
2802
2880
  const isPreviewable = fileUri?.fileName ? canPreviewInIframe(fileUri.fileName) : false;
2803
- return isPreviewable ? /* @__PURE__ */ jsx18(
2881
+ return isPreviewable || url ? /* @__PURE__ */ jsx19(
2804
2882
  "iframe",
2805
2883
  {
2806
2884
  style: { width: "100%", height: "100%", border: 0 },
2807
- src: fileUri?.url
2885
+ src: fileUri?.url || url
2808
2886
  }
2809
- ) : /* @__PURE__ */ jsx18(
2887
+ ) : /* @__PURE__ */ jsx19(
2810
2888
  Empty2,
2811
2889
  {
2812
2890
  description: /* @__PURE__ */ jsxs10(Fragment2, { children: [
2813
- /* @__PURE__ */ jsx18("div", { children: "\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u540E\u67E5\u770B\u3002" }),
2814
- /* @__PURE__ */ jsxs10(Button5, { type: "link", href: fileUri?.url, download: fileUri?.fileName, children: [
2891
+ /* @__PURE__ */ jsx19("div", { children: "\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u540E\u67E5\u770B\u3002" }),
2892
+ /* @__PURE__ */ jsxs10(Button6, { type: "link", href: fileUri?.url, download: fileUri?.fileName, children: [
2815
2893
  "\u4E0B\u8F7D",
2816
2894
  fileUri?.fileName
2817
2895
  ] })
@@ -2822,15 +2900,15 @@ function AttachmentsViewerSideApp({
2822
2900
  }
2823
2901
 
2824
2902
  // src/components/GenUI/elements/WriteFile.tsx
2825
- import { Button as Button6, Space as Space8, Typography as Typography8 } from "antd";
2903
+ import { Button as Button7, Space as Space8, Typography as Typography8 } from "antd";
2826
2904
 
2827
2905
  // src/components/GenUI/elements/ContentPreviewCollapse.tsx
2828
- import { useRef as useRef6, useState as useState13, useEffect as useEffect8, useCallback as useCallback6 } from "react";
2906
+ import { useRef as useRef6, useState as useState14, useEffect as useEffect8, useCallback as useCallback6 } from "react";
2829
2907
  import { Collapse as Collapse4 } from "antd";
2830
2908
  import { createStyles as createStyles6 } from "antd-style";
2831
- import { DownOutlined as DownOutlined2, UpOutlined } from "@ant-design/icons";
2909
+ import { DownOutlined as DownOutlined3, UpOutlined as UpOutlined2 } from "@ant-design/icons";
2832
2910
  import CollapsePanel3 from "antd/es/collapse/CollapsePanel";
2833
- import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
2911
+ import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
2834
2912
  var DEFAULT_COLLAPSED_MAX_HEIGHT = 180;
2835
2913
  var DEFAULT_EXPANDED_MAX_HEIGHT = 500;
2836
2914
  var useStyle4 = createStyles6(
@@ -2895,8 +2973,8 @@ var ContentPreviewCollapse = ({
2895
2973
  showAllText = "Show all content",
2896
2974
  showLessText = "Show less"
2897
2975
  }) => {
2898
- const [showFullContent, setShowFullContent] = useState13(false);
2899
- const [isOverflowing, setIsOverflowing] = useState13(false);
2976
+ const [showFullContent, setShowFullContent] = useState14(false);
2977
+ const [isOverflowing, setIsOverflowing] = useState14(false);
2900
2978
  const contentRef = useRef6(null);
2901
2979
  const showShadow = isOverflowing && !showFullContent;
2902
2980
  const { styles, cx } = useStyle4({ showShadow });
@@ -2922,7 +3000,7 @@ var ContentPreviewCollapse = ({
2922
3000
  e.stopPropagation();
2923
3001
  setShowFullContent(!showFullContent);
2924
3002
  };
2925
- return /* @__PURE__ */ jsx19(
3003
+ return /* @__PURE__ */ jsx20(
2926
3004
  Collapse4,
2927
3005
  {
2928
3006
  className: styles.collapse,
@@ -2937,22 +3015,22 @@ var ContentPreviewCollapse = ({
2937
3015
  extra,
2938
3016
  style: { minWidth },
2939
3017
  children: [
2940
- /* @__PURE__ */ jsx19(
3018
+ /* @__PURE__ */ jsx20(
2941
3019
  "div",
2942
3020
  {
2943
3021
  className: cx(styles.contentContainer, showFullContent && "expanded"),
2944
3022
  style: {
2945
3023
  maxHeight: showFullContent ? expandedMaxHeight : collapsedMaxHeight
2946
3024
  },
2947
- children: /* @__PURE__ */ jsx19("div", { ref: contentRef, className: styles.content, children })
3025
+ children: /* @__PURE__ */ jsx20("div", { ref: contentRef, className: styles.content, children })
2948
3026
  }
2949
3027
  ),
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 })
3028
+ isOverflowing && /* @__PURE__ */ jsx20("div", { className: styles.toggleButton, onClick: handleToggleContent, children: showFullContent ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
3029
+ /* @__PURE__ */ jsx20(UpOutlined2, { style: { fontSize: 10 } }),
3030
+ /* @__PURE__ */ jsx20("span", { children: showLessText })
2953
3031
  ] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
2954
- /* @__PURE__ */ jsx19(DownOutlined2, { style: { fontSize: 10 } }),
2955
- /* @__PURE__ */ jsx19("span", { children: showAllText })
3032
+ /* @__PURE__ */ jsx20(DownOutlined3, { style: { fontSize: 10 } }),
3033
+ /* @__PURE__ */ jsx20("span", { children: showAllText })
2956
3034
  ] }) })
2957
3035
  ]
2958
3036
  },
@@ -2963,7 +3041,7 @@ var ContentPreviewCollapse = ({
2963
3041
  };
2964
3042
 
2965
3043
  // src/components/GenUI/elements/WriteFile.tsx
2966
- import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
3044
+ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
2967
3045
  var { Text: Text6 } = Typography8;
2968
3046
  var WriteFile = ({
2969
3047
  data,
@@ -2978,8 +3056,8 @@ var WriteFile = ({
2978
3056
  }
2979
3057
  const expandIcon = () => getFileIcon(file_path);
2980
3058
  const header = /* @__PURE__ */ jsxs12(Space8, { children: [
2981
- /* @__PURE__ */ jsx20(Text6, { strong: true, children: "New" }),
2982
- /* @__PURE__ */ jsx20(Text6, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3059
+ /* @__PURE__ */ jsx21(Text6, { strong: true, children: "New" }),
3060
+ /* @__PURE__ */ jsx21(Text6, { title: file_path, children: file_path?.split("/")?.pop() || "" })
2983
3061
  ] });
2984
3062
  const handleItemClick = (toolCallData2) => {
2985
3063
  openSideApp({
@@ -2991,14 +3069,14 @@ var WriteFile = ({
2991
3069
  }
2992
3070
  });
2993
3071
  };
2994
- return /* @__PURE__ */ jsx20(
3072
+ return /* @__PURE__ */ jsx21(
2995
3073
  ContentPreviewCollapse,
2996
3074
  {
2997
3075
  panelKey: toolCallData.id,
2998
3076
  header,
2999
3077
  expandIcon,
3000
- extra: /* @__PURE__ */ jsx20(
3001
- Button6,
3078
+ extra: /* @__PURE__ */ jsx21(
3079
+ Button7,
3002
3080
  {
3003
3081
  type: "link",
3004
3082
  size: "small",
@@ -3009,7 +3087,7 @@ var WriteFile = ({
3009
3087
  children: "Diff View"
3010
3088
  }
3011
3089
  ),
3012
- children: /* @__PURE__ */ jsx20(MDResponse, { content })
3090
+ children: /* @__PURE__ */ jsx21(MDResponse, { content })
3013
3091
  }
3014
3092
  );
3015
3093
  };
@@ -3017,10 +3095,10 @@ var WriteFile = ({
3017
3095
  // src/components/GenUI/elements/file_content_diff_view.tsx
3018
3096
  import ReactDiffViewer from "@alexbruf/react-diff-viewer";
3019
3097
  import "@alexbruf/react-diff-viewer/index.css";
3020
- import { jsx as jsx21 } from "react/jsx-runtime";
3098
+ import { jsx as jsx22 } from "react/jsx-runtime";
3021
3099
  var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app = true }) => {
3022
3100
  const { old_code, new_code } = data;
3023
- return /* @__PURE__ */ jsx21(
3101
+ return /* @__PURE__ */ jsx22(
3024
3102
  ReactDiffViewer,
3025
3103
  {
3026
3104
  oldValue: old_code,
@@ -3031,8 +3109,8 @@ var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app
3031
3109
  };
3032
3110
 
3033
3111
  // src/components/GenUI/elements/EditFile.tsx
3034
- import { Button as Button7, Space as Space9, Typography as Typography9 } from "antd";
3035
- import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
3112
+ import { Button as Button8, Space as Space9, Typography as Typography9 } from "antd";
3113
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
3036
3114
  var { Text: Text7 } = Typography9;
3037
3115
  var EditFile = ({
3038
3116
  data,
@@ -3047,8 +3125,8 @@ var EditFile = ({
3047
3125
  }
3048
3126
  const expandIcon = () => getFileIcon(file_path);
3049
3127
  const header = /* @__PURE__ */ jsxs13(Space9, { children: [
3050
- /* @__PURE__ */ jsx22(Text7, { strong: true, children: "Edit" }),
3051
- /* @__PURE__ */ jsx22(Text7, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3128
+ /* @__PURE__ */ jsx23(Text7, { strong: true, children: "Edit" }),
3129
+ /* @__PURE__ */ jsx23(Text7, { title: file_path, children: file_path?.split("/")?.pop() || "" })
3052
3130
  ] });
3053
3131
  const handleItemClick = (toolCallData2) => {
3054
3132
  openSideApp({
@@ -3060,14 +3138,14 @@ var EditFile = ({
3060
3138
  }
3061
3139
  });
3062
3140
  };
3063
- return /* @__PURE__ */ jsx22(
3141
+ return /* @__PURE__ */ jsx23(
3064
3142
  ContentPreviewCollapse,
3065
3143
  {
3066
3144
  panelKey: toolCallData.id,
3067
3145
  header,
3068
3146
  expandIcon,
3069
- extra: /* @__PURE__ */ jsx22(
3070
- Button7,
3147
+ extra: /* @__PURE__ */ jsx23(
3148
+ Button8,
3071
3149
  {
3072
3150
  type: "link",
3073
3151
  size: "small",
@@ -3078,7 +3156,7 @@ var EditFile = ({
3078
3156
  children: "Diff View"
3079
3157
  }
3080
3158
  ),
3081
- children: /* @__PURE__ */ jsx22(MDResponse, { content: new_string })
3159
+ children: /* @__PURE__ */ jsx23(MDResponse, { content: new_string })
3082
3160
  }
3083
3161
  );
3084
3162
  };
@@ -3094,7 +3172,7 @@ import {
3094
3172
  RightOutlined as RightOutlined2,
3095
3173
  CarryOutOutlined
3096
3174
  } from "@ant-design/icons";
3097
- import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
3175
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
3098
3176
  var { Text: Text8 } = Typography10;
3099
3177
  var useStyle5 = createStyles7(({ token, css }) => ({
3100
3178
  card: css`
@@ -3262,14 +3340,14 @@ var TaskCard = ({
3262
3340
  switch (status2) {
3263
3341
  case "success":
3264
3342
  return {
3265
- icon: /* @__PURE__ */ jsx23(CheckCircleOutlined3, { style: { fontSize: 16 } }),
3343
+ icon: /* @__PURE__ */ jsx24(CheckCircleOutlined3, { style: { fontSize: 16 } }),
3266
3344
  color: "success",
3267
3345
  text: "Completed",
3268
3346
  bgColor: "rgba(82, 196, 26, 0.1)"
3269
3347
  };
3270
3348
  case "error":
3271
3349
  return {
3272
- icon: /* @__PURE__ */ jsx23(CloseCircleOutlined, { style: { fontSize: 16 } }),
3350
+ icon: /* @__PURE__ */ jsx24(CloseCircleOutlined, { style: { fontSize: 16 } }),
3273
3351
  color: "error",
3274
3352
  text: "Failed",
3275
3353
  bgColor: "rgba(255, 77, 79, 0.1)"
@@ -3277,7 +3355,7 @@ var TaskCard = ({
3277
3355
  case "pending":
3278
3356
  default:
3279
3357
  return {
3280
- icon: /* @__PURE__ */ jsx23(LoadingOutlined2, { style: { fontSize: 16 } }),
3358
+ icon: /* @__PURE__ */ jsx24(LoadingOutlined2, { style: { fontSize: 16 } }),
3281
3359
  color: "processing",
3282
3360
  text: "In Progress",
3283
3361
  bgColor: "rgba(24, 144, 255, 0.1)"
@@ -3297,7 +3375,7 @@ var TaskCard = ({
3297
3375
  }
3298
3376
  });
3299
3377
  };
3300
- return /* @__PURE__ */ jsx23(
3378
+ return /* @__PURE__ */ jsx24(
3301
3379
  Card5,
3302
3380
  {
3303
3381
  size: "small",
@@ -3307,27 +3385,27 @@ var TaskCard = ({
3307
3385
  hoverable: interactive,
3308
3386
  bodyStyle: { padding: 0 },
3309
3387
  children: /* @__PURE__ */ jsxs14("div", { className: styles.cardBody, children: [
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" } }) }),
3388
+ /* @__PURE__ */ jsx24("div", { className: styles.header, children: /* @__PURE__ */ jsxs14("div", { className: styles.titleSection, children: [
3389
+ /* @__PURE__ */ jsx24("div", { className: styles.iconWrapper, children: /* @__PURE__ */ jsx24(CarryOutOutlined, { style: { fontSize: 20, color: "#1890ff" } }) }),
3312
3390
  /* @__PURE__ */ jsxs14("div", { className: styles.titleContent, children: [
3313
- subagent_type && /* @__PURE__ */ jsx23("div", { className: styles.taskType, children: subagent_type }),
3314
- description && /* @__PURE__ */ jsx23(Text8, { className: styles.description, children: description })
3391
+ subagent_type && /* @__PURE__ */ jsx24("div", { className: styles.taskType, children: subagent_type }),
3392
+ description && /* @__PURE__ */ jsx24(Text8, { className: styles.description, children: description })
3315
3393
  ] })
3316
3394
  ] }) }),
3317
3395
  /* @__PURE__ */ jsxs14("div", { className: styles.footer, children: [
3318
3396
  /* @__PURE__ */ jsxs14("div", { className: styles.footerLeft, children: [
3319
3397
  assignee && /* @__PURE__ */ jsxs14("div", { className: styles.assigneeContainer, children: [
3320
- /* @__PURE__ */ jsx23(
3398
+ /* @__PURE__ */ jsx24(
3321
3399
  Avatar,
3322
3400
  {
3323
3401
  size: 24,
3324
- icon: /* @__PURE__ */ jsx23(UserOutlined, {}),
3402
+ icon: /* @__PURE__ */ jsx24(UserOutlined, {}),
3325
3403
  className: styles.assigneeAvatar
3326
3404
  }
3327
3405
  ),
3328
- /* @__PURE__ */ jsx23(Text8, { className: styles.assigneeName, children: assignee })
3406
+ /* @__PURE__ */ jsx24(Text8, { className: styles.assigneeName, children: assignee })
3329
3407
  ] }),
3330
- /* @__PURE__ */ jsx23(
3408
+ /* @__PURE__ */ jsx24(
3331
3409
  Tag3,
3332
3410
  {
3333
3411
  icon: statusConfig.icon,
@@ -3345,7 +3423,7 @@ var TaskCard = ({
3345
3423
  }
3346
3424
  )
3347
3425
  ] }),
3348
- interactive && /* @__PURE__ */ jsx23(RightOutlined2, { className: styles.actionIcon })
3426
+ interactive && /* @__PURE__ */ jsx24(RightOutlined2, { className: styles.actionIcon })
3349
3427
  ] }),
3350
3428
  showResponse && /* @__PURE__ */ jsxs14(
3351
3429
  "div",
@@ -3353,8 +3431,8 @@ var TaskCard = ({
3353
3431
  className: styles.responseSection,
3354
3432
  onClick: (e) => e.stopPropagation(),
3355
3433
  children: [
3356
- /* @__PURE__ */ jsx23(Text8, { className: styles.responseHeader, children: "Response" }),
3357
- /* @__PURE__ */ jsx23("div", { className: styles.responseContent, children: /* @__PURE__ */ jsx23(MDResponse, { content: response }) })
3434
+ /* @__PURE__ */ jsx24(Text8, { className: styles.responseHeader, children: "Response" }),
3435
+ /* @__PURE__ */ jsx24("div", { className: styles.responseContent, children: /* @__PURE__ */ jsx24(MDResponse, { content: response }) })
3358
3436
  ]
3359
3437
  }
3360
3438
  )
@@ -3388,17 +3466,17 @@ import {
3388
3466
  useEffect as useEffect9,
3389
3467
  useMemo as useMemo3,
3390
3468
  useRef as useRef7,
3391
- useState as useState14
3469
+ useState as useState15
3392
3470
  } from "react";
3393
- import { jsx as jsx24 } from "react/jsx-runtime";
3471
+ import { jsx as jsx25 } from "react/jsx-runtime";
3394
3472
  var LazyBubble = ({
3395
3473
  message: message5,
3396
3474
  renderContent,
3397
3475
  autoLoadRightPanel
3398
3476
  }) => {
3399
3477
  const ref = useRef7(null);
3400
- const [isVisible, setIsVisible] = useState14(false);
3401
- const [wasEverVisible, setWasEverVisible] = useState14(false);
3478
+ const [isVisible, setIsVisible] = useState15(false);
3479
+ const [wasEverVisible, setWasEverVisible] = useState15(false);
3402
3480
  useEffect9(() => {
3403
3481
  const observer = new IntersectionObserver(
3404
3482
  ([entry]) => {
@@ -3424,16 +3502,16 @@ var LazyBubble = ({
3424
3502
  }, []);
3425
3503
  const getPlaceholder = () => {
3426
3504
  const estimatedHeight = message5.content ? Math.min(100, message5.content.length / 5) : 100;
3427
- return /* @__PURE__ */ jsx24("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
3505
+ return /* @__PURE__ */ jsx25("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
3428
3506
  };
3429
- return /* @__PURE__ */ jsx24(ErrorBoundary, { children: /* @__PURE__ */ jsx24("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message5) : getPlaceholder() }) });
3507
+ return /* @__PURE__ */ jsx25(ErrorBoundary, { children: /* @__PURE__ */ jsx25("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message5) : getPlaceholder() }) });
3430
3508
  };
3431
3509
  var MemoizedBubbleList = memo(
3432
3510
  ({
3433
3511
  items,
3434
3512
  role,
3435
3513
  className
3436
- }) => /* @__PURE__ */ jsx24(
3514
+ }) => /* @__PURE__ */ jsx25(
3437
3515
  Bubble.List,
3438
3516
  {
3439
3517
  autoScroll: true,
@@ -3462,7 +3540,7 @@ var MessageList = ({
3462
3540
  try {
3463
3541
  const json = JSON.parse(content);
3464
3542
  if (json.action && json.message) {
3465
- return /* @__PURE__ */ jsx24(MDResponse, { content: json.message });
3543
+ return /* @__PURE__ */ jsx25(MDResponse, { content: json.message });
3466
3544
  }
3467
3545
  } catch (error) {
3468
3546
  }
@@ -3472,14 +3550,14 @@ ${JSON.stringify(tool_call)}
3472
3550
  \`\`\``;
3473
3551
  }) || [];
3474
3552
  const content_md = [content, ...tool_calls_md].join("\n");
3475
- return /* @__PURE__ */ jsx24(Space10, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ jsx24(MDResponse, { content: content_md }) });
3553
+ return /* @__PURE__ */ jsx25(Space10, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ jsx25(MDResponse, { content: content_md }) });
3476
3554
  }, []);
3477
3555
  const items = useMemo3(
3478
3556
  () => messages.map((message5, index) => ({
3479
3557
  key: message5.id,
3480
3558
  role: message5.role,
3481
3559
  typing: false,
3482
- content: /* @__PURE__ */ jsx24(
3560
+ content: /* @__PURE__ */ jsx25(
3483
3561
  LazyBubble,
3484
3562
  {
3485
3563
  message: message5,
@@ -3539,9 +3617,9 @@ ${JSON.stringify(tool_call)}
3539
3617
  }
3540
3618
  };
3541
3619
  if (items.length === 0) {
3542
- return /* @__PURE__ */ jsx24("div", { style: { flex: 1 } });
3620
+ return /* @__PURE__ */ jsx25("div", { style: { flex: 1 } });
3543
3621
  }
3544
- return /* @__PURE__ */ jsx24(
3622
+ return /* @__PURE__ */ jsx25(
3545
3623
  MemoizedBubbleList,
3546
3624
  {
3547
3625
  items,
@@ -3555,10 +3633,10 @@ ${JSON.stringify(tool_call)}
3555
3633
  import {
3556
3634
  Alert as Alert2,
3557
3635
  Badge as Badge2,
3558
- Button as Button10,
3636
+ Button as Button11,
3559
3637
  message as message3
3560
3638
  } from "antd";
3561
- import React6, { useEffect as useEffect10, useRef as useRef8, useState as useState15 } from "react";
3639
+ import React6, { useEffect as useEffect10, useRef as useRef8, useState as useState16 } from "react";
3562
3640
 
3563
3641
  // src/components/GenUI/HITLContainer.tsx
3564
3642
  import {
@@ -3569,7 +3647,7 @@ import {
3569
3647
  } from "antd";
3570
3648
  import { createStyles as createStyles8 } from "antd-style";
3571
3649
  import CollapsePanel4 from "antd/es/collapse/CollapsePanel";
3572
- import { jsx as jsx25 } from "react/jsx-runtime";
3650
+ import { jsx as jsx26 } from "react/jsx-runtime";
3573
3651
  var { Text: Text9 } = Typography11;
3574
3652
  var useStyle6 = createStyles8(({ token, css }) => ({
3575
3653
  card: css`
@@ -3585,18 +3663,18 @@ var useStyle6 = createStyles8(({ token, css }) => ({
3585
3663
  var HITLContainer = () => {
3586
3664
  const { styles } = useStyle6();
3587
3665
  const { interrupts } = useAgentChat();
3588
- return interrupts && interrupts.length > 0 ? /* @__PURE__ */ jsx25(
3666
+ return interrupts && interrupts.length > 0 ? /* @__PURE__ */ jsx26(
3589
3667
  Collapse5,
3590
3668
  {
3591
3669
  className: styles.card,
3592
3670
  size: "small",
3593
3671
  bordered: false,
3594
3672
  defaultActiveKey: ["hitl"],
3595
- children: /* @__PURE__ */ jsx25(
3673
+ children: /* @__PURE__ */ jsx26(
3596
3674
  CollapsePanel4,
3597
3675
  {
3598
3676
  showArrow: false,
3599
- header: /* @__PURE__ */ jsx25(
3677
+ header: /* @__PURE__ */ jsx26(
3600
3678
  Tag4,
3601
3679
  {
3602
3680
  bordered: false,
@@ -3611,7 +3689,7 @@ var HITLContainer = () => {
3611
3689
  children: "\u7B49\u5F85\u53CD\u9988"
3612
3690
  }
3613
3691
  ),
3614
- children: /* @__PURE__ */ jsx25(Space11, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ jsx25(MDResponse, { content: interrupt.value }, interrupt.id)) })
3692
+ children: /* @__PURE__ */ jsx26(Space11, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ jsx26(MDResponse, { content: interrupt.value }, interrupt.id)) })
3615
3693
  },
3616
3694
  "hitl"
3617
3695
  )
@@ -3624,7 +3702,7 @@ import { Avatar as Avatar2, Space as Space12, Typography as Typography12 } from
3624
3702
 
3625
3703
  // src/components/Chat/TodoProgress.tsx
3626
3704
  import { Popover, Tooltip as Tooltip2, Progress } from "antd";
3627
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3705
+ import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
3628
3706
  var TodoProgress = ({}) => {
3629
3707
  const { openSideApp } = useChatUIContext();
3630
3708
  const { todos } = useAgentChat();
@@ -3637,14 +3715,14 @@ var TodoProgress = ({}) => {
3637
3715
  const totalCount = todos.length;
3638
3716
  const hasInProgress = todos.some((item) => item.status === "in_progress");
3639
3717
  const percent = Math.round(completedCount / totalCount * 100);
3640
- return /* @__PURE__ */ jsx26(
3718
+ return /* @__PURE__ */ jsx27(
3641
3719
  Popover,
3642
3720
  {
3643
- content: /* @__PURE__ */ jsx26("div", { style: { width: 400 }, children: /* @__PURE__ */ jsx26(Todo, { data: todos, component_key: "header_todos" }) }),
3721
+ content: /* @__PURE__ */ jsx27("div", { style: { width: 400 }, children: /* @__PURE__ */ jsx27(Todo, { data: todos, component_key: "header_todos" }) }),
3644
3722
  title: "Todos",
3645
3723
  trigger: "click",
3646
3724
  placement: "bottomRight",
3647
- children: /* @__PURE__ */ jsx26(Tooltip2, { title: `${completedCount} / ${totalCount} tasks completed`, children: /* @__PURE__ */ jsx26("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ jsx26(
3725
+ children: /* @__PURE__ */ jsx27(Tooltip2, { title: `${completedCount} / ${totalCount} tasks completed`, children: /* @__PURE__ */ jsx27("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ jsx27(
3648
3726
  Progress,
3649
3727
  {
3650
3728
  type: "circle",
@@ -3655,7 +3733,7 @@ var TodoProgress = ({}) => {
3655
3733
  percent,
3656
3734
  status: hasInProgress ? "active" : "normal",
3657
3735
  width: 30,
3658
- format: () => /* @__PURE__ */ jsx26(
3736
+ format: () => /* @__PURE__ */ jsx27(
3659
3737
  "div",
3660
3738
  {
3661
3739
  style: {
@@ -3678,9 +3756,9 @@ var TodoProgress = ({}) => {
3678
3756
  };
3679
3757
 
3680
3758
  // src/components/Chat/FileExplorerButton.tsx
3681
- import { Tooltip as Tooltip3, Badge, Button as Button9 } from "antd";
3759
+ import { Tooltip as Tooltip3, Badge, Button as Button10 } from "antd";
3682
3760
  import { FileTextOutlined as FileTextOutlined4 } from "@ant-design/icons";
3683
- import { jsx as jsx27 } from "react/jsx-runtime";
3761
+ import { jsx as jsx28 } from "react/jsx-runtime";
3684
3762
  var FileExplorerButton = ({}) => {
3685
3763
  const { agentState } = useAgentChat();
3686
3764
  const { openSideApp } = useChatUIContext();
@@ -3689,11 +3767,11 @@ var FileExplorerButton = ({}) => {
3689
3767
  return null;
3690
3768
  }
3691
3769
  const fileCount = Object.keys(files).length;
3692
- return /* @__PURE__ */ jsx27(Tooltip3, { title: "File Explorer", children: /* @__PURE__ */ jsx27(Badge, { count: fileCount, size: "small", color: "blue", children: /* @__PURE__ */ jsx27(
3693
- Button9,
3770
+ return /* @__PURE__ */ jsx28(Tooltip3, { title: "File Explorer", children: /* @__PURE__ */ jsx28(Badge, { count: fileCount, size: "small", color: "blue", children: /* @__PURE__ */ jsx28(
3771
+ Button10,
3694
3772
  {
3695
3773
  type: "text",
3696
- icon: /* @__PURE__ */ jsx27(FileTextOutlined4, {}),
3774
+ icon: /* @__PURE__ */ jsx28(FileTextOutlined4, {}),
3697
3775
  onClick: () => openSideApp({
3698
3776
  component_key: "file_explorer",
3699
3777
  message: "File Explorer",
@@ -3706,7 +3784,7 @@ var FileExplorerButton = ({}) => {
3706
3784
  // src/components/Chat/AgentHeader.tsx
3707
3785
  import { Welcome } from "@ant-design/x";
3708
3786
  import { useMemo as useMemo4 } from "react";
3709
- import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
3787
+ import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
3710
3788
  var { Text: Text10 } = Typography12;
3711
3789
  var AgentHeader = (props) => {
3712
3790
  const { description, avatar, name, extra, extraMeta } = props;
@@ -3719,7 +3797,7 @@ var AgentHeader = (props) => {
3719
3797
  try {
3720
3798
  } catch (error) {
3721
3799
  }
3722
- return /* @__PURE__ */ jsx28(
3800
+ return /* @__PURE__ */ jsx29(
3723
3801
  Element,
3724
3802
  {
3725
3803
  component_key: meta.id,
@@ -3733,23 +3811,23 @@ var AgentHeader = (props) => {
3733
3811
  return void 0;
3734
3812
  }, [extraMeta]);
3735
3813
  return /* @__PURE__ */ jsxs16("div", { children: [
3736
- /* @__PURE__ */ jsx28(
3814
+ /* @__PURE__ */ jsx29(
3737
3815
  Welcome,
3738
3816
  {
3739
3817
  style: { padding: 8 },
3740
3818
  variant: "borderless",
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() }),
3819
+ description: description ? /* @__PURE__ */ jsx29(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
3820
+ icon: avatar ? /* @__PURE__ */ jsx29(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx29(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() }),
3743
3821
  title: name ? name : void 0,
3744
3822
  extra: /* @__PURE__ */ jsxs16(Space12, { children: [
3745
3823
  extra,
3746
- /* @__PURE__ */ jsx28(TodoProgress, {}),
3747
- /* @__PURE__ */ jsx28(FileExplorerButton, {}),
3748
- extraMetaComponents && /* @__PURE__ */ jsx28(Space12, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3824
+ /* @__PURE__ */ jsx29(TodoProgress, {}),
3825
+ /* @__PURE__ */ jsx29(FileExplorerButton, {}),
3826
+ extraMetaComponents && /* @__PURE__ */ jsx29(Space12, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3749
3827
  ] })
3750
3828
  }
3751
3829
  ),
3752
- /* @__PURE__ */ jsx28(
3830
+ /* @__PURE__ */ jsx29(
3753
3831
  "div",
3754
3832
  {
3755
3833
  style: {
@@ -3761,7 +3839,7 @@ var AgentHeader = (props) => {
3761
3839
  };
3762
3840
 
3763
3841
  // src/components/Chat/Chating.tsx
3764
- import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
3842
+ import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
3765
3843
  var Chating = ({
3766
3844
  avatar,
3767
3845
  name,
@@ -3777,10 +3855,10 @@ var Chating = ({
3777
3855
  showHITL = true,
3778
3856
  showRefreshButton = false
3779
3857
  }) => {
3780
- const [content, setContent] = useState15("");
3781
- const [attachedFiles, setAttachedFiles] = useState15([]);
3858
+ const [content, setContent] = useState16("");
3859
+ const [attachedFiles, setAttachedFiles] = useState16([]);
3782
3860
  const { styles } = useStyle();
3783
- const [headerOpen, setHeaderOpen] = useState15(false);
3861
+ const [headerOpen, setHeaderOpen] = useState16(false);
3784
3862
  const attachmentsRef = useRef8(null);
3785
3863
  const senderRef = React6.useRef(null);
3786
3864
  const {
@@ -3879,15 +3957,15 @@ var Chating = ({
3879
3957
  }
3880
3958
  return true;
3881
3959
  };
3882
- const attachmentsNode = /* @__PURE__ */ jsx29(Badge2, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx29(
3883
- Button10,
3960
+ const attachmentsNode = /* @__PURE__ */ jsx30(Badge2, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx30(
3961
+ Button11,
3884
3962
  {
3885
3963
  type: "text",
3886
- icon: /* @__PURE__ */ jsx29(PaperClipOutlined, {}),
3964
+ icon: /* @__PURE__ */ jsx30(PaperClipOutlined, {}),
3887
3965
  onClick: () => setHeaderOpen(!headerOpen)
3888
3966
  }
3889
3967
  ) });
3890
- const senderHeader = /* @__PURE__ */ jsx29(
3968
+ const senderHeader = /* @__PURE__ */ jsx30(
3891
3969
  Sender.Header,
3892
3970
  {
3893
3971
  title: "Attachments",
@@ -3899,7 +3977,7 @@ var Chating = ({
3899
3977
  }
3900
3978
  },
3901
3979
  forceRender: true,
3902
- children: /* @__PURE__ */ jsx29(
3980
+ children: /* @__PURE__ */ jsx30(
3903
3981
  Attachments,
3904
3982
  {
3905
3983
  ref: attachmentsRef,
@@ -3921,7 +3999,7 @@ var Chating = ({
3921
3999
  multiple: true,
3922
4000
  maxCount: 10,
3923
4001
  placeholder: (type) => ({
3924
- icon: /* @__PURE__ */ jsx29(CloudUploadOutlined, {}),
4002
+ icon: /* @__PURE__ */ jsx30(CloudUploadOutlined, {}),
3925
4003
  title: "\u4E0A\u4F20\u6587\u4EF6",
3926
4004
  description: attachment_placeholder
3927
4005
  })
@@ -3929,11 +4007,11 @@ var Chating = ({
3929
4007
  )
3930
4008
  }
3931
4009
  );
3932
- const refreshButton = /* @__PURE__ */ jsx29(
3933
- Button10,
4010
+ const refreshButton = /* @__PURE__ */ jsx30(
4011
+ Button11,
3934
4012
  {
3935
4013
  type: "text",
3936
- icon: /* @__PURE__ */ jsx29(ReloadOutlined, {}),
4014
+ icon: /* @__PURE__ */ jsx30(ReloadOutlined, {}),
3937
4015
  onClick: () => {
3938
4016
  loadMessages();
3939
4017
  }
@@ -3941,7 +4019,7 @@ var Chating = ({
3941
4019
  );
3942
4020
  const headerExtra = showRefreshButton ? [refreshButton] : [];
3943
4021
  return /* @__PURE__ */ jsxs17(Fragment4, { children: [
3944
- /* @__PURE__ */ jsx29("div", { children: showHeader && /* @__PURE__ */ jsx29(
4022
+ /* @__PURE__ */ jsx30("div", { children: showHeader && /* @__PURE__ */ jsx30(
3945
4023
  AgentHeader,
3946
4024
  {
3947
4025
  description,
@@ -3951,9 +4029,9 @@ var Chating = ({
3951
4029
  extraMeta
3952
4030
  }
3953
4031
  ) }),
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(
4032
+ /* @__PURE__ */ jsx30(MessageList, { messages, className: styles.messages }),
4033
+ isLoading ? /* @__PURE__ */ jsx30("div", {}) : /* @__PURE__ */ jsx30(Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
4034
+ error && /* @__PURE__ */ jsx30("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ jsx30(
3957
4035
  Alert2,
3958
4036
  {
3959
4037
  type: "error",
@@ -3963,8 +4041,8 @@ var Chating = ({
3963
4041
  message: `${error.message}`
3964
4042
  }
3965
4043
  ) }),
3966
- showHITL && /* @__PURE__ */ jsx29(HITLContainer, {}),
3967
- showSender && /* @__PURE__ */ jsx29(
4044
+ showHITL && /* @__PURE__ */ jsx30(HITLContainer, {}),
4045
+ showSender && /* @__PURE__ */ jsx30(
3968
4046
  Sender,
3969
4047
  {
3970
4048
  disabled: interrupts && interrupts.length > 0,
@@ -3990,11 +4068,11 @@ var Chating = ({
3990
4068
  };
3991
4069
 
3992
4070
  // src/components/GenUI/elements/task_detail.tsx
3993
- import { jsx as jsx30 } from "react/jsx-runtime";
4071
+ import { jsx as jsx31 } from "react/jsx-runtime";
3994
4072
  var { Text: Text11 } = Typography13;
3995
4073
  var TaskDetail = ({ data, component_key, interactive = true }) => {
3996
4074
  const { description, subagent_type, thread_id } = data || {};
3997
- return /* @__PURE__ */ jsx30(
4075
+ return /* @__PURE__ */ jsx31(
3998
4076
  AgentThreadProvider,
3999
4077
  {
4000
4078
  threadId: thread_id,
@@ -4004,7 +4082,7 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
4004
4082
  enableReturnStateWhenStreamCompleted: true,
4005
4083
  enableResumeStream: true
4006
4084
  },
4007
- children: /* @__PURE__ */ jsx30("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx30(
4085
+ children: /* @__PURE__ */ jsx31("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx31(
4008
4086
  Chating,
4009
4087
  {
4010
4088
  showRefreshButton: true,
@@ -4018,6 +4096,172 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
4018
4096
  );
4019
4097
  };
4020
4098
 
4099
+ // src/components/GenUI/elements/internet_search_card.tsx
4100
+ import { Avatar as Avatar3, Button as Button12, List as List2, Space as Space13, Typography as Typography14 } from "antd";
4101
+ import {
4102
+ SearchOutlined
4103
+ } from "@ant-design/icons";
4104
+ import { createStyles as createStyles9 } from "antd-style";
4105
+ import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
4106
+ var { Text: Text12 } = Typography14;
4107
+ var useStyle7 = createStyles9(({ token, css }) => ({
4108
+ listContainer: css`
4109
+ background: ${token.colorBgContainer};
4110
+ border-radius: ${token.borderRadius}px;
4111
+ padding: 8px 0;
4112
+ `,
4113
+ listItem: css`
4114
+ padding: 12px 16px;
4115
+ border-bottom: 1px solid ${token.colorBorderSecondary};
4116
+ transition: background-color 0.2s ease;
4117
+ cursor: pointer;
4118
+
4119
+ &:hover {
4120
+ background: ${token.colorFillTertiary};
4121
+ }
4122
+
4123
+ &:last-child {
4124
+ border-bottom: none;
4125
+ }
4126
+ `,
4127
+ itemContent: css`
4128
+ display: flex;
4129
+ align-items: center;
4130
+ gap: 12px;
4131
+ width: 100%;
4132
+ `,
4133
+ iconWrapper: css`
4134
+ width: 32px;
4135
+ height: 32px;
4136
+ border-radius: 50%;
4137
+ display: flex;
4138
+ align-items: center;
4139
+ justify-content: center;
4140
+ flex-shrink: 0;
4141
+ background: ${token.colorPrimary};
4142
+ color: white;
4143
+ font-size: 14px;
4144
+ font-weight: 600;
4145
+ `,
4146
+ titleWrapper: css`
4147
+ flex: 1;
4148
+ min-width: 0;
4149
+ `,
4150
+ title: css`
4151
+ color: ${token.colorText};
4152
+ font-size: ${token.fontSize}px;
4153
+ line-height: 1.5;
4154
+ margin: 0;
4155
+ overflow: hidden;
4156
+ text-overflow: ellipsis;
4157
+ white-space: nowrap;
4158
+ `,
4159
+ source: css`
4160
+ color: ${token.colorTextSecondary};
4161
+ font-size: ${token.fontSizeSM}px;
4162
+ margin: 0;
4163
+ flex-shrink: 0;
4164
+ margin-left: 16px;
4165
+ `
4166
+ }));
4167
+ var getDomainFromUrl = (url) => {
4168
+ try {
4169
+ const urlObj = new URL(url);
4170
+ return urlObj.hostname.replace(/^www\./, "");
4171
+ } catch {
4172
+ return url;
4173
+ }
4174
+ };
4175
+ var getIconText = (domain) => {
4176
+ if (!domain) return "?";
4177
+ const parts = domain.split(".");
4178
+ if (parts.length >= 2) {
4179
+ const mainPart = parts[parts.length - 2];
4180
+ return mainPart.substring(0, 2).toUpperCase();
4181
+ }
4182
+ return domain.substring(0, 2).toUpperCase();
4183
+ };
4184
+ var getIconColor = (domain) => {
4185
+ const colors = [
4186
+ "#1890ff",
4187
+ // blue
4188
+ "#52c41a",
4189
+ // green
4190
+ "#fa8c16",
4191
+ // orange
4192
+ "#eb2f96",
4193
+ // pink
4194
+ "#722ed1",
4195
+ // purple
4196
+ "#13c2c2",
4197
+ // cyan
4198
+ "#f5222d"
4199
+ // red
4200
+ ];
4201
+ let hash = 0;
4202
+ for (let i = 0; i < domain.length; i++) {
4203
+ hash = domain.charCodeAt(i) + ((hash << 5) - hash);
4204
+ }
4205
+ return colors[Math.abs(hash) % colors.length];
4206
+ };
4207
+ var InternetSearchCard = ({
4208
+ data,
4209
+ component_key,
4210
+ interactive = true
4211
+ }) => {
4212
+ const { styles } = useStyle7();
4213
+ const toolCallData = data;
4214
+ const { query } = toolCallData?.args || {};
4215
+ const dataSource = JSON.parse(toolCallData.response || "[]");
4216
+ const { openSideApp } = useChatUIContext();
4217
+ if (!toolCallData) {
4218
+ return null;
4219
+ }
4220
+ const header = /* @__PURE__ */ jsxs18(Space13, { children: [
4221
+ /* @__PURE__ */ jsx32(Text12, { strong: true, children: "Internet Search" }),
4222
+ /* @__PURE__ */ jsx32(Text12, { title: query, children: query })
4223
+ ] });
4224
+ return /* @__PURE__ */ jsx32(
4225
+ ContentPreviewCollapse,
4226
+ {
4227
+ panelKey: toolCallData.id,
4228
+ header,
4229
+ expandIcon: () => /* @__PURE__ */ jsx32(SearchOutlined, {}),
4230
+ children: /* @__PURE__ */ jsx32(
4231
+ List2,
4232
+ {
4233
+ size: "small",
4234
+ dataSource,
4235
+ renderItem: (item) => {
4236
+ const url = item.url || "";
4237
+ const domain = getDomainFromUrl(url);
4238
+ const iconText = getIconText(domain);
4239
+ const iconColor = getIconColor(domain);
4240
+ return /* @__PURE__ */ jsx32(List2.Item, { extra: /* @__PURE__ */ jsx32(Text12, { className: styles.source, children: domain }), children: /* @__PURE__ */ jsxs18(Space13, { style: { width: "100%" }, children: [
4241
+ /* @__PURE__ */ jsx32(Avatar3, { style: { background: iconColor }, children: iconText }),
4242
+ " ",
4243
+ /* @__PURE__ */ jsx32(
4244
+ Button12,
4245
+ {
4246
+ type: "text",
4247
+ onClick: () => {
4248
+ openSideApp({
4249
+ component_key: "attachments",
4250
+ data: { url, message: item.title },
4251
+ message: item.title
4252
+ });
4253
+ },
4254
+ children: item.title
4255
+ }
4256
+ )
4257
+ ] }) });
4258
+ }
4259
+ }
4260
+ )
4261
+ }
4262
+ );
4263
+ };
4264
+
4021
4265
  // src/components/GenUI/elements/builtIns.tsx
4022
4266
  var elements = {
4023
4267
  action_show_attachments_uploader: {
@@ -4045,6 +4289,9 @@ var elements = {
4045
4289
  write_todos: {
4046
4290
  card_view: WriteTodos
4047
4291
  },
4292
+ internet_search: {
4293
+ card_view: InternetSearchCard
4294
+ },
4048
4295
  write_file: {
4049
4296
  card_view: WriteFile
4050
4297
  },
@@ -4083,11 +4330,11 @@ var regsiterElement = (language, ElementMeta) => {
4083
4330
  };
4084
4331
 
4085
4332
  // src/components/Chat/SideAppViewBrowser.tsx
4086
- import { Button as Button11, Tabs } from "antd";
4087
- import { createStyles as createStyles9 } from "antd-style";
4088
- import { useEffect as useEffect11, useState as useState16 } from "react";
4089
- import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
4090
- var useStyle7 = createStyles9(({ token, css }) => {
4333
+ import { Button as Button13, Tabs } from "antd";
4334
+ import { createStyles as createStyles10 } from "antd-style";
4335
+ import { useEffect as useEffect11, useState as useState17 } from "react";
4336
+ import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
4337
+ var useStyle8 = createStyles10(({ token, css }) => {
4091
4338
  return {
4092
4339
  tabContainer: css`
4093
4340
  .ant-tabs-content-holder {
@@ -4106,13 +4353,13 @@ var useStyle7 = createStyles9(({ token, css }) => {
4106
4353
  };
4107
4354
  });
4108
4355
  var EmptySideAppView = ({ component_key, data }) => {
4109
- return /* @__PURE__ */ jsxs18("div", { children: [
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) })
4356
+ return /* @__PURE__ */ jsxs19("div", { children: [
4357
+ /* @__PURE__ */ jsx33("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
4358
+ /* @__PURE__ */ jsx33("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
4112
4359
  ] });
4113
4360
  };
4114
4361
  var SideAppViewBrowser = () => {
4115
- const { styles } = useStyle7();
4362
+ const { styles } = useStyle8();
4116
4363
  const {
4117
4364
  sideAppSize,
4118
4365
  sideAppSelectedCard,
@@ -4120,10 +4367,10 @@ var SideAppViewBrowser = () => {
4120
4367
  openSideApp,
4121
4368
  closeSideApp
4122
4369
  } = useChatUIContext();
4123
- const [activeKey, setActiveKey] = useState16(
4370
+ const [activeKey, setActiveKey] = useState17(
4124
4371
  JSON.stringify(sideAppSelectedCard)
4125
4372
  );
4126
- const [items, setItems] = useState16([]);
4373
+ const [items, setItems] = useState17([]);
4127
4374
  const add = (key, label, children) => {
4128
4375
  const newActiveKey = key;
4129
4376
  const newPanes = [...items];
@@ -4169,7 +4416,7 @@ var SideAppViewBrowser = () => {
4169
4416
  add(
4170
4417
  key,
4171
4418
  sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
4172
- /* @__PURE__ */ jsx31(
4419
+ /* @__PURE__ */ jsx33(
4173
4420
  SideAppView,
4174
4421
  {
4175
4422
  component_key: sideAppSelectedCard?.component_key || "",
@@ -4210,16 +4457,16 @@ var SideAppViewBrowser = () => {
4210
4457
  const getSizeIcon = (size) => {
4211
4458
  switch (size) {
4212
4459
  case "middle":
4213
- return /* @__PURE__ */ jsx31(CompressOutlined, {});
4460
+ return /* @__PURE__ */ jsx33(CompressOutlined, {});
4214
4461
  case "large":
4215
- return /* @__PURE__ */ jsx31(ExpandOutlined, {});
4462
+ return /* @__PURE__ */ jsx33(ExpandOutlined, {});
4216
4463
  case "full":
4217
- return /* @__PURE__ */ jsx31(FullscreenOutlined, {});
4464
+ return /* @__PURE__ */ jsx33(FullscreenOutlined, {});
4218
4465
  default:
4219
- return /* @__PURE__ */ jsx31(ExpandOutlined, {});
4466
+ return /* @__PURE__ */ jsx33(ExpandOutlined, {});
4220
4467
  }
4221
4468
  };
4222
- return /* @__PURE__ */ jsx31(
4469
+ return /* @__PURE__ */ jsx33(
4223
4470
  Tabs,
4224
4471
  {
4225
4472
  className: styles.tabContainer,
@@ -4227,9 +4474,9 @@ var SideAppViewBrowser = () => {
4227
4474
  style: { height: "100%" },
4228
4475
  hideAdd: true,
4229
4476
  tabBarExtraContent: {
4230
- right: /* @__PURE__ */ jsxs18("div", { style: { display: "flex", gap: "4px" }, children: [
4231
- /* @__PURE__ */ jsx31(
4232
- Button11,
4477
+ right: /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "4px" }, children: [
4478
+ /* @__PURE__ */ jsx33(
4479
+ Button13,
4233
4480
  {
4234
4481
  style: { margin: "8px 0" },
4235
4482
  size: "large",
@@ -4239,13 +4486,13 @@ var SideAppViewBrowser = () => {
4239
4486
  title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
4240
4487
  }
4241
4488
  ),
4242
- /* @__PURE__ */ jsx31(
4243
- Button11,
4489
+ /* @__PURE__ */ jsx33(
4490
+ Button13,
4244
4491
  {
4245
4492
  style: { margin: "8px 0" },
4246
4493
  size: "large",
4247
4494
  type: "text",
4248
- icon: /* @__PURE__ */ jsx31(CloseOutlined, {}),
4495
+ icon: /* @__PURE__ */ jsx33(CloseOutlined, {}),
4249
4496
  onClick: () => {
4250
4497
  closeSideApp();
4251
4498
  }
@@ -4262,10 +4509,10 @@ var SideAppViewBrowser = () => {
4262
4509
  };
4263
4510
 
4264
4511
  // src/components/Chat/LatticeChat.tsx
4265
- import { jsx as jsx32 } from "react/jsx-runtime";
4512
+ import { jsx as jsx34 } from "react/jsx-runtime";
4266
4513
  var LatticeChat = (props) => {
4267
4514
  const { assistant_id, thread_id = "", menu, ...chatingProps } = props;
4268
- return /* @__PURE__ */ jsx32(
4515
+ return /* @__PURE__ */ jsx34(
4269
4516
  AgentThreadProvider,
4270
4517
  {
4271
4518
  assistantId: assistant_id,
@@ -4275,12 +4522,12 @@ var LatticeChat = (props) => {
4275
4522
  enableReturnStateWhenStreamCompleted: true,
4276
4523
  enableResumeStream: true
4277
4524
  },
4278
- children: /* @__PURE__ */ jsx32(ChatUIContextProvider, { children: /* @__PURE__ */ jsx32(
4525
+ children: /* @__PURE__ */ jsx34(ChatUIContextProvider, { children: /* @__PURE__ */ jsx34(
4279
4526
  ColumnLayout,
4280
4527
  {
4281
4528
  menu,
4282
- left: thread_id ? /* @__PURE__ */ jsx32(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx32("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4283
- right: /* @__PURE__ */ jsx32(SideAppViewBrowser, {})
4529
+ left: thread_id ? /* @__PURE__ */ jsx34(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx34("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4530
+ right: /* @__PURE__ */ jsx34(SideAppViewBrowser, {})
4284
4531
  }
4285
4532
  ) })
4286
4533
  }
@@ -4295,7 +4542,7 @@ import {
4295
4542
  useEffect as useEffect13,
4296
4543
  useMemo as useMemo6,
4297
4544
  useRef as useRef10,
4298
- useState as useState19
4545
+ useState as useState20
4299
4546
  } from "react";
4300
4547
 
4301
4548
  // src/components/Chat/AssistantContext.tsx
@@ -4306,7 +4553,7 @@ import {
4306
4553
  useEffect as useEffect12,
4307
4554
  useMemo as useMemo5,
4308
4555
  useRef as useRef9,
4309
- useState as useState18
4556
+ useState as useState19
4310
4557
  } from "react";
4311
4558
  import {
4312
4559
  Client as Client2
@@ -4317,9 +4564,9 @@ import {
4317
4564
  createContext as createContext4,
4318
4565
  useCallback as useCallback8,
4319
4566
  useContext as useContext4,
4320
- useState as useState17
4567
+ useState as useState18
4321
4568
  } from "react";
4322
- import { jsx as jsx33 } from "react/jsx-runtime";
4569
+ import { jsx as jsx35 } from "react/jsx-runtime";
4323
4570
  var DEFAULT_CONFIG = {
4324
4571
  baseURL: "http://localhost:4001",
4325
4572
  apiKey: "",
@@ -4359,8 +4606,8 @@ var LatticeChatShellContextProvider = ({
4359
4606
  }
4360
4607
  return { ...DEFAULT_CONFIG, ...initialConfig };
4361
4608
  }, [persistToLocalStorage, localStorageKey, initialConfig]);
4362
- const [config, setConfig] = useState17(loadInitialConfig);
4363
- const [settingsModalOpen, setSettingsModalOpen] = useState17(false);
4609
+ const [config, setConfig] = useState18(loadInitialConfig);
4610
+ const [settingsModalOpen, setSettingsModalOpen] = useState18(false);
4364
4611
  const saveToLocalStorage = useCallback8(
4365
4612
  (newConfig) => {
4366
4613
  if (persistToLocalStorage && typeof window !== "undefined") {
@@ -4398,7 +4645,7 @@ var LatticeChatShellContextProvider = ({
4398
4645
  setConfig(defaultConfig);
4399
4646
  saveToLocalStorage(defaultConfig);
4400
4647
  }, [initialConfig, saveToLocalStorage]);
4401
- return /* @__PURE__ */ jsx33(
4648
+ return /* @__PURE__ */ jsx35(
4402
4649
  LatticeChatShellContext.Provider,
4403
4650
  {
4404
4651
  value: {
@@ -4424,7 +4671,7 @@ var useLatticeChatShellContext = () => {
4424
4671
  };
4425
4672
 
4426
4673
  // src/components/Chat/AssistantContext.tsx
4427
- import { jsx as jsx34 } from "react/jsx-runtime";
4674
+ import { jsx as jsx36 } from "react/jsx-runtime";
4428
4675
  var AssistantContext = createContext5({
4429
4676
  assistants: [],
4430
4677
  currentAssistant: null,
@@ -4467,7 +4714,7 @@ var AssistantContextProvider = ({
4467
4714
  }),
4468
4715
  [baseURL, apiKey, transport]
4469
4716
  );
4470
- const [state, setState] = useState18({
4717
+ const [state, setState] = useState19({
4471
4718
  assistants: [],
4472
4719
  currentAssistant: null,
4473
4720
  isLoading: false,
@@ -4659,7 +4906,7 @@ var AssistantContextProvider = ({
4659
4906
  }
4660
4907
  }
4661
4908
  }, [initialAssistantId, state.assistants, state.currentAssistant]);
4662
- return /* @__PURE__ */ jsx34(
4909
+ return /* @__PURE__ */ jsx36(
4663
4910
  AssistantContext.Provider,
4664
4911
  {
4665
4912
  value: {
@@ -4689,7 +4936,7 @@ var useAssistantContext = () => {
4689
4936
 
4690
4937
  // src/components/Chat/ConversationContext.tsx
4691
4938
  import { Client as Client3 } from "@axiom-lattice/client-sdk";
4692
- import { jsx as jsx35 } from "react/jsx-runtime";
4939
+ import { jsx as jsx37 } from "react/jsx-runtime";
4693
4940
  var ConversationContext = createContext6({
4694
4941
  assistantId: null,
4695
4942
  thread: null,
@@ -4741,10 +4988,10 @@ var ConversationContextProvider = ({
4741
4988
  }),
4742
4989
  [baseURL, apiKey, assistantId, transport]
4743
4990
  );
4744
- const [threads, setThreads] = useState19([]);
4745
- const [threadId, setThreadId] = useState19(null);
4746
- const [isLoading, setIsLoading] = useState19(false);
4747
- const [error, setError] = useState19(null);
4991
+ const [threads, setThreads] = useState20([]);
4992
+ const [threadId, setThreadId] = useState20(null);
4993
+ const [isLoading, setIsLoading] = useState20(false);
4994
+ const [error, setError] = useState20(null);
4748
4995
  const loadedAssistantIdRef = useRef10(null);
4749
4996
  const prevAssistantIdRef = useRef10(null);
4750
4997
  const isLoadingRef = useRef10(false);
@@ -4952,7 +5199,7 @@ var ConversationContextProvider = ({
4952
5199
  const clearThread = useCallback10(() => {
4953
5200
  setThreadId(null);
4954
5201
  }, []);
4955
- return /* @__PURE__ */ jsx35(
5202
+ return /* @__PURE__ */ jsx37(
4956
5203
  ConversationContext.Provider,
4957
5204
  {
4958
5205
  value: {
@@ -4990,7 +5237,7 @@ var useConversationContext = () => {
4990
5237
  import { Conversations } from "@ant-design/x";
4991
5238
  import { theme } from "antd";
4992
5239
  import { useMemo as useMemo7 } from "react";
4993
- import { jsx as jsx36 } from "react/jsx-runtime";
5240
+ import { jsx as jsx38 } from "react/jsx-runtime";
4994
5241
  var AgentConversations = () => {
4995
5242
  const { token } = theme.useToken();
4996
5243
  const { currentAssistant } = useAssistantContext();
@@ -5020,7 +5267,7 @@ var AgentConversations = () => {
5020
5267
  }
5021
5268
  await createThread();
5022
5269
  };
5023
- return /* @__PURE__ */ jsx36(
5270
+ return /* @__PURE__ */ jsx38(
5024
5271
  Conversations,
5025
5272
  {
5026
5273
  creation: {
@@ -5038,7 +5285,7 @@ var AgentConversations = () => {
5038
5285
  };
5039
5286
 
5040
5287
  // src/components/Chat/ChatSidebar.tsx
5041
- import { useState as useState20 } from "react";
5288
+ import { useState as useState21 } from "react";
5042
5289
  import { Divider as Divider2 } from "antd";
5043
5290
  import {
5044
5291
  MenuFoldOutlined,
@@ -5048,8 +5295,8 @@ import {
5048
5295
 
5049
5296
  // src/components/Chat/AssistantList.tsx
5050
5297
  import { Conversations as Conversations2 } from "@ant-design/x";
5051
- import { Avatar as Avatar3, theme as theme2 } from "antd";
5052
- import { jsx as jsx37 } from "react/jsx-runtime";
5298
+ import { Avatar as Avatar4, theme as theme2 } from "antd";
5299
+ import { jsx as jsx39 } from "react/jsx-runtime";
5053
5300
  var AssistantList = () => {
5054
5301
  const { token } = theme2.useToken();
5055
5302
  const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
@@ -5061,8 +5308,8 @@ var AssistantList = () => {
5061
5308
  const items = assistants.map((assistant) => ({
5062
5309
  key: assistant.id,
5063
5310
  label: assistant.name,
5064
- icon: /* @__PURE__ */ jsx37(
5065
- Avatar3,
5311
+ icon: /* @__PURE__ */ jsx39(
5312
+ Avatar4,
5066
5313
  {
5067
5314
  size: "small",
5068
5315
  style: {
@@ -5073,7 +5320,7 @@ var AssistantList = () => {
5073
5320
  }
5074
5321
  )
5075
5322
  }));
5076
- return /* @__PURE__ */ jsx37(
5323
+ return /* @__PURE__ */ jsx39(
5077
5324
  Conversations2,
5078
5325
  {
5079
5326
  items,
@@ -5087,9 +5334,9 @@ var AssistantList = () => {
5087
5334
  };
5088
5335
 
5089
5336
  // src/components/Chat/ChatSidebar.tsx
5090
- import { createStyles as createStyles10 } from "antd-style";
5091
- import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
5092
- var useStyles3 = createStyles10(({ token, css }) => ({
5337
+ import { createStyles as createStyles11 } from "antd-style";
5338
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
5339
+ var useStyles3 = createStyles11(({ token, css }) => ({
5093
5340
  sidebar: css`
5094
5341
  display: flex;
5095
5342
  flex-direction: column;
@@ -5266,7 +5513,7 @@ var ChatSidebar = ({
5266
5513
  const { styles } = useStyles3();
5267
5514
  const { setMenuCollapsed, menuCollapsed, sideAppVisible } = useChatUIContext();
5268
5515
  const { setSettingsModalOpen } = useLatticeChatShellContext();
5269
- const [isHovered, setIsHovered] = useState20(false);
5516
+ const [isHovered, setIsHovered] = useState21(false);
5270
5517
  const handleToggleCollapse = () => {
5271
5518
  setMenuCollapsed(!menuCollapsed);
5272
5519
  };
@@ -5283,87 +5530,87 @@ var ChatSidebar = ({
5283
5530
  const handleMouseLeave = () => {
5284
5531
  setIsHovered(false);
5285
5532
  };
5286
- return /* @__PURE__ */ jsxs19(Fragment5, { children: [
5287
- /* @__PURE__ */ jsx38(
5533
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
5534
+ /* @__PURE__ */ jsx40(
5288
5535
  "div",
5289
5536
  {
5290
5537
  className: styles.sidebar,
5291
5538
  onMouseEnter: handleMouseEnter,
5292
5539
  onMouseLeave: handleMouseLeave,
5293
- children: !isCollapsed && /* @__PURE__ */ jsxs19(Fragment5, { children: [
5294
- /* @__PURE__ */ jsxs19("div", { className: styles.content, children: [
5295
- /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5296
- /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Assistants" }),
5297
- /* @__PURE__ */ jsx38(AssistantList, {})
5540
+ children: !isCollapsed && /* @__PURE__ */ jsxs20(Fragment5, { children: [
5541
+ /* @__PURE__ */ jsxs20("div", { className: styles.content, children: [
5542
+ /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5543
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Assistants" }),
5544
+ /* @__PURE__ */ jsx40(AssistantList, {})
5298
5545
  ] }),
5299
- /* @__PURE__ */ jsx38(Divider2, { className: styles.divider }),
5300
- /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5301
- /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Threads" }),
5302
- /* @__PURE__ */ jsx38(AgentConversations, {})
5546
+ /* @__PURE__ */ jsx40(Divider2, { className: styles.divider }),
5547
+ /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5548
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Threads" }),
5549
+ /* @__PURE__ */ jsx40(AgentConversations, {})
5303
5550
  ] })
5304
5551
  ] }),
5305
- /* @__PURE__ */ jsxs19("div", { className: styles.footer, children: [
5306
- /* @__PURE__ */ jsx38(
5552
+ /* @__PURE__ */ jsxs20("div", { className: styles.footer, children: [
5553
+ /* @__PURE__ */ jsx40(
5307
5554
  "button",
5308
5555
  {
5309
5556
  className: styles.actionButton,
5310
5557
  onClick: handleToggleCollapse,
5311
5558
  title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5312
5559
  "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5313
- children: isCollapsed ? /* @__PURE__ */ jsx38(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx38(MenuFoldOutlined, {})
5560
+ children: isCollapsed ? /* @__PURE__ */ jsx40(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx40(MenuFoldOutlined, {})
5314
5561
  }
5315
5562
  ),
5316
- /* @__PURE__ */ jsx38(
5563
+ /* @__PURE__ */ jsx40(
5317
5564
  "button",
5318
5565
  {
5319
5566
  className: styles.actionButton,
5320
5567
  onClick: handleSettingsClick,
5321
5568
  title: "Settings",
5322
5569
  "aria-label": "Settings",
5323
- children: /* @__PURE__ */ jsx38(SettingOutlined, {})
5570
+ children: /* @__PURE__ */ jsx40(SettingOutlined, {})
5324
5571
  }
5325
5572
  )
5326
5573
  ] })
5327
5574
  ] })
5328
5575
  }
5329
5576
  ),
5330
- isCollapsed && /* @__PURE__ */ jsxs19(
5577
+ isCollapsed && /* @__PURE__ */ jsxs20(
5331
5578
  "div",
5332
5579
  {
5333
5580
  className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
5334
5581
  onMouseEnter: handleMouseEnter,
5335
5582
  onMouseLeave: handleMouseLeave,
5336
5583
  children: [
5337
- /* @__PURE__ */ jsxs19("div", { className: styles.hoverContent, children: [
5338
- /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5339
- /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Assistants" }),
5340
- /* @__PURE__ */ jsx38(AssistantList, {})
5584
+ /* @__PURE__ */ jsxs20("div", { className: styles.hoverContent, children: [
5585
+ /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5586
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Assistants" }),
5587
+ /* @__PURE__ */ jsx40(AssistantList, {})
5341
5588
  ] }),
5342
- /* @__PURE__ */ jsx38(Divider2, { className: styles.divider }),
5343
- /* @__PURE__ */ jsxs19("div", { className: styles.section, children: [
5344
- /* @__PURE__ */ jsx38("div", { className: styles.sectionTitle, children: "Threads" }),
5345
- /* @__PURE__ */ jsx38(AgentConversations, {})
5589
+ /* @__PURE__ */ jsx40(Divider2, { className: styles.divider }),
5590
+ /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5591
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Threads" }),
5592
+ /* @__PURE__ */ jsx40(AgentConversations, {})
5346
5593
  ] })
5347
5594
  ] }),
5348
- /* @__PURE__ */ jsxs19("div", { className: styles.footer, children: [
5349
- /* @__PURE__ */ jsx38(
5595
+ /* @__PURE__ */ jsxs20("div", { className: styles.footer, children: [
5596
+ /* @__PURE__ */ jsx40(
5350
5597
  "button",
5351
5598
  {
5352
5599
  className: styles.actionButton,
5353
5600
  onClick: handleToggleCollapse,
5354
5601
  title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5355
5602
  "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5356
- children: isCollapsed ? /* @__PURE__ */ jsx38(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx38(MenuFoldOutlined, {})
5603
+ children: isCollapsed ? /* @__PURE__ */ jsx40(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx40(MenuFoldOutlined, {})
5357
5604
  }
5358
5605
  ),
5359
- /* @__PURE__ */ jsx38(
5606
+ /* @__PURE__ */ jsx40(
5360
5607
  "button",
5361
5608
  {
5362
5609
  className: styles.actionButton,
5363
5610
  onClick: handleSettingsClick,
5364
5611
  title: "Settings",
5365
5612
  "aria-label": "Settings",
5366
- children: /* @__PURE__ */ jsx38(SettingOutlined, {})
5613
+ children: /* @__PURE__ */ jsx40(SettingOutlined, {})
5367
5614
  }
5368
5615
  )
5369
5616
  ] })
@@ -5374,14 +5621,14 @@ var ChatSidebar = ({
5374
5621
  };
5375
5622
 
5376
5623
  // src/components/Chat/LatticeChatView.tsx
5377
- import { jsx as jsx39 } from "react/jsx-runtime";
5624
+ import { jsx as jsx41 } from "react/jsx-runtime";
5378
5625
  var LatticeChatView = (props) => {
5379
5626
  const { assistantId, thread } = useConversationContext();
5380
5627
  const { currentAssistant } = useAssistantContext();
5381
5628
  const {
5382
5629
  config: { baseURL }
5383
5630
  } = useLatticeChatShellContext();
5384
- return assistantId && thread ? /* @__PURE__ */ jsx39(
5631
+ return assistantId && thread ? /* @__PURE__ */ jsx41(
5385
5632
  AxiomLatticeProvider,
5386
5633
  {
5387
5634
  config: {
@@ -5390,14 +5637,14 @@ var LatticeChatView = (props) => {
5390
5637
  assistantId,
5391
5638
  transport: "sse"
5392
5639
  },
5393
- children: /* @__PURE__ */ jsx39(
5640
+ children: /* @__PURE__ */ jsx41(
5394
5641
  LatticeChat,
5395
5642
  {
5396
5643
  thread_id: thread?.id,
5397
5644
  assistant_id: assistantId,
5398
5645
  name: currentAssistant?.name,
5399
5646
  description: currentAssistant?.description,
5400
- menu: /* @__PURE__ */ jsx39(ChatSidebar, {})
5647
+ menu: /* @__PURE__ */ jsx41(ChatSidebar, {})
5401
5648
  }
5402
5649
  )
5403
5650
  }
@@ -5405,17 +5652,17 @@ var LatticeChatView = (props) => {
5405
5652
  };
5406
5653
 
5407
5654
  // src/components/Chat/SettingsModal.tsx
5408
- import { useState as useState21, useEffect as useEffect14, useRef as useRef11 } from "react";
5655
+ import { useState as useState22, useEffect as useEffect14, useRef as useRef11 } from "react";
5409
5656
  import {
5410
5657
  Modal,
5411
5658
  Input,
5412
- Button as Button12,
5659
+ Button as Button14,
5413
5660
  message as message4,
5414
- Typography as Typography14,
5661
+ Typography as Typography15,
5415
5662
  Alert as Alert3,
5416
5663
  Select,
5417
5664
  Switch,
5418
- Space as Space13,
5665
+ Space as Space14,
5419
5666
  Tabs as Tabs2
5420
5667
  } from "antd";
5421
5668
  import {
@@ -5430,11 +5677,11 @@ import {
5430
5677
  PlusOutlined,
5431
5678
  CloudServerOutlined
5432
5679
  } from "@ant-design/icons";
5433
- import { createStyles as createStyles11 } from "antd-style";
5434
- import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
5435
- var { Text: Text12, Title: Title2 } = Typography14;
5680
+ import { createStyles as createStyles12 } from "antd-style";
5681
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
5682
+ var { Text: Text13, Title: Title2 } = Typography15;
5436
5683
  var { TextArea } = Input;
5437
- var useStyles4 = createStyles11(({ token, css }) => ({
5684
+ var useStyles4 = createStyles12(({ token, css }) => ({
5438
5685
  // settingsModal: css`
5439
5686
  // .ant-modal {
5440
5687
  // max-width: 100vw !important;
@@ -5780,12 +6027,12 @@ var SETTINGS_MENU_ITEMS = [
5780
6027
  {
5781
6028
  key: "environment",
5782
6029
  label: "Environment Variables",
5783
- icon: /* @__PURE__ */ jsx40(EnvironmentOutlined, {})
6030
+ icon: /* @__PURE__ */ jsx42(EnvironmentOutlined, {})
5784
6031
  },
5785
6032
  {
5786
6033
  key: "models",
5787
6034
  label: "Model Configuration",
5788
- icon: /* @__PURE__ */ jsx40(ApiOutlined, {})
6035
+ icon: /* @__PURE__ */ jsx42(ApiOutlined, {})
5789
6036
  }
5790
6037
  ];
5791
6038
  var SettingsModal = ({
@@ -5794,7 +6041,7 @@ var SettingsModal = ({
5794
6041
  }) => {
5795
6042
  const { styles } = useStyles4();
5796
6043
  const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
5797
- const [connections, setConnections] = useState21(() => {
6044
+ const [connections, setConnections] = useState22(() => {
5798
6045
  if (typeof window !== "undefined") {
5799
6046
  try {
5800
6047
  const stored = localStorage.getItem("lattice_server_connections");
@@ -5817,21 +6064,21 @@ var SettingsModal = ({
5817
6064
  }
5818
6065
  return [];
5819
6066
  });
5820
- const [serverConfigs, setServerConfigs] = useState21({});
6067
+ const [serverConfigs, setServerConfigs] = useState22({});
5821
6068
  const connectionsRef = useRef11(connections);
5822
6069
  useEffect14(() => {
5823
6070
  connectionsRef.current = connections;
5824
6071
  }, [connections]);
5825
- const [activeTabKey, setActiveTabKey] = useState21(
6072
+ const [activeTabKey, setActiveTabKey] = useState22(
5826
6073
  connections.length > 0 ? connections[0].id : ""
5827
6074
  );
5828
- const [activeMenu, setActiveMenu] = useState21("environment");
5829
- const [loading, setLoading] = useState21(false);
5830
- const [showAddServerModal, setShowAddServerModal] = useState21(false);
5831
- const [newServerUrl, setNewServerUrl] = useState21("");
5832
- const [newServerName, setNewServerName] = useState21("");
5833
- const [newServerApiKey, setNewServerApiKey] = useState21("");
5834
- const [addingServer, setAddingServer] = useState21(false);
6075
+ const [activeMenu, setActiveMenu] = useState22("environment");
6076
+ const [loading, setLoading] = useState22(false);
6077
+ const [showAddServerModal, setShowAddServerModal] = useState22(false);
6078
+ const [newServerUrl, setNewServerUrl] = useState22("");
6079
+ const [newServerName, setNewServerName] = useState22("");
6080
+ const [newServerApiKey, setNewServerApiKey] = useState22("");
6081
+ const [addingServer, setAddingServer] = useState22(false);
5835
6082
  const saveConnections = (newConnections) => {
5836
6083
  setConnections(newConnections);
5837
6084
  if (typeof window !== "undefined") {
@@ -6231,25 +6478,25 @@ var SettingsModal = ({
6231
6478
  }
6232
6479
  }));
6233
6480
  };
6234
- return /* @__PURE__ */ jsxs20("div", { className: styles.formContainer, children: [
6235
- /* @__PURE__ */ jsx40(
6481
+ return /* @__PURE__ */ jsxs21("div", { className: styles.formContainer, children: [
6482
+ /* @__PURE__ */ jsx42(
6236
6483
  Alert3,
6237
6484
  {
6238
6485
  message: "Configuration Effect",
6239
- description: /* @__PURE__ */ jsxs20("div", { children: [
6240
- /* @__PURE__ */ jsxs20("div", { style: { marginBottom: 8 }, children: [
6241
- /* @__PURE__ */ jsx40(
6486
+ description: /* @__PURE__ */ jsxs21("div", { children: [
6487
+ /* @__PURE__ */ jsxs21("div", { style: { marginBottom: 8 }, children: [
6488
+ /* @__PURE__ */ jsx42(
6242
6489
  CheckCircleOutlined4,
6243
6490
  {
6244
6491
  style: { color: "#52c41a", marginRight: 8 }
6245
6492
  }
6246
6493
  ),
6247
- /* @__PURE__ */ jsx40("strong", { children: "Immediately effective:" }),
6494
+ /* @__PURE__ */ jsx42("strong", { children: "Immediately effective:" }),
6248
6495
  " QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
6249
6496
  ] }),
6250
- /* @__PURE__ */ jsxs20("div", { children: [
6251
- /* @__PURE__ */ jsx40(ReloadOutlined2, { style: { color: "#faad14", marginRight: 8 } }),
6252
- /* @__PURE__ */ jsx40("strong", { children: "Requires restart:" }),
6497
+ /* @__PURE__ */ jsxs21("div", { children: [
6498
+ /* @__PURE__ */ jsx42(ReloadOutlined2, { style: { color: "#faad14", marginRight: 8 } }),
6499
+ /* @__PURE__ */ jsx42("strong", { children: "Requires restart:" }),
6253
6500
  " PORT (server must be restarted to change port)"
6254
6501
  ] })
6255
6502
  ] }),
@@ -6258,8 +6505,8 @@ var SettingsModal = ({
6258
6505
  className: styles.alertCard
6259
6506
  }
6260
6507
  ),
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(
6508
+ /* @__PURE__ */ jsx42("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx42(Text13, { 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." }) }),
6509
+ /* @__PURE__ */ jsx42(
6263
6510
  TextArea,
6264
6511
  {
6265
6512
  value: config.envText,
@@ -6336,10 +6583,10 @@ QUEUE_NAME=tasks`,
6336
6583
  }));
6337
6584
  }
6338
6585
  };
6339
- return /* @__PURE__ */ jsxs20("div", { className: styles.formContainer, children: [
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." }) }),
6341
- config.models.map((model, index) => /* @__PURE__ */ jsxs20("div", { className: styles.card, children: [
6342
- /* @__PURE__ */ jsxs20(
6586
+ return /* @__PURE__ */ jsxs21("div", { className: styles.formContainer, children: [
6587
+ /* @__PURE__ */ jsx42("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx42(Text13, { 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." }) }),
6588
+ config.models.map((model, index) => /* @__PURE__ */ jsxs21("div", { className: styles.card, children: [
6589
+ /* @__PURE__ */ jsxs21(
6343
6590
  "div",
6344
6591
  {
6345
6592
  style: {
@@ -6351,13 +6598,13 @@ QUEUE_NAME=tasks`,
6351
6598
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
6352
6599
  },
6353
6600
  children: [
6354
- /* @__PURE__ */ jsxs20("div", { children: [
6355
- /* @__PURE__ */ jsxs20(Text12, { strong: true, style: { fontSize: 16 }, children: [
6601
+ /* @__PURE__ */ jsxs21("div", { children: [
6602
+ /* @__PURE__ */ jsxs21(Text13, { strong: true, style: { fontSize: 16 }, children: [
6356
6603
  "Model ",
6357
6604
  index + 1
6358
6605
  ] }),
6359
- model.key && /* @__PURE__ */ jsxs20(
6360
- Text12,
6606
+ model.key && /* @__PURE__ */ jsxs21(
6607
+ Text13,
6361
6608
  {
6362
6609
  type: "secondary",
6363
6610
  style: { marginLeft: 8, fontSize: 12 },
@@ -6369,8 +6616,8 @@ QUEUE_NAME=tasks`,
6369
6616
  }
6370
6617
  )
6371
6618
  ] }),
6372
- config.models.length > 1 && /* @__PURE__ */ jsx40(
6373
- Button12,
6619
+ config.models.length > 1 && /* @__PURE__ */ jsx42(
6620
+ Button14,
6374
6621
  {
6375
6622
  type: "text",
6376
6623
  danger: true,
@@ -6386,10 +6633,10 @@ QUEUE_NAME=tasks`,
6386
6633
  ]
6387
6634
  }
6388
6635
  ),
6389
- /* @__PURE__ */ jsxs20(Space13, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6390
- /* @__PURE__ */ jsxs20("div", { children: [
6391
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Key *" }),
6392
- /* @__PURE__ */ jsx40(
6636
+ /* @__PURE__ */ jsxs21(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6637
+ /* @__PURE__ */ jsxs21("div", { children: [
6638
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Key *" }),
6639
+ /* @__PURE__ */ jsx42(
6393
6640
  Input,
6394
6641
  {
6395
6642
  placeholder: "e.g., default, gpt-4, claude",
@@ -6398,11 +6645,11 @@ QUEUE_NAME=tasks`,
6398
6645
  style: { height: 40 }
6399
6646
  }
6400
6647
  ),
6401
- /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "Unique identifier for this model" })
6648
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "Unique identifier for this model" })
6402
6649
  ] }),
6403
- /* @__PURE__ */ jsxs20("div", { children: [
6404
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Provider *" }),
6405
- /* @__PURE__ */ jsx40(
6650
+ /* @__PURE__ */ jsxs21("div", { children: [
6651
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Provider *" }),
6652
+ /* @__PURE__ */ jsx42(
6406
6653
  Select,
6407
6654
  {
6408
6655
  style: { width: "100%", height: 40 },
@@ -6418,9 +6665,9 @@ QUEUE_NAME=tasks`,
6418
6665
  }
6419
6666
  )
6420
6667
  ] }),
6421
- /* @__PURE__ */ jsxs20("div", { children: [
6422
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Model Name *" }),
6423
- /* @__PURE__ */ jsx40(
6668
+ /* @__PURE__ */ jsxs21("div", { children: [
6669
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Model Name *" }),
6670
+ /* @__PURE__ */ jsx42(
6424
6671
  Input,
6425
6672
  {
6426
6673
  placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
@@ -6430,9 +6677,9 @@ QUEUE_NAME=tasks`,
6430
6677
  }
6431
6678
  )
6432
6679
  ] }),
6433
- /* @__PURE__ */ jsxs20("div", { children: [
6434
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "API Key" }),
6435
- /* @__PURE__ */ jsx40(
6680
+ /* @__PURE__ */ jsxs21("div", { children: [
6681
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "API Key" }),
6682
+ /* @__PURE__ */ jsx42(
6436
6683
  Input.Password,
6437
6684
  {
6438
6685
  placeholder: "Enter your API key",
@@ -6441,11 +6688,11 @@ QUEUE_NAME=tasks`,
6441
6688
  style: { height: 40 }
6442
6689
  }
6443
6690
  ),
6444
- /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
6691
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
6445
6692
  ] }),
6446
- /* @__PURE__ */ jsxs20("div", { children: [
6447
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Base URL" }),
6448
- /* @__PURE__ */ jsx40(
6693
+ /* @__PURE__ */ jsxs21("div", { children: [
6694
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Base URL" }),
6695
+ /* @__PURE__ */ jsx42(
6449
6696
  Input,
6450
6697
  {
6451
6698
  placeholder: "e.g., https://api.openai.com/v1",
@@ -6454,22 +6701,22 @@ QUEUE_NAME=tasks`,
6454
6701
  style: { height: 40 }
6455
6702
  }
6456
6703
  ),
6457
- /* @__PURE__ */ jsx40(Text12, { className: styles.formDescription, children: "Optional custom base URL for the API" })
6704
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "Optional custom base URL for the API" })
6458
6705
  ] }),
6459
- /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsxs20(Space13, { children: [
6460
- /* @__PURE__ */ jsx40(
6706
+ /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsxs21(Space14, { children: [
6707
+ /* @__PURE__ */ jsx42(
6461
6708
  Switch,
6462
6709
  {
6463
6710
  checked: model.streaming,
6464
6711
  onChange: (checked) => handleModelChange(index, "streaming", checked)
6465
6712
  }
6466
6713
  ),
6467
- /* @__PURE__ */ jsx40(Text12, { children: "Enable Streaming" })
6714
+ /* @__PURE__ */ jsx42(Text13, { children: "Enable Streaming" })
6468
6715
  ] }) }),
6469
- /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: 20 }, children: [
6470
- /* @__PURE__ */ jsxs20("div", { style: { flex: 1 }, children: [
6471
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Max Tokens" }),
6472
- /* @__PURE__ */ jsx40(
6716
+ /* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: 20 }, children: [
6717
+ /* @__PURE__ */ jsxs21("div", { style: { flex: 1 }, children: [
6718
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Max Tokens" }),
6719
+ /* @__PURE__ */ jsx42(
6473
6720
  Input,
6474
6721
  {
6475
6722
  type: "number",
@@ -6484,9 +6731,9 @@ QUEUE_NAME=tasks`,
6484
6731
  }
6485
6732
  )
6486
6733
  ] }),
6487
- /* @__PURE__ */ jsxs20("div", { style: { flex: 1 }, children: [
6488
- /* @__PURE__ */ jsx40(Text12, { className: styles.formLabel, children: "Temperature" }),
6489
- /* @__PURE__ */ jsx40(
6734
+ /* @__PURE__ */ jsxs21("div", { style: { flex: 1 }, children: [
6735
+ /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Temperature" }),
6736
+ /* @__PURE__ */ jsx42(
6490
6737
  Input,
6491
6738
  {
6492
6739
  type: "number",
@@ -6505,8 +6752,8 @@ QUEUE_NAME=tasks`,
6505
6752
  ] })
6506
6753
  ] })
6507
6754
  ] }, index)),
6508
- /* @__PURE__ */ jsx40(
6509
- Button12,
6755
+ /* @__PURE__ */ jsx42(
6756
+ Button14,
6510
6757
  {
6511
6758
  type: "dashed",
6512
6759
  onClick: handleAddModel,
@@ -6533,8 +6780,8 @@ QUEUE_NAME=tasks`,
6533
6780
  );
6534
6781
  const currentConnection = connections.find((c) => c.id === activeTabKey);
6535
6782
  const renderTabLabel = (connection) => {
6536
- return /* @__PURE__ */ jsxs20("div", { style: { display: "flex", alignItems: "center" }, children: [
6537
- /* @__PURE__ */ jsx40(
6783
+ return /* @__PURE__ */ jsxs21("div", { style: { display: "flex", alignItems: "center" }, children: [
6784
+ /* @__PURE__ */ jsx42(
6538
6785
  CloudServerOutlined,
6539
6786
  {
6540
6787
  style: {
@@ -6543,14 +6790,14 @@ QUEUE_NAME=tasks`,
6543
6790
  }
6544
6791
  }
6545
6792
  ),
6546
- /* @__PURE__ */ jsx40("span", { children: connection.name }),
6547
- connection.connected && /* @__PURE__ */ jsx40(
6793
+ /* @__PURE__ */ jsx42("span", { children: connection.name }),
6794
+ connection.connected && /* @__PURE__ */ jsx42(
6548
6795
  CheckCircleFilled,
6549
6796
  {
6550
6797
  style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
6551
6798
  }
6552
6799
  ),
6553
- connection.error && !connection.connecting && /* @__PURE__ */ jsx40(
6800
+ connection.error && !connection.connecting && /* @__PURE__ */ jsx42(
6554
6801
  CloseCircleFilled,
6555
6802
  {
6556
6803
  style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
@@ -6561,35 +6808,35 @@ QUEUE_NAME=tasks`,
6561
6808
  const tabItems = connections.map((connection) => ({
6562
6809
  key: connection.id,
6563
6810
  label: renderTabLabel(connection),
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(
6811
+ children: /* @__PURE__ */ jsx42("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsxs21("div", { style: { display: "flex", height: "100%" }, children: [
6812
+ /* @__PURE__ */ jsx42("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs21(
6566
6813
  "div",
6567
6814
  {
6568
6815
  className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
6569
6816
  onClick: () => setActiveMenu(item.key),
6570
6817
  children: [
6571
- /* @__PURE__ */ jsx40("span", { className: styles.menuItemIcon, children: item.icon }),
6572
- /* @__PURE__ */ jsx40("span", { className: styles.menuItemText, children: item.label })
6818
+ /* @__PURE__ */ jsx42("span", { className: styles.menuItemIcon, children: item.icon }),
6819
+ /* @__PURE__ */ jsx42("span", { className: styles.menuItemText, children: item.label })
6573
6820
  ]
6574
6821
  },
6575
6822
  item.key
6576
6823
  )) }),
6577
- /* @__PURE__ */ jsxs20("div", { className: styles.content, children: [
6578
- /* @__PURE__ */ jsxs20("div", { className: styles.contentHeader, children: [
6579
- /* @__PURE__ */ jsxs20("div", { className: styles.contentHeaderLeft, children: [
6580
- /* @__PURE__ */ jsx40(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
6581
- /* @__PURE__ */ jsxs20(Text12, { className: styles.contentDescription, children: [
6824
+ /* @__PURE__ */ jsxs21("div", { className: styles.content, children: [
6825
+ /* @__PURE__ */ jsxs21("div", { className: styles.contentHeader, children: [
6826
+ /* @__PURE__ */ jsxs21("div", { className: styles.contentHeaderLeft, children: [
6827
+ /* @__PURE__ */ jsx42(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
6828
+ /* @__PURE__ */ jsxs21(Text13, { className: styles.contentDescription, children: [
6582
6829
  activeMenu === "environment" && "Manage environment variables for the gateway server",
6583
6830
  activeMenu === "models" && "Configure and register model lattices for use by agents"
6584
6831
  ] })
6585
6832
  ] }),
6586
- /* @__PURE__ */ jsxs20("div", { className: styles.contentHeaderRight, children: [
6587
- /* @__PURE__ */ jsx40(Button12, { onClick: onClose, children: "Cancel" }),
6588
- /* @__PURE__ */ jsx40(
6589
- Button12,
6833
+ /* @__PURE__ */ jsxs21("div", { className: styles.contentHeaderRight, children: [
6834
+ /* @__PURE__ */ jsx42(Button14, { onClick: onClose, children: "Cancel" }),
6835
+ /* @__PURE__ */ jsx42(
6836
+ Button14,
6590
6837
  {
6591
6838
  type: "primary",
6592
- icon: /* @__PURE__ */ jsx40(SaveOutlined, {}),
6839
+ icon: /* @__PURE__ */ jsx42(SaveOutlined, {}),
6593
6840
  onClick: handleSave,
6594
6841
  loading,
6595
6842
  children: "Save Configuration"
@@ -6597,9 +6844,9 @@ QUEUE_NAME=tasks`,
6597
6844
  )
6598
6845
  ] })
6599
6846
  ] }),
6600
- /* @__PURE__ */ jsx40("div", { className: styles.contentBody, children: renderContent(connection.id) })
6847
+ /* @__PURE__ */ jsx42("div", { className: styles.contentBody, children: renderContent(connection.id) })
6601
6848
  ] })
6602
- ] }) }) : /* @__PURE__ */ jsx40(
6849
+ ] }) }) : /* @__PURE__ */ jsx42(
6603
6850
  "div",
6604
6851
  {
6605
6852
  style: {
@@ -6611,29 +6858,29 @@ QUEUE_NAME=tasks`,
6611
6858
  gap: 16,
6612
6859
  padding: 48
6613
6860
  },
6614
- children: connection.connecting ? /* @__PURE__ */ jsxs20(Fragment6, { children: [
6615
- /* @__PURE__ */ jsx40(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
6616
- /* @__PURE__ */ jsx40(Title2, { level: 4, children: "Connecting..." }),
6617
- /* @__PURE__ */ jsxs20(Text12, { type: "secondary", style: { textAlign: "center" }, children: [
6861
+ children: connection.connecting ? /* @__PURE__ */ jsxs21(Fragment6, { children: [
6862
+ /* @__PURE__ */ jsx42(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
6863
+ /* @__PURE__ */ jsx42(Title2, { level: 4, children: "Connecting..." }),
6864
+ /* @__PURE__ */ jsxs21(Text13, { type: "secondary", style: { textAlign: "center" }, children: [
6618
6865
  "Connecting to ",
6619
6866
  connection.url
6620
6867
  ] })
6621
- ] }) : /* @__PURE__ */ jsxs20(Fragment6, { children: [
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(
6625
- Text12,
6868
+ ] }) : /* @__PURE__ */ jsxs21(Fragment6, { children: [
6869
+ /* @__PURE__ */ jsx42(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
6870
+ /* @__PURE__ */ jsx42(Title2, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
6871
+ /* @__PURE__ */ jsx42(
6872
+ Text13,
6626
6873
  {
6627
6874
  type: "secondary",
6628
6875
  style: { textAlign: "center", maxWidth: 400 },
6629
6876
  children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
6630
6877
  }
6631
6878
  ),
6632
- /* @__PURE__ */ jsx40(
6633
- Button12,
6879
+ /* @__PURE__ */ jsx42(
6880
+ Button14,
6634
6881
  {
6635
6882
  type: "primary",
6636
- icon: /* @__PURE__ */ jsx40(LinkOutlined, {}),
6883
+ icon: /* @__PURE__ */ jsx42(LinkOutlined, {}),
6637
6884
  onClick: () => checkConnection(connection.id),
6638
6885
  loading: connection.connecting,
6639
6886
  style: { marginTop: 16 },
@@ -6645,8 +6892,8 @@ QUEUE_NAME=tasks`,
6645
6892
  ) }),
6646
6893
  closable: connections.length > 1
6647
6894
  }));
6648
- return /* @__PURE__ */ jsxs20(Fragment6, { children: [
6649
- /* @__PURE__ */ jsx40(
6895
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
6896
+ /* @__PURE__ */ jsx42(
6650
6897
  Modal,
6651
6898
  {
6652
6899
  open,
@@ -6655,7 +6902,7 @@ QUEUE_NAME=tasks`,
6655
6902
  width: "80%",
6656
6903
  footer: null,
6657
6904
  title: "Settings",
6658
- children: /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(
6905
+ children: /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsx42(
6659
6906
  Tabs2,
6660
6907
  {
6661
6908
  activeKey: activeTabKey,
@@ -6669,7 +6916,7 @@ QUEUE_NAME=tasks`,
6669
6916
  }
6670
6917
  },
6671
6918
  items: tabItems,
6672
- addIcon: /* @__PURE__ */ jsxs20(
6919
+ addIcon: /* @__PURE__ */ jsxs21(
6673
6920
  "div",
6674
6921
  {
6675
6922
  style: {
@@ -6679,8 +6926,8 @@ QUEUE_NAME=tasks`,
6679
6926
  padding: "4px 8px"
6680
6927
  },
6681
6928
  children: [
6682
- /* @__PURE__ */ jsx40(PlusOutlined, {}),
6683
- /* @__PURE__ */ jsx40("span", { children: "Add Server" })
6929
+ /* @__PURE__ */ jsx42(PlusOutlined, {}),
6930
+ /* @__PURE__ */ jsx42("span", { children: "Add Server" })
6684
6931
  ]
6685
6932
  }
6686
6933
  )
@@ -6688,7 +6935,7 @@ QUEUE_NAME=tasks`,
6688
6935
  ) })
6689
6936
  }
6690
6937
  ),
6691
- /* @__PURE__ */ jsx40(
6938
+ /* @__PURE__ */ jsx42(
6692
6939
  Modal,
6693
6940
  {
6694
6941
  title: "Add New Server",
@@ -6702,10 +6949,10 @@ QUEUE_NAME=tasks`,
6702
6949
  },
6703
6950
  confirmLoading: addingServer,
6704
6951
  className: styles.addServerModal,
6705
- children: /* @__PURE__ */ jsxs20(Space13, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6706
- /* @__PURE__ */ jsxs20("div", { children: [
6707
- /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
6708
- /* @__PURE__ */ jsx40(
6952
+ children: /* @__PURE__ */ jsxs21(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6953
+ /* @__PURE__ */ jsxs21("div", { children: [
6954
+ /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
6955
+ /* @__PURE__ */ jsx42(
6709
6956
  Input,
6710
6957
  {
6711
6958
  placeholder: "e.g., Production Server",
@@ -6714,11 +6961,11 @@ QUEUE_NAME=tasks`,
6714
6961
  onPressEnter: handleAddServer
6715
6962
  }
6716
6963
  ),
6717
- /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
6964
+ /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
6718
6965
  ] }),
6719
- /* @__PURE__ */ jsxs20("div", { children: [
6720
- /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
6721
- /* @__PURE__ */ jsx40(
6966
+ /* @__PURE__ */ jsxs21("div", { children: [
6967
+ /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
6968
+ /* @__PURE__ */ jsx42(
6722
6969
  Input,
6723
6970
  {
6724
6971
  placeholder: "e.g., http://localhost:4001",
@@ -6727,11 +6974,11 @@ QUEUE_NAME=tasks`,
6727
6974
  onPressEnter: handleAddServer
6728
6975
  }
6729
6976
  ),
6730
- /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
6977
+ /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
6731
6978
  ] }),
6732
- /* @__PURE__ */ jsxs20("div", { children: [
6733
- /* @__PURE__ */ jsx40(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
6734
- /* @__PURE__ */ jsx40(
6979
+ /* @__PURE__ */ jsxs21("div", { children: [
6980
+ /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
6981
+ /* @__PURE__ */ jsx42(
6735
6982
  Input.Password,
6736
6983
  {
6737
6984
  placeholder: "Optional: Enter API key for authentication",
@@ -6740,7 +6987,7 @@ QUEUE_NAME=tasks`,
6740
6987
  onPressEnter: handleAddServer
6741
6988
  }
6742
6989
  ),
6743
- /* @__PURE__ */ jsx40(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
6990
+ /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
6744
6991
  ] })
6745
6992
  ] })
6746
6993
  }
@@ -6749,10 +6996,10 @@ QUEUE_NAME=tasks`,
6749
6996
  };
6750
6997
 
6751
6998
  // src/components/Chat/AgentServerSetting.tsx
6752
- import { jsx as jsx41 } from "react/jsx-runtime";
6999
+ import { jsx as jsx43 } from "react/jsx-runtime";
6753
7000
  var AgentServerSetting = () => {
6754
7001
  const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
6755
- return /* @__PURE__ */ jsx41(
7002
+ return /* @__PURE__ */ jsx43(
6756
7003
  SettingsModal,
6757
7004
  {
6758
7005
  open: settingsModalOpen,
@@ -6762,11 +7009,11 @@ var AgentServerSetting = () => {
6762
7009
  };
6763
7010
 
6764
7011
  // src/components/Chat/LatticeChatShell.tsx
6765
- import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
7012
+ import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
6766
7013
  var LatticeChatShell = (props) => {
6767
- return /* @__PURE__ */ jsxs21(LatticeChatShellContextProvider, { ...props, children: [
6768
- /* @__PURE__ */ jsx42(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx42(ConversationContextProvider, { children: /* @__PURE__ */ jsx42(LatticeChatView, {}) }) }),
6769
- /* @__PURE__ */ jsx42(AgentServerSetting, {})
7014
+ return /* @__PURE__ */ jsxs22(LatticeChatShellContextProvider, { ...props, children: [
7015
+ /* @__PURE__ */ jsx44(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx44(ConversationContextProvider, { children: /* @__PURE__ */ jsx44(LatticeChatView, {}) }) }),
7016
+ /* @__PURE__ */ jsx44(AgentServerSetting, {})
6770
7017
  ] });
6771
7018
  };
6772
7019
  export {