@axiom-lattice/react-sdk 2.1.27 → 2.1.28

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.js CHANGED
@@ -1037,40 +1037,16 @@ var useStyle = (0, import_antd_style.createStyles)(({ token, css }) => {
1037
1037
  }
1038
1038
  `,
1039
1039
  menu: css`
1040
- background: ${token.colorBgContainer}90;
1041
- width: 240px;
1040
+ // background: ${token.colorBgContainer}90;
1041
+ width: 60px;
1042
1042
  display: flex;
1043
1043
  flex-direction: column;
1044
1044
  flex-shrink: 0;
1045
1045
  transition: all 0.3s ease;
1046
1046
  overflow: hidden;
1047
1047
  position: relative;
1048
- border-radius: ${token.borderRadiusLG}px;
1049
- box-shadow: ${token.boxShadow};
1050
-
1051
- &.open {
1052
- background: transparent;
1053
- box-shadow: none;
1054
- margin-left: -8px;
1055
- height: 100%;
1056
- }
1057
-
1058
- &.collapsed {
1059
- width: 8px;
1060
- height: 100%;
1061
- margin-right: -8px;
1062
- .ant-conversations {
1063
- width: 64px;
1064
- }
1065
-
1066
- .ant-conversations-list {
1067
- display: none !important;
1068
- }
1069
-
1070
- .btn-text {
1071
- display: none !important;
1072
- }
1073
- }
1048
+ // border-radius: ${token.borderRadiusLG}px;
1049
+ // box-shadow: ${token.boxShadow};
1074
1050
  `,
1075
1051
  menuToggle: css`
1076
1052
  position: relative;
@@ -1354,7 +1330,7 @@ var ColumnLayout = ({
1354
1330
  };
1355
1331
 
1356
1332
  // src/components/Chat/SideAppViewBrowser.tsx
1357
- var import_icons16 = require("@ant-design/icons");
1333
+ var import_icons17 = require("@ant-design/icons");
1358
1334
 
1359
1335
  // src/components/GenUI/elements/confirm_feedback.tsx
1360
1336
  var import_antd3 = require("antd");
@@ -2490,7 +2466,11 @@ var ToolCall = ({ data }) => {
2490
2466
  const expandIcon = ({ isActive }) => {
2491
2467
  return getStatusIcon(toolCallData.status);
2492
2468
  };
2493
- const toolCallElement = getElement(toolCallData.name.toLowerCase());
2469
+ let toolCallName = toolCallData.name.toLowerCase();
2470
+ if (toolCallName.startsWith("browser_")) {
2471
+ toolCallName = "browser_viewer";
2472
+ }
2473
+ const toolCallElement = getElement(toolCallName);
2494
2474
  if (toolCallElement) {
2495
2475
  return toolCallElement.card_view({
2496
2476
  data: toolCallData,
@@ -3285,7 +3265,7 @@ var AttachmentsCard = ({
3285
3265
  columns = 1,
3286
3266
  showDownloadButton = false
3287
3267
  }) => {
3288
- const { Text: Text17 } = import_antd9.Typography;
3268
+ const { Text: Text18 } = import_antd9.Typography;
3289
3269
  const [showAll, setShowAll] = (0, import_react14.useState)(false);
3290
3270
  const { openSideApp } = useChatUIContext();
3291
3271
  const getStyles = () => {
@@ -3360,7 +3340,7 @@ var AttachmentsCard = ({
3360
3340
  );
3361
3341
  };
3362
3342
  const renderFileDescription = (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd9.Space, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd9.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3363
- Text17,
3343
+ Text18,
3364
3344
  {
3365
3345
  type: "secondary",
3366
3346
  style: {
@@ -3432,7 +3412,7 @@ var AttachmentsCard = ({
3432
3412
  }
3433
3413
  ),
3434
3414
  item.files && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
3435
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text17, { type: "secondary", style: { fontSize: "12px" }, children: [
3415
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text18, { type: "secondary", style: { fontSize: "12px" }, children: [
3436
3416
  "\u5305\u542B\u6587\u4EF6(",
3437
3417
  item.files.length,
3438
3418
  ")"
@@ -6308,6 +6288,99 @@ var ScheduleViewer = ({ data }) => {
6308
6288
  ] });
6309
6289
  };
6310
6290
 
6291
+ // src/components/GenUI/elements/browser_view_card.tsx
6292
+ var import_antd26 = require("antd");
6293
+ var import_icons16 = require("@ant-design/icons");
6294
+ var import_jsx_runtime40 = require("react/jsx-runtime");
6295
+ var { Text: Text13 } = import_antd26.Typography;
6296
+ var BrowserViewer = ({
6297
+ data,
6298
+ component_key,
6299
+ interactive = true
6300
+ }) => {
6301
+ const toolCallData = data;
6302
+ const { threadId, assistantId } = useConversationContext();
6303
+ const { config } = useLatticeChatShellContext();
6304
+ const ws_path = `/sandbox/assistants/${assistantId}/threads/${threadId}/sandbox/websockify`;
6305
+ let targetUrl = `/api/assistants/${assistantId}/threads/${threadId}/sandbox?autoconnect=true&resize=scale&reconnect=1&path${ws_path}`;
6306
+ if (config.globalSharedSandboxURL) {
6307
+ targetUrl = `${config.globalSharedSandboxURL}/vnc/index.html?autoconnect=true&resize=scale&reconnect=1&path=/sandbox/global/websockify`;
6308
+ }
6309
+ function getStatusIcon3(status) {
6310
+ switch (status) {
6311
+ case "success":
6312
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.CheckCircleOutlined, { style: { color: "#52c41a" } });
6313
+ case "error":
6314
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.InfoCircleOutlined, { style: { color: "#ff4d4f" } });
6315
+ default:
6316
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.LoadingOutlined, { style: { color: "#1890ff" } });
6317
+ }
6318
+ }
6319
+ const formatToolName = (name) => {
6320
+ if (!name) {
6321
+ return "";
6322
+ }
6323
+ return name.replace(/([a-z])([A-Z])/g, "$1 $2").split(/[_-]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
6324
+ };
6325
+ const formatArgsPreview = (args) => {
6326
+ try {
6327
+ const argsStr = Object.values(args).map((value) => {
6328
+ const valueStr = typeof value === "object" ? JSON.stringify(value).substring(0, 50) + (JSON.stringify(value).length > 50 ? "..." : "") : String(value).substring(0, 50) + (String(value).length > 50 ? "..." : "");
6329
+ return valueStr;
6330
+ }).join(" ");
6331
+ const result = argsStr.length > 100 ? argsStr.substring(0, 100) + "..." : argsStr;
6332
+ return result.replaceAll("\n", " ");
6333
+ } catch (e) {
6334
+ return "Error parsing args";
6335
+ }
6336
+ };
6337
+ const header = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd26.Flex, { align: "center", wrap: "wrap", children: [
6338
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd26.Typography.Text, { strong: true, children: formatToolName(toolCallData.name) }),
6339
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6340
+ import_antd26.Typography.Text,
6341
+ {
6342
+ type: "secondary",
6343
+ style: { fontSize: "12px", marginLeft: "8px" },
6344
+ children: formatArgsPreview(toolCallData.args)
6345
+ }
6346
+ )
6347
+ ] });
6348
+ const { openSideApp } = useChatUIContext();
6349
+ if (!toolCallData) {
6350
+ return null;
6351
+ }
6352
+ const handleItemClick = (toolCallData2) => {
6353
+ openSideApp({
6354
+ component_key: "browser_viewer",
6355
+ message: "View Browser",
6356
+ data: {
6357
+ url: targetUrl
6358
+ }
6359
+ });
6360
+ };
6361
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6362
+ ContentPreviewCollapse,
6363
+ {
6364
+ panelKey: toolCallData.id,
6365
+ header,
6366
+ expandIcon: () => getStatusIcon3(toolCallData.status),
6367
+ extra: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6368
+ import_antd26.Button,
6369
+ {
6370
+ type: "link",
6371
+ size: "small",
6372
+ onClick: (evt) => {
6373
+ evt.stopPropagation();
6374
+ handleItemClick(toolCallData);
6375
+ },
6376
+ children: "View Browser"
6377
+ }
6378
+ ),
6379
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MDResponse, { content: toolCallData.response || "" })
6380
+ }
6381
+ );
6382
+ };
6383
+
6311
6384
  // src/components/GenUI/elements/builtIns.tsx
6312
6385
  var elements = {
6313
6386
  action_show_attachments_uploader: {
@@ -6363,6 +6436,10 @@ var elements = {
6363
6436
  schedule_viewer: {
6364
6437
  card_view: () => null,
6365
6438
  side_app_view: ScheduleViewer
6439
+ },
6440
+ browser_viewer: {
6441
+ card_view: BrowserViewer,
6442
+ side_app_view: AttachmentsViewerSideApp
6366
6443
  }
6367
6444
  };
6368
6445
 
@@ -6380,10 +6457,10 @@ var regsiterElement = (language, ElementMeta) => {
6380
6457
  };
6381
6458
 
6382
6459
  // src/components/Chat/SideAppViewBrowser.tsx
6383
- var import_antd26 = require("antd");
6460
+ var import_antd27 = require("antd");
6384
6461
  var import_antd_style12 = require("antd-style");
6385
6462
  var import_react26 = require("react");
6386
- var import_jsx_runtime40 = require("react/jsx-runtime");
6463
+ var import_jsx_runtime41 = require("react/jsx-runtime");
6387
6464
  var useStyle8 = (0, import_antd_style12.createStyles)(({ token, css }) => {
6388
6465
  return {
6389
6466
  tabContainer: css`
@@ -6403,9 +6480,9 @@ var useStyle8 = (0, import_antd_style12.createStyles)(({ token, css }) => {
6403
6480
  };
6404
6481
  });
6405
6482
  var EmptySideAppView = ({ component_key, data }) => {
6406
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
6407
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
6408
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
6483
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
6484
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
6485
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
6409
6486
  ] });
6410
6487
  };
6411
6488
  var SideAppViewBrowser = () => {
@@ -6466,7 +6543,7 @@ var SideAppViewBrowser = () => {
6466
6543
  add(
6467
6544
  key,
6468
6545
  sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
6469
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6546
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6470
6547
  SideAppView,
6471
6548
  {
6472
6549
  component_key: sideAppSelectedCard?.component_key || "",
@@ -6507,26 +6584,26 @@ var SideAppViewBrowser = () => {
6507
6584
  const getSizeIcon = (size) => {
6508
6585
  switch (size) {
6509
6586
  case "middle":
6510
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.CompressOutlined, {});
6587
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons17.CompressOutlined, {});
6511
6588
  case "large":
6512
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.ExpandOutlined, {});
6589
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons17.ExpandOutlined, {});
6513
6590
  case "full":
6514
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.FullscreenOutlined, {});
6591
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons17.FullscreenOutlined, {});
6515
6592
  default:
6516
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.ExpandOutlined, {});
6593
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons17.ExpandOutlined, {});
6517
6594
  }
6518
6595
  };
6519
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6520
- import_antd26.Tabs,
6596
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6597
+ import_antd27.Tabs,
6521
6598
  {
6522
6599
  className: styles.tabContainer,
6523
6600
  type: "editable-card",
6524
6601
  style: { height: "100%" },
6525
6602
  hideAdd: true,
6526
6603
  tabBarExtraContent: {
6527
- right: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [
6528
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6529
- import_antd26.Button,
6604
+ right: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [
6605
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6606
+ import_antd27.Button,
6530
6607
  {
6531
6608
  style: { margin: "8px 0" },
6532
6609
  size: "large",
@@ -6536,13 +6613,13 @@ var SideAppViewBrowser = () => {
6536
6613
  title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
6537
6614
  }
6538
6615
  ),
6539
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6540
- import_antd26.Button,
6616
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6617
+ import_antd27.Button,
6541
6618
  {
6542
6619
  style: { margin: "8px 0" },
6543
6620
  size: "large",
6544
6621
  type: "text",
6545
- icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons16.CloseOutlined, {}),
6622
+ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons17.CloseOutlined, {}),
6546
6623
  onClick: () => {
6547
6624
  closeSideApp();
6548
6625
  }
@@ -6559,10 +6636,10 @@ var SideAppViewBrowser = () => {
6559
6636
  };
6560
6637
 
6561
6638
  // src/components/Chat/LatticeChat.tsx
6562
- var import_jsx_runtime41 = require("react/jsx-runtime");
6639
+ var import_jsx_runtime42 = require("react/jsx-runtime");
6563
6640
  var LatticeChat = (props) => {
6564
6641
  const { assistant_id, thread_id = "", menu, header, ...chatingProps } = props;
6565
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6642
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6566
6643
  AgentThreadProvider,
6567
6644
  {
6568
6645
  assistantId: assistant_id,
@@ -6572,7 +6649,7 @@ var LatticeChat = (props) => {
6572
6649
  enableReturnStateWhenStreamCompleted: true,
6573
6650
  enableResumeStream: true
6574
6651
  },
6575
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ChatUIContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6652
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChatUIContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6576
6653
  "div",
6577
6654
  {
6578
6655
  style: {
@@ -6583,12 +6660,12 @@ var LatticeChat = (props) => {
6583
6660
  },
6584
6661
  children: [
6585
6662
  header,
6586
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6663
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6587
6664
  ColumnLayout,
6588
6665
  {
6589
6666
  menu,
6590
- left: thread_id ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Chating, { ...chatingProps }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
6591
- right: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SideAppViewBrowser, {})
6667
+ left: thread_id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Chating, { ...chatingProps }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
6668
+ right: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SideAppViewBrowser, {})
6592
6669
  }
6593
6670
  )
6594
6671
  ]
@@ -6600,14 +6677,14 @@ var LatticeChat = (props) => {
6600
6677
 
6601
6678
  // src/components/Chat/AgentConversations.tsx
6602
6679
  var import_x6 = require("@ant-design/x");
6603
- var import_antd27 = require("antd");
6680
+ var import_antd28 = require("antd");
6604
6681
  var import_react27 = require("react");
6605
- var import_jsx_runtime42 = require("react/jsx-runtime");
6682
+ var import_jsx_runtime43 = require("react/jsx-runtime");
6606
6683
  var AgentConversations = ({
6607
6684
  enableThreadCreation = true,
6608
6685
  enableThreadList = true
6609
6686
  }) => {
6610
- const { token } = import_antd27.theme.useToken();
6687
+ const { token } = import_antd28.theme.useToken();
6611
6688
  const { currentAssistant } = useAssistantContext();
6612
6689
  const {
6613
6690
  assistantId,
@@ -6641,7 +6718,7 @@ var AgentConversations = ({
6641
6718
  const creation = enableThreadCreation ? {
6642
6719
  onClick: newChatClick
6643
6720
  } : void 0;
6644
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6721
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6645
6722
  import_x6.Conversations,
6646
6723
  {
6647
6724
  creation,
@@ -6657,54 +6734,12 @@ var AgentConversations = ({
6657
6734
  };
6658
6735
 
6659
6736
  // src/components/Chat/LatticeChatView.tsx
6660
- var import_react38 = require("react");
6661
-
6662
- // src/components/Chat/ChatSidebar.tsx
6663
- var import_react37 = require("react");
6664
- var import_antd34 = require("antd");
6665
- var import_icons21 = require("@ant-design/icons");
6666
-
6667
- // src/components/Chat/AssistantList.tsx
6668
- var import_x7 = require("@ant-design/x");
6669
- var import_antd28 = require("antd");
6670
- var import_jsx_runtime43 = require("react/jsx-runtime");
6671
- var AssistantList = () => {
6672
- const { token } = import_antd28.theme.useToken();
6673
- const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
6674
- const style = {
6675
- width: "100%",
6676
- background: "transparent",
6677
- borderRadius: token.borderRadius
6678
- };
6679
- const items = assistants.map((assistant) => ({
6680
- key: assistant.id,
6681
- label: assistant.name,
6682
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6683
- import_antd28.Avatar,
6684
- {
6685
- size: "small",
6686
- style: {
6687
- backgroundColor: token.colorFillSecondary,
6688
- color: token.colorText
6689
- },
6690
- children: assistant.name.charAt(0).toUpperCase()
6691
- }
6692
- )
6693
- }));
6694
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6695
- import_x7.Conversations,
6696
- {
6697
- items,
6698
- activeKey: currentAssistant?.id,
6699
- style,
6700
- onActiveChange: (key) => {
6701
- selectAssistant(key);
6702
- }
6703
- }
6704
- );
6705
- };
6737
+ var import_react39 = require("react");
6706
6738
 
6707
6739
  // src/components/Chat/ChatSidebar.tsx
6740
+ var import_react38 = require("react");
6741
+ var import_antd35 = require("antd");
6742
+ var import_icons23 = require("@ant-design/icons");
6708
6743
  var import_antd_style13 = require("antd-style");
6709
6744
 
6710
6745
  // src/components/Chat/AssistantFlow.tsx
@@ -6716,9 +6751,9 @@ var import_style = require("@xyflow/react/dist/style.css");
6716
6751
  var import_react28 = require("react");
6717
6752
  var import_react29 = require("@xyflow/react");
6718
6753
  var import_antd29 = require("antd");
6719
- var import_icons17 = require("@ant-design/icons");
6754
+ var import_icons18 = require("@ant-design/icons");
6720
6755
  var import_jsx_runtime44 = require("react/jsx-runtime");
6721
- var { Text: Text13 } = import_antd29.Typography;
6756
+ var { Text: Text14 } = import_antd29.Typography;
6722
6757
  var getBadgeColor = (id) => {
6723
6758
  const colors = [
6724
6759
  "#1890ff",
@@ -6830,7 +6865,7 @@ var AssistantNode = ({
6830
6865
  },
6831
6866
  children: [
6832
6867
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6833
- Text13,
6868
+ Text14,
6834
6869
  {
6835
6870
  strong: true,
6836
6871
  style: {
@@ -6866,7 +6901,7 @@ var AssistantNode = ({
6866
6901
  gap: 6
6867
6902
  },
6868
6903
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6869
- Text13,
6904
+ Text14,
6870
6905
  {
6871
6906
  style: {
6872
6907
  fontSize: 11,
@@ -6882,7 +6917,7 @@ var AssistantNode = ({
6882
6917
  }
6883
6918
  ),
6884
6919
  assistant.description && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6885
- Text13,
6920
+ Text14,
6886
6921
  {
6887
6922
  style: {
6888
6923
  fontSize: 12,
@@ -6909,7 +6944,7 @@ var AssistantNode = ({
6909
6944
  },
6910
6945
  children: [
6911
6946
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6912
- import_icons17.SettingOutlined,
6947
+ import_icons18.SettingOutlined,
6913
6948
  {
6914
6949
  style: {
6915
6950
  fontSize: 14,
@@ -6918,7 +6953,7 @@ var AssistantNode = ({
6918
6953
  }
6919
6954
  ),
6920
6955
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6921
- Text13,
6956
+ Text14,
6922
6957
  {
6923
6958
  style: {
6924
6959
  fontSize: 12,
@@ -6955,7 +6990,7 @@ var AssistantNode = ({
6955
6990
  },
6956
6991
  children: [
6957
6992
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6958
- import_icons17.CodeOutlined,
6993
+ import_icons18.CodeOutlined,
6959
6994
  {
6960
6995
  style: {
6961
6996
  fontSize: 14,
@@ -6964,7 +6999,7 @@ var AssistantNode = ({
6964
6999
  }
6965
7000
  ),
6966
7001
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6967
- Text13,
7002
+ Text14,
6968
7003
  {
6969
7004
  style: {
6970
7005
  fontSize: 12,
@@ -6990,7 +7025,7 @@ var AssistantNode = ({
6990
7025
  overflowY: "auto"
6991
7026
  },
6992
7027
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6993
- Text13,
7028
+ Text14,
6994
7029
  {
6995
7030
  style: {
6996
7031
  fontSize: 11,
@@ -7016,7 +7051,7 @@ var AssistantNode = ({
7016
7051
  },
7017
7052
  children: [
7018
7053
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7019
- import_icons17.ToolOutlined,
7054
+ import_icons18.ToolOutlined,
7020
7055
  {
7021
7056
  style: {
7022
7057
  fontSize: 14,
@@ -7025,7 +7060,7 @@ var AssistantNode = ({
7025
7060
  }
7026
7061
  ),
7027
7062
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7028
- Text13,
7063
+ Text14,
7029
7064
  {
7030
7065
  style: {
7031
7066
  fontSize: 12,
@@ -7067,7 +7102,7 @@ var AssistantNode = ({
7067
7102
  },
7068
7103
  children: [
7069
7104
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7070
- import_icons17.BranchesOutlined,
7105
+ import_icons18.BranchesOutlined,
7071
7106
  {
7072
7107
  style: {
7073
7108
  fontSize: 14,
@@ -7076,7 +7111,7 @@ var AssistantNode = ({
7076
7111
  }
7077
7112
  ),
7078
7113
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7079
- Text13,
7114
+ Text14,
7080
7115
  {
7081
7116
  style: {
7082
7117
  fontSize: 12,
@@ -7134,7 +7169,7 @@ var AssistantNode = ({
7134
7169
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7135
7170
  import_antd29.Button,
7136
7171
  {
7137
- icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons17.CopyOutlined, {}),
7172
+ icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons18.CopyOutlined, {}),
7138
7173
  onClick: () => handleCopy(assistant.id),
7139
7174
  title: "\u590D\u5236 ID"
7140
7175
  }
@@ -7222,7 +7257,7 @@ var AssistantNode = ({
7222
7257
  e.currentTarget.style.background = token.colorBgContainer;
7223
7258
  },
7224
7259
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7225
- import_icons17.InfoCircleOutlined,
7260
+ import_icons18.InfoCircleOutlined,
7226
7261
  {
7227
7262
  style: {
7228
7263
  fontSize: 14,
@@ -7265,7 +7300,7 @@ var AssistantNode = ({
7265
7300
  import_antd29.Avatar,
7266
7301
  {
7267
7302
  size: 44,
7268
- icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons17.UserOutlined, {}),
7303
+ icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons18.UserOutlined, {}),
7269
7304
  style: {
7270
7305
  backgroundColor: badgeColor,
7271
7306
  color: "#fff",
@@ -7302,7 +7337,7 @@ var AssistantNode = ({
7302
7337
  },
7303
7338
  children: [
7304
7339
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7305
- Text13,
7340
+ Text14,
7306
7341
  {
7307
7342
  strong: true,
7308
7343
  style: {
@@ -7327,7 +7362,7 @@ var AssistantNode = ({
7327
7362
  },
7328
7363
  children: [
7329
7364
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7330
- import_icons17.IdcardOutlined,
7365
+ import_icons18.IdcardOutlined,
7331
7366
  {
7332
7367
  style: {
7333
7368
  fontSize: 9,
@@ -7336,7 +7371,7 @@ var AssistantNode = ({
7336
7371
  }
7337
7372
  ),
7338
7373
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7339
- Text13,
7374
+ Text14,
7340
7375
  {
7341
7376
  style: {
7342
7377
  fontSize: 9,
@@ -7747,16 +7782,16 @@ var import_react35 = require("react");
7747
7782
  var import_react36 = require("@xyflow/react");
7748
7783
  var import_style2 = require("@xyflow/react/dist/style.css");
7749
7784
  var import_antd33 = require("antd");
7750
- var import_icons20 = require("@ant-design/icons");
7785
+ var import_icons21 = require("@ant-design/icons");
7751
7786
 
7752
7787
  // src/components/Chat/SkillNode.tsx
7753
7788
  var import_react32 = require("react");
7754
7789
  var import_react33 = require("@xyflow/react");
7755
7790
  var import_antd30 = require("antd");
7756
- var import_icons18 = require("@ant-design/icons");
7791
+ var import_icons19 = require("@ant-design/icons");
7757
7792
  var import_client_sdk8 = require("@axiom-lattice/client-sdk");
7758
7793
  var import_jsx_runtime46 = require("react/jsx-runtime");
7759
- var { Text: Text14 } = import_antd30.Typography;
7794
+ var { Text: Text15 } = import_antd30.Typography;
7760
7795
  var { TextArea } = import_antd30.Input;
7761
7796
  var getBadgeColor2 = (name) => {
7762
7797
  const colors = [
@@ -7968,7 +8003,7 @@ var SkillNode = ({ data }) => {
7968
8003
  },
7969
8004
  children: [
7970
8005
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
7971
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
8006
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
7972
8007
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7973
8008
  TextArea,
7974
8009
  {
@@ -7980,7 +8015,7 @@ var SkillNode = ({ data }) => {
7980
8015
  )
7981
8016
  ] }),
7982
8017
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
7983
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
8018
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
7984
8019
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7985
8020
  import_antd30.Input,
7986
8021
  {
@@ -7991,7 +8026,7 @@ var SkillNode = ({ data }) => {
7991
8026
  )
7992
8027
  ] }),
7993
8028
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
7994
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
8029
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
7995
8030
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7996
8031
  import_antd30.Input,
7997
8032
  {
@@ -8012,7 +8047,7 @@ var SkillNode = ({ data }) => {
8012
8047
  },
8013
8048
  children: [
8014
8049
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8015
- Text14,
8050
+ Text15,
8016
8051
  {
8017
8052
  style: {
8018
8053
  fontSize: 12,
@@ -8026,7 +8061,7 @@ var SkillNode = ({ data }) => {
8026
8061
  import_antd30.Button,
8027
8062
  {
8028
8063
  size: "small",
8029
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.PlusOutlined, {}),
8064
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.PlusOutlined, {}),
8030
8065
  onClick: handleAddMetadataRow,
8031
8066
  children: "Add"
8032
8067
  }
@@ -8036,7 +8071,7 @@ var SkillNode = ({ data }) => {
8036
8071
  ),
8037
8072
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd30.Space, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
8038
8073
  metadataRows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8039
- Text14,
8074
+ Text15,
8040
8075
  {
8041
8076
  style: {
8042
8077
  fontSize: 11,
@@ -8055,7 +8090,7 @@ var SkillNode = ({ data }) => {
8055
8090
  width: "100%"
8056
8091
  },
8057
8092
  children: [
8058
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text14, { style: { fontSize: 11, color: token.colorTextSecondary }, children: [
8093
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text15, { style: { fontSize: 11, color: token.colorTextSecondary }, children: [
8059
8094
  "Meta ",
8060
8095
  index + 1
8061
8096
  ] }),
@@ -8085,7 +8120,7 @@ var SkillNode = ({ data }) => {
8085
8120
  ))
8086
8121
  ] }),
8087
8122
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8088
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
8123
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
8089
8124
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8090
8125
  TextArea,
8091
8126
  {
@@ -8130,7 +8165,7 @@ var SkillNode = ({ data }) => {
8130
8165
  },
8131
8166
  children: [
8132
8167
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8133
- Text14,
8168
+ Text15,
8134
8169
  {
8135
8170
  strong: true,
8136
8171
  style: {
@@ -8166,7 +8201,7 @@ var SkillNode = ({ data }) => {
8166
8201
  gap: 6
8167
8202
  },
8168
8203
  children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8169
- Text14,
8204
+ Text15,
8170
8205
  {
8171
8206
  style: {
8172
8207
  fontSize: 11,
@@ -8183,7 +8218,7 @@ var SkillNode = ({ data }) => {
8183
8218
  ),
8184
8219
  isEditing ? editingView : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
8185
8220
  currentSkill.description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8186
- Text14,
8221
+ Text15,
8187
8222
  {
8188
8223
  style: {
8189
8224
  fontSize: 12,
@@ -8210,7 +8245,7 @@ var SkillNode = ({ data }) => {
8210
8245
  },
8211
8246
  children: [
8212
8247
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8213
- import_icons18.InfoCircleOutlined,
8248
+ import_icons19.InfoCircleOutlined,
8214
8249
  {
8215
8250
  style: {
8216
8251
  fontSize: 14,
@@ -8219,7 +8254,7 @@ var SkillNode = ({ data }) => {
8219
8254
  }
8220
8255
  ),
8221
8256
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8222
- Text14,
8257
+ Text15,
8223
8258
  {
8224
8259
  style: {
8225
8260
  fontSize: 12,
@@ -8301,7 +8336,7 @@ var SkillNode = ({ data }) => {
8301
8336
  },
8302
8337
  children: [
8303
8338
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8304
- import_icons18.BranchesOutlined,
8339
+ import_icons19.BranchesOutlined,
8305
8340
  {
8306
8341
  style: {
8307
8342
  fontSize: 14,
@@ -8310,7 +8345,7 @@ var SkillNode = ({ data }) => {
8310
8345
  }
8311
8346
  ),
8312
8347
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8313
- Text14,
8348
+ Text15,
8314
8349
  {
8315
8350
  style: {
8316
8351
  fontSize: 12,
@@ -8348,7 +8383,7 @@ var SkillNode = ({ data }) => {
8348
8383
  currentSkill.license && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8349
8384
  import_antd30.Tag,
8350
8385
  {
8351
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.CopyrightOutlined, {}),
8386
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.CopyrightOutlined, {}),
8352
8387
  style: {
8353
8388
  margin: 0,
8354
8389
  fontSize: 11,
@@ -8386,7 +8421,7 @@ var SkillNode = ({ data }) => {
8386
8421
  ] }) }),
8387
8422
  (currentSkill.createdAt || currentSkill.updatedAt) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd30.Space, { direction: "vertical", size: 4, children: [
8388
8423
  currentSkill.createdAt && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8389
- Text14,
8424
+ Text15,
8390
8425
  {
8391
8426
  style: {
8392
8427
  fontSize: 11,
@@ -8400,7 +8435,7 @@ var SkillNode = ({ data }) => {
8400
8435
  }
8401
8436
  ),
8402
8437
  currentSkill.updatedAt && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8403
- Text14,
8438
+ Text15,
8404
8439
  {
8405
8440
  style: {
8406
8441
  fontSize: 11,
@@ -8426,7 +8461,7 @@ var SkillNode = ({ data }) => {
8426
8461
  },
8427
8462
  children: [
8428
8463
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8429
- import_icons18.FileTextOutlined,
8464
+ import_icons19.FileTextOutlined,
8430
8465
  {
8431
8466
  style: {
8432
8467
  fontSize: 14,
@@ -8435,7 +8470,7 @@ var SkillNode = ({ data }) => {
8435
8470
  }
8436
8471
  ),
8437
8472
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8438
- Text14,
8473
+ Text15,
8439
8474
  {
8440
8475
  style: {
8441
8476
  fontSize: 12,
@@ -8461,7 +8496,7 @@ var SkillNode = ({ data }) => {
8461
8496
  overflowY: "auto"
8462
8497
  },
8463
8498
  children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8464
- Text14,
8499
+ Text15,
8465
8500
  {
8466
8501
  style: {
8467
8502
  fontSize: 11,
@@ -8541,7 +8576,7 @@ var SkillNode = ({ data }) => {
8541
8576
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8542
8577
  import_antd30.Button,
8543
8578
  {
8544
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.CopyOutlined, {}),
8579
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.CopyOutlined, {}),
8545
8580
  onClick: () => handleCopy(currentSkill.id),
8546
8581
  title: "Copy ID"
8547
8582
  }
@@ -8637,7 +8672,7 @@ var SkillNode = ({ data }) => {
8637
8672
  import_antd30.Avatar,
8638
8673
  {
8639
8674
  size: 44,
8640
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.BookOutlined, {}),
8675
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.BookOutlined, {}),
8641
8676
  style: {
8642
8677
  backgroundColor: badgeColor,
8643
8678
  color: "#fff",
@@ -8664,7 +8699,7 @@ var SkillNode = ({ data }) => {
8664
8699
  justifyContent: "center"
8665
8700
  },
8666
8701
  children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8667
- import_icons18.BranchesOutlined,
8702
+ import_icons19.BranchesOutlined,
8668
8703
  {
8669
8704
  style: {
8670
8705
  fontSize: 10,
@@ -8686,7 +8721,7 @@ var SkillNode = ({ data }) => {
8686
8721
  },
8687
8722
  children: [
8688
8723
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8689
- Text14,
8724
+ Text15,
8690
8725
  {
8691
8726
  strong: true,
8692
8727
  style: {
@@ -8711,7 +8746,7 @@ var SkillNode = ({ data }) => {
8711
8746
  },
8712
8747
  children: [
8713
8748
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8714
- import_icons18.FileTextOutlined,
8749
+ import_icons19.FileTextOutlined,
8715
8750
  {
8716
8751
  style: {
8717
8752
  fontSize: 9,
@@ -8720,7 +8755,7 @@ var SkillNode = ({ data }) => {
8720
8755
  }
8721
8756
  ),
8722
8757
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8723
- Text14,
8758
+ Text15,
8724
8759
  {
8725
8760
  style: {
8726
8761
  fontSize: 9,
@@ -8846,7 +8881,7 @@ var SkillNode = ({ data }) => {
8846
8881
  fontWeight: 500,
8847
8882
  lineHeight: "14px"
8848
8883
  },
8849
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.CopyrightOutlined, {}),
8884
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.CopyrightOutlined, {}),
8850
8885
  children: currentSkill.license
8851
8886
  }
8852
8887
  ),
@@ -8864,7 +8899,7 @@ var SkillNode = ({ data }) => {
8864
8899
  fontWeight: 500,
8865
8900
  lineHeight: "14px"
8866
8901
  },
8867
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons18.InfoCircleOutlined, {}),
8902
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons19.InfoCircleOutlined, {}),
8868
8903
  children: currentSkill.compatibility
8869
8904
  }
8870
8905
  )
@@ -8913,11 +8948,11 @@ var SkillNode_default = SkillNode;
8913
8948
  // src/components/Chat/CreateSkillModal.tsx
8914
8949
  var import_react34 = require("react");
8915
8950
  var import_antd31 = require("antd");
8916
- var import_icons19 = require("@ant-design/icons");
8951
+ var import_icons20 = require("@ant-design/icons");
8917
8952
  var import_antd32 = require("antd");
8918
8953
  var import_jsx_runtime47 = require("react/jsx-runtime");
8919
8954
  var { TextArea: TextArea2 } = import_antd31.Input;
8920
- var { Text: Text15 } = import_antd31.Typography;
8955
+ var { Text: Text16 } = import_antd31.Typography;
8921
8956
  var CreateSkillModal = ({
8922
8957
  open,
8923
8958
  onCancel,
@@ -9028,7 +9063,7 @@ var CreateSkillModal = ({
9028
9063
  },
9029
9064
  children: [
9030
9065
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9031
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Name" }),
9066
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Name" }),
9032
9067
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9033
9068
  import_antd31.Form.Item,
9034
9069
  {
@@ -9047,7 +9082,7 @@ var CreateSkillModal = ({
9047
9082
  )
9048
9083
  ] }),
9049
9084
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9050
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
9085
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
9051
9086
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9052
9087
  import_antd31.Form.Item,
9053
9088
  {
@@ -9067,11 +9102,11 @@ var CreateSkillModal = ({
9067
9102
  )
9068
9103
  ] }),
9069
9104
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9070
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
9105
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
9071
9106
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd31.Form.Item, { name: "license", style: { marginBottom: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd31.Input, { placeholder: "License" }) })
9072
9107
  ] }),
9073
9108
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9074
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
9109
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
9075
9110
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd31.Form.Item, { name: "compatibility", style: { marginBottom: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd31.Input, { placeholder: "Compatibility" }) })
9076
9111
  ] }),
9077
9112
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
@@ -9086,7 +9121,7 @@ var CreateSkillModal = ({
9086
9121
  },
9087
9122
  children: [
9088
9123
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9089
- Text15,
9124
+ Text16,
9090
9125
  {
9091
9126
  style: {
9092
9127
  fontSize: 12,
@@ -9100,7 +9135,7 @@ var CreateSkillModal = ({
9100
9135
  import_antd31.Button,
9101
9136
  {
9102
9137
  size: "small",
9103
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons19.PlusOutlined, {}),
9138
+ icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons20.PlusOutlined, {}),
9104
9139
  onClick: handleAddMetadataRow,
9105
9140
  children: "Add"
9106
9141
  }
@@ -9110,7 +9145,7 @@ var CreateSkillModal = ({
9110
9145
  ),
9111
9146
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_antd31.Space, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
9112
9147
  metadataRows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9113
- Text15,
9148
+ Text16,
9114
9149
  {
9115
9150
  style: {
9116
9151
  fontSize: 11,
@@ -9130,7 +9165,7 @@ var CreateSkillModal = ({
9130
9165
  },
9131
9166
  children: [
9132
9167
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
9133
- Text15,
9168
+ Text16,
9134
9169
  {
9135
9170
  style: { fontSize: 11, color: token.colorTextSecondary },
9136
9171
  children: [
@@ -9166,7 +9201,7 @@ var CreateSkillModal = ({
9166
9201
  ] })
9167
9202
  ] }),
9168
9203
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9169
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
9204
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
9170
9205
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd31.Form.Item, { name: "content", style: { marginBottom: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9171
9206
  TextArea2,
9172
9207
  {
@@ -9420,7 +9455,7 @@ var SkillFlowInner = ({ onNodeClick }) => {
9420
9455
  {
9421
9456
  type: "primary",
9422
9457
  size: "large",
9423
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons20.PlusOutlined, {}),
9458
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons21.PlusOutlined, {}),
9424
9459
  onClick: () => setIsCreateModalOpen(true),
9425
9460
  style: {
9426
9461
  height: 48,
@@ -9449,164 +9484,274 @@ var SkillFlowInner = ({ onNodeClick }) => {
9449
9484
  var SkillFlow = (props) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react36.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkillFlowInner, { ...props }) });
9450
9485
  var SkillFlow_default = SkillFlow;
9451
9486
 
9452
- // src/components/Chat/ChatSidebar.tsx
9487
+ // src/components/Chat/ToolsList.tsx
9488
+ var import_antd34 = require("antd");
9489
+ var import_icons22 = require("@ant-design/icons");
9490
+ var import_react37 = require("react");
9453
9491
  var import_jsx_runtime49 = require("react/jsx-runtime");
9454
- var useStyles4 = (0, import_antd_style13.createStyles)(({ token, css }) => ({
9455
- sidebar: css`
9456
- display: flex;
9457
- flex-direction: column;
9458
- height: 100%;
9459
- width: 100%;
9460
- position: relative;
9461
- background: transparent;
9462
- border-radius: ${token.borderRadiusLG}px;
9463
- overflow: visible;
9464
-
9465
- &.firstTimeHighlight {
9466
- border: 2px dashed ${token.colorPrimary};
9467
- background: ${token.colorPrimaryBg};
9468
- }
9469
- `,
9470
- content: css`
9471
- flex: 1;
9472
- overflow-y: auto;
9473
- overflow-x: hidden;
9474
- padding: ${token.paddingMD}px ${token.paddingSM}px;
9475
- padding-bottom: ${token.paddingLG}px;
9476
-
9477
- /* Custom scrollbar styling */
9478
- &::-webkit-scrollbar {
9479
- width: 6px;
9480
- }
9481
-
9482
- &::-webkit-scrollbar-track {
9483
- background: transparent;
9484
- }
9485
-
9486
- &::-webkit-scrollbar-thumb {
9487
- background: ${token.colorBorder};
9488
- border-radius: 3px;
9489
-
9490
- &:hover {
9491
- background: ${token.colorBorderSecondary};
9492
+ var ToolsList = ({
9493
+ onToolSelect,
9494
+ autoLoad = true
9495
+ }) => {
9496
+ const { token } = import_antd34.theme.useToken();
9497
+ const { config } = useLatticeChatShellContext();
9498
+ const [state, setState] = (0, import_react37.useState)({
9499
+ tools: [],
9500
+ isLoading: false,
9501
+ error: null
9502
+ });
9503
+ const [selectedToolId, setSelectedToolId] = (0, import_react37.useState)(null);
9504
+ const fetchTools = (0, import_react37.useCallback)(async () => {
9505
+ setState((prev) => ({ ...prev, isLoading: true, error: null }));
9506
+ try {
9507
+ const headers = {};
9508
+ if (config.apiKey) {
9509
+ headers["Authorization"] = `Bearer ${config.apiKey}`;
9492
9510
  }
9511
+ const response = await fetch(`${config.baseURL}/api/tools`, {
9512
+ headers
9513
+ });
9514
+ if (response.ok) {
9515
+ const data = await response.json();
9516
+ if (data.success && data.data && Array.isArray(data.data.records)) {
9517
+ setState((prev) => ({
9518
+ ...prev,
9519
+ tools: data.data.records,
9520
+ isLoading: false
9521
+ }));
9522
+ } else {
9523
+ throw new Error("Invalid response format");
9524
+ }
9525
+ } else {
9526
+ throw new Error(`Failed to fetch tools: ${response.statusText}`);
9527
+ }
9528
+ } catch (error) {
9529
+ setState((prev) => ({
9530
+ ...prev,
9531
+ tools: [],
9532
+ isLoading: false,
9533
+ error: error instanceof Error ? error : new Error(String(error))
9534
+ }));
9493
9535
  }
9494
- `,
9495
- hoverOverlay: css`
9496
- position: fixed;
9497
- top: 0;
9498
- left: 0;
9499
- height: 100vh;
9500
- width: 240px;
9501
- background: ${token.colorBgContainer};
9502
- box-shadow: ${token.boxShadowSecondary};
9503
- border-radius: 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px 0;
9504
- z-index: 1000;
9505
- transform: translateX(-100%);
9506
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
9507
- overflow: hidden;
9508
- display: flex;
9509
- flex-direction: column;
9510
- padding-top: ${token.paddingMD}px;
9511
-
9512
- &.visible {
9513
- transform: translateX(0);
9514
- }
9515
- `,
9516
- hoverContent: css`
9517
- flex: 1;
9518
- overflow-y: auto;
9519
- overflow-x: hidden;
9520
- padding: ${token.paddingMD}px ${token.paddingSM}px;
9521
- padding-bottom: ${token.paddingLG}px;
9522
-
9523
- /* Custom scrollbar styling */
9524
- &::-webkit-scrollbar {
9525
- width: 6px;
9536
+ }, [config]);
9537
+ const handleToolSelect = (0, import_react37.useCallback)(
9538
+ (tool) => {
9539
+ setSelectedToolId(tool.id);
9540
+ onToolSelect?.(tool);
9541
+ },
9542
+ [onToolSelect]
9543
+ );
9544
+ const handleRefresh = (0, import_react37.useCallback)(() => {
9545
+ fetchTools();
9546
+ }, [fetchTools]);
9547
+ (0, import_react37.useEffect)(() => {
9548
+ if (autoLoad) {
9549
+ fetchTools();
9526
9550
  }
9527
-
9528
- &::-webkit-scrollbar-track {
9529
- background: transparent;
9530
- }
9531
-
9532
- &::-webkit-scrollbar-thumb {
9533
- background: ${token.colorBorder};
9534
- border-radius: 3px;
9535
-
9536
- &:hover {
9537
- background: ${token.colorBorderSecondary};
9551
+ }, [autoLoad, fetchTools]);
9552
+ const style = {
9553
+ width: "100%",
9554
+ height: "100%",
9555
+ background: "transparent",
9556
+ borderRadius: token.borderRadius,
9557
+ padding: token.paddingSM
9558
+ };
9559
+ if (state.error) {
9560
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9561
+ import_antd34.Alert,
9562
+ {
9563
+ message: "Error Loading Tools",
9564
+ description: state.error.message,
9565
+ type: "error",
9566
+ showIcon: true,
9567
+ action: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9568
+ import_antd34.Button,
9569
+ {
9570
+ size: "small",
9571
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons22.ReloadOutlined, {}),
9572
+ onClick: handleRefresh,
9573
+ children: "Retry"
9574
+ }
9575
+ )
9538
9576
  }
9539
- }
9540
- `,
9541
- section: css`
9542
- margin-bottom: ${token.marginLG}px;
9577
+ ) });
9578
+ }
9579
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
9580
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9581
+ "div",
9582
+ {
9583
+ style: {
9584
+ position: "absolute",
9585
+ top: token.paddingSM,
9586
+ right: token.paddingSM,
9587
+ zIndex: 1
9588
+ },
9589
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9590
+ import_antd34.Button,
9591
+ {
9592
+ type: "text",
9593
+ size: "small",
9594
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons22.ReloadOutlined, {}),
9595
+ onClick: handleRefresh,
9596
+ title: "Refresh tools",
9597
+ style: {
9598
+ color: token.colorTextSecondary
9599
+ }
9600
+ }
9601
+ )
9602
+ }
9603
+ ),
9604
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9605
+ "div",
9606
+ {
9607
+ style: {
9608
+ width: "100%",
9609
+ height: "100%",
9610
+ overflowY: "auto",
9611
+ overflowX: "hidden",
9612
+ paddingTop: token.paddingLG
9613
+ },
9614
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9615
+ import_antd34.List,
9616
+ {
9617
+ dataSource: state.tools,
9618
+ loading: state.isLoading,
9619
+ locale: {
9620
+ emptyText: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
9621
+ "div",
9622
+ {
9623
+ style: {
9624
+ display: "flex",
9625
+ flexDirection: "column",
9626
+ alignItems: "center",
9627
+ gap: token.marginSM,
9628
+ padding: token.paddingLG
9629
+ },
9630
+ children: [
9631
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style: { color: token.colorTextSecondary }, children: "No tools available" }),
9632
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9633
+ import_antd34.Button,
9634
+ {
9635
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons22.ReloadOutlined, {}),
9636
+ onClick: handleRefresh,
9637
+ type: "dashed",
9638
+ size: "small",
9639
+ children: "Refresh"
9640
+ }
9641
+ )
9642
+ ]
9643
+ }
9644
+ )
9645
+ },
9646
+ style: {
9647
+ ...style,
9648
+ paddingTop: 0
9649
+ },
9650
+ renderItem: (tool) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9651
+ import_antd34.List.Item,
9652
+ {
9653
+ onClick: () => handleToolSelect(tool),
9654
+ style: {
9655
+ cursor: "pointer",
9656
+ padding: token.paddingSM,
9657
+ borderRadius: token.borderRadius,
9658
+ backgroundColor: selectedToolId === tool.id ? token.colorFillSecondary : "transparent",
9659
+ transition: "background-color 0.2s"
9660
+ },
9661
+ onMouseEnter: (e) => {
9662
+ if (selectedToolId !== tool.id) {
9663
+ e.currentTarget.style.backgroundColor = token.colorFillTertiary;
9664
+ }
9665
+ },
9666
+ onMouseLeave: (e) => {
9667
+ if (selectedToolId !== tool.id) {
9668
+ e.currentTarget.style.backgroundColor = "transparent";
9669
+ }
9670
+ },
9671
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9672
+ import_antd34.List.Item.Meta,
9673
+ {
9674
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9675
+ import_antd34.Avatar,
9676
+ {
9677
+ size: "small",
9678
+ style: {
9679
+ backgroundColor: token.colorFillSecondary,
9680
+ color: token.colorText
9681
+ },
9682
+ children: tool.name.charAt(0).toUpperCase()
9683
+ }
9684
+ ),
9685
+ title: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
9686
+ "div",
9687
+ {
9688
+ style: {
9689
+ display: "flex",
9690
+ alignItems: "center",
9691
+ gap: token.marginXS
9692
+ },
9693
+ children: [
9694
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: tool.name }),
9695
+ tool.needUserApprove && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9696
+ import_antd34.Tag,
9697
+ {
9698
+ color: "warning",
9699
+ style: {
9700
+ fontSize: "10px",
9701
+ padding: "2px 6px",
9702
+ margin: 0,
9703
+ lineHeight: "1.2"
9704
+ },
9705
+ children: "Requires approval"
9706
+ }
9707
+ )
9708
+ ]
9709
+ }
9710
+ ),
9711
+ description: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9712
+ "div",
9713
+ {
9714
+ style: {
9715
+ color: token.colorTextSecondary,
9716
+ fontSize: token.fontSizeSM,
9717
+ overflow: "hidden",
9718
+ textOverflow: "ellipsis",
9719
+ whiteSpace: "nowrap"
9720
+ },
9721
+ children: tool.description
9722
+ }
9723
+ )
9724
+ }
9725
+ )
9726
+ },
9727
+ tool.id
9728
+ )
9729
+ }
9730
+ )
9731
+ }
9732
+ )
9733
+ ] });
9734
+ };
9543
9735
 
9544
- &:last-child {
9545
- margin-bottom: 0;
9546
- }
9547
- `,
9548
- sectionTitle: css`
9549
- font-size: ${token.fontSizeSM}px;
9550
- font-weight: 600;
9551
- color: ${token.colorTextSecondary};
9552
- text-transform: uppercase;
9553
- letter-spacing: 0.5px;
9554
- padding: 0 ${token.paddingXS}px;
9555
- margin-bottom: ${token.marginSM}px;
9736
+ // src/components/Chat/ChatSidebar.tsx
9737
+ var import_jsx_runtime50 = require("react/jsx-runtime");
9738
+ var useStyles4 = (0, import_antd_style13.createStyles)(({ token, css }) => ({
9739
+ sidebar: css`
9556
9740
  display: flex;
9557
- align-items: center;
9558
- justify-content: space-between;
9559
- `,
9560
- sectionTitleButton: css`
9561
- font-size: ${token.fontSizeSM}px;
9562
- padding: 0;
9563
- height: auto;
9564
- color: ${token.colorTextSecondary};
9565
- border: none;
9741
+ flex-direction: column;
9742
+ height: 100%;
9743
+ width: 100%;
9744
+ position: relative;
9566
9745
  background: transparent;
9567
-
9568
- &:hover {
9569
- color: ${token.colorPrimary};
9570
- background: transparent;
9571
- }
9746
+ border-radius: ${token.borderRadiusLG}px;
9747
+ overflow: visible;
9748
+ padding: ${token.paddingMD}px ${token.paddingSM}px;
9572
9749
  `,
9573
- footer: css`
9750
+ buttonContainer: css`
9574
9751
  display: flex;
9575
- justify-content: center;
9752
+ flex-direction: column;
9753
+ gap: ${token.marginSM}px;
9576
9754
  align-items: center;
9577
- padding: ${token.paddingSM}px;
9578
- background: transparent;
9579
- border-top: 1px solid ${token.colorBorderSecondary};
9580
- gap: ${token.marginXS}px;
9581
- flex-shrink: 0;
9582
- position: relative;
9583
-
9584
- &::before {
9585
- content: "";
9586
- position: absolute;
9587
- top: 0;
9588
- left: 0;
9589
- right: 0;
9590
- height: 1px;
9591
- background: linear-gradient(
9592
- 90deg,
9593
- transparent,
9594
- ${token.colorBorder},
9595
- transparent
9596
- );
9597
- }
9598
-
9599
- &.collapsed {
9600
- border: 0;
9601
- &::before {
9602
- content: "";
9603
- position: absolute;
9604
- top: 0;
9605
- left: 0;
9606
- right: 0;
9607
- height: 0px;
9608
- }
9609
- }
9610
9755
  `,
9611
9756
  actionButton: css`
9612
9757
  display: flex;
@@ -9636,253 +9781,75 @@ var useStyles4 = (0, import_antd_style13.createStyles)(({ token, css }) => ({
9636
9781
  .anticon {
9637
9782
  font-size: 16px;
9638
9783
  }
9639
- `,
9640
- divider: css`
9641
- margin: ${token.marginMD}px 0;
9642
- border-color: ${token.colorBorderSecondary};
9643
- `,
9644
- hintTooltip: css`
9645
- position: absolute;
9646
- top: ${token.paddingMD}px;
9647
- left: ${token.paddingMD}px;
9648
- right: ${token.paddingMD}px;
9649
- padding: ${token.paddingSM}px ${token.paddingMD}px;
9650
- background: ${token.colorPrimary};
9651
- color: ${token.colorTextLightSolid};
9652
- border-radius: ${token.borderRadius}px;
9653
- font-size: ${token.fontSizeSM}px;
9654
- z-index: 1001;
9655
- animation: slideIn 0.3s ease-out;
9656
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
9657
-
9658
- @keyframes slideIn {
9659
- from {
9660
- opacity: 0;
9661
- transform: translateY(-10px);
9662
- }
9663
- to {
9664
- opacity: 1;
9665
- transform: translateY(0);
9666
- }
9667
- }
9668
9784
  `
9669
9785
  }));
9670
- var FIRST_COLLAPSE_KEY = "chat-sidebar-first-collapse-seen";
9671
9786
  var ChatSidebar = ({
9672
- onSettingsClick,
9673
- defaultCollapsed = false
9787
+ onSettingsClick
9674
9788
  }) => {
9675
9789
  const { styles } = useStyles4();
9676
- const { setMenuCollapsed, menuCollapsed, sideAppVisible } = useChatUIContext();
9677
- const { setSettingsModalOpen, config } = useLatticeChatShellContext();
9790
+ const { setSettingsModalOpen } = useLatticeChatShellContext();
9678
9791
  const { selectAssistant } = useAssistantContext();
9679
- const [isHovered, setIsHovered] = (0, import_react37.useState)(false);
9680
- const [isFirstCollapse, setIsFirstCollapse] = (0, import_react37.useState)(false);
9681
- const [isFlowModalOpen, setIsFlowModalOpen] = (0, import_react37.useState)(false);
9682
- const [isSkillFlowModalOpen, setIsSkillFlowModalOpen] = (0, import_react37.useState)(false);
9683
- const prevIsCollapsedRef = (0, import_react37.useRef)(false);
9684
- const handleToggleCollapse = () => {
9685
- setMenuCollapsed(!menuCollapsed);
9686
- };
9792
+ const [isFlowModalOpen, setIsFlowModalOpen] = (0, import_react38.useState)(false);
9793
+ const [isSkillFlowModalOpen, setIsSkillFlowModalOpen] = (0, import_react38.useState)(false);
9794
+ const [isToolsModalOpen, setIsToolsModalOpen] = (0, import_react38.useState)(false);
9687
9795
  const handleSettingsClick = () => {
9688
9796
  setSettingsModalOpen(true);
9689
9797
  onSettingsClick?.();
9690
9798
  };
9799
+ const handleAssistantFlowClick = () => {
9800
+ setIsFlowModalOpen(true);
9801
+ };
9691
9802
  const handleSkillFlowClick = () => {
9692
9803
  setIsSkillFlowModalOpen(true);
9693
9804
  };
9694
- const isCollapsed = menuCollapsed || sideAppVisible;
9695
- (0, import_react37.useEffect)(() => {
9696
- const prevIsCollapsed = prevIsCollapsedRef.current;
9697
- if (isCollapsed) {
9698
- const hasSeenFirstCollapse = localStorage.getItem(FIRST_COLLAPSE_KEY);
9699
- if (!hasSeenFirstCollapse) {
9700
- setIsFirstCollapse(true);
9701
- }
9702
- } else if (prevIsCollapsed && !isCollapsed) {
9703
- setIsFirstCollapse((prev) => {
9704
- if (prev) {
9705
- return false;
9706
- }
9707
- return prev;
9708
- });
9709
- }
9710
- prevIsCollapsedRef.current = isCollapsed;
9711
- }, [isCollapsed]);
9712
- const handleMouseEnter = () => {
9713
- if (isCollapsed) {
9714
- setIsHovered(true);
9715
- if (isFirstCollapse) {
9716
- localStorage.setItem(FIRST_COLLAPSE_KEY, "true");
9717
- setIsFirstCollapse(false);
9718
- }
9719
- }
9805
+ const handleToolsClick = () => {
9806
+ setIsToolsModalOpen(true);
9720
9807
  };
9721
- const handleMouseLeave = () => {
9722
- setIsHovered(false);
9723
- };
9724
- const {
9725
- enableThreadCreation = true,
9726
- enableThreadList = true
9727
- } = config || {};
9728
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
9729
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
9730
- "div",
9731
- {
9732
- className: `${styles.sidebar} ${isFirstCollapse ? "firstTimeHighlight" : ""}`,
9733
- onMouseEnter: handleMouseEnter,
9734
- onMouseLeave: handleMouseLeave,
9735
- children: [
9736
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9737
- import_antd34.Tooltip,
9738
- {
9739
- title: "Move the mouse over the collapsed sidebar to see the assistants and threads",
9740
- open: isFirstCollapse,
9741
- placement: "right",
9742
- children: isFirstCollapse && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style: { marginTop: "400px" } })
9743
- }
9744
- ),
9745
- !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
9746
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.content, children: [
9747
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.section, children: [
9748
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.sectionTitle, children: [
9749
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: "Assistants" }),
9750
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9751
- import_antd34.Button,
9752
- {
9753
- type: "text",
9754
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.ApartmentOutlined, {}),
9755
- onClick: () => setIsFlowModalOpen(true),
9756
- className: styles.sectionTitleButton,
9757
- title: "View Assistant Flow Canvas",
9758
- size: "small"
9759
- }
9760
- )
9761
- ] }),
9762
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AssistantList, {})
9763
- ] }),
9764
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd34.Divider, { className: styles.divider }),
9765
- enableThreadList && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.section, children: [
9766
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: styles.sectionTitle, children: "Threads" }),
9767
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9768
- AgentConversations,
9769
- {
9770
- enableThreadCreation,
9771
- enableThreadList
9772
- }
9773
- )
9774
- ] })
9775
- ] }),
9776
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.footer, children: [
9777
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9778
- "button",
9779
- {
9780
- className: styles.actionButton,
9781
- onClick: handleToggleCollapse,
9782
- title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9783
- "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9784
- children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.MenuUnfoldOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.MenuFoldOutlined, {})
9785
- }
9786
- ),
9787
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9788
- "button",
9789
- {
9790
- className: styles.actionButton,
9791
- onClick: handleSkillFlowClick,
9792
- title: "Skill Flow Canvas",
9793
- "aria-label": "Skill Flow Canvas",
9794
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.ThunderboltOutlined, {})
9795
- }
9796
- ),
9797
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9798
- "button",
9799
- {
9800
- className: styles.actionButton,
9801
- onClick: handleSettingsClick,
9802
- title: "Settings",
9803
- "aria-label": "Settings",
9804
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.SettingOutlined, {})
9805
- }
9806
- )
9807
- ] })
9808
- ] })
9809
- ]
9810
- }
9811
- ),
9812
- isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
9813
- "div",
9814
- {
9815
- className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
9816
- onMouseEnter: handleMouseEnter,
9817
- onMouseLeave: handleMouseLeave,
9818
- children: [
9819
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.hoverContent, children: [
9820
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.section, children: [
9821
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.sectionTitle, children: [
9822
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: "Assistants" }),
9823
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9824
- import_antd34.Button,
9825
- {
9826
- type: "text",
9827
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.ApartmentOutlined, {}),
9828
- onClick: () => setIsFlowModalOpen(true),
9829
- className: styles.sectionTitleButton,
9830
- title: "View Assistant Flow Canvas",
9831
- size: "small"
9832
- }
9833
- )
9834
- ] }),
9835
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AssistantList, {})
9836
- ] }),
9837
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd34.Divider, { className: styles.divider }),
9838
- enableThreadList && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.section, children: [
9839
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: styles.sectionTitle, children: "Threads" }),
9840
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9841
- AgentConversations,
9842
- {
9843
- enableThreadCreation,
9844
- enableThreadList
9845
- }
9846
- )
9847
- ] })
9848
- ] }),
9849
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: styles.footer, children: [
9850
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9851
- "button",
9852
- {
9853
- className: styles.actionButton,
9854
- onClick: handleToggleCollapse,
9855
- title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9856
- "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9857
- children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.MenuUnfoldOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.MenuFoldOutlined, {})
9858
- }
9859
- ),
9860
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9861
- "button",
9862
- {
9863
- className: styles.actionButton,
9864
- onClick: handleSkillFlowClick,
9865
- title: "Skill Flow Canvas",
9866
- "aria-label": "Skill Flow Canvas",
9867
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.ThunderboltOutlined, {})
9868
- }
9869
- ),
9870
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9871
- "button",
9872
- {
9873
- className: styles.actionButton,
9874
- onClick: handleSettingsClick,
9875
- title: "Settings",
9876
- "aria-label": "Settings",
9877
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons21.SettingOutlined, {})
9878
- }
9879
- )
9880
- ] })
9881
- ]
9882
- }
9883
- ),
9884
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9885
- import_antd34.Modal,
9808
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
9809
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: styles.sidebar, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: styles.buttonContainer, children: [
9810
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9811
+ "button",
9812
+ {
9813
+ className: styles.actionButton,
9814
+ onClick: handleAssistantFlowClick,
9815
+ title: "Assistant Flow Canvas",
9816
+ "aria-label": "Assistant Flow Canvas",
9817
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons23.ApartmentOutlined, {})
9818
+ }
9819
+ ),
9820
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9821
+ "button",
9822
+ {
9823
+ className: styles.actionButton,
9824
+ onClick: handleSkillFlowClick,
9825
+ title: "Skill Flow Canvas",
9826
+ "aria-label": "Skill Flow Canvas",
9827
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons23.ThunderboltOutlined, {})
9828
+ }
9829
+ ),
9830
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9831
+ "button",
9832
+ {
9833
+ className: styles.actionButton,
9834
+ onClick: handleToolsClick,
9835
+ title: "Tools List",
9836
+ "aria-label": "Tools List",
9837
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons23.ToolOutlined, {})
9838
+ }
9839
+ ),
9840
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9841
+ "button",
9842
+ {
9843
+ className: styles.actionButton,
9844
+ onClick: handleSettingsClick,
9845
+ title: "Settings",
9846
+ "aria-label": "Settings",
9847
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons23.SettingOutlined, {})
9848
+ }
9849
+ )
9850
+ ] }) }),
9851
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9852
+ import_antd35.Modal,
9886
9853
  {
9887
9854
  destroyOnHidden: true,
9888
9855
  title: "Assistant Overview",
@@ -9895,7 +9862,7 @@ var ChatSidebar = ({
9895
9862
  height: "calc(100vh - 120px)",
9896
9863
  padding: 0
9897
9864
  },
9898
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9865
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9899
9866
  AssistantFlow_default,
9900
9867
  {
9901
9868
  onNodeClick: (assistant) => {
@@ -9906,8 +9873,8 @@ var ChatSidebar = ({
9906
9873
  ) })
9907
9874
  }
9908
9875
  ),
9909
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9910
- import_antd34.Modal,
9876
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9877
+ import_antd35.Modal,
9911
9878
  {
9912
9879
  destroyOnHidden: true,
9913
9880
  title: "Skill Overview",
@@ -9920,7 +9887,7 @@ var ChatSidebar = ({
9920
9887
  height: "calc(100vh - 120px)",
9921
9888
  padding: 0
9922
9889
  },
9923
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9890
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9924
9891
  SkillFlow_default,
9925
9892
  {
9926
9893
  onNodeClick: (skill) => {
@@ -9929,21 +9896,45 @@ var ChatSidebar = ({
9929
9896
  }
9930
9897
  ) })
9931
9898
  }
9899
+ ),
9900
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9901
+ import_antd35.Modal,
9902
+ {
9903
+ destroyOnHidden: true,
9904
+ title: "Tools Overview",
9905
+ open: isToolsModalOpen,
9906
+ onCancel: () => setIsToolsModalOpen(false),
9907
+ footer: null,
9908
+ width: "90%",
9909
+ style: { top: 20 },
9910
+ bodyStyle: {
9911
+ height: "calc(100vh - 120px)",
9912
+ padding: 0
9913
+ },
9914
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9915
+ ToolsList,
9916
+ {
9917
+ onToolSelect: (tool) => {
9918
+ console.log("Tool selected:", tool);
9919
+ }
9920
+ }
9921
+ ) })
9922
+ }
9932
9923
  )
9933
9924
  ] });
9934
9925
  };
9935
9926
 
9936
9927
  // src/components/Chat/LatticeChatView.tsx
9937
- var import_jsx_runtime50 = require("react/jsx-runtime");
9928
+ var import_jsx_runtime51 = require("react/jsx-runtime");
9938
9929
  var LatticeChatView = (props) => {
9939
- const shellContext = (0, import_react38.useContext)(LatticeChatShellContext);
9930
+ const shellContext = (0, import_react39.useContext)(LatticeChatShellContext);
9940
9931
  const { showSideMenu } = shellContext.config;
9941
9932
  const { assistantId, thread } = useConversationContext();
9942
9933
  const { currentAssistant } = useAssistantContext();
9943
9934
  const {
9944
9935
  config: { baseURL }
9945
9936
  } = useLatticeChatShellContext();
9946
- return assistantId && thread ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9937
+ return assistantId && thread ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9947
9938
  AxiomLatticeProvider,
9948
9939
  {
9949
9940
  config: {
@@ -9952,14 +9943,14 @@ var LatticeChatView = (props) => {
9952
9943
  assistantId,
9953
9944
  transport: "sse"
9954
9945
  },
9955
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9946
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9956
9947
  LatticeChat,
9957
9948
  {
9958
9949
  thread_id: thread?.id,
9959
9950
  assistant_id: assistantId,
9960
9951
  name: currentAssistant?.name,
9961
9952
  description: currentAssistant?.description,
9962
- menu: showSideMenu ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChatSidebar, {}) : void 0
9953
+ menu: showSideMenu ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChatSidebar, {}) : void 0
9963
9954
  }
9964
9955
  )
9965
9956
  }
@@ -9967,13 +9958,13 @@ var LatticeChatView = (props) => {
9967
9958
  };
9968
9959
 
9969
9960
  // src/components/Chat/SettingsModal.tsx
9970
- var import_react39 = require("react");
9971
- var import_antd35 = require("antd");
9972
- var import_icons22 = require("@ant-design/icons");
9961
+ var import_react40 = require("react");
9962
+ var import_antd36 = require("antd");
9963
+ var import_icons24 = require("@ant-design/icons");
9973
9964
  var import_antd_style14 = require("antd-style");
9974
- var import_jsx_runtime51 = require("react/jsx-runtime");
9975
- var { Text: Text16, Title: Title3 } = import_antd35.Typography;
9976
- var { TextArea: TextArea3 } = import_antd35.Input;
9965
+ var import_jsx_runtime52 = require("react/jsx-runtime");
9966
+ var { Text: Text17, Title: Title3 } = import_antd36.Typography;
9967
+ var { TextArea: TextArea3 } = import_antd36.Input;
9977
9968
  var useStyles5 = (0, import_antd_style14.createStyles)(({ token, css }) => ({
9978
9969
  // settingsModal: css`
9979
9970
  // .ant-modal {
@@ -10320,12 +10311,12 @@ var SETTINGS_MENU_ITEMS = [
10320
10311
  {
10321
10312
  key: "environment",
10322
10313
  label: "Environment Variables",
10323
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.EnvironmentOutlined, {})
10314
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.EnvironmentOutlined, {})
10324
10315
  },
10325
10316
  {
10326
10317
  key: "models",
10327
10318
  label: "Model Configuration",
10328
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.ApiOutlined, {})
10319
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.ApiOutlined, {})
10329
10320
  }
10330
10321
  ];
10331
10322
  var SettingsModal = ({
@@ -10334,7 +10325,7 @@ var SettingsModal = ({
10334
10325
  }) => {
10335
10326
  const { styles } = useStyles5();
10336
10327
  const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
10337
- const [connections, setConnections] = (0, import_react39.useState)(() => {
10328
+ const [connections, setConnections] = (0, import_react40.useState)(() => {
10338
10329
  if (typeof window !== "undefined") {
10339
10330
  try {
10340
10331
  const stored = localStorage.getItem("lattice_server_connections");
@@ -10357,21 +10348,21 @@ var SettingsModal = ({
10357
10348
  }
10358
10349
  return [];
10359
10350
  });
10360
- const [serverConfigs, setServerConfigs] = (0, import_react39.useState)({});
10361
- const connectionsRef = (0, import_react39.useRef)(connections);
10362
- (0, import_react39.useEffect)(() => {
10351
+ const [serverConfigs, setServerConfigs] = (0, import_react40.useState)({});
10352
+ const connectionsRef = (0, import_react40.useRef)(connections);
10353
+ (0, import_react40.useEffect)(() => {
10363
10354
  connectionsRef.current = connections;
10364
10355
  }, [connections]);
10365
- const [activeTabKey, setActiveTabKey] = (0, import_react39.useState)(
10356
+ const [activeTabKey, setActiveTabKey] = (0, import_react40.useState)(
10366
10357
  connections.length > 0 ? connections[0].id : ""
10367
10358
  );
10368
- const [activeMenu, setActiveMenu] = (0, import_react39.useState)("environment");
10369
- const [loading, setLoading] = (0, import_react39.useState)(false);
10370
- const [showAddServerModal, setShowAddServerModal] = (0, import_react39.useState)(false);
10371
- const [newServerUrl, setNewServerUrl] = (0, import_react39.useState)("");
10372
- const [newServerName, setNewServerName] = (0, import_react39.useState)("");
10373
- const [newServerApiKey, setNewServerApiKey] = (0, import_react39.useState)("");
10374
- const [addingServer, setAddingServer] = (0, import_react39.useState)(false);
10359
+ const [activeMenu, setActiveMenu] = (0, import_react40.useState)("environment");
10360
+ const [loading, setLoading] = (0, import_react40.useState)(false);
10361
+ const [showAddServerModal, setShowAddServerModal] = (0, import_react40.useState)(false);
10362
+ const [newServerUrl, setNewServerUrl] = (0, import_react40.useState)("");
10363
+ const [newServerName, setNewServerName] = (0, import_react40.useState)("");
10364
+ const [newServerApiKey, setNewServerApiKey] = (0, import_react40.useState)("");
10365
+ const [addingServer, setAddingServer] = (0, import_react40.useState)(false);
10375
10366
  const saveConnections = (newConnections) => {
10376
10367
  setConnections(newConnections);
10377
10368
  if (typeof window !== "undefined") {
@@ -10510,7 +10501,7 @@ var SettingsModal = ({
10510
10501
  }
10511
10502
  } catch (error) {
10512
10503
  console.error("Failed to load configuration:", error);
10513
- import_antd35.message.error("Failed to load current configuration");
10504
+ import_antd36.message.error("Failed to load current configuration");
10514
10505
  }
10515
10506
  };
10516
10507
  const loadModelsConfig = async (serverId) => {
@@ -10561,7 +10552,7 @@ var SettingsModal = ({
10561
10552
  console.error("Failed to load models configuration:", error);
10562
10553
  }
10563
10554
  };
10564
- (0, import_react39.useEffect)(() => {
10555
+ (0, import_react40.useEffect)(() => {
10565
10556
  if (open && activeTabKey) {
10566
10557
  initializeServerConfig(activeTabKey);
10567
10558
  const connection = connections.find((c) => c.id === activeTabKey);
@@ -10570,7 +10561,7 @@ var SettingsModal = ({
10570
10561
  }
10571
10562
  }
10572
10563
  }, [open, activeTabKey]);
10573
- (0, import_react39.useEffect)(() => {
10564
+ (0, import_react40.useEffect)(() => {
10574
10565
  if (open && activeTabKey) {
10575
10566
  const connection = connections.find((c) => c.id === activeTabKey);
10576
10567
  if (connection?.connected) {
@@ -10584,7 +10575,7 @@ var SettingsModal = ({
10584
10575
  }, [open, activeTabKey, activeMenu]);
10585
10576
  const handleAddServer = async () => {
10586
10577
  if (!newServerUrl.trim()) {
10587
- import_antd35.message.error("Please enter a server URL");
10578
+ import_antd36.message.error("Please enter a server URL");
10588
10579
  return;
10589
10580
  }
10590
10581
  let normalizedUrl = newServerUrl.trim();
@@ -10610,7 +10601,7 @@ var SettingsModal = ({
10610
10601
  setNewServerUrl("");
10611
10602
  setNewServerName("");
10612
10603
  setNewServerApiKey("");
10613
- import_antd35.message.success("Server added successfully");
10604
+ import_antd36.message.success("Server added successfully");
10614
10605
  };
10615
10606
  const handleDeleteServer = (serverId) => {
10616
10607
  const newConnections = connections.filter((c) => c.id !== serverId);
@@ -10627,7 +10618,7 @@ var SettingsModal = ({
10627
10618
  setActiveTabKey("");
10628
10619
  }
10629
10620
  }
10630
- import_antd35.message.success("Server deleted");
10621
+ import_antd36.message.success("Server deleted");
10631
10622
  };
10632
10623
  const handleTabChange = (newTabKey) => {
10633
10624
  setConnections(
@@ -10641,12 +10632,12 @@ var SettingsModal = ({
10641
10632
  const handleSave = async () => {
10642
10633
  const connection = connections.find((c) => c.id === activeTabKey);
10643
10634
  if (!connection || !connection.connected) {
10644
- import_antd35.message.error("Please connect to a server first");
10635
+ import_antd36.message.error("Please connect to a server first");
10645
10636
  return;
10646
10637
  }
10647
10638
  const url = connection.url;
10648
10639
  if (!url) {
10649
- import_antd35.message.error("Please connect to a server first");
10640
+ import_antd36.message.error("Please connect to a server first");
10650
10641
  return;
10651
10642
  }
10652
10643
  try {
@@ -10710,23 +10701,23 @@ var SettingsModal = ({
10710
10701
  const data = await response.json();
10711
10702
  if (response.ok && data.success) {
10712
10703
  if (data.requiresRestart && data.requiresRestart.length > 0) {
10713
- import_antd35.message.warning(
10704
+ import_antd36.message.warning(
10714
10705
  `Configuration saved. Please restart the server for ${data.requiresRestart.join(
10715
10706
  ", "
10716
10707
  )} to take effect.`,
10717
10708
  5
10718
10709
  );
10719
10710
  } else {
10720
- import_antd35.message.success("Configuration saved and applied successfully");
10711
+ import_antd36.message.success("Configuration saved and applied successfully");
10721
10712
  }
10722
10713
  if (data.warnings && data.warnings.length > 0) {
10723
10714
  data.warnings.forEach((warning) => {
10724
- import_antd35.message.warning(warning, 5);
10715
+ import_antd36.message.warning(warning, 5);
10725
10716
  });
10726
10717
  }
10727
10718
  onClose();
10728
10719
  } else {
10729
- import_antd35.message.error(data.error || "Failed to save configuration");
10720
+ import_antd36.message.error(data.error || "Failed to save configuration");
10730
10721
  }
10731
10722
  } else if (activeMenu === "models") {
10732
10723
  const validModels = config.models.filter(
@@ -10745,17 +10736,17 @@ var SettingsModal = ({
10745
10736
  });
10746
10737
  const data = await response.json();
10747
10738
  if (response.ok && data.success) {
10748
- import_antd35.message.success(
10739
+ import_antd36.message.success(
10749
10740
  "Model configuration saved and registered successfully"
10750
10741
  );
10751
10742
  onClose();
10752
10743
  } else {
10753
- import_antd35.message.error(data.error || "Failed to save model configuration");
10744
+ import_antd36.message.error(data.error || "Failed to save model configuration");
10754
10745
  }
10755
10746
  }
10756
10747
  } catch (error) {
10757
10748
  console.error("Failed to save configuration:", error);
10758
- import_antd35.message.error(error.message || "Failed to save configuration");
10749
+ import_antd36.message.error(error.message || "Failed to save configuration");
10759
10750
  } finally {
10760
10751
  setLoading(false);
10761
10752
  }
@@ -10771,25 +10762,25 @@ var SettingsModal = ({
10771
10762
  }
10772
10763
  }));
10773
10764
  };
10774
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.formContainer, children: [
10775
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10776
- import_antd35.Alert,
10765
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.formContainer, children: [
10766
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10767
+ import_antd36.Alert,
10777
10768
  {
10778
10769
  message: "Configuration Effect",
10779
- description: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10780
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { marginBottom: 8 }, children: [
10781
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10782
- import_icons22.CheckCircleOutlined,
10770
+ description: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10771
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { marginBottom: 8 }, children: [
10772
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10773
+ import_icons24.CheckCircleOutlined,
10783
10774
  {
10784
10775
  style: { color: "#52c41a", marginRight: 8 }
10785
10776
  }
10786
10777
  ),
10787
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: "Immediately effective:" }),
10778
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "Immediately effective:" }),
10788
10779
  " QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
10789
10780
  ] }),
10790
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10791
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.ReloadOutlined, { style: { color: "#faad14", marginRight: 8 } }),
10792
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: "Requires restart:" }),
10781
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10782
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.ReloadOutlined, { style: { color: "#faad14", marginRight: 8 } }),
10783
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "Requires restart:" }),
10793
10784
  " PORT (server must be restarted to change port)"
10794
10785
  ] })
10795
10786
  ] }),
@@ -10798,8 +10789,8 @@ var SettingsModal = ({
10798
10789
  className: styles.alertCard
10799
10790
  }
10800
10791
  ),
10801
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { 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." }) }),
10802
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10792
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { 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." }) }),
10793
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10803
10794
  TextArea3,
10804
10795
  {
10805
10796
  value: config.envText,
@@ -10876,10 +10867,10 @@ QUEUE_NAME=tasks`,
10876
10867
  }));
10877
10868
  }
10878
10869
  };
10879
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.formContainer, children: [
10880
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { 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." }) }),
10881
- config.models.map((model, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.card, children: [
10882
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
10870
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.formContainer, children: [
10871
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { 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." }) }),
10872
+ config.models.map((model, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.card, children: [
10873
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
10883
10874
  "div",
10884
10875
  {
10885
10876
  style: {
@@ -10891,13 +10882,13 @@ QUEUE_NAME=tasks`,
10891
10882
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
10892
10883
  },
10893
10884
  children: [
10894
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10895
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text16, { strong: true, style: { fontSize: 16 }, children: [
10885
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10886
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text17, { strong: true, style: { fontSize: 16 }, children: [
10896
10887
  "Model ",
10897
10888
  index + 1
10898
10889
  ] }),
10899
- model.key && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
10900
- Text16,
10890
+ model.key && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
10891
+ Text17,
10901
10892
  {
10902
10893
  type: "secondary",
10903
10894
  style: { marginLeft: 8, fontSize: 12 },
@@ -10909,8 +10900,8 @@ QUEUE_NAME=tasks`,
10909
10900
  }
10910
10901
  )
10911
10902
  ] }),
10912
- config.models.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10913
- import_antd35.Button,
10903
+ config.models.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10904
+ import_antd36.Button,
10914
10905
  {
10915
10906
  type: "text",
10916
10907
  danger: true,
@@ -10926,11 +10917,11 @@ QUEUE_NAME=tasks`,
10926
10917
  ]
10927
10918
  }
10928
10919
  ),
10929
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_antd35.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
10930
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10931
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Key *" }),
10932
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10933
- import_antd35.Input,
10920
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_antd36.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
10921
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10922
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Key *" }),
10923
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10924
+ import_antd36.Input,
10934
10925
  {
10935
10926
  placeholder: "e.g., default, gpt-4, claude",
10936
10927
  value: model.key,
@@ -10938,12 +10929,12 @@ QUEUE_NAME=tasks`,
10938
10929
  style: { height: 40 }
10939
10930
  }
10940
10931
  ),
10941
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formDescription, children: "Unique identifier for this model" })
10932
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formDescription, children: "Unique identifier for this model" })
10942
10933
  ] }),
10943
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10944
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Provider *" }),
10945
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10946
- import_antd35.Select,
10934
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10935
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Provider *" }),
10936
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10937
+ import_antd36.Select,
10947
10938
  {
10948
10939
  style: { width: "100%", height: 40 },
10949
10940
  value: model.provider,
@@ -10958,10 +10949,10 @@ QUEUE_NAME=tasks`,
10958
10949
  }
10959
10950
  )
10960
10951
  ] }),
10961
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10962
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Model Name *" }),
10963
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10964
- import_antd35.Input,
10952
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10953
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Model Name *" }),
10954
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10955
+ import_antd36.Input,
10965
10956
  {
10966
10957
  placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
10967
10958
  value: model.model,
@@ -10970,10 +10961,10 @@ QUEUE_NAME=tasks`,
10970
10961
  }
10971
10962
  )
10972
10963
  ] }),
10973
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10974
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "API Key" }),
10975
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10976
- import_antd35.Input.Password,
10964
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10965
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "API Key" }),
10966
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10967
+ import_antd36.Input.Password,
10977
10968
  {
10978
10969
  placeholder: "Enter your API key",
10979
10970
  value: model.apiKey,
@@ -10981,12 +10972,12 @@ QUEUE_NAME=tasks`,
10981
10972
  style: { height: 40 }
10982
10973
  }
10983
10974
  ),
10984
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
10975
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
10985
10976
  ] }),
10986
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
10987
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Base URL" }),
10988
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
10989
- import_antd35.Input,
10977
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
10978
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Base URL" }),
10979
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10980
+ import_antd36.Input,
10990
10981
  {
10991
10982
  placeholder: "e.g., https://api.openai.com/v1",
10992
10983
  value: model.baseURL,
@@ -10994,23 +10985,23 @@ QUEUE_NAME=tasks`,
10994
10985
  style: { height: 40 }
10995
10986
  }
10996
10987
  ),
10997
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formDescription, children: "Optional custom base URL for the API" })
10988
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formDescription, children: "Optional custom base URL for the API" })
10998
10989
  ] }),
10999
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_antd35.Space, { children: [
11000
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11001
- import_antd35.Switch,
10990
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_antd36.Space, { children: [
10991
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10992
+ import_antd36.Switch,
11002
10993
  {
11003
10994
  checked: model.streaming,
11004
10995
  onChange: (checked) => handleModelChange(index, "streaming", checked)
11005
10996
  }
11006
10997
  ),
11007
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { children: "Enable Streaming" })
10998
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { children: "Enable Streaming" })
11008
10999
  ] }) }),
11009
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", gap: 20 }, children: [
11010
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { flex: 1 }, children: [
11011
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Max Tokens" }),
11012
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11013
- import_antd35.Input,
11000
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { display: "flex", gap: 20 }, children: [
11001
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { flex: 1 }, children: [
11002
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Max Tokens" }),
11003
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11004
+ import_antd36.Input,
11014
11005
  {
11015
11006
  type: "number",
11016
11007
  placeholder: "e.g., 4096",
@@ -11024,10 +11015,10 @@ QUEUE_NAME=tasks`,
11024
11015
  }
11025
11016
  )
11026
11017
  ] }),
11027
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { flex: 1 }, children: [
11028
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { className: styles.formLabel, children: "Temperature" }),
11029
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11030
- import_antd35.Input,
11018
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { flex: 1 }, children: [
11019
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { className: styles.formLabel, children: "Temperature" }),
11020
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11021
+ import_antd36.Input,
11031
11022
  {
11032
11023
  type: "number",
11033
11024
  step: "0.1",
@@ -11045,8 +11036,8 @@ QUEUE_NAME=tasks`,
11045
11036
  ] })
11046
11037
  ] })
11047
11038
  ] }, index)),
11048
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11049
- import_antd35.Button,
11039
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11040
+ import_antd36.Button,
11050
11041
  {
11051
11042
  type: "dashed",
11052
11043
  onClick: handleAddModel,
@@ -11073,9 +11064,9 @@ QUEUE_NAME=tasks`,
11073
11064
  );
11074
11065
  const currentConnection = connections.find((c) => c.id === activeTabKey);
11075
11066
  const renderTabLabel = (connection) => {
11076
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
11077
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11078
- import_icons22.CloudServerOutlined,
11067
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
11068
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11069
+ import_icons24.CloudServerOutlined,
11079
11070
  {
11080
11071
  style: {
11081
11072
  marginRight: 8,
@@ -11083,15 +11074,15 @@ QUEUE_NAME=tasks`,
11083
11074
  }
11084
11075
  }
11085
11076
  ),
11086
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: connection.name }),
11087
- connection.connected && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11088
- import_icons22.CheckCircleFilled,
11077
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: connection.name }),
11078
+ connection.connected && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11079
+ import_icons24.CheckCircleFilled,
11089
11080
  {
11090
11081
  style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
11091
11082
  }
11092
11083
  ),
11093
- connection.error && !connection.connecting && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11094
- import_icons22.CloseCircleFilled,
11084
+ connection.error && !connection.connecting && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11085
+ import_icons24.CloseCircleFilled,
11095
11086
  {
11096
11087
  style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
11097
11088
  }
@@ -11101,35 +11092,35 @@ QUEUE_NAME=tasks`,
11101
11092
  const tabItems = connections.map((connection) => ({
11102
11093
  key: connection.id,
11103
11094
  label: renderTabLabel(connection),
11104
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", height: "100%" }, children: [
11105
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11095
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { display: "flex", height: "100%" }, children: [
11096
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
11106
11097
  "div",
11107
11098
  {
11108
11099
  className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
11109
11100
  onClick: () => setActiveMenu(item.key),
11110
11101
  children: [
11111
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: styles.menuItemIcon, children: item.icon }),
11112
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: styles.menuItemText, children: item.label })
11102
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: styles.menuItemIcon, children: item.icon }),
11103
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: styles.menuItemText, children: item.label })
11113
11104
  ]
11114
11105
  },
11115
11106
  item.key
11116
11107
  )) }),
11117
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.content, children: [
11118
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.contentHeader, children: [
11119
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.contentHeaderLeft, children: [
11120
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Title3, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
11121
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text16, { className: styles.contentDescription, children: [
11108
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.content, children: [
11109
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.contentHeader, children: [
11110
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.contentHeaderLeft, children: [
11111
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Title3, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
11112
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text17, { className: styles.contentDescription, children: [
11122
11113
  activeMenu === "environment" && "Manage environment variables for the gateway server",
11123
11114
  activeMenu === "models" && "Configure and register model lattices for use by agents"
11124
11115
  ] })
11125
11116
  ] }),
11126
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.contentHeaderRight, children: [
11127
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_antd35.Button, { onClick: onClose, children: "Cancel" }),
11128
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11129
- import_antd35.Button,
11117
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: styles.contentHeaderRight, children: [
11118
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_antd36.Button, { onClick: onClose, children: "Cancel" }),
11119
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11120
+ import_antd36.Button,
11130
11121
  {
11131
11122
  type: "primary",
11132
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.SaveOutlined, {}),
11123
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.SaveOutlined, {}),
11133
11124
  onClick: handleSave,
11134
11125
  loading,
11135
11126
  children: "Save Configuration"
@@ -11137,9 +11128,9 @@ QUEUE_NAME=tasks`,
11137
11128
  )
11138
11129
  ] })
11139
11130
  ] }),
11140
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: styles.contentBody, children: renderContent(connection.id) })
11131
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: styles.contentBody, children: renderContent(connection.id) })
11141
11132
  ] })
11142
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11133
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11143
11134
  "div",
11144
11135
  {
11145
11136
  style: {
@@ -11151,29 +11142,29 @@ QUEUE_NAME=tasks`,
11151
11142
  gap: 16,
11152
11143
  padding: 48
11153
11144
  },
11154
- children: connection.connecting ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11155
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
11156
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Title3, { level: 4, children: "Connecting..." }),
11157
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text16, { type: "secondary", style: { textAlign: "center" }, children: [
11145
+ children: connection.connecting ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
11146
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
11147
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Title3, { level: 4, children: "Connecting..." }),
11148
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Text17, { type: "secondary", style: { textAlign: "center" }, children: [
11158
11149
  "Connecting to ",
11159
11150
  connection.url
11160
11151
  ] })
11161
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11162
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
11163
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Title3, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
11164
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11165
- Text16,
11152
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
11153
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
11154
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Title3, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
11155
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11156
+ Text17,
11166
11157
  {
11167
11158
  type: "secondary",
11168
11159
  style: { textAlign: "center", maxWidth: 400 },
11169
11160
  children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
11170
11161
  }
11171
11162
  ),
11172
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11173
- import_antd35.Button,
11163
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11164
+ import_antd36.Button,
11174
11165
  {
11175
11166
  type: "primary",
11176
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.LinkOutlined, {}),
11167
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.LinkOutlined, {}),
11177
11168
  onClick: () => checkConnection(connection.id),
11178
11169
  loading: connection.connecting,
11179
11170
  style: { marginTop: 16 },
@@ -11185,9 +11176,9 @@ QUEUE_NAME=tasks`,
11185
11176
  ) }),
11186
11177
  closable: connections.length > 1
11187
11178
  }));
11188
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11189
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11190
- import_antd35.Modal,
11179
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
11180
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11181
+ import_antd36.Modal,
11191
11182
  {
11192
11183
  open,
11193
11184
  onCancel: onClose,
@@ -11195,8 +11186,8 @@ QUEUE_NAME=tasks`,
11195
11186
  width: "80%",
11196
11187
  footer: null,
11197
11188
  title: "Settings",
11198
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11199
- import_antd35.Tabs,
11189
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11190
+ import_antd36.Tabs,
11200
11191
  {
11201
11192
  activeKey: activeTabKey,
11202
11193
  onChange: handleTabChange,
@@ -11209,7 +11200,7 @@ QUEUE_NAME=tasks`,
11209
11200
  }
11210
11201
  },
11211
11202
  items: tabItems,
11212
- addIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11203
+ addIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
11213
11204
  "div",
11214
11205
  {
11215
11206
  style: {
@@ -11219,8 +11210,8 @@ QUEUE_NAME=tasks`,
11219
11210
  padding: "4px 8px"
11220
11211
  },
11221
11212
  children: [
11222
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons22.PlusOutlined, {}),
11223
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Add Server" })
11213
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons24.PlusOutlined, {}),
11214
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "Add Server" })
11224
11215
  ]
11225
11216
  }
11226
11217
  )
@@ -11228,8 +11219,8 @@ QUEUE_NAME=tasks`,
11228
11219
  ) })
11229
11220
  }
11230
11221
  ),
11231
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11232
- import_antd35.Modal,
11222
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11223
+ import_antd36.Modal,
11233
11224
  {
11234
11225
  title: "Add New Server",
11235
11226
  open: showAddServerModal,
@@ -11242,11 +11233,11 @@ QUEUE_NAME=tasks`,
11242
11233
  },
11243
11234
  confirmLoading: addingServer,
11244
11235
  className: styles.addServerModal,
11245
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_antd35.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11246
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
11247
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
11248
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11249
- import_antd35.Input,
11236
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_antd36.Space, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11237
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
11238
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
11239
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11240
+ import_antd36.Input,
11250
11241
  {
11251
11242
  placeholder: "e.g., Production Server",
11252
11243
  value: newServerName,
@@ -11254,12 +11245,12 @@ QUEUE_NAME=tasks`,
11254
11245
  onPressEnter: handleAddServer
11255
11246
  }
11256
11247
  ),
11257
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
11248
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
11258
11249
  ] }),
11259
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
11260
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
11261
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11262
- import_antd35.Input,
11250
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
11251
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
11252
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11253
+ import_antd36.Input,
11263
11254
  {
11264
11255
  placeholder: "e.g., http://localhost:4001",
11265
11256
  value: newServerUrl,
@@ -11267,12 +11258,12 @@ QUEUE_NAME=tasks`,
11267
11258
  onPressEnter: handleAddServer
11268
11259
  }
11269
11260
  ),
11270
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
11261
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
11271
11262
  ] }),
11272
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
11273
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
11274
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11275
- import_antd35.Input.Password,
11263
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
11264
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
11265
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11266
+ import_antd36.Input.Password,
11276
11267
  {
11277
11268
  placeholder: "Optional: Enter API key for authentication",
11278
11269
  value: newServerApiKey,
@@ -11280,7 +11271,7 @@ QUEUE_NAME=tasks`,
11280
11271
  onPressEnter: handleAddServer
11281
11272
  }
11282
11273
  ),
11283
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
11274
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
11284
11275
  ] })
11285
11276
  ] })
11286
11277
  }
@@ -11289,10 +11280,10 @@ QUEUE_NAME=tasks`,
11289
11280
  };
11290
11281
 
11291
11282
  // src/components/Chat/AgentServerSetting.tsx
11292
- var import_jsx_runtime52 = require("react/jsx-runtime");
11283
+ var import_jsx_runtime53 = require("react/jsx-runtime");
11293
11284
  var AgentServerSetting = () => {
11294
11285
  const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
11295
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11286
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11296
11287
  SettingsModal,
11297
11288
  {
11298
11289
  open: settingsModalOpen,
@@ -11302,12 +11293,12 @@ var AgentServerSetting = () => {
11302
11293
  };
11303
11294
 
11304
11295
  // src/components/Chat/LatticeChatShell.tsx
11305
- var import_jsx_runtime53 = require("react/jsx-runtime");
11296
+ var import_jsx_runtime54 = require("react/jsx-runtime");
11306
11297
  var LatticeChatShell = (props) => {
11307
11298
  const { initialConfig } = props;
11308
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(LatticeChatShellContextProvider, { ...props, children: [
11309
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AssistantContextProvider, { autoLoad: true, initialAssistantId: initialConfig?.assistantId, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConversationContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LatticeChatView, {}) }) }),
11310
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AgentServerSetting, {})
11299
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(LatticeChatShellContextProvider, { ...props, children: [
11300
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(AssistantContextProvider, { autoLoad: true, initialAssistantId: initialConfig?.assistantId, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ConversationContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LatticeChatView, {}) }) }),
11301
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(AgentServerSetting, {})
11311
11302
  ] });
11312
11303
  };
11313
11304
  // Annotate the CommonJS export names for ESM import in node: