@axiom-lattice/react-sdk 2.1.17 → 2.1.19

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