@axiom-lattice/react-sdk 2.1.16 → 2.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +469 -587
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +377 -494
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -6
package/dist/index.js
CHANGED
|
@@ -47,7 +47,6 @@ __export(index_exports, {
|
|
|
47
47
|
LatticeChatShell: () => LatticeChatShell,
|
|
48
48
|
LatticeChatShellContext: () => LatticeChatShellContext,
|
|
49
49
|
LatticeChatShellContextProvider: () => LatticeChatShellContextProvider,
|
|
50
|
-
MDMermaid: () => MDMermaid,
|
|
51
50
|
MDResponse: () => MDResponse,
|
|
52
51
|
MDViewFormItem: () => MDViewFormItem,
|
|
53
52
|
SideAppViewBrowser: () => SideAppViewBrowser,
|
|
@@ -1331,92 +1330,67 @@ var import_antd = require("antd");
|
|
|
1331
1330
|
var import_react9 = require("react");
|
|
1332
1331
|
|
|
1333
1332
|
// src/components/GenUI/MDResponse.tsx
|
|
1334
|
-
var
|
|
1335
|
-
var import_react_syntax_highlighter = require("react-syntax-highlighter");
|
|
1336
|
-
var import_prism = require("react-syntax-highlighter/dist/cjs/styles/prism");
|
|
1337
|
-
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
1333
|
+
var import_x_markdown = __toESM(require("@ant-design/x-markdown"));
|
|
1338
1334
|
var import_react8 = require("react");
|
|
1339
1335
|
var import_antd_style2 = require("antd-style");
|
|
1340
|
-
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
1341
1336
|
|
|
1342
|
-
// src/components/GenUI/
|
|
1343
|
-
var
|
|
1337
|
+
// src/components/GenUI/Code.tsx
|
|
1338
|
+
var import_x = require("@ant-design/x");
|
|
1339
|
+
|
|
1340
|
+
// src/components/GenUI/ReactInfographic.tsx
|
|
1341
|
+
var import_infographic = require("@antv/infographic");
|
|
1344
1342
|
var import_react7 = require("react");
|
|
1345
|
-
var import_uuid = require("uuid");
|
|
1346
1343
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1347
|
-
var
|
|
1348
|
-
const
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1351
|
-
const targetInternal = (0, import_react7.useRef)(null);
|
|
1344
|
+
var ReactInfographic = (props) => {
|
|
1345
|
+
const { children } = props;
|
|
1346
|
+
const $container = (0, import_react7.useRef)(null);
|
|
1347
|
+
let infographicInstance = (0, import_react7.useRef)(null);
|
|
1352
1348
|
(0, import_react7.useEffect)(() => {
|
|
1353
|
-
if (
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
theme: "default",
|
|
1357
|
-
securityLevel: "loose",
|
|
1358
|
-
themeCSS: `
|
|
1359
|
-
g.classGroup rect {
|
|
1360
|
-
fill: #282a36;
|
|
1361
|
-
stroke: #6272a4;
|
|
1362
|
-
}
|
|
1363
|
-
g.classGroup text {
|
|
1364
|
-
fill: #f8f8f2;
|
|
1365
|
-
}
|
|
1366
|
-
g.classGroup line {
|
|
1367
|
-
stroke: #f8f8f2;
|
|
1368
|
-
stroke-width: 0.5;
|
|
1369
|
-
}
|
|
1370
|
-
.classLabel .box {
|
|
1371
|
-
stroke: #21222c;
|
|
1372
|
-
stroke-width: 3;
|
|
1373
|
-
fill: #21222c;
|
|
1374
|
-
opacity: 1;
|
|
1375
|
-
}
|
|
1376
|
-
.classLabel .label {
|
|
1377
|
-
fill: #f1fa8c;
|
|
1378
|
-
}
|
|
1379
|
-
.relation {
|
|
1380
|
-
stroke: #ff79c6;
|
|
1381
|
-
stroke-width: 1;
|
|
1382
|
-
}
|
|
1383
|
-
#compositionStart, #compositionEnd {
|
|
1384
|
-
fill: #bd93f9;
|
|
1385
|
-
stroke: #bd93f9;
|
|
1386
|
-
stroke-width: 1;
|
|
1387
|
-
}
|
|
1388
|
-
#aggregationEnd, #aggregationStart {
|
|
1389
|
-
fill: #21222c;
|
|
1390
|
-
stroke: #50fa7b;
|
|
1391
|
-
stroke-width: 1;
|
|
1392
|
-
}
|
|
1393
|
-
#dependencyStart, #dependencyEnd {
|
|
1394
|
-
fill: #00bcd4;
|
|
1395
|
-
stroke: #00bcd4;
|
|
1396
|
-
stroke-width: 1;
|
|
1397
|
-
}
|
|
1398
|
-
#extensionStart, #extensionEnd {
|
|
1399
|
-
fill: #f8f8f2;
|
|
1400
|
-
stroke: #f8f8f2;
|
|
1401
|
-
stroke-width: 1;
|
|
1402
|
-
}
|
|
1403
|
-
`,
|
|
1404
|
-
fontFamily: "Fira Code",
|
|
1405
|
-
sequence: { showSequenceNumbers: true }
|
|
1406
|
-
});
|
|
1407
|
-
import_mermaid.default.render(domId.current, code, target.current).then((result) => {
|
|
1408
|
-
target.current.innerHTML = result.svg;
|
|
1409
|
-
}).catch((error) => {
|
|
1410
|
-
console.log(error);
|
|
1349
|
+
if ($container.current) {
|
|
1350
|
+
infographicInstance.current = new import_infographic.Infographic({
|
|
1351
|
+
container: $container.current
|
|
1411
1352
|
});
|
|
1412
1353
|
}
|
|
1413
|
-
|
|
1414
|
-
|
|
1354
|
+
return () => {
|
|
1355
|
+
infographicInstance.current?.destroy();
|
|
1356
|
+
};
|
|
1357
|
+
}, []);
|
|
1358
|
+
(0, import_react7.useEffect)(() => {
|
|
1359
|
+
infographicInstance.current?.render(children);
|
|
1360
|
+
}, [children]);
|
|
1361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref: $container });
|
|
1415
1362
|
};
|
|
1416
1363
|
|
|
1417
|
-
// src/components/GenUI/
|
|
1364
|
+
// src/components/GenUI/Code.tsx
|
|
1418
1365
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1419
|
-
var
|
|
1366
|
+
var Code = (props) => {
|
|
1367
|
+
const { className, children } = props;
|
|
1368
|
+
const language = className?.match(/language-(\w+)/)?.[1] || "";
|
|
1369
|
+
if (typeof children !== "string") return null;
|
|
1370
|
+
if (language) {
|
|
1371
|
+
const Element = getElement(language)?.card_view;
|
|
1372
|
+
if (Element) {
|
|
1373
|
+
let childrenData;
|
|
1374
|
+
try {
|
|
1375
|
+
childrenData = JSON.parse(children);
|
|
1376
|
+
} catch (error) {
|
|
1377
|
+
}
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Element, { component_key: language, data: childrenData });
|
|
1379
|
+
}
|
|
1380
|
+
switch (language) {
|
|
1381
|
+
case "infographic":
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ReactInfographic, { children });
|
|
1383
|
+
case "mermaid":
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_x.Mermaid, { children });
|
|
1385
|
+
default:
|
|
1386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_x.CodeHighlighter, { lang: language, children });
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_x.CodeHighlighter, { lang: language, children });
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
// src/components/GenUI/MDResponse.tsx
|
|
1393
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1420
1394
|
var useStyles = (0, import_antd_style2.createStyles)(({ token, css }) => ({
|
|
1421
1395
|
markdownTableContainer: css`
|
|
1422
1396
|
overflow-x: auto;
|
|
@@ -1506,105 +1480,14 @@ var MDResponse = ({
|
|
|
1506
1480
|
noGenUI
|
|
1507
1481
|
}) => {
|
|
1508
1482
|
const { styles } = useStyles();
|
|
1509
|
-
|
|
1510
|
-
() => ({
|
|
1511
|
-
components: {
|
|
1512
|
-
a({ node, ...props }) {
|
|
1513
|
-
if (embeddedLink) {
|
|
1514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IFrameCard, { src: props.href });
|
|
1515
|
-
} else return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { ...props });
|
|
1516
|
-
},
|
|
1517
|
-
table({ node, ...props }) {
|
|
1518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: styles.markdownTableContainer, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("table", { className: styles.markdownTable, ...props }) });
|
|
1519
|
-
},
|
|
1520
|
-
th({ node, ...props }) {
|
|
1521
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { className: styles.markdownTh, ...props });
|
|
1522
|
-
},
|
|
1523
|
-
td({ node, ...props }) {
|
|
1524
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { className: styles.markdownTd, ...props });
|
|
1525
|
-
},
|
|
1526
|
-
tr({ node, ...props }) {
|
|
1527
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("tr", { className: styles.markdownTr, ...props });
|
|
1528
|
-
},
|
|
1529
|
-
code({ children, className, node, ...rest }) {
|
|
1530
|
-
const match = /language-(\w+)/.exec(className || "");
|
|
1531
|
-
const language = match?.[1];
|
|
1532
|
-
if (language) {
|
|
1533
|
-
const Element = getElement(language)?.card_view;
|
|
1534
|
-
if (Element) {
|
|
1535
|
-
let childrenData;
|
|
1536
|
-
try {
|
|
1537
|
-
childrenData = JSON.parse(children);
|
|
1538
|
-
} catch (error) {
|
|
1539
|
-
}
|
|
1540
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1541
|
-
Element,
|
|
1542
|
-
{
|
|
1543
|
-
context,
|
|
1544
|
-
interactive,
|
|
1545
|
-
component_key: language,
|
|
1546
|
-
data: childrenData
|
|
1547
|
-
}
|
|
1548
|
-
);
|
|
1549
|
-
}
|
|
1550
|
-
switch (language) {
|
|
1551
|
-
case "mermaid":
|
|
1552
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MDMermaid, { children });
|
|
1553
|
-
default:
|
|
1554
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1555
|
-
SyntaxHighlighter,
|
|
1556
|
-
{
|
|
1557
|
-
...rest,
|
|
1558
|
-
PreTag: "div",
|
|
1559
|
-
language,
|
|
1560
|
-
style: import_prism.dark,
|
|
1561
|
-
children: String(children).replace(/\n$/, "")
|
|
1562
|
-
}
|
|
1563
|
-
);
|
|
1564
|
-
}
|
|
1565
|
-
} else {
|
|
1566
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("code", { ...rest, className, children });
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
},
|
|
1570
|
-
remarkPlugins: [import_remark_gfm.default],
|
|
1571
|
-
rehypePlugins: [import_rehype_raw.default]
|
|
1572
|
-
}),
|
|
1573
|
-
[userData, interactive, embeddedLink, styles]
|
|
1574
|
-
);
|
|
1575
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: styles.markdownContainer, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_markdown.default, { ...config, children: content }) });
|
|
1483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: styles.markdownContainer, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_x_markdown.default, { components: { code: Code }, paragraphTag: "div", children: content }) });
|
|
1576
1484
|
};
|
|
1577
1485
|
var MDViewFormItem = ({ value }) => {
|
|
1578
|
-
return /* @__PURE__ */ (0,
|
|
1579
|
-
};
|
|
1580
|
-
var IFrameCard = ({ src }) => {
|
|
1581
|
-
const containerRef = (0, import_react8.useRef)(null);
|
|
1582
|
-
const [width, setWidth] = (0, import_react8.useState)("640px");
|
|
1583
|
-
const [height, setHeight] = (0, import_react8.useState)("320px");
|
|
1584
|
-
const valid_images = [
|
|
1585
|
-
"jpg",
|
|
1586
|
-
"jpeg",
|
|
1587
|
-
"png",
|
|
1588
|
-
"gif",
|
|
1589
|
-
"bmp",
|
|
1590
|
-
"svg",
|
|
1591
|
-
"tif",
|
|
1592
|
-
"tiff",
|
|
1593
|
-
"webp"
|
|
1594
|
-
];
|
|
1595
|
-
if (!src) {
|
|
1596
|
-
return null;
|
|
1597
|
-
}
|
|
1598
|
-
const spitedSrc = src.split(".");
|
|
1599
|
-
if (valid_images.includes(spitedSrc[spitedSrc.length - 1].toLowerCase())) {
|
|
1600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src, style: { width: "100%" } }) });
|
|
1601
|
-
} else {
|
|
1602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href: src, target: "_black", children: src }) });
|
|
1603
|
-
}
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MDResponse, { content: value || "" });
|
|
1604
1487
|
};
|
|
1605
1488
|
|
|
1606
1489
|
// src/components/GenUI/elements/confirm_feedback.tsx
|
|
1607
|
-
var
|
|
1490
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1608
1491
|
var { Text } = import_antd.Typography;
|
|
1609
1492
|
var ConfirmFeedback = ({
|
|
1610
1493
|
data,
|
|
@@ -1613,9 +1496,9 @@ var ConfirmFeedback = ({
|
|
|
1613
1496
|
const { message: message5, type, config, feedback, options } = data ?? {};
|
|
1614
1497
|
const { sendMessage } = useAgentChat();
|
|
1615
1498
|
const [clicked, setClicked] = (0, import_react9.useState)(false);
|
|
1616
|
-
return /* @__PURE__ */ (0,
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1618
|
-
options ? /* @__PURE__ */ (0,
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_antd.Space, { direction: "vertical", style: { width: "100%" }, children: [
|
|
1500
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MDResponse, { content: message5 }),
|
|
1501
|
+
options ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_antd.Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1619
1502
|
import_antd.Button,
|
|
1620
1503
|
{
|
|
1621
1504
|
title: option.description,
|
|
@@ -1638,8 +1521,8 @@ var ConfirmFeedback = ({
|
|
|
1638
1521
|
children: option.label
|
|
1639
1522
|
},
|
|
1640
1523
|
option.value
|
|
1641
|
-
)) }) : /* @__PURE__ */ (0,
|
|
1642
|
-
/* @__PURE__ */ (0,
|
|
1524
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_antd.Space, { style: { justifyContent: "flex-end", width: "100%" }, children: [
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1643
1526
|
import_antd.Button,
|
|
1644
1527
|
{
|
|
1645
1528
|
disabled: !interactive || clicked || feedback,
|
|
@@ -1662,7 +1545,7 @@ var ConfirmFeedback = ({
|
|
|
1662
1545
|
children: "\u786E\u8BA4"
|
|
1663
1546
|
}
|
|
1664
1547
|
),
|
|
1665
|
-
/* @__PURE__ */ (0,
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1666
1549
|
import_antd.Button,
|
|
1667
1550
|
{
|
|
1668
1551
|
disabled: !interactive || clicked || feedback,
|
|
@@ -1693,7 +1576,7 @@ var ConfirmFeedback = ({
|
|
|
1693
1576
|
var import_antd2 = require("antd");
|
|
1694
1577
|
var import_react10 = require("react");
|
|
1695
1578
|
var import_icons = require("@ant-design/icons");
|
|
1696
|
-
var
|
|
1579
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1697
1580
|
var { Text: Text2 } = import_antd2.Typography;
|
|
1698
1581
|
var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
|
|
1699
1582
|
const { dataSource, message: message5 } = data ?? {};
|
|
@@ -1747,14 +1630,14 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1747
1630
|
if (!expandItem) {
|
|
1748
1631
|
return null;
|
|
1749
1632
|
}
|
|
1750
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
-
expandItem.content && /* @__PURE__ */ (0,
|
|
1752
|
-
/* @__PURE__ */ (0,
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { padding: "16px" }, children: [
|
|
1634
|
+
expandItem.content && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u8BE6\u7EC6\u4FE1\u606F:" }),
|
|
1636
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MDResponse, { content: expandItem.content })
|
|
1754
1637
|
] }),
|
|
1755
|
-
expandItem.dataSource && expandItem.dataSource.length > 0 && /* @__PURE__ */ (0,
|
|
1756
|
-
/* @__PURE__ */ (0,
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
expandItem.dataSource && expandItem.dataSource.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1639
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text2, { strong: true, style: { display: "block", marginBottom: "8px" }, children: "\u5B50\u8868\u6570\u636E:" }),
|
|
1640
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1758
1641
|
GenericDataTable,
|
|
1759
1642
|
{
|
|
1760
1643
|
component_key: `nested_${record.key}`,
|
|
@@ -1775,25 +1658,25 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1775
1658
|
);
|
|
1776
1659
|
};
|
|
1777
1660
|
const hasExpandableRows = processedData.some((item) => item.expandItem);
|
|
1778
|
-
return /* @__PURE__ */ (0,
|
|
1661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1779
1662
|
import_antd2.Table,
|
|
1780
1663
|
{
|
|
1781
1664
|
size: "small",
|
|
1782
|
-
title: () => /* @__PURE__ */ (0,
|
|
1783
|
-
/* @__PURE__ */ (0,
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1785
|
-
/* @__PURE__ */ (0,
|
|
1665
|
+
title: () => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_antd2.Flex, { justify: "space-between", align: "center", children: [
|
|
1666
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd2.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text2, { strong: true, style: { fontSize: 16 }, children: message5 || "" }) }),
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_antd2.Space, { children: [
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1786
1669
|
import_antd2.Button,
|
|
1787
1670
|
{
|
|
1788
1671
|
type: "text",
|
|
1789
1672
|
size: "small",
|
|
1790
|
-
icon: /* @__PURE__ */ (0,
|
|
1673
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons.DownloadOutlined, {}),
|
|
1791
1674
|
onClick: exportToExcel,
|
|
1792
1675
|
disabled: !processedData || processedData.length === 0,
|
|
1793
1676
|
children: "\u5BFC\u51FAExcel"
|
|
1794
1677
|
}
|
|
1795
1678
|
),
|
|
1796
|
-
default_open_in_side_app && /* @__PURE__ */ (0,
|
|
1679
|
+
default_open_in_side_app && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1797
1680
|
import_antd2.Button,
|
|
1798
1681
|
{
|
|
1799
1682
|
type: "link",
|
|
@@ -1806,7 +1689,7 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1806
1689
|
});
|
|
1807
1690
|
},
|
|
1808
1691
|
children: [
|
|
1809
|
-
/* @__PURE__ */ (0,
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons.ExpandAltOutlined, {}),
|
|
1810
1693
|
"\u5C55\u5F00"
|
|
1811
1694
|
]
|
|
1812
1695
|
}
|
|
@@ -1835,9 +1718,9 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
1835
1718
|
};
|
|
1836
1719
|
|
|
1837
1720
|
// src/components/GenUI/elements/generic_data_table_side_app.tsx
|
|
1838
|
-
var
|
|
1721
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1839
1722
|
var GenericDataTableSideApp = (props) => {
|
|
1840
|
-
return /* @__PURE__ */ (0,
|
|
1723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(GenericDataTable, { ...props, default_open_in_side_app: false });
|
|
1841
1724
|
};
|
|
1842
1725
|
|
|
1843
1726
|
// src/components/GenUI/elements/ToolCall.tsx
|
|
@@ -1849,7 +1732,7 @@ var import_icons3 = require("@ant-design/icons");
|
|
|
1849
1732
|
var import_antd3 = require("antd");
|
|
1850
1733
|
var import_antd_style3 = require("antd-style");
|
|
1851
1734
|
var import_icons2 = require("@ant-design/icons");
|
|
1852
|
-
var
|
|
1735
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1853
1736
|
var { Text: Text3, Title } = import_antd3.Typography;
|
|
1854
1737
|
var useStyle2 = (0, import_antd_style3.createStyles)(({ token, css }) => ({
|
|
1855
1738
|
card: css`
|
|
@@ -1919,7 +1802,7 @@ var ToolCard = ({
|
|
|
1919
1802
|
}) => {
|
|
1920
1803
|
const { styles } = useStyle2();
|
|
1921
1804
|
if (!data || !data.name) {
|
|
1922
|
-
return /* @__PURE__ */ (0,
|
|
1805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd3.Card, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text3, { type: "secondary", children: "Invalid tool data" }) });
|
|
1923
1806
|
}
|
|
1924
1807
|
const formatToolName = (name) => {
|
|
1925
1808
|
return name.replace(/([a-z])([A-Z])/g, "$1 $2").split(/[_-]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
@@ -1962,7 +1845,7 @@ var ToolCard = ({
|
|
|
1962
1845
|
return typeof value;
|
|
1963
1846
|
};
|
|
1964
1847
|
const hasParameters = data.parameters && Object.keys(data.parameters).length > 0;
|
|
1965
|
-
return /* @__PURE__ */ (0,
|
|
1848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1966
1849
|
import_antd3.Card,
|
|
1967
1850
|
{
|
|
1968
1851
|
size: "small",
|
|
@@ -1970,13 +1853,13 @@ var ToolCard = ({
|
|
|
1970
1853
|
bordered: false,
|
|
1971
1854
|
bodyStyle: { padding: "16px" },
|
|
1972
1855
|
children: [
|
|
1973
|
-
/* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
1976
|
-
/* @__PURE__ */ (0,
|
|
1977
|
-
data.type && /* @__PURE__ */ (0,
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: styles.header, children: [
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd3.Space, { align: "center", children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons2.ToolOutlined, { style: { color: "#1890ff", fontSize: "18px" } }),
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Title, { level: 5, className: styles.toolName, style: { margin: 0 }, children: formatToolName(data.name) }),
|
|
1860
|
+
data.type && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd3.Tag, { color: "blue", className: styles.typeTag, children: data.type })
|
|
1978
1861
|
] }),
|
|
1979
|
-
data.description && /* @__PURE__ */ (0,
|
|
1862
|
+
data.description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1980
1863
|
Text3,
|
|
1981
1864
|
{
|
|
1982
1865
|
type: "secondary",
|
|
@@ -1985,19 +1868,19 @@ var ToolCard = ({
|
|
|
1985
1868
|
}
|
|
1986
1869
|
)
|
|
1987
1870
|
] }),
|
|
1988
|
-
hasParameters ? /* @__PURE__ */ (0,
|
|
1989
|
-
/* @__PURE__ */ (0,
|
|
1990
|
-
/* @__PURE__ */ (0,
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
1871
|
+
hasParameters ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd3.Space, { align: "center", style: { marginBottom: "12px" }, children: [
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons2.CodeOutlined, { style: { color: "#52c41a", fontSize: "14px" } }),
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text3, { strong: true, style: { fontSize: "14px" }, children: [
|
|
1992
1875
|
"Parameters (",
|
|
1993
1876
|
Object.keys(data.parameters).length,
|
|
1994
1877
|
")"
|
|
1995
1878
|
] })
|
|
1996
1879
|
] }),
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1999
|
-
/* @__PURE__ */ (0,
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
1880
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: styles.parameterGrid, children: Object.entries(data.parameters).map(([key, value], index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: styles.parameterItem, children: [
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: styles.parameterName, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd3.Space, { align: "center", children: [
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: key }),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2001
1884
|
import_antd3.Tag,
|
|
2002
1885
|
{
|
|
2003
1886
|
color: getTypeColor(value),
|
|
@@ -2006,11 +1889,11 @@ var ToolCard = ({
|
|
|
2006
1889
|
}
|
|
2007
1890
|
)
|
|
2008
1891
|
] }) }),
|
|
2009
|
-
/* @__PURE__ */ (0,
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: styles.parameterValue, children: formatParameterValue(value) })
|
|
2010
1893
|
] }, index)) })
|
|
2011
|
-
] }) : /* @__PURE__ */ (0,
|
|
2012
|
-
/* @__PURE__ */ (0,
|
|
2013
|
-
/* @__PURE__ */ (0,
|
|
1894
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd3.Space, { align: "center", children: [
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons2.CodeOutlined, { style: { color: "#d9d9d9", fontSize: "14px" } }),
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text3, { type: "secondary", style: { fontSize: "13px" }, children: "No parameters" })
|
|
2014
1897
|
] })
|
|
2015
1898
|
]
|
|
2016
1899
|
}
|
|
@@ -2018,15 +1901,15 @@ var ToolCard = ({
|
|
|
2018
1901
|
};
|
|
2019
1902
|
|
|
2020
1903
|
// src/components/GenUI/elements/ToolCall.tsx
|
|
2021
|
-
var
|
|
1904
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2022
1905
|
function getStatusIcon(status) {
|
|
2023
1906
|
switch (status) {
|
|
2024
1907
|
case "success":
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
1908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons3.CheckCircleOutlined, { style: { color: "#52c41a" } });
|
|
2026
1909
|
case "error":
|
|
2027
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons3.InfoCircleOutlined, { style: { color: "#ff4d4f" } });
|
|
2028
1911
|
default:
|
|
2029
|
-
return /* @__PURE__ */ (0,
|
|
1912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons3.LoadingOutlined, { style: { color: "#1890ff" } });
|
|
2030
1913
|
}
|
|
2031
1914
|
}
|
|
2032
1915
|
var ToolCall = ({ data }) => {
|
|
@@ -2049,9 +1932,9 @@ var ToolCall = ({ data }) => {
|
|
|
2049
1932
|
return "Error parsing args";
|
|
2050
1933
|
}
|
|
2051
1934
|
};
|
|
2052
|
-
const header = /* @__PURE__ */ (0,
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
2054
|
-
/* @__PURE__ */ (0,
|
|
1935
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_antd4.Flex, { align: "center", wrap: "wrap", children: [
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_antd4.Typography.Text, { strong: true, children: formatToolName(toolCallData.name) }),
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2055
1938
|
import_antd4.Typography.Text,
|
|
2056
1939
|
{
|
|
2057
1940
|
type: "secondary",
|
|
@@ -2065,8 +1948,8 @@ var ToolCall = ({ data }) => {
|
|
|
2065
1948
|
parameters: toolCallData.args,
|
|
2066
1949
|
type: "tool_call"
|
|
2067
1950
|
};
|
|
2068
|
-
const content = /* @__PURE__ */ (0,
|
|
2069
|
-
/* @__PURE__ */ (0,
|
|
1951
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: { marginTop: "8px" }, children: [
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2070
1953
|
ToolCard,
|
|
2071
1954
|
{
|
|
2072
1955
|
data: toolCardData,
|
|
@@ -2074,8 +1957,8 @@ var ToolCall = ({ data }) => {
|
|
|
2074
1957
|
interactive: false
|
|
2075
1958
|
}
|
|
2076
1959
|
),
|
|
2077
|
-
toolCallData.response && /* @__PURE__ */ (0,
|
|
2078
|
-
/* @__PURE__ */ (0,
|
|
1960
|
+
toolCallData.response && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: { marginTop: "12px" }, children: [
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2079
1962
|
import_antd4.Typography.Text,
|
|
2080
1963
|
{
|
|
2081
1964
|
strong: true,
|
|
@@ -2083,7 +1966,7 @@ var ToolCall = ({ data }) => {
|
|
|
2083
1966
|
children: "Response:"
|
|
2084
1967
|
}
|
|
2085
1968
|
),
|
|
2086
|
-
/* @__PURE__ */ (0,
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MDResponse, { content: toolCallData.response })
|
|
2087
1970
|
] })
|
|
2088
1971
|
] });
|
|
2089
1972
|
const expandIcon = ({ isActive }) => {
|
|
@@ -2096,14 +1979,14 @@ var ToolCall = ({ data }) => {
|
|
|
2096
1979
|
component_key: toolCallData.id
|
|
2097
1980
|
});
|
|
2098
1981
|
}
|
|
2099
|
-
return /* @__PURE__ */ (0,
|
|
1982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2100
1983
|
import_antd4.Collapse,
|
|
2101
1984
|
{
|
|
2102
1985
|
size: "small",
|
|
2103
1986
|
bordered: false,
|
|
2104
1987
|
defaultActiveKey: [],
|
|
2105
1988
|
expandIcon,
|
|
2106
|
-
children: /* @__PURE__ */ (0,
|
|
1989
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2107
1990
|
import_CollapsePanel.default,
|
|
2108
1991
|
{
|
|
2109
1992
|
header,
|
|
@@ -2120,7 +2003,7 @@ var ToolCall = ({ data }) => {
|
|
|
2120
2003
|
var import_antd5 = require("antd");
|
|
2121
2004
|
var import_antd_style4 = require("antd-style");
|
|
2122
2005
|
var import_icons4 = require("@ant-design/icons");
|
|
2123
|
-
var
|
|
2006
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2124
2007
|
var { Text: Text4 } = import_antd5.Typography;
|
|
2125
2008
|
var useStyle3 = (0, import_antd_style4.createStyles)(({ token, css }) => ({
|
|
2126
2009
|
card: css`
|
|
@@ -2157,11 +2040,11 @@ var Todo = ({
|
|
|
2157
2040
|
const getStatusIcon2 = (status) => {
|
|
2158
2041
|
switch (status) {
|
|
2159
2042
|
case "completed":
|
|
2160
|
-
return /* @__PURE__ */ (0,
|
|
2043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons4.CheckCircleOutlined, { style: { color: "#52c41a" } });
|
|
2161
2044
|
case "in_progress":
|
|
2162
|
-
return /* @__PURE__ */ (0,
|
|
2045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons4.ArrowRightOutlined, { style: { fontWeight: "500" } });
|
|
2163
2046
|
case "pending":
|
|
2164
|
-
return /* @__PURE__ */ (0,
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons4.ClockCircleOutlined, { style: { color: "gray" } });
|
|
2165
2048
|
default:
|
|
2166
2049
|
return null;
|
|
2167
2050
|
}
|
|
@@ -2203,35 +2086,35 @@ var Todo = ({
|
|
|
2203
2086
|
}
|
|
2204
2087
|
};
|
|
2205
2088
|
if (!data || !Array.isArray(data)) {
|
|
2206
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2207
2090
|
import_antd5.Card,
|
|
2208
2091
|
{
|
|
2209
2092
|
size: "small",
|
|
2210
2093
|
className: `shadow-sm ${styles.card}`,
|
|
2211
2094
|
bordered: false,
|
|
2212
|
-
children: /* @__PURE__ */ (0,
|
|
2095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text4, { type: "secondary", children: "No todo items available" })
|
|
2213
2096
|
}
|
|
2214
2097
|
);
|
|
2215
2098
|
}
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2217
|
-
/* @__PURE__ */ (0,
|
|
2099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd5.Card, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_antd5.Space, { direction: "vertical", style: { width: "100%" }, children: [
|
|
2100
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2218
2101
|
import_antd5.List,
|
|
2219
2102
|
{
|
|
2220
2103
|
size: "small",
|
|
2221
2104
|
dataSource: data,
|
|
2222
|
-
renderItem: (item, index) => /* @__PURE__ */ (0,
|
|
2105
|
+
renderItem: (item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2223
2106
|
import_antd5.List.Item,
|
|
2224
2107
|
{
|
|
2225
2108
|
className: `${styles.todoItem} ${getItemClassName(item.status)}`,
|
|
2226
|
-
children: /* @__PURE__ */ (0,
|
|
2109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_antd5.Space, { align: "center", style: { width: "100%" }, children: [
|
|
2227
2110
|
getStatusIcon2(item.status),
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text4, { style: { flex: 1 }, children: item.content })
|
|
2229
2112
|
] })
|
|
2230
2113
|
}
|
|
2231
2114
|
)
|
|
2232
2115
|
}
|
|
2233
2116
|
),
|
|
2234
|
-
/* @__PURE__ */ (0,
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text4, { type: "secondary", style: { fontSize: 12 }, children: [
|
|
2235
2118
|
"Total items: ",
|
|
2236
2119
|
data.length,
|
|
2237
2120
|
" | Completed:",
|
|
@@ -2250,7 +2133,7 @@ var Todo = ({
|
|
|
2250
2133
|
var import_antd6 = require("antd");
|
|
2251
2134
|
var import_icons5 = require("@ant-design/icons");
|
|
2252
2135
|
var import_CollapsePanel2 = __toESM(require("antd/es/collapse/CollapsePanel"));
|
|
2253
|
-
var
|
|
2136
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2254
2137
|
var { Text: Text5 } = import_antd6.Typography;
|
|
2255
2138
|
var WriteTodos = ({
|
|
2256
2139
|
data,
|
|
@@ -2264,11 +2147,11 @@ var WriteTodos = ({
|
|
|
2264
2147
|
(item) => item.status === "completed"
|
|
2265
2148
|
).length;
|
|
2266
2149
|
const expandIcon = () => {
|
|
2267
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons5.UnorderedListOutlined, {});
|
|
2268
2151
|
};
|
|
2269
|
-
const header = /* @__PURE__ */ (0,
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2152
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_antd6.Space, { children: [
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text5, { strong: true, children: "Todos" }),
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Text5, { style: { fontSize: 12 }, type: "secondary", children: [
|
|
2272
2155
|
completedCount,
|
|
2273
2156
|
"/",
|
|
2274
2157
|
totalCount,
|
|
@@ -2278,19 +2161,19 @@ var WriteTodos = ({
|
|
|
2278
2161
|
if (!toolCallData) {
|
|
2279
2162
|
return null;
|
|
2280
2163
|
}
|
|
2281
|
-
return /* @__PURE__ */ (0,
|
|
2164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2282
2165
|
import_antd6.Collapse,
|
|
2283
2166
|
{
|
|
2284
2167
|
size: "small",
|
|
2285
2168
|
bordered: false,
|
|
2286
2169
|
defaultActiveKey: [toolCallData.id],
|
|
2287
2170
|
expandIcon,
|
|
2288
|
-
children: /* @__PURE__ */ (0,
|
|
2171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2289
2172
|
import_CollapsePanel2.default,
|
|
2290
2173
|
{
|
|
2291
2174
|
header,
|
|
2292
2175
|
style: { minWidth: 400 },
|
|
2293
|
-
children: /* @__PURE__ */ (0,
|
|
2176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2294
2177
|
Todo,
|
|
2295
2178
|
{
|
|
2296
2179
|
data: data.args.todos,
|
|
@@ -2313,40 +2196,40 @@ var import_antd_style5 = require("antd-style");
|
|
|
2313
2196
|
|
|
2314
2197
|
// src/components/GenUI/elements/getFileIcon.tsx
|
|
2315
2198
|
var import_icons6 = require("@ant-design/icons");
|
|
2316
|
-
var
|
|
2199
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2317
2200
|
var getFileIcon = (filename) => {
|
|
2318
2201
|
const ext = filename?.split(".")?.pop()?.toLowerCase();
|
|
2319
2202
|
const iconStyle = { fontSize: 14, marginRight: 4, verticalAlign: "middle" };
|
|
2320
2203
|
switch (ext) {
|
|
2321
2204
|
case "ts":
|
|
2322
2205
|
case "tsx":
|
|
2323
|
-
return /* @__PURE__ */ (0,
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.CodeOutlined, { style: { ...iconStyle, color: "#3178c6" } });
|
|
2324
2207
|
case "js":
|
|
2325
2208
|
case "jsx":
|
|
2326
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.CodeOutlined, { style: { ...iconStyle, color: "#f7df1e" } });
|
|
2327
2210
|
case "html":
|
|
2328
|
-
return /* @__PURE__ */ (0,
|
|
2211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.Html5Outlined, { style: { ...iconStyle, color: "#e34c26" } });
|
|
2329
2212
|
case "css":
|
|
2330
2213
|
case "less":
|
|
2331
2214
|
case "scss":
|
|
2332
|
-
return /* @__PURE__ */ (0,
|
|
2215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.FileUnknownOutlined, { style: { ...iconStyle, color: "#563d7c" } });
|
|
2333
2216
|
case "md":
|
|
2334
|
-
return /* @__PURE__ */ (0,
|
|
2217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.FileMarkdownOutlined, { style: { ...iconStyle, color: "#083fa1" } });
|
|
2335
2218
|
case "json":
|
|
2336
|
-
return /* @__PURE__ */ (0,
|
|
2219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.FileTextOutlined, { style: { ...iconStyle, color: "#fbc02d" } });
|
|
2337
2220
|
case "png":
|
|
2338
2221
|
case "jpg":
|
|
2339
2222
|
case "jpeg":
|
|
2340
2223
|
case "gif":
|
|
2341
2224
|
case "svg":
|
|
2342
|
-
return /* @__PURE__ */ (0,
|
|
2225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.FileImageOutlined, { style: { ...iconStyle, color: "#4caf50" } });
|
|
2343
2226
|
default:
|
|
2344
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons6.FileOutlined, { style: { ...iconStyle, color: "#9e9e9e" } });
|
|
2345
2228
|
}
|
|
2346
2229
|
};
|
|
2347
2230
|
|
|
2348
2231
|
// src/components/GenUI/FileExplorer.tsx
|
|
2349
|
-
var
|
|
2232
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2350
2233
|
var useStyles2 = (0, import_antd_style5.createStyles)(({ token, css }) => ({
|
|
2351
2234
|
container: css`
|
|
2352
2235
|
height: 100%;
|
|
@@ -2478,7 +2361,7 @@ var getFolderIcon = (expanded) => {
|
|
|
2478
2361
|
color: "#dcb67a",
|
|
2479
2362
|
verticalAlign: "middle"
|
|
2480
2363
|
};
|
|
2481
|
-
return expanded ? /* @__PURE__ */ (0,
|
|
2364
|
+
return expanded ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.FolderOpenOutlined, { style: iconStyle }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.FolderOutlined, { style: iconStyle });
|
|
2482
2365
|
};
|
|
2483
2366
|
var sortTreeNodes = (nodes) => {
|
|
2484
2367
|
return nodes.sort((a, b) => {
|
|
@@ -2503,7 +2386,7 @@ var buildTreeData = (files, expandedKeys) => {
|
|
|
2503
2386
|
const key = parts.slice(0, index + 1).join("/");
|
|
2504
2387
|
let existingNode = currentLevel.find((node) => node.key === key);
|
|
2505
2388
|
if (!existingNode) {
|
|
2506
|
-
const title = part === "" && index === 0 ? /* @__PURE__ */ (0,
|
|
2389
|
+
const title = part === "" && index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2507
2390
|
"span",
|
|
2508
2391
|
{
|
|
2509
2392
|
style: {
|
|
@@ -2612,7 +2495,7 @@ var FileExplorer = ({
|
|
|
2612
2495
|
};
|
|
2613
2496
|
const renderContent = () => {
|
|
2614
2497
|
if (!selectedFile) {
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
2498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.emptyState, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2616
2499
|
import_antd7.Empty,
|
|
2617
2500
|
{
|
|
2618
2501
|
description: "Select a file to preview",
|
|
@@ -2621,38 +2504,38 @@ var FileExplorer = ({
|
|
|
2621
2504
|
) });
|
|
2622
2505
|
}
|
|
2623
2506
|
const content = Array.isArray(selectedFile.content) ? selectedFile.content.join("\n") : selectedFile.content;
|
|
2624
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2625
2508
|
"div",
|
|
2626
2509
|
{
|
|
2627
2510
|
style: { minHeight: "100%", display: "flex", flexDirection: "column" },
|
|
2628
2511
|
children: [
|
|
2629
|
-
/* @__PURE__ */ (0,
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: styles.header, children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd7.Tooltip, { title: "Copy Content", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2631
2514
|
import_antd7.Button,
|
|
2632
2515
|
{
|
|
2633
2516
|
type: "text",
|
|
2634
|
-
icon: copied ? /* @__PURE__ */ (0,
|
|
2517
|
+
icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.CheckOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.CopyOutlined, {}),
|
|
2635
2518
|
onClick: handleCopy,
|
|
2636
2519
|
size: "small"
|
|
2637
2520
|
}
|
|
2638
2521
|
) }),
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd7.Tooltip, { title: "Download File", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2640
2523
|
import_antd7.Button,
|
|
2641
2524
|
{
|
|
2642
2525
|
type: "text",
|
|
2643
|
-
icon: /* @__PURE__ */ (0,
|
|
2526
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.DownloadOutlined, {}),
|
|
2644
2527
|
onClick: handleDownload,
|
|
2645
2528
|
size: "small"
|
|
2646
2529
|
}
|
|
2647
2530
|
) })
|
|
2648
2531
|
] }),
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2532
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.contentBody, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MDResponse, { content }) })
|
|
2650
2533
|
]
|
|
2651
2534
|
}
|
|
2652
2535
|
);
|
|
2653
2536
|
};
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_antd7.Splitter, { className: styles.splitter, children: [
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd7.Splitter.Panel, { defaultSize: "25%", min: "15%", max: "40%", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.leftPanel, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2656
2539
|
import_antd7.Tree,
|
|
2657
2540
|
{
|
|
2658
2541
|
showIcon: true,
|
|
@@ -2690,16 +2573,16 @@ var FileExplorer = ({
|
|
|
2690
2573
|
}
|
|
2691
2574
|
}
|
|
2692
2575
|
) }) }),
|
|
2693
|
-
/* @__PURE__ */ (0,
|
|
2576
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd7.Splitter.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.rightPanel, children: renderContent() }) })
|
|
2694
2577
|
] }) });
|
|
2695
2578
|
};
|
|
2696
2579
|
|
|
2697
2580
|
// src/components/GenUI/elements/attachments_card.tsx
|
|
2698
|
-
var
|
|
2581
|
+
var import_x2 = require("@ant-design/x");
|
|
2699
2582
|
var import_antd8 = require("antd");
|
|
2700
2583
|
var import_dayjs = __toESM(require("dayjs"));
|
|
2701
2584
|
var import_react12 = require("react");
|
|
2702
|
-
var
|
|
2585
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2703
2586
|
var AttachmentsCard = ({
|
|
2704
2587
|
data,
|
|
2705
2588
|
component_key,
|
|
@@ -2767,7 +2650,7 @@ var AttachmentsCard = ({
|
|
|
2767
2650
|
};
|
|
2768
2651
|
const DownloadButton = ({ item }) => {
|
|
2769
2652
|
if (!showDownloadButton) return null;
|
|
2770
|
-
return /* @__PURE__ */ (0,
|
|
2653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2771
2654
|
"div",
|
|
2772
2655
|
{
|
|
2773
2656
|
style: {
|
|
@@ -2781,7 +2664,7 @@ var AttachmentsCard = ({
|
|
|
2781
2664
|
}
|
|
2782
2665
|
);
|
|
2783
2666
|
};
|
|
2784
|
-
const renderFileDescription = (item) => /* @__PURE__ */ (0,
|
|
2667
|
+
const renderFileDescription = (item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd8.Space, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd8.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2785
2668
|
Text13,
|
|
2786
2669
|
{
|
|
2787
2670
|
type: "secondary",
|
|
@@ -2795,18 +2678,18 @@ var AttachmentsCard = ({
|
|
|
2795
2678
|
const displayData2 = data || [];
|
|
2796
2679
|
const shouldShowViewMore2 = displayData2.length > 4;
|
|
2797
2680
|
const visibleData2 = showAll ? displayData2 : displayData2.slice(0, 4);
|
|
2798
|
-
return /* @__PURE__ */ (0,
|
|
2799
|
-
/* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd8.Flex, { vertical: true, gap: "small", children: [
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd8.Row, { gutter: [8, 8], children: visibleData2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd8.Col, { span: 24 / columns, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2800
2683
|
"div",
|
|
2801
2684
|
{
|
|
2802
2685
|
onClick: (evt) => {
|
|
2803
2686
|
evt.stopPropagation();
|
|
2804
2687
|
handleItemClick(item);
|
|
2805
2688
|
},
|
|
2806
|
-
children: /* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2809
|
-
|
|
2689
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd8.Card, { size: styles.cardSize, style: getCardStyle(item), children: [
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DownloadButton, { item }),
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2692
|
+
import_x2.FileCard,
|
|
2810
2693
|
{
|
|
2811
2694
|
style: getFileCardStyle(item),
|
|
2812
2695
|
name: item.name,
|
|
@@ -2814,7 +2697,7 @@ var AttachmentsCard = ({
|
|
|
2814
2697
|
description: renderFileDescription(item)
|
|
2815
2698
|
}
|
|
2816
2699
|
),
|
|
2817
|
-
item.files && /* @__PURE__ */ (0,
|
|
2700
|
+
item.files && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2818
2701
|
AttachmentsCard,
|
|
2819
2702
|
{
|
|
2820
2703
|
data: item.files,
|
|
@@ -2827,7 +2710,7 @@ var AttachmentsCard = ({
|
|
|
2827
2710
|
] })
|
|
2828
2711
|
}
|
|
2829
2712
|
) }, item.id)) }),
|
|
2830
|
-
shouldShowViewMore2 && /* @__PURE__ */ (0,
|
|
2713
|
+
shouldShowViewMore2 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2831
2714
|
import_antd8.Button,
|
|
2832
2715
|
{
|
|
2833
2716
|
type: "link",
|
|
@@ -2841,11 +2724,11 @@ var AttachmentsCard = ({
|
|
|
2841
2724
|
const displayData = data || [];
|
|
2842
2725
|
const shouldShowViewMore = displayData.length > 4;
|
|
2843
2726
|
const visibleData = showAll ? displayData : displayData.slice(0, 4);
|
|
2844
|
-
return /* @__PURE__ */ (0,
|
|
2845
|
-
visibleData.map((item) => /* @__PURE__ */ (0,
|
|
2846
|
-
/* @__PURE__ */ (0,
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
2848
|
-
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd8.Flex, { vertical: true, gap: size === "small" ? "small" : "middle", children: [
|
|
2728
|
+
visibleData.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { onClick: () => handleItemClick(item), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd8.Card, { size: styles.cardSize, style: getCardStyle(item), children: [
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DownloadButton, { item }),
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2731
|
+
import_x2.FileCard,
|
|
2849
2732
|
{
|
|
2850
2733
|
style: getFileCardStyle(item),
|
|
2851
2734
|
name: item.name,
|
|
@@ -2853,13 +2736,13 @@ var AttachmentsCard = ({
|
|
|
2853
2736
|
description: renderFileDescription(item)
|
|
2854
2737
|
}
|
|
2855
2738
|
),
|
|
2856
|
-
item.files && /* @__PURE__ */ (0,
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2739
|
+
item.files && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text13, { type: "secondary", style: { fontSize: "12px" }, children: [
|
|
2858
2741
|
"\u5305\u542B\u6587\u4EF6(",
|
|
2859
2742
|
item.files.length,
|
|
2860
2743
|
")"
|
|
2861
2744
|
] }),
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2745
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2863
2746
|
AttachmentsCard,
|
|
2864
2747
|
{
|
|
2865
2748
|
data: item.files,
|
|
@@ -2871,7 +2754,7 @@ var AttachmentsCard = ({
|
|
|
2871
2754
|
)
|
|
2872
2755
|
] })
|
|
2873
2756
|
] }) }, item.id)),
|
|
2874
|
-
shouldShowViewMore && /* @__PURE__ */ (0,
|
|
2757
|
+
shouldShowViewMore && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2875
2758
|
import_antd8.Button,
|
|
2876
2759
|
{
|
|
2877
2760
|
type: "link",
|
|
@@ -2890,7 +2773,7 @@ var AttachmentsCard = ({
|
|
|
2890
2773
|
// src/components/GenUI/elements/attachments_viewer_side_app.tsx
|
|
2891
2774
|
var import_antd9 = require("antd");
|
|
2892
2775
|
var import_react13 = require("react");
|
|
2893
|
-
var
|
|
2776
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2894
2777
|
function AttachmentsViewerSideApp({
|
|
2895
2778
|
data,
|
|
2896
2779
|
component_key
|
|
@@ -2899,7 +2782,7 @@ function AttachmentsViewerSideApp({
|
|
|
2899
2782
|
const [loading, setLoading] = (0, import_react13.useState)(true);
|
|
2900
2783
|
const { file_id } = data ?? {};
|
|
2901
2784
|
if (loading) {
|
|
2902
|
-
return /* @__PURE__ */ (0,
|
|
2785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd9.Skeleton, { active: true });
|
|
2903
2786
|
}
|
|
2904
2787
|
const canPreviewInIframe = (fileName) => {
|
|
2905
2788
|
if (!fileName) return false;
|
|
@@ -2934,18 +2817,18 @@ function AttachmentsViewerSideApp({
|
|
|
2934
2817
|
return previewableExtensions.includes(extension);
|
|
2935
2818
|
};
|
|
2936
2819
|
const isPreviewable = fileUri?.fileName ? canPreviewInIframe(fileUri.fileName) : false;
|
|
2937
|
-
return isPreviewable ? /* @__PURE__ */ (0,
|
|
2820
|
+
return isPreviewable ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2938
2821
|
"iframe",
|
|
2939
2822
|
{
|
|
2940
2823
|
style: { width: "100%", height: "100%", border: 0 },
|
|
2941
2824
|
src: fileUri?.url
|
|
2942
2825
|
}
|
|
2943
|
-
) : /* @__PURE__ */ (0,
|
|
2826
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2944
2827
|
import_antd9.Empty,
|
|
2945
2828
|
{
|
|
2946
|
-
description: /* @__PURE__ */ (0,
|
|
2947
|
-
/* @__PURE__ */ (0,
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
2829
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2830
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: "\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u540E\u67E5\u770B\u3002" }),
|
|
2831
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_antd9.Button, { type: "link", href: fileUri?.url, download: fileUri?.fileName, children: [
|
|
2949
2832
|
"\u4E0B\u8F7D",
|
|
2950
2833
|
fileUri?.fileName
|
|
2951
2834
|
] })
|
|
@@ -2964,7 +2847,7 @@ var import_antd10 = require("antd");
|
|
|
2964
2847
|
var import_antd_style6 = require("antd-style");
|
|
2965
2848
|
var import_icons8 = require("@ant-design/icons");
|
|
2966
2849
|
var import_CollapsePanel3 = __toESM(require("antd/es/collapse/CollapsePanel"));
|
|
2967
|
-
var
|
|
2850
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2968
2851
|
var DEFAULT_COLLAPSED_MAX_HEIGHT = 180;
|
|
2969
2852
|
var DEFAULT_EXPANDED_MAX_HEIGHT = 500;
|
|
2970
2853
|
var useStyle4 = (0, import_antd_style6.createStyles)(
|
|
@@ -3056,7 +2939,7 @@ var ContentPreviewCollapse = ({
|
|
|
3056
2939
|
e.stopPropagation();
|
|
3057
2940
|
setShowFullContent(!showFullContent);
|
|
3058
2941
|
};
|
|
3059
|
-
return /* @__PURE__ */ (0,
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3060
2943
|
import_antd10.Collapse,
|
|
3061
2944
|
{
|
|
3062
2945
|
className: styles.collapse,
|
|
@@ -3064,29 +2947,29 @@ var ContentPreviewCollapse = ({
|
|
|
3064
2947
|
bordered: false,
|
|
3065
2948
|
defaultActiveKey: defaultExpanded ? [panelKey] : [],
|
|
3066
2949
|
expandIcon,
|
|
3067
|
-
children: /* @__PURE__ */ (0,
|
|
2950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3068
2951
|
import_CollapsePanel3.default,
|
|
3069
2952
|
{
|
|
3070
2953
|
header,
|
|
3071
2954
|
extra,
|
|
3072
2955
|
style: { minWidth },
|
|
3073
2956
|
children: [
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3075
2958
|
"div",
|
|
3076
2959
|
{
|
|
3077
2960
|
className: cx(styles.contentContainer, showFullContent && "expanded"),
|
|
3078
2961
|
style: {
|
|
3079
2962
|
maxHeight: showFullContent ? expandedMaxHeight : collapsedMaxHeight
|
|
3080
2963
|
},
|
|
3081
|
-
children: /* @__PURE__ */ (0,
|
|
2964
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: contentRef, className: styles.content, children })
|
|
3082
2965
|
}
|
|
3083
2966
|
),
|
|
3084
|
-
isOverflowing && /* @__PURE__ */ (0,
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3086
|
-
/* @__PURE__ */ (0,
|
|
3087
|
-
] }) : /* @__PURE__ */ (0,
|
|
3088
|
-
/* @__PURE__ */ (0,
|
|
3089
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
isOverflowing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: styles.toggleButton, onClick: handleToggleContent, children: showFullContent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons8.UpOutlined, { style: { fontSize: 10 } }),
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: showLessText })
|
|
2970
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons8.DownOutlined, { style: { fontSize: 10 } }),
|
|
2972
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: showAllText })
|
|
3090
2973
|
] }) })
|
|
3091
2974
|
]
|
|
3092
2975
|
},
|
|
@@ -3097,7 +2980,7 @@ var ContentPreviewCollapse = ({
|
|
|
3097
2980
|
};
|
|
3098
2981
|
|
|
3099
2982
|
// src/components/GenUI/elements/WriteFile.tsx
|
|
3100
|
-
var
|
|
2983
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3101
2984
|
var { Text: Text6 } = import_antd11.Typography;
|
|
3102
2985
|
var WriteFile = ({
|
|
3103
2986
|
data,
|
|
@@ -3111,9 +2994,9 @@ var WriteFile = ({
|
|
|
3111
2994
|
return null;
|
|
3112
2995
|
}
|
|
3113
2996
|
const expandIcon = () => getFileIcon(file_path);
|
|
3114
|
-
const header = /* @__PURE__ */ (0,
|
|
3115
|
-
/* @__PURE__ */ (0,
|
|
3116
|
-
/* @__PURE__ */ (0,
|
|
2997
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd11.Space, { children: [
|
|
2998
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text6, { strong: true, children: "New" }),
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text6, { title: file_path, children: file_path?.split("/")?.pop() || "" })
|
|
3117
3000
|
] });
|
|
3118
3001
|
const handleItemClick = (toolCallData2) => {
|
|
3119
3002
|
openSideApp({
|
|
@@ -3125,13 +3008,13 @@ var WriteFile = ({
|
|
|
3125
3008
|
}
|
|
3126
3009
|
});
|
|
3127
3010
|
};
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3129
3012
|
ContentPreviewCollapse,
|
|
3130
3013
|
{
|
|
3131
3014
|
panelKey: toolCallData.id,
|
|
3132
3015
|
header,
|
|
3133
3016
|
expandIcon,
|
|
3134
|
-
extra: /* @__PURE__ */ (0,
|
|
3017
|
+
extra: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3135
3018
|
import_antd11.Button,
|
|
3136
3019
|
{
|
|
3137
3020
|
type: "link",
|
|
@@ -3143,7 +3026,7 @@ var WriteFile = ({
|
|
|
3143
3026
|
children: "Diff View"
|
|
3144
3027
|
}
|
|
3145
3028
|
),
|
|
3146
|
-
children: /* @__PURE__ */ (0,
|
|
3029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MDResponse, { content })
|
|
3147
3030
|
}
|
|
3148
3031
|
);
|
|
3149
3032
|
};
|
|
@@ -3151,10 +3034,10 @@ var WriteFile = ({
|
|
|
3151
3034
|
// src/components/GenUI/elements/file_content_diff_view.tsx
|
|
3152
3035
|
var import_react_diff_viewer = __toESM(require("@alexbruf/react-diff-viewer"));
|
|
3153
3036
|
var import_react_diff_viewer2 = require("@alexbruf/react-diff-viewer/index.css");
|
|
3154
|
-
var
|
|
3037
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3155
3038
|
var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app = true }) => {
|
|
3156
3039
|
const { old_code, new_code } = data;
|
|
3157
|
-
return /* @__PURE__ */ (0,
|
|
3040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3158
3041
|
import_react_diff_viewer.default,
|
|
3159
3042
|
{
|
|
3160
3043
|
oldValue: old_code,
|
|
@@ -3166,7 +3049,7 @@ var FileContentDiffView = ({ data, interactive = true, default_open_in_side_app
|
|
|
3166
3049
|
|
|
3167
3050
|
// src/components/GenUI/elements/EditFile.tsx
|
|
3168
3051
|
var import_antd12 = require("antd");
|
|
3169
|
-
var
|
|
3052
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3170
3053
|
var { Text: Text7 } = import_antd12.Typography;
|
|
3171
3054
|
var EditFile = ({
|
|
3172
3055
|
data,
|
|
@@ -3180,9 +3063,9 @@ var EditFile = ({
|
|
|
3180
3063
|
return null;
|
|
3181
3064
|
}
|
|
3182
3065
|
const expandIcon = () => getFileIcon(file_path);
|
|
3183
|
-
const header = /* @__PURE__ */ (0,
|
|
3184
|
-
/* @__PURE__ */ (0,
|
|
3185
|
-
/* @__PURE__ */ (0,
|
|
3066
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_antd12.Space, { children: [
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text7, { strong: true, children: "Edit" }),
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text7, { title: file_path, children: file_path?.split("/")?.pop() || "" })
|
|
3186
3069
|
] });
|
|
3187
3070
|
const handleItemClick = (toolCallData2) => {
|
|
3188
3071
|
openSideApp({
|
|
@@ -3194,13 +3077,13 @@ var EditFile = ({
|
|
|
3194
3077
|
}
|
|
3195
3078
|
});
|
|
3196
3079
|
};
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3198
3081
|
ContentPreviewCollapse,
|
|
3199
3082
|
{
|
|
3200
3083
|
panelKey: toolCallData.id,
|
|
3201
3084
|
header,
|
|
3202
3085
|
expandIcon,
|
|
3203
|
-
extra: /* @__PURE__ */ (0,
|
|
3086
|
+
extra: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3204
3087
|
import_antd12.Button,
|
|
3205
3088
|
{
|
|
3206
3089
|
type: "link",
|
|
@@ -3212,7 +3095,7 @@ var EditFile = ({
|
|
|
3212
3095
|
children: "Diff View"
|
|
3213
3096
|
}
|
|
3214
3097
|
),
|
|
3215
|
-
children: /* @__PURE__ */ (0,
|
|
3098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MDResponse, { content: new_string })
|
|
3216
3099
|
}
|
|
3217
3100
|
);
|
|
3218
3101
|
};
|
|
@@ -3221,7 +3104,7 @@ var EditFile = ({
|
|
|
3221
3104
|
var import_antd13 = require("antd");
|
|
3222
3105
|
var import_antd_style7 = require("antd-style");
|
|
3223
3106
|
var import_icons9 = require("@ant-design/icons");
|
|
3224
|
-
var
|
|
3107
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3225
3108
|
var { Text: Text8 } = import_antd13.Typography;
|
|
3226
3109
|
var useStyle5 = (0, import_antd_style7.createStyles)(({ token, css }) => ({
|
|
3227
3110
|
card: css`
|
|
@@ -3389,14 +3272,14 @@ var TaskCard = ({
|
|
|
3389
3272
|
switch (status2) {
|
|
3390
3273
|
case "success":
|
|
3391
3274
|
return {
|
|
3392
|
-
icon: /* @__PURE__ */ (0,
|
|
3275
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.CheckCircleOutlined, { style: { fontSize: 16 } }),
|
|
3393
3276
|
color: "success",
|
|
3394
3277
|
text: "Completed",
|
|
3395
3278
|
bgColor: "rgba(82, 196, 26, 0.1)"
|
|
3396
3279
|
};
|
|
3397
3280
|
case "error":
|
|
3398
3281
|
return {
|
|
3399
|
-
icon: /* @__PURE__ */ (0,
|
|
3282
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.CloseCircleOutlined, { style: { fontSize: 16 } }),
|
|
3400
3283
|
color: "error",
|
|
3401
3284
|
text: "Failed",
|
|
3402
3285
|
bgColor: "rgba(255, 77, 79, 0.1)"
|
|
@@ -3404,7 +3287,7 @@ var TaskCard = ({
|
|
|
3404
3287
|
case "pending":
|
|
3405
3288
|
default:
|
|
3406
3289
|
return {
|
|
3407
|
-
icon: /* @__PURE__ */ (0,
|
|
3290
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.LoadingOutlined, { style: { fontSize: 16 } }),
|
|
3408
3291
|
color: "processing",
|
|
3409
3292
|
text: "In Progress",
|
|
3410
3293
|
bgColor: "rgba(24, 144, 255, 0.1)"
|
|
@@ -3424,7 +3307,7 @@ var TaskCard = ({
|
|
|
3424
3307
|
}
|
|
3425
3308
|
});
|
|
3426
3309
|
};
|
|
3427
|
-
return /* @__PURE__ */ (0,
|
|
3310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3428
3311
|
import_antd13.Card,
|
|
3429
3312
|
{
|
|
3430
3313
|
size: "small",
|
|
@@ -3433,28 +3316,28 @@ var TaskCard = ({
|
|
|
3433
3316
|
onClick: handleCardClick,
|
|
3434
3317
|
hoverable: interactive,
|
|
3435
3318
|
bodyStyle: { padding: 0 },
|
|
3436
|
-
children: /* @__PURE__ */ (0,
|
|
3437
|
-
/* @__PURE__ */ (0,
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
subagent_type && /* @__PURE__ */ (0,
|
|
3441
|
-
description && /* @__PURE__ */ (0,
|
|
3319
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.cardBody, children: [
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: styles.header, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.titleSection, children: [
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: styles.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.CarryOutOutlined, { style: { fontSize: 20, color: "#1890ff" } }) }),
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.titleContent, children: [
|
|
3323
|
+
subagent_type && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: styles.taskType, children: subagent_type }),
|
|
3324
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text8, { className: styles.description, children: description })
|
|
3442
3325
|
] })
|
|
3443
3326
|
] }) }),
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3445
|
-
/* @__PURE__ */ (0,
|
|
3446
|
-
assignee && /* @__PURE__ */ (0,
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.footer, children: [
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.footerLeft, children: [
|
|
3329
|
+
assignee && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: styles.assigneeContainer, children: [
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3448
3331
|
import_antd13.Avatar,
|
|
3449
3332
|
{
|
|
3450
3333
|
size: 24,
|
|
3451
|
-
icon: /* @__PURE__ */ (0,
|
|
3334
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.UserOutlined, {}),
|
|
3452
3335
|
className: styles.assigneeAvatar
|
|
3453
3336
|
}
|
|
3454
3337
|
),
|
|
3455
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text8, { className: styles.assigneeName, children: assignee })
|
|
3456
3339
|
] }),
|
|
3457
|
-
/* @__PURE__ */ (0,
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3458
3341
|
import_antd13.Tag,
|
|
3459
3342
|
{
|
|
3460
3343
|
icon: statusConfig.icon,
|
|
@@ -3472,16 +3355,16 @@ var TaskCard = ({
|
|
|
3472
3355
|
}
|
|
3473
3356
|
)
|
|
3474
3357
|
] }),
|
|
3475
|
-
interactive && /* @__PURE__ */ (0,
|
|
3358
|
+
interactive && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons9.RightOutlined, { className: styles.actionIcon })
|
|
3476
3359
|
] }),
|
|
3477
|
-
showResponse && /* @__PURE__ */ (0,
|
|
3360
|
+
showResponse && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3478
3361
|
"div",
|
|
3479
3362
|
{
|
|
3480
3363
|
className: styles.responseSection,
|
|
3481
3364
|
onClick: (e) => e.stopPropagation(),
|
|
3482
3365
|
children: [
|
|
3483
|
-
/* @__PURE__ */ (0,
|
|
3484
|
-
/* @__PURE__ */ (0,
|
|
3366
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text8, { className: styles.responseHeader, children: "Response" }),
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: styles.responseContent, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MDResponse, { content: response }) })
|
|
3485
3368
|
]
|
|
3486
3369
|
}
|
|
3487
3370
|
)
|
|
@@ -3495,14 +3378,14 @@ var import_antd20 = require("antd");
|
|
|
3495
3378
|
|
|
3496
3379
|
// src/components/Chat/Chating.tsx
|
|
3497
3380
|
var import_icons11 = require("@ant-design/icons");
|
|
3498
|
-
var
|
|
3381
|
+
var import_x5 = require("@ant-design/x");
|
|
3499
3382
|
|
|
3500
3383
|
// src/components/Chat/MessageList.tsx
|
|
3501
|
-
var
|
|
3384
|
+
var import_x3 = require("@ant-design/x");
|
|
3502
3385
|
var import_antd14 = require("antd");
|
|
3503
3386
|
var import_ErrorBoundary = __toESM(require("antd/es/alert/ErrorBoundary"));
|
|
3504
3387
|
var import_react15 = require("react");
|
|
3505
|
-
var
|
|
3388
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3506
3389
|
var LazyBubble = ({
|
|
3507
3390
|
message: message5,
|
|
3508
3391
|
renderContent,
|
|
@@ -3536,17 +3419,17 @@ var LazyBubble = ({
|
|
|
3536
3419
|
}, []);
|
|
3537
3420
|
const getPlaceholder = () => {
|
|
3538
3421
|
const estimatedHeight = message5.content ? Math.min(100, message5.content.length / 5) : 100;
|
|
3539
|
-
return /* @__PURE__ */ (0,
|
|
3422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
|
|
3540
3423
|
};
|
|
3541
|
-
return /* @__PURE__ */ (0,
|
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ErrorBoundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message5) : getPlaceholder() }) });
|
|
3542
3425
|
};
|
|
3543
3426
|
var MemoizedBubbleList = (0, import_react15.memo)(
|
|
3544
3427
|
({
|
|
3545
3428
|
items,
|
|
3546
3429
|
role,
|
|
3547
3430
|
className
|
|
3548
|
-
}) => /* @__PURE__ */ (0,
|
|
3549
|
-
|
|
3431
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3432
|
+
import_x3.Bubble.List,
|
|
3550
3433
|
{
|
|
3551
3434
|
autoScroll: true,
|
|
3552
3435
|
items,
|
|
@@ -3574,7 +3457,7 @@ var MessageList = ({
|
|
|
3574
3457
|
try {
|
|
3575
3458
|
const json = JSON.parse(content);
|
|
3576
3459
|
if (json.action && json.message) {
|
|
3577
|
-
return /* @__PURE__ */ (0,
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MDResponse, { content: json.message });
|
|
3578
3461
|
}
|
|
3579
3462
|
} catch (error) {
|
|
3580
3463
|
}
|
|
@@ -3584,14 +3467,14 @@ ${JSON.stringify(tool_call)}
|
|
|
3584
3467
|
\`\`\``;
|
|
3585
3468
|
}) || [];
|
|
3586
3469
|
const content_md = [content, ...tool_calls_md].join("\n");
|
|
3587
|
-
return /* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_antd14.Space, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MDResponse, { content: content_md }) });
|
|
3588
3471
|
}, []);
|
|
3589
3472
|
const items = (0, import_react15.useMemo)(
|
|
3590
3473
|
() => messages.map((message5, index) => ({
|
|
3591
3474
|
key: message5.id,
|
|
3592
3475
|
role: message5.role,
|
|
3593
3476
|
typing: false,
|
|
3594
|
-
content: /* @__PURE__ */ (0,
|
|
3477
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3595
3478
|
LazyBubble,
|
|
3596
3479
|
{
|
|
3597
3480
|
message: message5,
|
|
@@ -3651,9 +3534,9 @@ ${JSON.stringify(tool_call)}
|
|
|
3651
3534
|
}
|
|
3652
3535
|
};
|
|
3653
3536
|
if (items.length === 0) {
|
|
3654
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { flex: 1 } });
|
|
3655
3538
|
}
|
|
3656
|
-
return /* @__PURE__ */ (0,
|
|
3539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3657
3540
|
MemoizedBubbleList,
|
|
3658
3541
|
{
|
|
3659
3542
|
items,
|
|
@@ -3671,7 +3554,7 @@ var import_react17 = __toESM(require("react"));
|
|
|
3671
3554
|
var import_antd15 = require("antd");
|
|
3672
3555
|
var import_antd_style8 = require("antd-style");
|
|
3673
3556
|
var import_CollapsePanel4 = __toESM(require("antd/es/collapse/CollapsePanel"));
|
|
3674
|
-
var
|
|
3557
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3675
3558
|
var { Text: Text9 } = import_antd15.Typography;
|
|
3676
3559
|
var useStyle6 = (0, import_antd_style8.createStyles)(({ token, css }) => ({
|
|
3677
3560
|
card: css`
|
|
@@ -3687,18 +3570,18 @@ var useStyle6 = (0, import_antd_style8.createStyles)(({ token, css }) => ({
|
|
|
3687
3570
|
var HITLContainer = () => {
|
|
3688
3571
|
const { styles } = useStyle6();
|
|
3689
3572
|
const { interrupts } = useAgentChat();
|
|
3690
|
-
return interrupts && interrupts.length > 0 ? /* @__PURE__ */ (0,
|
|
3573
|
+
return interrupts && interrupts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3691
3574
|
import_antd15.Collapse,
|
|
3692
3575
|
{
|
|
3693
3576
|
className: styles.card,
|
|
3694
3577
|
size: "small",
|
|
3695
3578
|
bordered: false,
|
|
3696
3579
|
defaultActiveKey: ["hitl"],
|
|
3697
|
-
children: /* @__PURE__ */ (0,
|
|
3580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3698
3581
|
import_CollapsePanel4.default,
|
|
3699
3582
|
{
|
|
3700
3583
|
showArrow: false,
|
|
3701
|
-
header: /* @__PURE__ */ (0,
|
|
3584
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3702
3585
|
import_antd15.Tag,
|
|
3703
3586
|
{
|
|
3704
3587
|
bordered: false,
|
|
@@ -3713,7 +3596,7 @@ var HITLContainer = () => {
|
|
|
3713
3596
|
children: "\u7B49\u5F85\u53CD\u9988"
|
|
3714
3597
|
}
|
|
3715
3598
|
),
|
|
3716
|
-
children: /* @__PURE__ */ (0,
|
|
3599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_antd15.Space, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MDResponse, { content: interrupt.value }, interrupt.id)) })
|
|
3717
3600
|
},
|
|
3718
3601
|
"hitl"
|
|
3719
3602
|
)
|
|
@@ -3726,7 +3609,7 @@ var import_antd18 = require("antd");
|
|
|
3726
3609
|
|
|
3727
3610
|
// src/components/Chat/TodoProgress.tsx
|
|
3728
3611
|
var import_antd16 = require("antd");
|
|
3729
|
-
var
|
|
3612
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3730
3613
|
var TodoProgress = ({}) => {
|
|
3731
3614
|
const { openSideApp } = useChatUIContext();
|
|
3732
3615
|
const { todos } = useAgentChat();
|
|
@@ -3739,14 +3622,14 @@ var TodoProgress = ({}) => {
|
|
|
3739
3622
|
const totalCount = todos.length;
|
|
3740
3623
|
const hasInProgress = todos.some((item) => item.status === "in_progress");
|
|
3741
3624
|
const percent = Math.round(completedCount / totalCount * 100);
|
|
3742
|
-
return /* @__PURE__ */ (0,
|
|
3625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3743
3626
|
import_antd16.Popover,
|
|
3744
3627
|
{
|
|
3745
|
-
content: /* @__PURE__ */ (0,
|
|
3628
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { width: 400 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Todo, { data: todos, component_key: "header_todos" }) }),
|
|
3746
3629
|
title: "Todos",
|
|
3747
3630
|
trigger: "click",
|
|
3748
3631
|
placement: "bottomRight",
|
|
3749
|
-
children: /* @__PURE__ */ (0,
|
|
3632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_antd16.Tooltip, { title: `${completedCount} / ${totalCount} tasks completed`, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3750
3633
|
import_antd16.Progress,
|
|
3751
3634
|
{
|
|
3752
3635
|
type: "circle",
|
|
@@ -3757,7 +3640,7 @@ var TodoProgress = ({}) => {
|
|
|
3757
3640
|
percent,
|
|
3758
3641
|
status: hasInProgress ? "active" : "normal",
|
|
3759
3642
|
width: 30,
|
|
3760
|
-
format: () => /* @__PURE__ */ (0,
|
|
3643
|
+
format: () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3761
3644
|
"div",
|
|
3762
3645
|
{
|
|
3763
3646
|
style: {
|
|
@@ -3766,7 +3649,7 @@ var TodoProgress = ({}) => {
|
|
|
3766
3649
|
alignItems: "center",
|
|
3767
3650
|
lineHeight: 1
|
|
3768
3651
|
},
|
|
3769
|
-
children: /* @__PURE__ */ (0,
|
|
3652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { style: { fontSize: 8 }, children: [
|
|
3770
3653
|
completedCount,
|
|
3771
3654
|
"/",
|
|
3772
3655
|
totalCount
|
|
@@ -3782,7 +3665,7 @@ var TodoProgress = ({}) => {
|
|
|
3782
3665
|
// src/components/Chat/FileExplorerButton.tsx
|
|
3783
3666
|
var import_antd17 = require("antd");
|
|
3784
3667
|
var import_icons10 = require("@ant-design/icons");
|
|
3785
|
-
var
|
|
3668
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3786
3669
|
var FileExplorerButton = ({}) => {
|
|
3787
3670
|
const { agentState } = useAgentChat();
|
|
3788
3671
|
const { openSideApp } = useChatUIContext();
|
|
@@ -3791,11 +3674,11 @@ var FileExplorerButton = ({}) => {
|
|
|
3791
3674
|
return null;
|
|
3792
3675
|
}
|
|
3793
3676
|
const fileCount = Object.keys(files).length;
|
|
3794
|
-
return /* @__PURE__ */ (0,
|
|
3677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_antd17.Tooltip, { title: "File Explorer", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_antd17.Badge, { count: fileCount, size: "small", color: "blue", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3795
3678
|
import_antd17.Button,
|
|
3796
3679
|
{
|
|
3797
3680
|
type: "text",
|
|
3798
|
-
icon: /* @__PURE__ */ (0,
|
|
3681
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons10.FileTextOutlined, {}),
|
|
3799
3682
|
onClick: () => openSideApp({
|
|
3800
3683
|
component_key: "file_explorer",
|
|
3801
3684
|
message: "File Explorer",
|
|
@@ -3806,9 +3689,9 @@ var FileExplorerButton = ({}) => {
|
|
|
3806
3689
|
};
|
|
3807
3690
|
|
|
3808
3691
|
// src/components/Chat/AgentHeader.tsx
|
|
3809
|
-
var
|
|
3692
|
+
var import_x4 = require("@ant-design/x");
|
|
3810
3693
|
var import_react16 = require("react");
|
|
3811
|
-
var
|
|
3694
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3812
3695
|
var { Text: Text10 } = import_antd18.Typography;
|
|
3813
3696
|
var AgentHeader = (props) => {
|
|
3814
3697
|
const { description, avatar, name, extra, extraMeta } = props;
|
|
@@ -3821,7 +3704,7 @@ var AgentHeader = (props) => {
|
|
|
3821
3704
|
try {
|
|
3822
3705
|
} catch (error) {
|
|
3823
3706
|
}
|
|
3824
|
-
return /* @__PURE__ */ (0,
|
|
3707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3825
3708
|
Element,
|
|
3826
3709
|
{
|
|
3827
3710
|
component_key: meta.id,
|
|
@@ -3834,24 +3717,24 @@ var AgentHeader = (props) => {
|
|
|
3834
3717
|
}
|
|
3835
3718
|
return void 0;
|
|
3836
3719
|
}, [extraMeta]);
|
|
3837
|
-
return /* @__PURE__ */ (0,
|
|
3838
|
-
/* @__PURE__ */ (0,
|
|
3839
|
-
|
|
3720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3722
|
+
import_x4.Welcome,
|
|
3840
3723
|
{
|
|
3841
3724
|
style: { padding: 8 },
|
|
3842
3725
|
variant: "borderless",
|
|
3843
|
-
description: description ? /* @__PURE__ */ (0,
|
|
3844
|
-
icon: avatar ? /* @__PURE__ */ (0,
|
|
3726
|
+
description: description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
|
|
3727
|
+
icon: avatar ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_antd18.Avatar, { src: avatar, size: 48 }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_antd18.Avatar, { size: 48, children: name?.charAt(0).toUpperCase() }),
|
|
3845
3728
|
title: name ? name : void 0,
|
|
3846
|
-
extra: /* @__PURE__ */ (0,
|
|
3729
|
+
extra: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_antd18.Space, { children: [
|
|
3847
3730
|
extra,
|
|
3848
|
-
/* @__PURE__ */ (0,
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3850
|
-
extraMetaComponents && /* @__PURE__ */ (0,
|
|
3731
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TodoProgress, {}),
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FileExplorerButton, {}),
|
|
3733
|
+
extraMetaComponents && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_antd18.Space, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
|
|
3851
3734
|
] })
|
|
3852
3735
|
}
|
|
3853
3736
|
),
|
|
3854
|
-
/* @__PURE__ */ (0,
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3855
3738
|
"div",
|
|
3856
3739
|
{
|
|
3857
3740
|
style: {
|
|
@@ -3863,7 +3746,7 @@ var AgentHeader = (props) => {
|
|
|
3863
3746
|
};
|
|
3864
3747
|
|
|
3865
3748
|
// src/components/Chat/Chating.tsx
|
|
3866
|
-
var
|
|
3749
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3867
3750
|
var Chating = ({
|
|
3868
3751
|
avatar,
|
|
3869
3752
|
name,
|
|
@@ -3981,16 +3864,16 @@ var Chating = ({
|
|
|
3981
3864
|
}
|
|
3982
3865
|
return true;
|
|
3983
3866
|
};
|
|
3984
|
-
const attachmentsNode = /* @__PURE__ */ (0,
|
|
3867
|
+
const attachmentsNode = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_antd19.Badge, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3985
3868
|
import_antd19.Button,
|
|
3986
3869
|
{
|
|
3987
3870
|
type: "text",
|
|
3988
|
-
icon: /* @__PURE__ */ (0,
|
|
3871
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons11.PaperClipOutlined, {}),
|
|
3989
3872
|
onClick: () => setHeaderOpen(!headerOpen)
|
|
3990
3873
|
}
|
|
3991
3874
|
) });
|
|
3992
|
-
const senderHeader = /* @__PURE__ */ (0,
|
|
3993
|
-
|
|
3875
|
+
const senderHeader = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3876
|
+
import_x5.Sender.Header,
|
|
3994
3877
|
{
|
|
3995
3878
|
title: "Attachments",
|
|
3996
3879
|
open: headerOpen,
|
|
@@ -4001,8 +3884,8 @@ var Chating = ({
|
|
|
4001
3884
|
}
|
|
4002
3885
|
},
|
|
4003
3886
|
forceRender: true,
|
|
4004
|
-
children: /* @__PURE__ */ (0,
|
|
4005
|
-
|
|
3887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3888
|
+
import_x5.Attachments,
|
|
4006
3889
|
{
|
|
4007
3890
|
ref: attachmentsRef,
|
|
4008
3891
|
items: attachedFiles,
|
|
@@ -4023,7 +3906,7 @@ var Chating = ({
|
|
|
4023
3906
|
multiple: true,
|
|
4024
3907
|
maxCount: 10,
|
|
4025
3908
|
placeholder: (type) => ({
|
|
4026
|
-
icon: /* @__PURE__ */ (0,
|
|
3909
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons11.CloudUploadOutlined, {}),
|
|
4027
3910
|
title: "\u4E0A\u4F20\u6587\u4EF6",
|
|
4028
3911
|
description: attachment_placeholder
|
|
4029
3912
|
})
|
|
@@ -4031,19 +3914,19 @@ var Chating = ({
|
|
|
4031
3914
|
)
|
|
4032
3915
|
}
|
|
4033
3916
|
);
|
|
4034
|
-
const refreshButton = /* @__PURE__ */ (0,
|
|
3917
|
+
const refreshButton = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4035
3918
|
import_antd19.Button,
|
|
4036
3919
|
{
|
|
4037
3920
|
type: "text",
|
|
4038
|
-
icon: /* @__PURE__ */ (0,
|
|
3921
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons11.ReloadOutlined, {}),
|
|
4039
3922
|
onClick: () => {
|
|
4040
3923
|
loadMessages();
|
|
4041
3924
|
}
|
|
4042
3925
|
}
|
|
4043
3926
|
);
|
|
4044
3927
|
const headerExtra = showRefreshButton ? [refreshButton] : [];
|
|
4045
|
-
return /* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
3928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: showHeader && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4047
3930
|
AgentHeader,
|
|
4048
3931
|
{
|
|
4049
3932
|
description,
|
|
@@ -4053,9 +3936,9 @@ var Chating = ({
|
|
|
4053
3936
|
extraMeta
|
|
4054
3937
|
}
|
|
4055
3938
|
) }),
|
|
4056
|
-
/* @__PURE__ */ (0,
|
|
4057
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
4058
|
-
error && /* @__PURE__ */ (0,
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MessageList, { messages, className: styles.messages }),
|
|
3940
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", {}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_x5.Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
|
|
3941
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4059
3942
|
import_antd19.Alert,
|
|
4060
3943
|
{
|
|
4061
3944
|
type: "error",
|
|
@@ -4065,9 +3948,9 @@ var Chating = ({
|
|
|
4065
3948
|
message: `${error.message}`
|
|
4066
3949
|
}
|
|
4067
3950
|
) }),
|
|
4068
|
-
showHITL && /* @__PURE__ */ (0,
|
|
4069
|
-
showSender && /* @__PURE__ */ (0,
|
|
4070
|
-
|
|
3951
|
+
showHITL && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HITLContainer, {}),
|
|
3952
|
+
showSender && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3953
|
+
import_x5.Sender,
|
|
4071
3954
|
{
|
|
4072
3955
|
disabled: interrupts && interrupts.length > 0,
|
|
4073
3956
|
allowSpeech: false,
|
|
@@ -4092,11 +3975,11 @@ var Chating = ({
|
|
|
4092
3975
|
};
|
|
4093
3976
|
|
|
4094
3977
|
// src/components/GenUI/elements/task_detail.tsx
|
|
4095
|
-
var
|
|
3978
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4096
3979
|
var { Text: Text11 } = import_antd20.Typography;
|
|
4097
3980
|
var TaskDetail = ({ data, component_key, interactive = true }) => {
|
|
4098
3981
|
const { description, subagent_type, thread_id } = data || {};
|
|
4099
|
-
return /* @__PURE__ */ (0,
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4100
3983
|
AgentThreadProvider,
|
|
4101
3984
|
{
|
|
4102
3985
|
threadId: thread_id,
|
|
@@ -4106,7 +3989,7 @@ var TaskDetail = ({ data, component_key, interactive = true }) => {
|
|
|
4106
3989
|
enableReturnStateWhenStreamCompleted: true,
|
|
4107
3990
|
enableResumeStream: true
|
|
4108
3991
|
},
|
|
4109
|
-
children: /* @__PURE__ */ (0,
|
|
3992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4110
3993
|
Chating,
|
|
4111
3994
|
{
|
|
4112
3995
|
showRefreshButton: true,
|
|
@@ -4188,7 +4071,7 @@ var regsiterElement = (language, ElementMeta) => {
|
|
|
4188
4071
|
var import_antd21 = require("antd");
|
|
4189
4072
|
var import_antd_style9 = require("antd-style");
|
|
4190
4073
|
var import_react18 = require("react");
|
|
4191
|
-
var
|
|
4074
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4192
4075
|
var useStyle7 = (0, import_antd_style9.createStyles)(({ token, css }) => {
|
|
4193
4076
|
return {
|
|
4194
4077
|
tabContainer: css`
|
|
@@ -4208,9 +4091,9 @@ var useStyle7 = (0, import_antd_style9.createStyles)(({ token, css }) => {
|
|
|
4208
4091
|
};
|
|
4209
4092
|
});
|
|
4210
4093
|
var EmptySideAppView = ({ component_key, data }) => {
|
|
4211
|
-
return /* @__PURE__ */ (0,
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
|
|
4096
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
|
|
4214
4097
|
] });
|
|
4215
4098
|
};
|
|
4216
4099
|
var SideAppViewBrowser = () => {
|
|
@@ -4271,7 +4154,7 @@ var SideAppViewBrowser = () => {
|
|
|
4271
4154
|
add(
|
|
4272
4155
|
key,
|
|
4273
4156
|
sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
|
|
4274
|
-
/* @__PURE__ */ (0,
|
|
4157
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4275
4158
|
SideAppView,
|
|
4276
4159
|
{
|
|
4277
4160
|
component_key: sideAppSelectedCard?.component_key || "",
|
|
@@ -4312,16 +4195,16 @@ var SideAppViewBrowser = () => {
|
|
|
4312
4195
|
const getSizeIcon = (size) => {
|
|
4313
4196
|
switch (size) {
|
|
4314
4197
|
case "middle":
|
|
4315
|
-
return /* @__PURE__ */ (0,
|
|
4198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons12.CompressOutlined, {});
|
|
4316
4199
|
case "large":
|
|
4317
|
-
return /* @__PURE__ */ (0,
|
|
4200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons12.ExpandOutlined, {});
|
|
4318
4201
|
case "full":
|
|
4319
|
-
return /* @__PURE__ */ (0,
|
|
4202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons12.FullscreenOutlined, {});
|
|
4320
4203
|
default:
|
|
4321
|
-
return /* @__PURE__ */ (0,
|
|
4204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons12.ExpandOutlined, {});
|
|
4322
4205
|
}
|
|
4323
4206
|
};
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4325
4208
|
import_antd21.Tabs,
|
|
4326
4209
|
{
|
|
4327
4210
|
className: styles.tabContainer,
|
|
@@ -4329,8 +4212,8 @@ var SideAppViewBrowser = () => {
|
|
|
4329
4212
|
style: { height: "100%" },
|
|
4330
4213
|
hideAdd: true,
|
|
4331
4214
|
tabBarExtraContent: {
|
|
4332
|
-
right: /* @__PURE__ */ (0,
|
|
4333
|
-
/* @__PURE__ */ (0,
|
|
4215
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4334
4217
|
import_antd21.Button,
|
|
4335
4218
|
{
|
|
4336
4219
|
style: { margin: "8px 0" },
|
|
@@ -4341,13 +4224,13 @@ var SideAppViewBrowser = () => {
|
|
|
4341
4224
|
title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
|
|
4342
4225
|
}
|
|
4343
4226
|
),
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4227
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4345
4228
|
import_antd21.Button,
|
|
4346
4229
|
{
|
|
4347
4230
|
style: { margin: "8px 0" },
|
|
4348
4231
|
size: "large",
|
|
4349
4232
|
type: "text",
|
|
4350
|
-
icon: /* @__PURE__ */ (0,
|
|
4233
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons12.CloseOutlined, {}),
|
|
4351
4234
|
onClick: () => {
|
|
4352
4235
|
closeSideApp();
|
|
4353
4236
|
}
|
|
@@ -4364,10 +4247,10 @@ var SideAppViewBrowser = () => {
|
|
|
4364
4247
|
};
|
|
4365
4248
|
|
|
4366
4249
|
// src/components/Chat/LatticeChat.tsx
|
|
4367
|
-
var
|
|
4250
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4368
4251
|
var LatticeChat = (props) => {
|
|
4369
4252
|
const { assistant_id, thread_id = "", menu, ...chatingProps } = props;
|
|
4370
|
-
return /* @__PURE__ */ (0,
|
|
4253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4371
4254
|
AgentThreadProvider,
|
|
4372
4255
|
{
|
|
4373
4256
|
assistantId: assistant_id,
|
|
@@ -4377,12 +4260,12 @@ var LatticeChat = (props) => {
|
|
|
4377
4260
|
enableReturnStateWhenStreamCompleted: true,
|
|
4378
4261
|
enableResumeStream: true
|
|
4379
4262
|
},
|
|
4380
|
-
children: /* @__PURE__ */ (0,
|
|
4263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChatUIContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4381
4264
|
ColumnLayout,
|
|
4382
4265
|
{
|
|
4383
4266
|
menu,
|
|
4384
|
-
left: thread_id ? /* @__PURE__ */ (0,
|
|
4385
|
-
right: /* @__PURE__ */ (0,
|
|
4267
|
+
left: thread_id ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Chating, { ...chatingProps }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
|
|
4268
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SideAppViewBrowser, {})
|
|
4386
4269
|
}
|
|
4387
4270
|
) })
|
|
4388
4271
|
}
|
|
@@ -4398,7 +4281,7 @@ var import_client_sdk4 = require("@axiom-lattice/client-sdk");
|
|
|
4398
4281
|
|
|
4399
4282
|
// src/components/Chat/LatticeChatShellContext.tsx
|
|
4400
4283
|
var import_react19 = require("react");
|
|
4401
|
-
var
|
|
4284
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4402
4285
|
var DEFAULT_CONFIG = {
|
|
4403
4286
|
baseURL: "http://localhost:4001",
|
|
4404
4287
|
apiKey: "",
|
|
@@ -4477,7 +4360,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
4477
4360
|
setConfig(defaultConfig);
|
|
4478
4361
|
saveToLocalStorage(defaultConfig);
|
|
4479
4362
|
}, [initialConfig, saveToLocalStorage]);
|
|
4480
|
-
return /* @__PURE__ */ (0,
|
|
4363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4481
4364
|
LatticeChatShellContext.Provider,
|
|
4482
4365
|
{
|
|
4483
4366
|
value: {
|
|
@@ -4503,7 +4386,7 @@ var useLatticeChatShellContext = () => {
|
|
|
4503
4386
|
};
|
|
4504
4387
|
|
|
4505
4388
|
// src/components/Chat/AssistantContext.tsx
|
|
4506
|
-
var
|
|
4389
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4507
4390
|
var AssistantContext = (0, import_react20.createContext)({
|
|
4508
4391
|
assistants: [],
|
|
4509
4392
|
currentAssistant: null,
|
|
@@ -4738,7 +4621,7 @@ var AssistantContextProvider = ({
|
|
|
4738
4621
|
}
|
|
4739
4622
|
}
|
|
4740
4623
|
}, [initialAssistantId, state.assistants, state.currentAssistant]);
|
|
4741
|
-
return /* @__PURE__ */ (0,
|
|
4624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4742
4625
|
AssistantContext.Provider,
|
|
4743
4626
|
{
|
|
4744
4627
|
value: {
|
|
@@ -4768,7 +4651,7 @@ var useAssistantContext = () => {
|
|
|
4768
4651
|
|
|
4769
4652
|
// src/components/Chat/ConversationContext.tsx
|
|
4770
4653
|
var import_client_sdk5 = require("@axiom-lattice/client-sdk");
|
|
4771
|
-
var
|
|
4654
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4772
4655
|
var ConversationContext = (0, import_react21.createContext)({
|
|
4773
4656
|
assistantId: null,
|
|
4774
4657
|
thread: null,
|
|
@@ -5031,7 +4914,7 @@ var ConversationContextProvider = ({
|
|
|
5031
4914
|
const clearThread = (0, import_react21.useCallback)(() => {
|
|
5032
4915
|
setThreadId(null);
|
|
5033
4916
|
}, []);
|
|
5034
|
-
return /* @__PURE__ */ (0,
|
|
4917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5035
4918
|
ConversationContext.Provider,
|
|
5036
4919
|
{
|
|
5037
4920
|
value: {
|
|
@@ -5066,10 +4949,10 @@ var useConversationContext = () => {
|
|
|
5066
4949
|
};
|
|
5067
4950
|
|
|
5068
4951
|
// src/components/Chat/AgentConversations.tsx
|
|
5069
|
-
var
|
|
4952
|
+
var import_x6 = require("@ant-design/x");
|
|
5070
4953
|
var import_antd22 = require("antd");
|
|
5071
4954
|
var import_react22 = require("react");
|
|
5072
|
-
var
|
|
4955
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5073
4956
|
var AgentConversations = () => {
|
|
5074
4957
|
const { token } = import_antd22.theme.useToken();
|
|
5075
4958
|
const { currentAssistant } = useAssistantContext();
|
|
@@ -5099,8 +4982,8 @@ var AgentConversations = () => {
|
|
|
5099
4982
|
}
|
|
5100
4983
|
await createThread();
|
|
5101
4984
|
};
|
|
5102
|
-
return /* @__PURE__ */ (0,
|
|
5103
|
-
|
|
4985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4986
|
+
import_x6.Conversations,
|
|
5104
4987
|
{
|
|
5105
4988
|
creation: {
|
|
5106
4989
|
onClick: newChatClick
|
|
@@ -5122,9 +5005,9 @@ var import_antd24 = require("antd");
|
|
|
5122
5005
|
var import_icons13 = require("@ant-design/icons");
|
|
5123
5006
|
|
|
5124
5007
|
// src/components/Chat/AssistantList.tsx
|
|
5125
|
-
var
|
|
5008
|
+
var import_x7 = require("@ant-design/x");
|
|
5126
5009
|
var import_antd23 = require("antd");
|
|
5127
|
-
var
|
|
5010
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5128
5011
|
var AssistantList = () => {
|
|
5129
5012
|
const { token } = import_antd23.theme.useToken();
|
|
5130
5013
|
const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
|
|
@@ -5136,7 +5019,7 @@ var AssistantList = () => {
|
|
|
5136
5019
|
const items = assistants.map((assistant) => ({
|
|
5137
5020
|
key: assistant.id,
|
|
5138
5021
|
label: assistant.name,
|
|
5139
|
-
icon: /* @__PURE__ */ (0,
|
|
5022
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5140
5023
|
import_antd23.Avatar,
|
|
5141
5024
|
{
|
|
5142
5025
|
size: "small",
|
|
@@ -5148,8 +5031,8 @@ var AssistantList = () => {
|
|
|
5148
5031
|
}
|
|
5149
5032
|
)
|
|
5150
5033
|
}));
|
|
5151
|
-
return /* @__PURE__ */ (0,
|
|
5152
|
-
|
|
5034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5035
|
+
import_x7.Conversations,
|
|
5153
5036
|
{
|
|
5154
5037
|
items,
|
|
5155
5038
|
activeKey: currentAssistant?.id,
|
|
@@ -5163,7 +5046,7 @@ var AssistantList = () => {
|
|
|
5163
5046
|
|
|
5164
5047
|
// src/components/Chat/ChatSidebar.tsx
|
|
5165
5048
|
var import_antd_style10 = require("antd-style");
|
|
5166
|
-
var
|
|
5049
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5167
5050
|
var useStyles3 = (0, import_antd_style10.createStyles)(({ token, css }) => ({
|
|
5168
5051
|
sidebar: css`
|
|
5169
5052
|
display: flex;
|
|
@@ -5358,87 +5241,87 @@ var ChatSidebar = ({
|
|
|
5358
5241
|
const handleMouseLeave = () => {
|
|
5359
5242
|
setIsHovered(false);
|
|
5360
5243
|
};
|
|
5361
|
-
return /* @__PURE__ */ (0,
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
5245
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5363
5246
|
"div",
|
|
5364
5247
|
{
|
|
5365
5248
|
className: styles.sidebar,
|
|
5366
5249
|
onMouseEnter: handleMouseEnter,
|
|
5367
5250
|
onMouseLeave: handleMouseLeave,
|
|
5368
|
-
children: !isCollapsed && /* @__PURE__ */ (0,
|
|
5369
|
-
/* @__PURE__ */ (0,
|
|
5370
|
-
/* @__PURE__ */ (0,
|
|
5371
|
-
/* @__PURE__ */ (0,
|
|
5372
|
-
/* @__PURE__ */ (0,
|
|
5251
|
+
children: !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.content, children: [
|
|
5253
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.section, children: [
|
|
5254
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: styles.sectionTitle, children: "Assistants" }),
|
|
5255
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssistantList, {})
|
|
5373
5256
|
] }),
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5375
|
-
/* @__PURE__ */ (0,
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5377
|
-
/* @__PURE__ */ (0,
|
|
5257
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_antd24.Divider, { className: styles.divider }),
|
|
5258
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.section, children: [
|
|
5259
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: styles.sectionTitle, children: "Threads" }),
|
|
5260
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AgentConversations, {})
|
|
5378
5261
|
] })
|
|
5379
5262
|
] }),
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.footer, children: [
|
|
5264
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5382
5265
|
"button",
|
|
5383
5266
|
{
|
|
5384
5267
|
className: styles.actionButton,
|
|
5385
5268
|
onClick: handleToggleCollapse,
|
|
5386
5269
|
title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5387
5270
|
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5388
|
-
children: isCollapsed ? /* @__PURE__ */ (0,
|
|
5271
|
+
children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.MenuUnfoldOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.MenuFoldOutlined, {})
|
|
5389
5272
|
}
|
|
5390
5273
|
),
|
|
5391
|
-
/* @__PURE__ */ (0,
|
|
5274
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5392
5275
|
"button",
|
|
5393
5276
|
{
|
|
5394
5277
|
className: styles.actionButton,
|
|
5395
5278
|
onClick: handleSettingsClick,
|
|
5396
5279
|
title: "Settings",
|
|
5397
5280
|
"aria-label": "Settings",
|
|
5398
|
-
children: /* @__PURE__ */ (0,
|
|
5281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.SettingOutlined, {})
|
|
5399
5282
|
}
|
|
5400
5283
|
)
|
|
5401
5284
|
] })
|
|
5402
5285
|
] })
|
|
5403
5286
|
}
|
|
5404
5287
|
),
|
|
5405
|
-
isCollapsed && /* @__PURE__ */ (0,
|
|
5288
|
+
isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5406
5289
|
"div",
|
|
5407
5290
|
{
|
|
5408
5291
|
className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
|
|
5409
5292
|
onMouseEnter: handleMouseEnter,
|
|
5410
5293
|
onMouseLeave: handleMouseLeave,
|
|
5411
5294
|
children: [
|
|
5412
|
-
/* @__PURE__ */ (0,
|
|
5413
|
-
/* @__PURE__ */ (0,
|
|
5414
|
-
/* @__PURE__ */ (0,
|
|
5415
|
-
/* @__PURE__ */ (0,
|
|
5295
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.hoverContent, children: [
|
|
5296
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.section, children: [
|
|
5297
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: styles.sectionTitle, children: "Assistants" }),
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssistantList, {})
|
|
5416
5299
|
] }),
|
|
5417
|
-
/* @__PURE__ */ (0,
|
|
5418
|
-
/* @__PURE__ */ (0,
|
|
5419
|
-
/* @__PURE__ */ (0,
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5300
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_antd24.Divider, { className: styles.divider }),
|
|
5301
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.section, children: [
|
|
5302
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: styles.sectionTitle, children: "Threads" }),
|
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AgentConversations, {})
|
|
5421
5304
|
] })
|
|
5422
5305
|
] }),
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5424
|
-
/* @__PURE__ */ (0,
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: styles.footer, children: [
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5425
5308
|
"button",
|
|
5426
5309
|
{
|
|
5427
5310
|
className: styles.actionButton,
|
|
5428
5311
|
onClick: handleToggleCollapse,
|
|
5429
5312
|
title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5430
5313
|
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5431
|
-
children: isCollapsed ? /* @__PURE__ */ (0,
|
|
5314
|
+
children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.MenuUnfoldOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.MenuFoldOutlined, {})
|
|
5432
5315
|
}
|
|
5433
5316
|
),
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5435
5318
|
"button",
|
|
5436
5319
|
{
|
|
5437
5320
|
className: styles.actionButton,
|
|
5438
5321
|
onClick: handleSettingsClick,
|
|
5439
5322
|
title: "Settings",
|
|
5440
5323
|
"aria-label": "Settings",
|
|
5441
|
-
children: /* @__PURE__ */ (0,
|
|
5324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.SettingOutlined, {})
|
|
5442
5325
|
}
|
|
5443
5326
|
)
|
|
5444
5327
|
] })
|
|
@@ -5449,14 +5332,14 @@ var ChatSidebar = ({
|
|
|
5449
5332
|
};
|
|
5450
5333
|
|
|
5451
5334
|
// src/components/Chat/LatticeChatView.tsx
|
|
5452
|
-
var
|
|
5335
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5453
5336
|
var LatticeChatView = (props) => {
|
|
5454
5337
|
const { assistantId, thread } = useConversationContext();
|
|
5455
5338
|
const { currentAssistant } = useAssistantContext();
|
|
5456
5339
|
const {
|
|
5457
5340
|
config: { baseURL }
|
|
5458
5341
|
} = useLatticeChatShellContext();
|
|
5459
|
-
return assistantId && thread ? /* @__PURE__ */ (0,
|
|
5342
|
+
return assistantId && thread ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5460
5343
|
AxiomLatticeProvider,
|
|
5461
5344
|
{
|
|
5462
5345
|
config: {
|
|
@@ -5465,14 +5348,14 @@ var LatticeChatView = (props) => {
|
|
|
5465
5348
|
assistantId,
|
|
5466
5349
|
transport: "sse"
|
|
5467
5350
|
},
|
|
5468
|
-
children: /* @__PURE__ */ (0,
|
|
5351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5469
5352
|
LatticeChat,
|
|
5470
5353
|
{
|
|
5471
5354
|
thread_id: thread?.id,
|
|
5472
5355
|
assistant_id: assistantId,
|
|
5473
5356
|
name: currentAssistant?.name,
|
|
5474
5357
|
description: currentAssistant?.description,
|
|
5475
|
-
menu: /* @__PURE__ */ (0,
|
|
5358
|
+
menu: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatSidebar, {})
|
|
5476
5359
|
}
|
|
5477
5360
|
)
|
|
5478
5361
|
}
|
|
@@ -5484,7 +5367,7 @@ var import_react24 = require("react");
|
|
|
5484
5367
|
var import_antd25 = require("antd");
|
|
5485
5368
|
var import_icons14 = require("@ant-design/icons");
|
|
5486
5369
|
var import_antd_style11 = require("antd-style");
|
|
5487
|
-
var
|
|
5370
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5488
5371
|
var { Text: Text12, Title: Title2 } = import_antd25.Typography;
|
|
5489
5372
|
var { TextArea } = import_antd25.Input;
|
|
5490
5373
|
var useStyles4 = (0, import_antd_style11.createStyles)(({ token, css }) => ({
|
|
@@ -5833,12 +5716,12 @@ var SETTINGS_MENU_ITEMS = [
|
|
|
5833
5716
|
{
|
|
5834
5717
|
key: "environment",
|
|
5835
5718
|
label: "Environment Variables",
|
|
5836
|
-
icon: /* @__PURE__ */ (0,
|
|
5719
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.EnvironmentOutlined, {})
|
|
5837
5720
|
},
|
|
5838
5721
|
{
|
|
5839
5722
|
key: "models",
|
|
5840
5723
|
label: "Model Configuration",
|
|
5841
|
-
icon: /* @__PURE__ */ (0,
|
|
5724
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.ApiOutlined, {})
|
|
5842
5725
|
}
|
|
5843
5726
|
];
|
|
5844
5727
|
var SettingsModal = ({
|
|
@@ -6284,25 +6167,25 @@ var SettingsModal = ({
|
|
|
6284
6167
|
}
|
|
6285
6168
|
}));
|
|
6286
6169
|
};
|
|
6287
|
-
return /* @__PURE__ */ (0,
|
|
6288
|
-
/* @__PURE__ */ (0,
|
|
6170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.formContainer, children: [
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6289
6172
|
import_antd25.Alert,
|
|
6290
6173
|
{
|
|
6291
6174
|
message: "Configuration Effect",
|
|
6292
|
-
description: /* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6294
|
-
/* @__PURE__ */ (0,
|
|
6175
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { marginBottom: 8 }, children: [
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6295
6178
|
import_icons14.CheckCircleOutlined,
|
|
6296
6179
|
{
|
|
6297
6180
|
style: { color: "#52c41a", marginRight: 8 }
|
|
6298
6181
|
}
|
|
6299
6182
|
),
|
|
6300
|
-
/* @__PURE__ */ (0,
|
|
6183
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Immediately effective:" }),
|
|
6301
6184
|
" QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
|
|
6302
6185
|
] }),
|
|
6303
|
-
/* @__PURE__ */ (0,
|
|
6304
|
-
/* @__PURE__ */ (0,
|
|
6305
|
-
/* @__PURE__ */ (0,
|
|
6186
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6187
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.ReloadOutlined, { style: { color: "#faad14", marginRight: 8 } }),
|
|
6188
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Requires restart:" }),
|
|
6306
6189
|
" PORT (server must be restarted to change port)"
|
|
6307
6190
|
] })
|
|
6308
6191
|
] }),
|
|
@@ -6311,8 +6194,8 @@ var SettingsModal = ({
|
|
|
6311
6194
|
className: styles.alertCard
|
|
6312
6195
|
}
|
|
6313
6196
|
),
|
|
6314
|
-
/* @__PURE__ */ (0,
|
|
6315
|
-
/* @__PURE__ */ (0,
|
|
6197
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(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." }) }),
|
|
6198
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6316
6199
|
TextArea,
|
|
6317
6200
|
{
|
|
6318
6201
|
value: config.envText,
|
|
@@ -6389,10 +6272,10 @@ QUEUE_NAME=tasks`,
|
|
|
6389
6272
|
}));
|
|
6390
6273
|
}
|
|
6391
6274
|
};
|
|
6392
|
-
return /* @__PURE__ */ (0,
|
|
6393
|
-
/* @__PURE__ */ (0,
|
|
6394
|
-
config.models.map((model, index) => /* @__PURE__ */ (0,
|
|
6395
|
-
/* @__PURE__ */ (0,
|
|
6275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.formContainer, children: [
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(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." }) }),
|
|
6277
|
+
config.models.map((model, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.card, children: [
|
|
6278
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6396
6279
|
"div",
|
|
6397
6280
|
{
|
|
6398
6281
|
style: {
|
|
@@ -6404,12 +6287,12 @@ QUEUE_NAME=tasks`,
|
|
|
6404
6287
|
borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
|
|
6405
6288
|
},
|
|
6406
6289
|
children: [
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6408
|
-
/* @__PURE__ */ (0,
|
|
6290
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text12, { strong: true, style: { fontSize: 16 }, children: [
|
|
6409
6292
|
"Model ",
|
|
6410
6293
|
index + 1
|
|
6411
6294
|
] }),
|
|
6412
|
-
model.key && /* @__PURE__ */ (0,
|
|
6295
|
+
model.key && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6413
6296
|
Text12,
|
|
6414
6297
|
{
|
|
6415
6298
|
type: "secondary",
|
|
@@ -6422,7 +6305,7 @@ QUEUE_NAME=tasks`,
|
|
|
6422
6305
|
}
|
|
6423
6306
|
)
|
|
6424
6307
|
] }),
|
|
6425
|
-
config.models.length > 1 && /* @__PURE__ */ (0,
|
|
6308
|
+
config.models.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6426
6309
|
import_antd25.Button,
|
|
6427
6310
|
{
|
|
6428
6311
|
type: "text",
|
|
@@ -6439,10 +6322,10 @@ QUEUE_NAME=tasks`,
|
|
|
6439
6322
|
]
|
|
6440
6323
|
}
|
|
6441
6324
|
),
|
|
6442
|
-
/* @__PURE__ */ (0,
|
|
6443
|
-
/* @__PURE__ */ (0,
|
|
6444
|
-
/* @__PURE__ */ (0,
|
|
6445
|
-
/* @__PURE__ */ (0,
|
|
6325
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd25.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
6326
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Key *" }),
|
|
6328
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6446
6329
|
import_antd25.Input,
|
|
6447
6330
|
{
|
|
6448
6331
|
placeholder: "e.g., default, gpt-4, claude",
|
|
@@ -6451,11 +6334,11 @@ QUEUE_NAME=tasks`,
|
|
|
6451
6334
|
style: { height: 40 }
|
|
6452
6335
|
}
|
|
6453
6336
|
),
|
|
6454
|
-
/* @__PURE__ */ (0,
|
|
6337
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formDescription, children: "Unique identifier for this model" })
|
|
6455
6338
|
] }),
|
|
6456
|
-
/* @__PURE__ */ (0,
|
|
6457
|
-
/* @__PURE__ */ (0,
|
|
6458
|
-
/* @__PURE__ */ (0,
|
|
6339
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6340
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Provider *" }),
|
|
6341
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6459
6342
|
import_antd25.Select,
|
|
6460
6343
|
{
|
|
6461
6344
|
style: { width: "100%", height: 40 },
|
|
@@ -6471,9 +6354,9 @@ QUEUE_NAME=tasks`,
|
|
|
6471
6354
|
}
|
|
6472
6355
|
)
|
|
6473
6356
|
] }),
|
|
6474
|
-
/* @__PURE__ */ (0,
|
|
6475
|
-
/* @__PURE__ */ (0,
|
|
6476
|
-
/* @__PURE__ */ (0,
|
|
6357
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6358
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Model Name *" }),
|
|
6359
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6477
6360
|
import_antd25.Input,
|
|
6478
6361
|
{
|
|
6479
6362
|
placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
|
|
@@ -6483,9 +6366,9 @@ QUEUE_NAME=tasks`,
|
|
|
6483
6366
|
}
|
|
6484
6367
|
)
|
|
6485
6368
|
] }),
|
|
6486
|
-
/* @__PURE__ */ (0,
|
|
6487
|
-
/* @__PURE__ */ (0,
|
|
6488
|
-
/* @__PURE__ */ (0,
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6370
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "API Key" }),
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6489
6372
|
import_antd25.Input.Password,
|
|
6490
6373
|
{
|
|
6491
6374
|
placeholder: "Enter your API key",
|
|
@@ -6494,11 +6377,11 @@ QUEUE_NAME=tasks`,
|
|
|
6494
6377
|
style: { height: 40 }
|
|
6495
6378
|
}
|
|
6496
6379
|
),
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6380
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
|
|
6498
6381
|
] }),
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6500
|
-
/* @__PURE__ */ (0,
|
|
6501
|
-
/* @__PURE__ */ (0,
|
|
6382
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6383
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Base URL" }),
|
|
6384
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6502
6385
|
import_antd25.Input,
|
|
6503
6386
|
{
|
|
6504
6387
|
placeholder: "e.g., https://api.openai.com/v1",
|
|
@@ -6507,22 +6390,22 @@ QUEUE_NAME=tasks`,
|
|
|
6507
6390
|
style: { height: 40 }
|
|
6508
6391
|
}
|
|
6509
6392
|
),
|
|
6510
|
-
/* @__PURE__ */ (0,
|
|
6393
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formDescription, children: "Optional custom base URL for the API" })
|
|
6511
6394
|
] }),
|
|
6512
|
-
/* @__PURE__ */ (0,
|
|
6513
|
-
/* @__PURE__ */ (0,
|
|
6395
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd25.Space, { children: [
|
|
6396
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6514
6397
|
import_antd25.Switch,
|
|
6515
6398
|
{
|
|
6516
6399
|
checked: model.streaming,
|
|
6517
6400
|
onChange: (checked) => handleModelChange(index, "streaming", checked)
|
|
6518
6401
|
}
|
|
6519
6402
|
),
|
|
6520
|
-
/* @__PURE__ */ (0,
|
|
6403
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { children: "Enable Streaming" })
|
|
6521
6404
|
] }) }),
|
|
6522
|
-
/* @__PURE__ */ (0,
|
|
6523
|
-
/* @__PURE__ */ (0,
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
6525
|
-
/* @__PURE__ */ (0,
|
|
6405
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", gap: 20 }, children: [
|
|
6406
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { flex: 1 }, children: [
|
|
6407
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Max Tokens" }),
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6526
6409
|
import_antd25.Input,
|
|
6527
6410
|
{
|
|
6528
6411
|
type: "number",
|
|
@@ -6537,9 +6420,9 @@ QUEUE_NAME=tasks`,
|
|
|
6537
6420
|
}
|
|
6538
6421
|
)
|
|
6539
6422
|
] }),
|
|
6540
|
-
/* @__PURE__ */ (0,
|
|
6541
|
-
/* @__PURE__ */ (0,
|
|
6542
|
-
/* @__PURE__ */ (0,
|
|
6423
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { flex: 1 }, children: [
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { className: styles.formLabel, children: "Temperature" }),
|
|
6425
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6543
6426
|
import_antd25.Input,
|
|
6544
6427
|
{
|
|
6545
6428
|
type: "number",
|
|
@@ -6558,7 +6441,7 @@ QUEUE_NAME=tasks`,
|
|
|
6558
6441
|
] })
|
|
6559
6442
|
] })
|
|
6560
6443
|
] }, index)),
|
|
6561
|
-
/* @__PURE__ */ (0,
|
|
6444
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6562
6445
|
import_antd25.Button,
|
|
6563
6446
|
{
|
|
6564
6447
|
type: "dashed",
|
|
@@ -6586,8 +6469,8 @@ QUEUE_NAME=tasks`,
|
|
|
6586
6469
|
);
|
|
6587
6470
|
const currentConnection = connections.find((c) => c.id === activeTabKey);
|
|
6588
6471
|
const renderTabLabel = (connection) => {
|
|
6589
|
-
return /* @__PURE__ */ (0,
|
|
6590
|
-
/* @__PURE__ */ (0,
|
|
6472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
6473
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6591
6474
|
import_icons14.CloudServerOutlined,
|
|
6592
6475
|
{
|
|
6593
6476
|
style: {
|
|
@@ -6596,14 +6479,14 @@ QUEUE_NAME=tasks`,
|
|
|
6596
6479
|
}
|
|
6597
6480
|
}
|
|
6598
6481
|
),
|
|
6599
|
-
/* @__PURE__ */ (0,
|
|
6600
|
-
connection.connected && /* @__PURE__ */ (0,
|
|
6482
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: connection.name }),
|
|
6483
|
+
connection.connected && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6601
6484
|
import_icons14.CheckCircleFilled,
|
|
6602
6485
|
{
|
|
6603
6486
|
style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
|
|
6604
6487
|
}
|
|
6605
6488
|
),
|
|
6606
|
-
connection.error && !connection.connecting && /* @__PURE__ */ (0,
|
|
6489
|
+
connection.error && !connection.connecting && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6607
6490
|
import_icons14.CloseCircleFilled,
|
|
6608
6491
|
{
|
|
6609
6492
|
style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
|
|
@@ -6614,35 +6497,35 @@ QUEUE_NAME=tasks`,
|
|
|
6614
6497
|
const tabItems = connections.map((connection) => ({
|
|
6615
6498
|
key: connection.id,
|
|
6616
6499
|
label: renderTabLabel(connection),
|
|
6617
|
-
children: /* @__PURE__ */ (0,
|
|
6618
|
-
/* @__PURE__ */ (0,
|
|
6500
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", height: "100%" }, children: [
|
|
6501
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6619
6502
|
"div",
|
|
6620
6503
|
{
|
|
6621
6504
|
className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
|
|
6622
6505
|
onClick: () => setActiveMenu(item.key),
|
|
6623
6506
|
children: [
|
|
6624
|
-
/* @__PURE__ */ (0,
|
|
6625
|
-
/* @__PURE__ */ (0,
|
|
6507
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: styles.menuItemIcon, children: item.icon }),
|
|
6508
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: styles.menuItemText, children: item.label })
|
|
6626
6509
|
]
|
|
6627
6510
|
},
|
|
6628
6511
|
item.key
|
|
6629
6512
|
)) }),
|
|
6630
|
-
/* @__PURE__ */ (0,
|
|
6631
|
-
/* @__PURE__ */ (0,
|
|
6632
|
-
/* @__PURE__ */ (0,
|
|
6633
|
-
/* @__PURE__ */ (0,
|
|
6634
|
-
/* @__PURE__ */ (0,
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.content, children: [
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.contentHeader, children: [
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.contentHeaderLeft, children: [
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text12, { className: styles.contentDescription, children: [
|
|
6635
6518
|
activeMenu === "environment" && "Manage environment variables for the gateway server",
|
|
6636
6519
|
activeMenu === "models" && "Configure and register model lattices for use by agents"
|
|
6637
6520
|
] })
|
|
6638
6521
|
] }),
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6640
|
-
/* @__PURE__ */ (0,
|
|
6641
|
-
/* @__PURE__ */ (0,
|
|
6522
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: styles.contentHeaderRight, children: [
|
|
6523
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd25.Button, { onClick: onClose, children: "Cancel" }),
|
|
6524
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6642
6525
|
import_antd25.Button,
|
|
6643
6526
|
{
|
|
6644
6527
|
type: "primary",
|
|
6645
|
-
icon: /* @__PURE__ */ (0,
|
|
6528
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.SaveOutlined, {}),
|
|
6646
6529
|
onClick: handleSave,
|
|
6647
6530
|
loading,
|
|
6648
6531
|
children: "Save Configuration"
|
|
@@ -6650,9 +6533,9 @@ QUEUE_NAME=tasks`,
|
|
|
6650
6533
|
)
|
|
6651
6534
|
] })
|
|
6652
6535
|
] }),
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6536
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: styles.contentBody, children: renderContent(connection.id) })
|
|
6654
6537
|
] })
|
|
6655
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
6538
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6656
6539
|
"div",
|
|
6657
6540
|
{
|
|
6658
6541
|
style: {
|
|
@@ -6664,17 +6547,17 @@ QUEUE_NAME=tasks`,
|
|
|
6664
6547
|
gap: 16,
|
|
6665
6548
|
padding: 48
|
|
6666
6549
|
},
|
|
6667
|
-
children: connection.connecting ? /* @__PURE__ */ (0,
|
|
6668
|
-
/* @__PURE__ */ (0,
|
|
6669
|
-
/* @__PURE__ */ (0,
|
|
6670
|
-
/* @__PURE__ */ (0,
|
|
6550
|
+
children: connection.connecting ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
6551
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
|
|
6552
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title2, { level: 4, children: "Connecting..." }),
|
|
6553
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text12, { type: "secondary", style: { textAlign: "center" }, children: [
|
|
6671
6554
|
"Connecting to ",
|
|
6672
6555
|
connection.url
|
|
6673
6556
|
] })
|
|
6674
|
-
] }) : /* @__PURE__ */ (0,
|
|
6675
|
-
/* @__PURE__ */ (0,
|
|
6676
|
-
/* @__PURE__ */ (0,
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6557
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title2, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6678
6561
|
Text12,
|
|
6679
6562
|
{
|
|
6680
6563
|
type: "secondary",
|
|
@@ -6682,11 +6565,11 @@ QUEUE_NAME=tasks`,
|
|
|
6682
6565
|
children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
|
|
6683
6566
|
}
|
|
6684
6567
|
),
|
|
6685
|
-
/* @__PURE__ */ (0,
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6686
6569
|
import_antd25.Button,
|
|
6687
6570
|
{
|
|
6688
6571
|
type: "primary",
|
|
6689
|
-
icon: /* @__PURE__ */ (0,
|
|
6572
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.LinkOutlined, {}),
|
|
6690
6573
|
onClick: () => checkConnection(connection.id),
|
|
6691
6574
|
loading: connection.connecting,
|
|
6692
6575
|
style: { marginTop: 16 },
|
|
@@ -6698,8 +6581,8 @@ QUEUE_NAME=tasks`,
|
|
|
6698
6581
|
) }),
|
|
6699
6582
|
closable: connections.length > 1
|
|
6700
6583
|
}));
|
|
6701
|
-
return /* @__PURE__ */ (0,
|
|
6702
|
-
/* @__PURE__ */ (0,
|
|
6584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6703
6586
|
import_antd25.Modal,
|
|
6704
6587
|
{
|
|
6705
6588
|
open,
|
|
@@ -6708,7 +6591,7 @@ QUEUE_NAME=tasks`,
|
|
|
6708
6591
|
width: "80%",
|
|
6709
6592
|
footer: null,
|
|
6710
6593
|
title: "Settings",
|
|
6711
|
-
children: /* @__PURE__ */ (0,
|
|
6594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6712
6595
|
import_antd25.Tabs,
|
|
6713
6596
|
{
|
|
6714
6597
|
activeKey: activeTabKey,
|
|
@@ -6722,7 +6605,7 @@ QUEUE_NAME=tasks`,
|
|
|
6722
6605
|
}
|
|
6723
6606
|
},
|
|
6724
6607
|
items: tabItems,
|
|
6725
|
-
addIcon: /* @__PURE__ */ (0,
|
|
6608
|
+
addIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6726
6609
|
"div",
|
|
6727
6610
|
{
|
|
6728
6611
|
style: {
|
|
@@ -6732,8 +6615,8 @@ QUEUE_NAME=tasks`,
|
|
|
6732
6615
|
padding: "4px 8px"
|
|
6733
6616
|
},
|
|
6734
6617
|
children: [
|
|
6735
|
-
/* @__PURE__ */ (0,
|
|
6736
|
-
/* @__PURE__ */ (0,
|
|
6618
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons14.PlusOutlined, {}),
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "Add Server" })
|
|
6737
6620
|
]
|
|
6738
6621
|
}
|
|
6739
6622
|
)
|
|
@@ -6741,7 +6624,7 @@ QUEUE_NAME=tasks`,
|
|
|
6741
6624
|
) })
|
|
6742
6625
|
}
|
|
6743
6626
|
),
|
|
6744
|
-
/* @__PURE__ */ (0,
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6745
6628
|
import_antd25.Modal,
|
|
6746
6629
|
{
|
|
6747
6630
|
title: "Add New Server",
|
|
@@ -6755,10 +6638,10 @@ QUEUE_NAME=tasks`,
|
|
|
6755
6638
|
},
|
|
6756
6639
|
confirmLoading: addingServer,
|
|
6757
6640
|
className: styles.addServerModal,
|
|
6758
|
-
children: /* @__PURE__ */ (0,
|
|
6759
|
-
/* @__PURE__ */ (0,
|
|
6760
|
-
/* @__PURE__ */ (0,
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
6641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd25.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
6642
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6643
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6762
6645
|
import_antd25.Input,
|
|
6763
6646
|
{
|
|
6764
6647
|
placeholder: "e.g., Production Server",
|
|
@@ -6767,11 +6650,11 @@ QUEUE_NAME=tasks`,
|
|
|
6767
6650
|
onPressEnter: handleAddServer
|
|
6768
6651
|
}
|
|
6769
6652
|
),
|
|
6770
|
-
/* @__PURE__ */ (0,
|
|
6653
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
|
|
6771
6654
|
] }),
|
|
6772
|
-
/* @__PURE__ */ (0,
|
|
6773
|
-
/* @__PURE__ */ (0,
|
|
6774
|
-
/* @__PURE__ */ (0,
|
|
6655
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6656
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
|
|
6657
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6775
6658
|
import_antd25.Input,
|
|
6776
6659
|
{
|
|
6777
6660
|
placeholder: "e.g., http://localhost:4001",
|
|
@@ -6780,11 +6663,11 @@ QUEUE_NAME=tasks`,
|
|
|
6780
6663
|
onPressEnter: handleAddServer
|
|
6781
6664
|
}
|
|
6782
6665
|
),
|
|
6783
|
-
/* @__PURE__ */ (0,
|
|
6666
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
|
|
6784
6667
|
] }),
|
|
6785
|
-
/* @__PURE__ */ (0,
|
|
6786
|
-
/* @__PURE__ */ (0,
|
|
6787
|
-
/* @__PURE__ */ (0,
|
|
6668
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
6669
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
|
|
6670
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6788
6671
|
import_antd25.Input.Password,
|
|
6789
6672
|
{
|
|
6790
6673
|
placeholder: "Optional: Enter API key for authentication",
|
|
@@ -6793,7 +6676,7 @@ QUEUE_NAME=tasks`,
|
|
|
6793
6676
|
onPressEnter: handleAddServer
|
|
6794
6677
|
}
|
|
6795
6678
|
),
|
|
6796
|
-
/* @__PURE__ */ (0,
|
|
6679
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text12, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
|
|
6797
6680
|
] })
|
|
6798
6681
|
] })
|
|
6799
6682
|
}
|
|
@@ -6802,10 +6685,10 @@ QUEUE_NAME=tasks`,
|
|
|
6802
6685
|
};
|
|
6803
6686
|
|
|
6804
6687
|
// src/components/Chat/AgentServerSetting.tsx
|
|
6805
|
-
var
|
|
6688
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6806
6689
|
var AgentServerSetting = () => {
|
|
6807
6690
|
const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
|
|
6808
|
-
return /* @__PURE__ */ (0,
|
|
6691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6809
6692
|
SettingsModal,
|
|
6810
6693
|
{
|
|
6811
6694
|
open: settingsModalOpen,
|
|
@@ -6815,11 +6698,11 @@ var AgentServerSetting = () => {
|
|
|
6815
6698
|
};
|
|
6816
6699
|
|
|
6817
6700
|
// src/components/Chat/LatticeChatShell.tsx
|
|
6818
|
-
var
|
|
6701
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6819
6702
|
var LatticeChatShell = (props) => {
|
|
6820
|
-
return /* @__PURE__ */ (0,
|
|
6821
|
-
/* @__PURE__ */ (0,
|
|
6822
|
-
/* @__PURE__ */ (0,
|
|
6703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(LatticeChatShellContextProvider, { ...props, children: [
|
|
6704
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ConversationContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LatticeChatView, {}) }) }),
|
|
6705
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AgentServerSetting, {})
|
|
6823
6706
|
] });
|
|
6824
6707
|
};
|
|
6825
6708
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -6840,7 +6723,6 @@ var LatticeChatShell = (props) => {
|
|
|
6840
6723
|
LatticeChatShell,
|
|
6841
6724
|
LatticeChatShellContext,
|
|
6842
6725
|
LatticeChatShellContextProvider,
|
|
6843
|
-
MDMermaid,
|
|
6844
6726
|
MDResponse,
|
|
6845
6727
|
MDViewFormItem,
|
|
6846
6728
|
SideAppViewBrowser,
|