@axiom-lattice/react-sdk 2.1.26 → 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.mjs CHANGED
@@ -980,40 +980,16 @@ var useStyle = createStyles(({ token, css }) => {
980
980
  }
981
981
  `,
982
982
  menu: css`
983
- background: ${token.colorBgContainer}90;
984
- width: 240px;
983
+ // background: ${token.colorBgContainer}90;
984
+ width: 60px;
985
985
  display: flex;
986
986
  flex-direction: column;
987
987
  flex-shrink: 0;
988
988
  transition: all 0.3s ease;
989
989
  overflow: hidden;
990
990
  position: relative;
991
- border-radius: ${token.borderRadiusLG}px;
992
- box-shadow: ${token.boxShadow};
993
-
994
- &.open {
995
- background: transparent;
996
- box-shadow: none;
997
- margin-left: -8px;
998
- height: 100%;
999
- }
1000
-
1001
- &.collapsed {
1002
- width: 8px;
1003
- height: 100%;
1004
- margin-right: -8px;
1005
- .ant-conversations {
1006
- width: 64px;
1007
- }
1008
-
1009
- .ant-conversations-list {
1010
- display: none !important;
1011
- }
1012
-
1013
- .btn-text {
1014
- display: none !important;
1015
- }
1016
- }
991
+ // border-radius: ${token.borderRadiusLG}px;
992
+ // box-shadow: ${token.boxShadow};
1017
993
  `,
1018
994
  menuToggle: css`
1019
995
  position: relative;
@@ -2442,7 +2418,11 @@ var ToolCall = ({ data }) => {
2442
2418
  const expandIcon = ({ isActive }) => {
2443
2419
  return getStatusIcon(toolCallData.status);
2444
2420
  };
2445
- const toolCallElement = getElement(toolCallData.name.toLowerCase());
2421
+ let toolCallName = toolCallData.name.toLowerCase();
2422
+ if (toolCallName.startsWith("browser_")) {
2423
+ toolCallName = "browser_viewer";
2424
+ }
2425
+ const toolCallElement = getElement(toolCallName);
2446
2426
  if (toolCallElement) {
2447
2427
  return toolCallElement.card_view({
2448
2428
  data: toolCallData,
@@ -3267,7 +3247,7 @@ var AttachmentsCard = ({
3267
3247
  columns = 1,
3268
3248
  showDownloadButton = false
3269
3249
  }) => {
3270
- const { Text: Text17 } = Typography7;
3250
+ const { Text: Text18 } = Typography7;
3271
3251
  const [showAll, setShowAll] = useState13(false);
3272
3252
  const { openSideApp } = useChatUIContext();
3273
3253
  const getStyles = () => {
@@ -3342,7 +3322,7 @@ var AttachmentsCard = ({
3342
3322
  );
3343
3323
  };
3344
3324
  const renderFileDescription = (item) => /* @__PURE__ */ jsx19(Space7, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ jsx19(Space7, { children: /* @__PURE__ */ jsx19(
3345
- Text17,
3325
+ Text18,
3346
3326
  {
3347
3327
  type: "secondary",
3348
3328
  style: {
@@ -3414,7 +3394,7 @@ var AttachmentsCard = ({
3414
3394
  }
3415
3395
  ),
3416
3396
  item.files && /* @__PURE__ */ jsxs10("div", { style: { paddingLeft: "12px" }, children: [
3417
- /* @__PURE__ */ jsxs10(Text17, { type: "secondary", style: { fontSize: "12px" }, children: [
3397
+ /* @__PURE__ */ jsxs10(Text18, { type: "secondary", style: { fontSize: "12px" }, children: [
3418
3398
  "\u5305\u542B\u6587\u4EF6(",
3419
3399
  item.files.length,
3420
3400
  ")"
@@ -4794,7 +4774,8 @@ var DEFAULT_CONFIG = {
4794
4774
  timeout: 3e5,
4795
4775
  headers: {},
4796
4776
  enableThreadCreation: true,
4797
- enableThreadList: true
4777
+ enableThreadList: true,
4778
+ showSideMenu: true
4798
4779
  };
4799
4780
  var LatticeChatShellContext = createContext4({
4800
4781
  config: DEFAULT_CONFIG,
@@ -6372,6 +6353,99 @@ var ScheduleViewer = ({ data }) => {
6372
6353
  ] });
6373
6354
  };
6374
6355
 
6356
+ // src/components/GenUI/elements/browser_view_card.tsx
6357
+ import { Button as Button16, Flex as Flex6, Typography as Typography15 } from "antd";
6358
+ import { CheckCircleOutlined as CheckCircleOutlined5, InfoCircleOutlined as InfoCircleOutlined2, LoadingOutlined as LoadingOutlined3 } from "@ant-design/icons";
6359
+ import { jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
6360
+ var { Text: Text13 } = Typography15;
6361
+ var BrowserViewer = ({
6362
+ data,
6363
+ component_key,
6364
+ interactive = true
6365
+ }) => {
6366
+ const toolCallData = data;
6367
+ const { threadId, assistantId } = useConversationContext();
6368
+ const { config } = useLatticeChatShellContext();
6369
+ const ws_path = `/sandbox/assistants/${assistantId}/threads/${threadId}/sandbox/websockify`;
6370
+ let targetUrl = `/api/assistants/${assistantId}/threads/${threadId}/sandbox?autoconnect=true&resize=scale&reconnect=1&path${ws_path}`;
6371
+ if (config.globalSharedSandboxURL) {
6372
+ targetUrl = `${config.globalSharedSandboxURL}/vnc/index.html?autoconnect=true&resize=scale&reconnect=1&path=/sandbox/global/websockify`;
6373
+ }
6374
+ function getStatusIcon3(status) {
6375
+ switch (status) {
6376
+ case "success":
6377
+ return /* @__PURE__ */ jsx40(CheckCircleOutlined5, { style: { color: "#52c41a" } });
6378
+ case "error":
6379
+ return /* @__PURE__ */ jsx40(InfoCircleOutlined2, { style: { color: "#ff4d4f" } });
6380
+ default:
6381
+ return /* @__PURE__ */ jsx40(LoadingOutlined3, { style: { color: "#1890ff" } });
6382
+ }
6383
+ }
6384
+ const formatToolName = (name) => {
6385
+ if (!name) {
6386
+ return "";
6387
+ }
6388
+ return name.replace(/([a-z])([A-Z])/g, "$1 $2").split(/[_-]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
6389
+ };
6390
+ const formatArgsPreview = (args) => {
6391
+ try {
6392
+ const argsStr = Object.values(args).map((value) => {
6393
+ 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 ? "..." : "");
6394
+ return valueStr;
6395
+ }).join(" ");
6396
+ const result = argsStr.length > 100 ? argsStr.substring(0, 100) + "..." : argsStr;
6397
+ return result.replaceAll("\n", " ");
6398
+ } catch (e) {
6399
+ return "Error parsing args";
6400
+ }
6401
+ };
6402
+ const header = /* @__PURE__ */ jsxs22(Flex6, { align: "center", wrap: "wrap", children: [
6403
+ /* @__PURE__ */ jsx40(Typography15.Text, { strong: true, children: formatToolName(toolCallData.name) }),
6404
+ /* @__PURE__ */ jsx40(
6405
+ Typography15.Text,
6406
+ {
6407
+ type: "secondary",
6408
+ style: { fontSize: "12px", marginLeft: "8px" },
6409
+ children: formatArgsPreview(toolCallData.args)
6410
+ }
6411
+ )
6412
+ ] });
6413
+ const { openSideApp } = useChatUIContext();
6414
+ if (!toolCallData) {
6415
+ return null;
6416
+ }
6417
+ const handleItemClick = (toolCallData2) => {
6418
+ openSideApp({
6419
+ component_key: "browser_viewer",
6420
+ message: "View Browser",
6421
+ data: {
6422
+ url: targetUrl
6423
+ }
6424
+ });
6425
+ };
6426
+ return /* @__PURE__ */ jsx40(
6427
+ ContentPreviewCollapse,
6428
+ {
6429
+ panelKey: toolCallData.id,
6430
+ header,
6431
+ expandIcon: () => getStatusIcon3(toolCallData.status),
6432
+ extra: /* @__PURE__ */ jsx40(
6433
+ Button16,
6434
+ {
6435
+ type: "link",
6436
+ size: "small",
6437
+ onClick: (evt) => {
6438
+ evt.stopPropagation();
6439
+ handleItemClick(toolCallData);
6440
+ },
6441
+ children: "View Browser"
6442
+ }
6443
+ ),
6444
+ children: /* @__PURE__ */ jsx40(MDResponse, { content: toolCallData.response || "" })
6445
+ }
6446
+ );
6447
+ };
6448
+
6375
6449
  // src/components/GenUI/elements/builtIns.tsx
6376
6450
  var elements = {
6377
6451
  action_show_attachments_uploader: {
@@ -6427,6 +6501,10 @@ var elements = {
6427
6501
  schedule_viewer: {
6428
6502
  card_view: () => null,
6429
6503
  side_app_view: ScheduleViewer
6504
+ },
6505
+ browser_viewer: {
6506
+ card_view: BrowserViewer,
6507
+ side_app_view: AttachmentsViewerSideApp
6430
6508
  }
6431
6509
  };
6432
6510
 
@@ -6444,10 +6522,10 @@ var regsiterElement = (language, ElementMeta) => {
6444
6522
  };
6445
6523
 
6446
6524
  // src/components/Chat/SideAppViewBrowser.tsx
6447
- import { Button as Button16, Tabs } from "antd";
6525
+ import { Button as Button17, Tabs } from "antd";
6448
6526
  import { createStyles as createStyles12 } from "antd-style";
6449
6527
  import { useEffect as useEffect16, useState as useState23 } from "react";
6450
- import { jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
6528
+ import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
6451
6529
  var useStyle8 = createStyles12(({ token, css }) => {
6452
6530
  return {
6453
6531
  tabContainer: css`
@@ -6467,9 +6545,9 @@ var useStyle8 = createStyles12(({ token, css }) => {
6467
6545
  };
6468
6546
  });
6469
6547
  var EmptySideAppView = ({ component_key, data }) => {
6470
- return /* @__PURE__ */ jsxs22("div", { children: [
6471
- /* @__PURE__ */ jsx40("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
6472
- /* @__PURE__ */ jsx40("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
6548
+ return /* @__PURE__ */ jsxs23("div", { children: [
6549
+ /* @__PURE__ */ jsx41("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
6550
+ /* @__PURE__ */ jsx41("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
6473
6551
  ] });
6474
6552
  };
6475
6553
  var SideAppViewBrowser = () => {
@@ -6530,7 +6608,7 @@ var SideAppViewBrowser = () => {
6530
6608
  add(
6531
6609
  key,
6532
6610
  sideAppSelectedCard?.message || sideAppSelectedCard?.data.message || "\u672A\u547D\u540D",
6533
- /* @__PURE__ */ jsx40(
6611
+ /* @__PURE__ */ jsx41(
6534
6612
  SideAppView,
6535
6613
  {
6536
6614
  component_key: sideAppSelectedCard?.component_key || "",
@@ -6571,16 +6649,16 @@ var SideAppViewBrowser = () => {
6571
6649
  const getSizeIcon = (size) => {
6572
6650
  switch (size) {
6573
6651
  case "middle":
6574
- return /* @__PURE__ */ jsx40(CompressOutlined, {});
6652
+ return /* @__PURE__ */ jsx41(CompressOutlined, {});
6575
6653
  case "large":
6576
- return /* @__PURE__ */ jsx40(ExpandOutlined, {});
6654
+ return /* @__PURE__ */ jsx41(ExpandOutlined, {});
6577
6655
  case "full":
6578
- return /* @__PURE__ */ jsx40(FullscreenOutlined, {});
6656
+ return /* @__PURE__ */ jsx41(FullscreenOutlined, {});
6579
6657
  default:
6580
- return /* @__PURE__ */ jsx40(ExpandOutlined, {});
6658
+ return /* @__PURE__ */ jsx41(ExpandOutlined, {});
6581
6659
  }
6582
6660
  };
6583
- return /* @__PURE__ */ jsx40(
6661
+ return /* @__PURE__ */ jsx41(
6584
6662
  Tabs,
6585
6663
  {
6586
6664
  className: styles.tabContainer,
@@ -6588,9 +6666,9 @@ var SideAppViewBrowser = () => {
6588
6666
  style: { height: "100%" },
6589
6667
  hideAdd: true,
6590
6668
  tabBarExtraContent: {
6591
- right: /* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: "4px" }, children: [
6592
- /* @__PURE__ */ jsx40(
6593
- Button16,
6669
+ right: /* @__PURE__ */ jsxs23("div", { style: { display: "flex", gap: "4px" }, children: [
6670
+ /* @__PURE__ */ jsx41(
6671
+ Button17,
6594
6672
  {
6595
6673
  style: { margin: "8px 0" },
6596
6674
  size: "large",
@@ -6600,13 +6678,13 @@ var SideAppViewBrowser = () => {
6600
6678
  title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(sideAppSize)}, \u70B9\u51FB\u5207\u6362`
6601
6679
  }
6602
6680
  ),
6603
- /* @__PURE__ */ jsx40(
6604
- Button16,
6681
+ /* @__PURE__ */ jsx41(
6682
+ Button17,
6605
6683
  {
6606
6684
  style: { margin: "8px 0" },
6607
6685
  size: "large",
6608
6686
  type: "text",
6609
- icon: /* @__PURE__ */ jsx40(CloseOutlined, {}),
6687
+ icon: /* @__PURE__ */ jsx41(CloseOutlined, {}),
6610
6688
  onClick: () => {
6611
6689
  closeSideApp();
6612
6690
  }
@@ -6623,10 +6701,10 @@ var SideAppViewBrowser = () => {
6623
6701
  };
6624
6702
 
6625
6703
  // src/components/Chat/LatticeChat.tsx
6626
- import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
6704
+ import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
6627
6705
  var LatticeChat = (props) => {
6628
6706
  const { assistant_id, thread_id = "", menu, header, ...chatingProps } = props;
6629
- return /* @__PURE__ */ jsx41(
6707
+ return /* @__PURE__ */ jsx42(
6630
6708
  AgentThreadProvider,
6631
6709
  {
6632
6710
  assistantId: assistant_id,
@@ -6636,7 +6714,7 @@ var LatticeChat = (props) => {
6636
6714
  enableReturnStateWhenStreamCompleted: true,
6637
6715
  enableResumeStream: true
6638
6716
  },
6639
- children: /* @__PURE__ */ jsx41(ChatUIContextProvider, { children: /* @__PURE__ */ jsxs23(
6717
+ children: /* @__PURE__ */ jsx42(ChatUIContextProvider, { children: /* @__PURE__ */ jsxs24(
6640
6718
  "div",
6641
6719
  {
6642
6720
  style: {
@@ -6647,12 +6725,12 @@ var LatticeChat = (props) => {
6647
6725
  },
6648
6726
  children: [
6649
6727
  header,
6650
- /* @__PURE__ */ jsx41(
6728
+ /* @__PURE__ */ jsx42(
6651
6729
  ColumnLayout,
6652
6730
  {
6653
6731
  menu,
6654
- left: thread_id ? /* @__PURE__ */ jsx41(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx41("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
6655
- right: /* @__PURE__ */ jsx41(SideAppViewBrowser, {})
6732
+ left: thread_id ? /* @__PURE__ */ jsx42(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx42("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
6733
+ right: /* @__PURE__ */ jsx42(SideAppViewBrowser, {})
6656
6734
  }
6657
6735
  )
6658
6736
  ]
@@ -6666,7 +6744,7 @@ var LatticeChat = (props) => {
6666
6744
  import { Conversations } from "@ant-design/x";
6667
6745
  import { theme } from "antd";
6668
6746
  import { useMemo as useMemo8 } from "react";
6669
- import { jsx as jsx42 } from "react/jsx-runtime";
6747
+ import { jsx as jsx43 } from "react/jsx-runtime";
6670
6748
  var AgentConversations = ({
6671
6749
  enableThreadCreation = true,
6672
6750
  enableThreadList = true
@@ -6705,7 +6783,7 @@ var AgentConversations = ({
6705
6783
  const creation = enableThreadCreation ? {
6706
6784
  onClick: newChatClick
6707
6785
  } : void 0;
6708
- return /* @__PURE__ */ jsx42(
6786
+ return /* @__PURE__ */ jsx43(
6709
6787
  Conversations,
6710
6788
  {
6711
6789
  creation,
@@ -6720,58 +6798,18 @@ var AgentConversations = ({
6720
6798
  );
6721
6799
  };
6722
6800
 
6801
+ // src/components/Chat/LatticeChatView.tsx
6802
+ import { useContext as useContext8 } from "react";
6803
+
6723
6804
  // src/components/Chat/ChatSidebar.tsx
6724
- import { useState as useState28, useEffect as useEffect20, useRef as useRef13 } from "react";
6725
- import { Divider as Divider4, Tooltip as Tooltip10, Modal as Modal3, Button as Button21 } from "antd";
6805
+ import { useState as useState29 } from "react";
6806
+ import { Modal as Modal3 } from "antd";
6726
6807
  import {
6727
- MenuFoldOutlined,
6728
- MenuUnfoldOutlined,
6729
6808
  SettingOutlined as SettingOutlined2,
6730
6809
  ApartmentOutlined,
6731
- ThunderboltOutlined as ThunderboltOutlined2
6810
+ ThunderboltOutlined as ThunderboltOutlined2,
6811
+ ToolOutlined as ToolOutlined3
6732
6812
  } from "@ant-design/icons";
6733
-
6734
- // src/components/Chat/AssistantList.tsx
6735
- import { Conversations as Conversations2 } from "@ant-design/x";
6736
- import { Avatar as Avatar4, theme as theme2 } from "antd";
6737
- import { jsx as jsx43 } from "react/jsx-runtime";
6738
- var AssistantList = () => {
6739
- const { token } = theme2.useToken();
6740
- const { assistants, selectAssistant, currentAssistant } = useAssistantContext();
6741
- const style = {
6742
- width: "100%",
6743
- background: "transparent",
6744
- borderRadius: token.borderRadius
6745
- };
6746
- const items = assistants.map((assistant) => ({
6747
- key: assistant.id,
6748
- label: assistant.name,
6749
- icon: /* @__PURE__ */ jsx43(
6750
- Avatar4,
6751
- {
6752
- size: "small",
6753
- style: {
6754
- backgroundColor: token.colorFillSecondary,
6755
- color: token.colorText
6756
- },
6757
- children: assistant.name.charAt(0).toUpperCase()
6758
- }
6759
- )
6760
- }));
6761
- return /* @__PURE__ */ jsx43(
6762
- Conversations2,
6763
- {
6764
- items,
6765
- activeKey: currentAssistant?.id,
6766
- style,
6767
- onActiveChange: (key) => {
6768
- selectAssistant(key);
6769
- }
6770
- }
6771
- );
6772
- };
6773
-
6774
- // src/components/Chat/ChatSidebar.tsx
6775
6813
  import { createStyles as createStyles13 } from "antd-style";
6776
6814
 
6777
6815
  // src/components/Chat/AssistantFlow.tsx
@@ -6789,19 +6827,19 @@ import "@xyflow/react/dist/style.css";
6789
6827
  // src/components/Chat/AssistantNode.tsx
6790
6828
  import { useMemo as useMemo9 } from "react";
6791
6829
  import { Handle, Position } from "@xyflow/react";
6792
- import { Avatar as Avatar5, Typography as Typography15, theme as theme3, Tag as Tag6, Tooltip as Tooltip8, Space as Space15, Popover as Popover2, Button as Button17, Divider as Divider2 } from "antd";
6830
+ import { Avatar as Avatar4, Typography as Typography16, theme as theme2, Tag as Tag6, Tooltip as Tooltip8, Space as Space16, Popover as Popover2, Button as Button18, Divider as Divider2 } from "antd";
6793
6831
  import {
6794
6832
  UserOutlined as UserOutlined3,
6795
6833
  ToolOutlined as ToolOutlined2,
6796
6834
  SettingOutlined,
6797
6835
  IdcardOutlined,
6798
- InfoCircleOutlined as InfoCircleOutlined2,
6836
+ InfoCircleOutlined as InfoCircleOutlined3,
6799
6837
  CopyOutlined as CopyOutlined2,
6800
6838
  CodeOutlined as CodeOutlined4,
6801
6839
  BranchesOutlined
6802
6840
  } from "@ant-design/icons";
6803
- import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
6804
- var { Text: Text13 } = Typography15;
6841
+ import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
6842
+ var { Text: Text14 } = Typography16;
6805
6843
  var getBadgeColor = (id) => {
6806
6844
  const colors = [
6807
6845
  "#1890ff",
@@ -6830,7 +6868,7 @@ var getBadgeColor = (id) => {
6830
6868
  var AssistantNode = ({
6831
6869
  data
6832
6870
  }) => {
6833
- const { token } = theme3.useToken();
6871
+ const { token } = theme2.useToken();
6834
6872
  if (!data) {
6835
6873
  return null;
6836
6874
  }
@@ -6882,7 +6920,7 @@ var AssistantNode = ({
6882
6920
  const handleCopy = (text) => {
6883
6921
  navigator.clipboard.writeText(text);
6884
6922
  };
6885
- const detailCardContent = /* @__PURE__ */ jsxs24(
6923
+ const detailCardContent = /* @__PURE__ */ jsxs25(
6886
6924
  "div",
6887
6925
  {
6888
6926
  style: {
@@ -6901,8 +6939,8 @@ var AssistantNode = ({
6901
6939
  justifyContent: "space-between",
6902
6940
  marginBottom: 16
6903
6941
  },
6904
- children: /* @__PURE__ */ jsxs24("div", { style: { flex: 1 }, children: [
6905
- /* @__PURE__ */ jsxs24(
6942
+ children: /* @__PURE__ */ jsxs25("div", { style: { flex: 1 }, children: [
6943
+ /* @__PURE__ */ jsxs25(
6906
6944
  "div",
6907
6945
  {
6908
6946
  style: {
@@ -6913,7 +6951,7 @@ var AssistantNode = ({
6913
6951
  },
6914
6952
  children: [
6915
6953
  /* @__PURE__ */ jsx44(
6916
- Text13,
6954
+ Text14,
6917
6955
  {
6918
6956
  strong: true,
6919
6957
  style: {
@@ -6949,7 +6987,7 @@ var AssistantNode = ({
6949
6987
  gap: 6
6950
6988
  },
6951
6989
  children: /* @__PURE__ */ jsx44(
6952
- Text13,
6990
+ Text14,
6953
6991
  {
6954
6992
  style: {
6955
6993
  fontSize: 11,
@@ -6964,8 +7002,8 @@ var AssistantNode = ({
6964
7002
  ] })
6965
7003
  }
6966
7004
  ),
6967
- assistant.description && /* @__PURE__ */ jsx44("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs24(
6968
- Text13,
7005
+ assistant.description && /* @__PURE__ */ jsx44("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs25(
7006
+ Text14,
6969
7007
  {
6970
7008
  style: {
6971
7009
  fontSize: 12,
@@ -6980,8 +7018,8 @@ var AssistantNode = ({
6980
7018
  ]
6981
7019
  }
6982
7020
  ) }),
6983
- modelKey && /* @__PURE__ */ jsxs24("div", { style: { marginBottom: 16 }, children: [
6984
- /* @__PURE__ */ jsxs24(
7021
+ modelKey && /* @__PURE__ */ jsxs25("div", { style: { marginBottom: 16 }, children: [
7022
+ /* @__PURE__ */ jsxs25(
6985
7023
  "div",
6986
7024
  {
6987
7025
  style: {
@@ -7001,7 +7039,7 @@ var AssistantNode = ({
7001
7039
  }
7002
7040
  ),
7003
7041
  /* @__PURE__ */ jsx44(
7004
- Text13,
7042
+ Text14,
7005
7043
  {
7006
7044
  style: {
7007
7045
  fontSize: 12,
@@ -7026,8 +7064,8 @@ var AssistantNode = ({
7026
7064
  }
7027
7065
  )
7028
7066
  ] }),
7029
- prompt && /* @__PURE__ */ jsxs24("div", { style: { marginBottom: 16 }, children: [
7030
- /* @__PURE__ */ jsxs24(
7067
+ prompt && /* @__PURE__ */ jsxs25("div", { style: { marginBottom: 16 }, children: [
7068
+ /* @__PURE__ */ jsxs25(
7031
7069
  "div",
7032
7070
  {
7033
7071
  style: {
@@ -7047,7 +7085,7 @@ var AssistantNode = ({
7047
7085
  }
7048
7086
  ),
7049
7087
  /* @__PURE__ */ jsx44(
7050
- Text13,
7088
+ Text14,
7051
7089
  {
7052
7090
  style: {
7053
7091
  fontSize: 12,
@@ -7073,7 +7111,7 @@ var AssistantNode = ({
7073
7111
  overflowY: "auto"
7074
7112
  },
7075
7113
  children: /* @__PURE__ */ jsx44(
7076
- Text13,
7114
+ Text14,
7077
7115
  {
7078
7116
  style: {
7079
7117
  fontSize: 11,
@@ -7087,8 +7125,8 @@ var AssistantNode = ({
7087
7125
  }
7088
7126
  )
7089
7127
  ] }),
7090
- tools && tools.length > 0 && /* @__PURE__ */ jsxs24("div", { style: { marginBottom: 16 }, children: [
7091
- /* @__PURE__ */ jsxs24(
7128
+ tools && tools.length > 0 && /* @__PURE__ */ jsxs25("div", { style: { marginBottom: 16 }, children: [
7129
+ /* @__PURE__ */ jsxs25(
7092
7130
  "div",
7093
7131
  {
7094
7132
  style: {
@@ -7107,8 +7145,8 @@ var AssistantNode = ({
7107
7145
  }
7108
7146
  }
7109
7147
  ),
7110
- /* @__PURE__ */ jsxs24(
7111
- Text13,
7148
+ /* @__PURE__ */ jsxs25(
7149
+ Text14,
7112
7150
  {
7113
7151
  style: {
7114
7152
  fontSize: 12,
@@ -7125,7 +7163,7 @@ var AssistantNode = ({
7125
7163
  ]
7126
7164
  }
7127
7165
  ),
7128
- /* @__PURE__ */ jsx44(Space15, { size: [8, 8], wrap: true, children: tools.map((tool, index) => /* @__PURE__ */ jsx44(
7166
+ /* @__PURE__ */ jsx44(Space16, { size: [8, 8], wrap: true, children: tools.map((tool, index) => /* @__PURE__ */ jsx44(
7129
7167
  Tag6,
7130
7168
  {
7131
7169
  color: "blue",
@@ -7138,8 +7176,8 @@ var AssistantNode = ({
7138
7176
  index
7139
7177
  )) })
7140
7178
  ] }),
7141
- subAgents && subAgents.length > 0 && /* @__PURE__ */ jsxs24("div", { style: { marginBottom: 16 }, children: [
7142
- /* @__PURE__ */ jsxs24(
7179
+ subAgents && subAgents.length > 0 && /* @__PURE__ */ jsxs25("div", { style: { marginBottom: 16 }, children: [
7180
+ /* @__PURE__ */ jsxs25(
7143
7181
  "div",
7144
7182
  {
7145
7183
  style: {
@@ -7158,8 +7196,8 @@ var AssistantNode = ({
7158
7196
  }
7159
7197
  }
7160
7198
  ),
7161
- /* @__PURE__ */ jsxs24(
7162
- Text13,
7199
+ /* @__PURE__ */ jsxs25(
7200
+ Text14,
7163
7201
  {
7164
7202
  style: {
7165
7203
  fontSize: 12,
@@ -7176,7 +7214,7 @@ var AssistantNode = ({
7176
7214
  ]
7177
7215
  }
7178
7216
  ),
7179
- /* @__PURE__ */ jsx44(Space15, { size: [8, 8], wrap: true, children: subAgents.map((subAgent, index) => /* @__PURE__ */ jsx44(
7217
+ /* @__PURE__ */ jsx44(Space16, { size: [8, 8], wrap: true, children: subAgents.map((subAgent, index) => /* @__PURE__ */ jsx44(
7180
7218
  Tag6,
7181
7219
  {
7182
7220
  style: {
@@ -7192,7 +7230,7 @@ var AssistantNode = ({
7192
7230
  )) })
7193
7231
  ] }),
7194
7232
  /* @__PURE__ */ jsx44(Divider2, { style: { margin: "16px 0" } }),
7195
- /* @__PURE__ */ jsxs24(
7233
+ /* @__PURE__ */ jsxs25(
7196
7234
  "div",
7197
7235
  {
7198
7236
  style: {
@@ -7203,7 +7241,7 @@ var AssistantNode = ({
7203
7241
  },
7204
7242
  children: [
7205
7243
  /* @__PURE__ */ jsx44(
7206
- Button17,
7244
+ Button18,
7207
7245
  {
7208
7246
  type: "primary",
7209
7247
  block: true,
@@ -7215,7 +7253,7 @@ var AssistantNode = ({
7215
7253
  }
7216
7254
  ),
7217
7255
  /* @__PURE__ */ jsx44(
7218
- Button17,
7256
+ Button18,
7219
7257
  {
7220
7258
  icon: /* @__PURE__ */ jsx44(CopyOutlined2, {}),
7221
7259
  onClick: () => handleCopy(assistant.id),
@@ -7228,7 +7266,7 @@ var AssistantNode = ({
7228
7266
  ]
7229
7267
  }
7230
7268
  );
7231
- return /* @__PURE__ */ jsxs24(
7269
+ return /* @__PURE__ */ jsxs25(
7232
7270
  "div",
7233
7271
  {
7234
7272
  style: {
@@ -7236,7 +7274,7 @@ var AssistantNode = ({
7236
7274
  },
7237
7275
  children: [
7238
7276
  /* @__PURE__ */ jsx44(Handle, { type: "target", position: Position.Top }),
7239
- /* @__PURE__ */ jsxs24(
7277
+ /* @__PURE__ */ jsxs25(
7240
7278
  "div",
7241
7279
  {
7242
7280
  onClick: () => onClick?.(assistant),
@@ -7305,7 +7343,7 @@ var AssistantNode = ({
7305
7343
  e.currentTarget.style.background = token.colorBgContainer;
7306
7344
  },
7307
7345
  children: /* @__PURE__ */ jsx44(
7308
- InfoCircleOutlined2,
7346
+ InfoCircleOutlined3,
7309
7347
  {
7310
7348
  style: {
7311
7349
  fontSize: 14,
@@ -7317,7 +7355,7 @@ var AssistantNode = ({
7317
7355
  )
7318
7356
  }
7319
7357
  ),
7320
- /* @__PURE__ */ jsxs24(
7358
+ /* @__PURE__ */ jsxs25(
7321
7359
  "div",
7322
7360
  {
7323
7361
  style: {
@@ -7327,7 +7365,7 @@ var AssistantNode = ({
7327
7365
  gap: 10
7328
7366
  },
7329
7367
  children: [
7330
- /* @__PURE__ */ jsxs24(
7368
+ /* @__PURE__ */ jsxs25(
7331
7369
  "div",
7332
7370
  {
7333
7371
  style: {
@@ -7336,7 +7374,7 @@ var AssistantNode = ({
7336
7374
  gap: 10
7337
7375
  },
7338
7376
  children: [
7339
- /* @__PURE__ */ jsxs24(
7377
+ /* @__PURE__ */ jsxs25(
7340
7378
  "div",
7341
7379
  {
7342
7380
  style: {
@@ -7345,7 +7383,7 @@ var AssistantNode = ({
7345
7383
  },
7346
7384
  children: [
7347
7385
  /* @__PURE__ */ jsx44(
7348
- Avatar5,
7386
+ Avatar4,
7349
7387
  {
7350
7388
  size: 44,
7351
7389
  icon: /* @__PURE__ */ jsx44(UserOutlined3, {}),
@@ -7376,7 +7414,7 @@ var AssistantNode = ({
7376
7414
  ]
7377
7415
  }
7378
7416
  ),
7379
- /* @__PURE__ */ jsxs24(
7417
+ /* @__PURE__ */ jsxs25(
7380
7418
  "div",
7381
7419
  {
7382
7420
  style: {
@@ -7385,7 +7423,7 @@ var AssistantNode = ({
7385
7423
  },
7386
7424
  children: [
7387
7425
  /* @__PURE__ */ jsx44(
7388
- Text13,
7426
+ Text14,
7389
7427
  {
7390
7428
  strong: true,
7391
7429
  style: {
@@ -7400,7 +7438,7 @@ var AssistantNode = ({
7400
7438
  children: assistant.name
7401
7439
  }
7402
7440
  ),
7403
- /* @__PURE__ */ jsxs24(
7441
+ /* @__PURE__ */ jsxs25(
7404
7442
  "div",
7405
7443
  {
7406
7444
  style: {
@@ -7419,7 +7457,7 @@ var AssistantNode = ({
7419
7457
  }
7420
7458
  ),
7421
7459
  /* @__PURE__ */ jsx44(
7422
- Text13,
7460
+ Text14,
7423
7461
  {
7424
7462
  style: {
7425
7463
  fontSize: 9,
@@ -7453,7 +7491,7 @@ var AssistantNode = ({
7453
7491
  {
7454
7492
  title: assistant.description.length > 150 ? assistant.description : void 0,
7455
7493
  placement: "top",
7456
- children: /* @__PURE__ */ jsxs24(
7494
+ children: /* @__PURE__ */ jsxs25(
7457
7495
  "div",
7458
7496
  {
7459
7497
  style: {
@@ -7479,7 +7517,7 @@ var AssistantNode = ({
7479
7517
  )
7480
7518
  }
7481
7519
  ),
7482
- /* @__PURE__ */ jsxs24(
7520
+ /* @__PURE__ */ jsxs25(
7483
7521
  "div",
7484
7522
  {
7485
7523
  style: {
@@ -7507,7 +7545,7 @@ var AssistantNode = ({
7507
7545
  children: getAgentTypeLabel(agentType)
7508
7546
  }
7509
7547
  ),
7510
- tools && tools.length > 0 && /* @__PURE__ */ jsxs24(
7548
+ tools && tools.length > 0 && /* @__PURE__ */ jsxs25(
7511
7549
  Tag6,
7512
7550
  {
7513
7551
  style: {
@@ -7562,7 +7600,7 @@ var AssistantNode = ({
7562
7600
  var AssistantNode_default = AssistantNode;
7563
7601
 
7564
7602
  // src/components/Chat/AssistantFlow.tsx
7565
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
7603
+ import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
7566
7604
  var AssistantFlowInner = ({ onNodeClick }) => {
7567
7605
  const [nodes, setNodes, onNodesChange] = useNodesState([]);
7568
7606
  const [edges, setEdges, onEdgesChange] = useEdgesState([]);
@@ -7806,7 +7844,7 @@ var AssistantFlowInner = ({ onNodeClick }) => {
7806
7844
  }
7807
7845
  );
7808
7846
  }
7809
- return /* @__PURE__ */ jsx45("div", { style: { width: "100%", height: "100%", background: "#fafafa" }, children: /* @__PURE__ */ jsxs25(
7847
+ return /* @__PURE__ */ jsx45("div", { style: { width: "100%", height: "100%", background: "#fafafa" }, children: /* @__PURE__ */ jsxs26(
7810
7848
  ReactFlow,
7811
7849
  {
7812
7850
  nodes,
@@ -7836,20 +7874,20 @@ import {
7836
7874
  ReactFlowProvider as ReactFlowProvider2
7837
7875
  } from "@xyflow/react";
7838
7876
  import "@xyflow/react/dist/style.css";
7839
- import { Button as Button20, theme as theme6 } from "antd";
7877
+ import { Button as Button21, theme as theme5 } from "antd";
7840
7878
  import { PlusOutlined as PlusOutlined4 } from "@ant-design/icons";
7841
7879
 
7842
7880
  // src/components/Chat/SkillNode.tsx
7843
7881
  import { useEffect as useEffect18, useMemo as useMemo11, useState as useState25 } from "react";
7844
7882
  import { Handle as Handle2, Position as Position2 } from "@xyflow/react";
7845
7883
  import {
7846
- Avatar as Avatar6,
7847
- Typography as Typography16,
7848
- theme as theme4,
7884
+ Avatar as Avatar5,
7885
+ Typography as Typography17,
7886
+ theme as theme3,
7849
7887
  Tag as Tag7,
7850
7888
  Tooltip as Tooltip9,
7851
- Space as Space16,
7852
- Button as Button18,
7889
+ Space as Space17,
7890
+ Button as Button19,
7853
7891
  Divider as Divider3,
7854
7892
  Input,
7855
7893
  Modal,
@@ -7859,14 +7897,14 @@ import {
7859
7897
  BookOutlined,
7860
7898
  BranchesOutlined as BranchesOutlined2,
7861
7899
  CopyrightOutlined,
7862
- InfoCircleOutlined as InfoCircleOutlined3,
7900
+ InfoCircleOutlined as InfoCircleOutlined4,
7863
7901
  FileTextOutlined as FileTextOutlined5,
7864
7902
  CopyOutlined as CopyOutlined3,
7865
7903
  PlusOutlined as PlusOutlined2
7866
7904
  } from "@ant-design/icons";
7867
7905
  import { Client as Client4 } from "@axiom-lattice/client-sdk";
7868
- import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
7869
- var { Text: Text14 } = Typography16;
7906
+ import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
7907
+ var { Text: Text15 } = Typography17;
7870
7908
  var { TextArea } = Input;
7871
7909
  var getBadgeColor2 = (name) => {
7872
7910
  const colors = [
@@ -7894,7 +7932,7 @@ var getBadgeColor2 = (name) => {
7894
7932
  return colors[Math.abs(hash) % colors.length];
7895
7933
  };
7896
7934
  var SkillNode = ({ data }) => {
7897
- const { token } = theme4.useToken();
7935
+ const { token } = theme3.useToken();
7898
7936
  const { config } = useLatticeChatShellContext();
7899
7937
  const client = useMemo11(
7900
7938
  () => new Client4({
@@ -8068,7 +8106,7 @@ var SkillNode = ({ data }) => {
8068
8106
  setSaving(false);
8069
8107
  }
8070
8108
  };
8071
- const editingView = /* @__PURE__ */ jsxs26(
8109
+ const editingView = /* @__PURE__ */ jsxs27(
8072
8110
  "div",
8073
8111
  {
8074
8112
  style: {
@@ -8077,8 +8115,8 @@ var SkillNode = ({ data }) => {
8077
8115
  gap: 12
8078
8116
  },
8079
8117
  children: [
8080
- /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8081
- /* @__PURE__ */ jsx46(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
8118
+ /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8119
+ /* @__PURE__ */ jsx46(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
8082
8120
  /* @__PURE__ */ jsx46(
8083
8121
  TextArea,
8084
8122
  {
@@ -8089,8 +8127,8 @@ var SkillNode = ({ data }) => {
8089
8127
  }
8090
8128
  )
8091
8129
  ] }),
8092
- /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8093
- /* @__PURE__ */ jsx46(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
8130
+ /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8131
+ /* @__PURE__ */ jsx46(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
8094
8132
  /* @__PURE__ */ jsx46(
8095
8133
  Input,
8096
8134
  {
@@ -8100,8 +8138,8 @@ var SkillNode = ({ data }) => {
8100
8138
  }
8101
8139
  )
8102
8140
  ] }),
8103
- /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8104
- /* @__PURE__ */ jsx46(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
8141
+ /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8142
+ /* @__PURE__ */ jsx46(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
8105
8143
  /* @__PURE__ */ jsx46(
8106
8144
  Input,
8107
8145
  {
@@ -8111,7 +8149,7 @@ var SkillNode = ({ data }) => {
8111
8149
  }
8112
8150
  )
8113
8151
  ] }),
8114
- /* @__PURE__ */ jsxs26(
8152
+ /* @__PURE__ */ jsxs27(
8115
8153
  "div",
8116
8154
  {
8117
8155
  style: {
@@ -8122,7 +8160,7 @@ var SkillNode = ({ data }) => {
8122
8160
  },
8123
8161
  children: [
8124
8162
  /* @__PURE__ */ jsx46(
8125
- Text14,
8163
+ Text15,
8126
8164
  {
8127
8165
  style: {
8128
8166
  fontSize: 12,
@@ -8133,7 +8171,7 @@ var SkillNode = ({ data }) => {
8133
8171
  }
8134
8172
  ),
8135
8173
  /* @__PURE__ */ jsx46(
8136
- Button18,
8174
+ Button19,
8137
8175
  {
8138
8176
  size: "small",
8139
8177
  icon: /* @__PURE__ */ jsx46(PlusOutlined2, {}),
@@ -8144,9 +8182,9 @@ var SkillNode = ({ data }) => {
8144
8182
  ]
8145
8183
  }
8146
8184
  ),
8147
- /* @__PURE__ */ jsxs26(Space16, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
8185
+ /* @__PURE__ */ jsxs27(Space17, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
8148
8186
  metadataRows.length === 0 && /* @__PURE__ */ jsx46(
8149
- Text14,
8187
+ Text15,
8150
8188
  {
8151
8189
  style: {
8152
8190
  fontSize: 11,
@@ -8155,7 +8193,7 @@ var SkillNode = ({ data }) => {
8155
8193
  children: "No metadata yet. Use Add to create one."
8156
8194
  }
8157
8195
  ),
8158
- metadataRows.map((row, index) => /* @__PURE__ */ jsxs26(
8196
+ metadataRows.map((row, index) => /* @__PURE__ */ jsxs27(
8159
8197
  "div",
8160
8198
  {
8161
8199
  style: {
@@ -8165,11 +8203,11 @@ var SkillNode = ({ data }) => {
8165
8203
  width: "100%"
8166
8204
  },
8167
8205
  children: [
8168
- /* @__PURE__ */ jsxs26(Text14, { style: { fontSize: 11, color: token.colorTextSecondary }, children: [
8206
+ /* @__PURE__ */ jsxs27(Text15, { style: { fontSize: 11, color: token.colorTextSecondary }, children: [
8169
8207
  "Meta ",
8170
8208
  index + 1
8171
8209
  ] }),
8172
- /* @__PURE__ */ jsxs26(Space16, { style: { width: "100%" }, size: 8, wrap: true, children: [
8210
+ /* @__PURE__ */ jsxs27(Space17, { style: { width: "100%" }, size: 8, wrap: true, children: [
8173
8211
  /* @__PURE__ */ jsx46(
8174
8212
  Input,
8175
8213
  {
@@ -8194,8 +8232,8 @@ var SkillNode = ({ data }) => {
8194
8232
  index
8195
8233
  ))
8196
8234
  ] }),
8197
- /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8198
- /* @__PURE__ */ jsx46(Text14, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
8235
+ /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
8236
+ /* @__PURE__ */ jsx46(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
8199
8237
  /* @__PURE__ */ jsx46(
8200
8238
  TextArea,
8201
8239
  {
@@ -8209,7 +8247,7 @@ var SkillNode = ({ data }) => {
8209
8247
  ]
8210
8248
  }
8211
8249
  );
8212
- const detailCardContent = /* @__PURE__ */ jsxs26(
8250
+ const detailCardContent = /* @__PURE__ */ jsxs27(
8213
8251
  "div",
8214
8252
  {
8215
8253
  style: {
@@ -8228,8 +8266,8 @@ var SkillNode = ({ data }) => {
8228
8266
  justifyContent: "space-between",
8229
8267
  marginBottom: 16
8230
8268
  },
8231
- children: /* @__PURE__ */ jsxs26("div", { style: { flex: 1 }, children: [
8232
- /* @__PURE__ */ jsxs26(
8269
+ children: /* @__PURE__ */ jsxs27("div", { style: { flex: 1 }, children: [
8270
+ /* @__PURE__ */ jsxs27(
8233
8271
  "div",
8234
8272
  {
8235
8273
  style: {
@@ -8240,7 +8278,7 @@ var SkillNode = ({ data }) => {
8240
8278
  },
8241
8279
  children: [
8242
8280
  /* @__PURE__ */ jsx46(
8243
- Text14,
8281
+ Text15,
8244
8282
  {
8245
8283
  strong: true,
8246
8284
  style: {
@@ -8276,7 +8314,7 @@ var SkillNode = ({ data }) => {
8276
8314
  gap: 6
8277
8315
  },
8278
8316
  children: /* @__PURE__ */ jsx46(
8279
- Text14,
8317
+ Text15,
8280
8318
  {
8281
8319
  style: {
8282
8320
  fontSize: 11,
@@ -8291,9 +8329,9 @@ var SkillNode = ({ data }) => {
8291
8329
  ] })
8292
8330
  }
8293
8331
  ),
8294
- isEditing ? editingView : /* @__PURE__ */ jsxs26(Fragment6, { children: [
8295
- currentSkill.description && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs26(
8296
- Text14,
8332
+ isEditing ? editingView : /* @__PURE__ */ jsxs27(Fragment6, { children: [
8333
+ currentSkill.description && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs27(
8334
+ Text15,
8297
8335
  {
8298
8336
  style: {
8299
8337
  fontSize: 12,
@@ -8308,8 +8346,8 @@ var SkillNode = ({ data }) => {
8308
8346
  ]
8309
8347
  }
8310
8348
  ) }),
8311
- metadataEntries.length > 0 && /* @__PURE__ */ jsxs26("div", { style: { marginBottom: 16 }, children: [
8312
- /* @__PURE__ */ jsxs26(
8349
+ metadataEntries.length > 0 && /* @__PURE__ */ jsxs27("div", { style: { marginBottom: 16 }, children: [
8350
+ /* @__PURE__ */ jsxs27(
8313
8351
  "div",
8314
8352
  {
8315
8353
  style: {
@@ -8320,7 +8358,7 @@ var SkillNode = ({ data }) => {
8320
8358
  },
8321
8359
  children: [
8322
8360
  /* @__PURE__ */ jsx46(
8323
- InfoCircleOutlined3,
8361
+ InfoCircleOutlined4,
8324
8362
  {
8325
8363
  style: {
8326
8364
  fontSize: 14,
@@ -8328,8 +8366,8 @@ var SkillNode = ({ data }) => {
8328
8366
  }
8329
8367
  }
8330
8368
  ),
8331
- /* @__PURE__ */ jsxs26(
8332
- Text14,
8369
+ /* @__PURE__ */ jsxs27(
8370
+ Text15,
8333
8371
  {
8334
8372
  style: {
8335
8373
  fontSize: 12,
@@ -8354,7 +8392,7 @@ var SkillNode = ({ data }) => {
8354
8392
  borderRadius: 6,
8355
8393
  overflow: "hidden"
8356
8394
  },
8357
- children: metadataEntries.map(([key, value], index) => /* @__PURE__ */ jsxs26(
8395
+ children: metadataEntries.map(([key, value], index) => /* @__PURE__ */ jsxs27(
8358
8396
  "div",
8359
8397
  {
8360
8398
  style: {
@@ -8399,8 +8437,8 @@ var SkillNode = ({ data }) => {
8399
8437
  }
8400
8438
  )
8401
8439
  ] }),
8402
- hasSubSkills && /* @__PURE__ */ jsxs26("div", { style: { marginBottom: 16 }, children: [
8403
- /* @__PURE__ */ jsxs26(
8440
+ hasSubSkills && /* @__PURE__ */ jsxs27("div", { style: { marginBottom: 16 }, children: [
8441
+ /* @__PURE__ */ jsxs27(
8404
8442
  "div",
8405
8443
  {
8406
8444
  style: {
@@ -8419,8 +8457,8 @@ var SkillNode = ({ data }) => {
8419
8457
  }
8420
8458
  }
8421
8459
  ),
8422
- /* @__PURE__ */ jsxs26(
8423
- Text14,
8460
+ /* @__PURE__ */ jsxs27(
8461
+ Text15,
8424
8462
  {
8425
8463
  style: {
8426
8464
  fontSize: 12,
@@ -8437,7 +8475,7 @@ var SkillNode = ({ data }) => {
8437
8475
  ]
8438
8476
  }
8439
8477
  ),
8440
- /* @__PURE__ */ jsx46(Space16, { size: [8, 8], wrap: true, children: currentSkill.subSkills.map(
8478
+ /* @__PURE__ */ jsx46(Space17, { size: [8, 8], wrap: true, children: currentSkill.subSkills.map(
8441
8479
  (subSkill, index) => /* @__PURE__ */ jsx46(
8442
8480
  Tag7,
8443
8481
  {
@@ -8454,7 +8492,7 @@ var SkillNode = ({ data }) => {
8454
8492
  )
8455
8493
  ) })
8456
8494
  ] }),
8457
- (currentSkill.license || currentSkill.compatibility) && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs26(Space16, { size: [8, 8], wrap: true, children: [
8495
+ (currentSkill.license || currentSkill.compatibility) && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs27(Space17, { size: [8, 8], wrap: true, children: [
8458
8496
  currentSkill.license && /* @__PURE__ */ jsx46(
8459
8497
  Tag7,
8460
8498
  {
@@ -8494,9 +8532,9 @@ var SkillNode = ({ data }) => {
8494
8532
  }
8495
8533
  )
8496
8534
  ] }) }),
8497
- (currentSkill.createdAt || currentSkill.updatedAt) && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs26(Space16, { direction: "vertical", size: 4, children: [
8498
- currentSkill.createdAt && /* @__PURE__ */ jsxs26(
8499
- Text14,
8535
+ (currentSkill.createdAt || currentSkill.updatedAt) && /* @__PURE__ */ jsx46("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxs27(Space17, { direction: "vertical", size: 4, children: [
8536
+ currentSkill.createdAt && /* @__PURE__ */ jsxs27(
8537
+ Text15,
8500
8538
  {
8501
8539
  style: {
8502
8540
  fontSize: 11,
@@ -8509,8 +8547,8 @@ var SkillNode = ({ data }) => {
8509
8547
  ]
8510
8548
  }
8511
8549
  ),
8512
- currentSkill.updatedAt && /* @__PURE__ */ jsxs26(
8513
- Text14,
8550
+ currentSkill.updatedAt && /* @__PURE__ */ jsxs27(
8551
+ Text15,
8514
8552
  {
8515
8553
  style: {
8516
8554
  fontSize: 11,
@@ -8524,8 +8562,8 @@ var SkillNode = ({ data }) => {
8524
8562
  }
8525
8563
  )
8526
8564
  ] }) }),
8527
- currentSkill.content && /* @__PURE__ */ jsxs26("div", { style: { marginBottom: 0 }, children: [
8528
- /* @__PURE__ */ jsxs26(
8565
+ currentSkill.content && /* @__PURE__ */ jsxs27("div", { style: { marginBottom: 0 }, children: [
8566
+ /* @__PURE__ */ jsxs27(
8529
8567
  "div",
8530
8568
  {
8531
8569
  style: {
@@ -8545,7 +8583,7 @@ var SkillNode = ({ data }) => {
8545
8583
  }
8546
8584
  ),
8547
8585
  /* @__PURE__ */ jsx46(
8548
- Text14,
8586
+ Text15,
8549
8587
  {
8550
8588
  style: {
8551
8589
  fontSize: 12,
@@ -8571,7 +8609,7 @@ var SkillNode = ({ data }) => {
8571
8609
  overflowY: "auto"
8572
8610
  },
8573
8611
  children: /* @__PURE__ */ jsx46(
8574
- Text14,
8612
+ Text15,
8575
8613
  {
8576
8614
  style: {
8577
8615
  fontSize: 11,
@@ -8596,9 +8634,9 @@ var SkillNode = ({ data }) => {
8596
8634
  justifyContent: "space-between",
8597
8635
  gap: 8
8598
8636
  },
8599
- children: isEditing ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
8637
+ children: isEditing ? /* @__PURE__ */ jsxs27(Fragment6, { children: [
8600
8638
  /* @__PURE__ */ jsx46(
8601
- Button18,
8639
+ Button19,
8602
8640
  {
8603
8641
  block: true,
8604
8642
  onClick: () => {
@@ -8612,7 +8650,7 @@ var SkillNode = ({ data }) => {
8612
8650
  }
8613
8651
  ),
8614
8652
  /* @__PURE__ */ jsx46(
8615
- Button18,
8653
+ Button19,
8616
8654
  {
8617
8655
  type: "primary",
8618
8656
  block: true,
@@ -8624,9 +8662,9 @@ var SkillNode = ({ data }) => {
8624
8662
  children: "Save"
8625
8663
  }
8626
8664
  )
8627
- ] }) : /* @__PURE__ */ jsxs26(Fragment6, { children: [
8665
+ ] }) : /* @__PURE__ */ jsxs27(Fragment6, { children: [
8628
8666
  /* @__PURE__ */ jsx46(
8629
- Button18,
8667
+ Button19,
8630
8668
  {
8631
8669
  type: "primary",
8632
8670
  block: true,
@@ -8638,7 +8676,7 @@ var SkillNode = ({ data }) => {
8638
8676
  }
8639
8677
  ),
8640
8678
  /* @__PURE__ */ jsx46(
8641
- Button18,
8679
+ Button19,
8642
8680
  {
8643
8681
  danger: true,
8644
8682
  onClick: (e) => {
@@ -8649,7 +8687,7 @@ var SkillNode = ({ data }) => {
8649
8687
  }
8650
8688
  ),
8651
8689
  /* @__PURE__ */ jsx46(
8652
- Button18,
8690
+ Button19,
8653
8691
  {
8654
8692
  icon: /* @__PURE__ */ jsx46(CopyOutlined3, {}),
8655
8693
  onClick: () => handleCopy(currentSkill.id),
@@ -8670,7 +8708,7 @@ var SkillNode = ({ data }) => {
8670
8708
  height: 0,
8671
8709
  pointerEvents: "none"
8672
8710
  };
8673
- return /* @__PURE__ */ jsxs26(
8711
+ return /* @__PURE__ */ jsxs27(
8674
8712
  "div",
8675
8713
  {
8676
8714
  style: {
@@ -8716,7 +8754,7 @@ var SkillNode = ({ data }) => {
8716
8754
  e.currentTarget.style.transform = "translateY(0)";
8717
8755
  e.currentTarget.style.boxShadow = `0 1px 4px rgba(0, 0, 0, 0.08)`;
8718
8756
  },
8719
- children: /* @__PURE__ */ jsxs26(
8757
+ children: /* @__PURE__ */ jsxs27(
8720
8758
  "div",
8721
8759
  {
8722
8760
  style: {
@@ -8726,7 +8764,7 @@ var SkillNode = ({ data }) => {
8726
8764
  gap: 10
8727
8765
  },
8728
8766
  children: [
8729
- /* @__PURE__ */ jsxs26(
8767
+ /* @__PURE__ */ jsxs27(
8730
8768
  "div",
8731
8769
  {
8732
8770
  style: {
@@ -8735,7 +8773,7 @@ var SkillNode = ({ data }) => {
8735
8773
  gap: 10
8736
8774
  },
8737
8775
  children: [
8738
- /* @__PURE__ */ jsxs26(
8776
+ /* @__PURE__ */ jsxs27(
8739
8777
  "div",
8740
8778
  {
8741
8779
  style: {
@@ -8744,7 +8782,7 @@ var SkillNode = ({ data }) => {
8744
8782
  },
8745
8783
  children: [
8746
8784
  /* @__PURE__ */ jsx46(
8747
- Avatar6,
8785
+ Avatar5,
8748
8786
  {
8749
8787
  size: 44,
8750
8788
  icon: /* @__PURE__ */ jsx46(BookOutlined, {}),
@@ -8787,7 +8825,7 @@ var SkillNode = ({ data }) => {
8787
8825
  ]
8788
8826
  }
8789
8827
  ),
8790
- /* @__PURE__ */ jsxs26(
8828
+ /* @__PURE__ */ jsxs27(
8791
8829
  "div",
8792
8830
  {
8793
8831
  style: {
@@ -8796,7 +8834,7 @@ var SkillNode = ({ data }) => {
8796
8834
  },
8797
8835
  children: [
8798
8836
  /* @__PURE__ */ jsx46(
8799
- Text14,
8837
+ Text15,
8800
8838
  {
8801
8839
  strong: true,
8802
8840
  style: {
@@ -8811,7 +8849,7 @@ var SkillNode = ({ data }) => {
8811
8849
  children: currentSkill.name
8812
8850
  }
8813
8851
  ),
8814
- /* @__PURE__ */ jsxs26(
8852
+ /* @__PURE__ */ jsxs27(
8815
8853
  "div",
8816
8854
  {
8817
8855
  style: {
@@ -8830,7 +8868,7 @@ var SkillNode = ({ data }) => {
8830
8868
  }
8831
8869
  ),
8832
8870
  /* @__PURE__ */ jsx46(
8833
- Text14,
8871
+ Text15,
8834
8872
  {
8835
8873
  style: {
8836
8874
  fontSize: 9,
@@ -8864,7 +8902,7 @@ var SkillNode = ({ data }) => {
8864
8902
  {
8865
8903
  title: currentSkill.description.length > 150 ? currentSkill.description : void 0,
8866
8904
  placement: "top",
8867
- children: /* @__PURE__ */ jsxs26(
8905
+ children: /* @__PURE__ */ jsxs27(
8868
8906
  "div",
8869
8907
  {
8870
8908
  style: {
@@ -8890,7 +8928,7 @@ var SkillNode = ({ data }) => {
8890
8928
  )
8891
8929
  }
8892
8930
  ),
8893
- /* @__PURE__ */ jsxs26(
8931
+ /* @__PURE__ */ jsxs27(
8894
8932
  "div",
8895
8933
  {
8896
8934
  style: {
@@ -8919,7 +8957,7 @@ var SkillNode = ({ data }) => {
8919
8957
  children: category.toUpperCase()
8920
8958
  }
8921
8959
  ),
8922
- hasSubSkills && /* @__PURE__ */ jsxs26(
8960
+ hasSubSkills && /* @__PURE__ */ jsxs27(
8923
8961
  Tag7,
8924
8962
  {
8925
8963
  style: {
@@ -8974,7 +9012,7 @@ var SkillNode = ({ data }) => {
8974
9012
  fontWeight: 500,
8975
9013
  lineHeight: "14px"
8976
9014
  },
8977
- icon: /* @__PURE__ */ jsx46(InfoCircleOutlined3, {}),
9015
+ icon: /* @__PURE__ */ jsx46(InfoCircleOutlined4, {}),
8978
9016
  children: currentSkill.compatibility
8979
9017
  }
8980
9018
  )
@@ -9026,16 +9064,16 @@ import {
9026
9064
  Modal as Modal2,
9027
9065
  Form,
9028
9066
  Input as Input2,
9029
- Button as Button19,
9067
+ Button as Button20,
9030
9068
  message as message6,
9031
- Space as Space17,
9032
- Typography as Typography17
9069
+ Space as Space18,
9070
+ Typography as Typography18
9033
9071
  } from "antd";
9034
9072
  import { PlusOutlined as PlusOutlined3 } from "@ant-design/icons";
9035
- import { theme as theme5 } from "antd";
9036
- import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
9073
+ import { theme as theme4 } from "antd";
9074
+ import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
9037
9075
  var { TextArea: TextArea2 } = Input2;
9038
- var { Text: Text15 } = Typography17;
9076
+ var { Text: Text16 } = Typography18;
9039
9077
  var CreateSkillModal = ({
9040
9078
  open,
9041
9079
  onCancel,
@@ -9044,7 +9082,7 @@ var CreateSkillModal = ({
9044
9082
  const [form] = Form.useForm();
9045
9083
  const [loading, setLoading] = useState26(false);
9046
9084
  const { config } = useLatticeChatShellContext();
9047
- const { token } = theme5.useToken();
9085
+ const { token } = theme4.useToken();
9048
9086
  const defaultMetadataRows = [{ key: "category", value: "global" }];
9049
9087
  const [metadataRows, setMetadataRows] = useState26(defaultMetadataRows);
9050
9088
  const handleSubmit = async () => {
@@ -9136,7 +9174,7 @@ var CreateSkillModal = ({
9136
9174
  layout: "vertical",
9137
9175
  onFinish: handleSubmit,
9138
9176
  autoComplete: "off",
9139
- children: /* @__PURE__ */ jsxs27(
9177
+ children: /* @__PURE__ */ jsxs28(
9140
9178
  "div",
9141
9179
  {
9142
9180
  style: {
@@ -9145,8 +9183,8 @@ var CreateSkillModal = ({
9145
9183
  gap: 12
9146
9184
  },
9147
9185
  children: [
9148
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9149
- /* @__PURE__ */ jsx47(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Name" }),
9186
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9187
+ /* @__PURE__ */ jsx47(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Name" }),
9150
9188
  /* @__PURE__ */ jsx47(
9151
9189
  Form.Item,
9152
9190
  {
@@ -9164,8 +9202,8 @@ var CreateSkillModal = ({
9164
9202
  }
9165
9203
  )
9166
9204
  ] }),
9167
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9168
- /* @__PURE__ */ jsx47(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
9205
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9206
+ /* @__PURE__ */ jsx47(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Description" }),
9169
9207
  /* @__PURE__ */ jsx47(
9170
9208
  Form.Item,
9171
9209
  {
@@ -9184,16 +9222,16 @@ var CreateSkillModal = ({
9184
9222
  }
9185
9223
  )
9186
9224
  ] }),
9187
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9188
- /* @__PURE__ */ jsx47(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
9225
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9226
+ /* @__PURE__ */ jsx47(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "License" }),
9189
9227
  /* @__PURE__ */ jsx47(Form.Item, { name: "license", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx47(Input2, { placeholder: "License" }) })
9190
9228
  ] }),
9191
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9192
- /* @__PURE__ */ jsx47(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
9229
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9230
+ /* @__PURE__ */ jsx47(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Compatibility" }),
9193
9231
  /* @__PURE__ */ jsx47(Form.Item, { name: "compatibility", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx47(Input2, { placeholder: "Compatibility" }) })
9194
9232
  ] }),
9195
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9196
- /* @__PURE__ */ jsxs27(
9233
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9234
+ /* @__PURE__ */ jsxs28(
9197
9235
  "div",
9198
9236
  {
9199
9237
  style: {
@@ -9204,7 +9242,7 @@ var CreateSkillModal = ({
9204
9242
  },
9205
9243
  children: [
9206
9244
  /* @__PURE__ */ jsx47(
9207
- Text15,
9245
+ Text16,
9208
9246
  {
9209
9247
  style: {
9210
9248
  fontSize: 12,
@@ -9215,7 +9253,7 @@ var CreateSkillModal = ({
9215
9253
  }
9216
9254
  ),
9217
9255
  /* @__PURE__ */ jsx47(
9218
- Button19,
9256
+ Button20,
9219
9257
  {
9220
9258
  size: "small",
9221
9259
  icon: /* @__PURE__ */ jsx47(PlusOutlined3, {}),
@@ -9226,9 +9264,9 @@ var CreateSkillModal = ({
9226
9264
  ]
9227
9265
  }
9228
9266
  ),
9229
- /* @__PURE__ */ jsxs27(Space17, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
9267
+ /* @__PURE__ */ jsxs28(Space18, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
9230
9268
  metadataRows.length === 0 && /* @__PURE__ */ jsx47(
9231
- Text15,
9269
+ Text16,
9232
9270
  {
9233
9271
  style: {
9234
9272
  fontSize: 11,
@@ -9237,7 +9275,7 @@ var CreateSkillModal = ({
9237
9275
  children: "No metadata yet. Use Add to create one."
9238
9276
  }
9239
9277
  ),
9240
- metadataRows.map((row, index) => /* @__PURE__ */ jsxs27(
9278
+ metadataRows.map((row, index) => /* @__PURE__ */ jsxs28(
9241
9279
  "div",
9242
9280
  {
9243
9281
  style: {
@@ -9247,8 +9285,8 @@ var CreateSkillModal = ({
9247
9285
  width: "100%"
9248
9286
  },
9249
9287
  children: [
9250
- /* @__PURE__ */ jsxs27(
9251
- Text15,
9288
+ /* @__PURE__ */ jsxs28(
9289
+ Text16,
9252
9290
  {
9253
9291
  style: { fontSize: 11, color: token.colorTextSecondary },
9254
9292
  children: [
@@ -9257,7 +9295,7 @@ var CreateSkillModal = ({
9257
9295
  ]
9258
9296
  }
9259
9297
  ),
9260
- /* @__PURE__ */ jsxs27(Space17, { style: { width: "100%" }, size: 8, wrap: true, children: [
9298
+ /* @__PURE__ */ jsxs28(Space18, { style: { width: "100%" }, size: 8, wrap: true, children: [
9261
9299
  /* @__PURE__ */ jsx47(
9262
9300
  Input2,
9263
9301
  {
@@ -9283,8 +9321,8 @@ var CreateSkillModal = ({
9283
9321
  ))
9284
9322
  ] })
9285
9323
  ] }),
9286
- /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9287
- /* @__PURE__ */ jsx47(Text15, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
9324
+ /* @__PURE__ */ jsxs28("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
9325
+ /* @__PURE__ */ jsx47(Text16, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Content" }),
9288
9326
  /* @__PURE__ */ jsx47(Form.Item, { name: "content", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx47(
9289
9327
  TextArea2,
9290
9328
  {
@@ -9293,7 +9331,7 @@ var CreateSkillModal = ({
9293
9331
  }
9294
9332
  ) })
9295
9333
  ] }),
9296
- /* @__PURE__ */ jsxs27(
9334
+ /* @__PURE__ */ jsxs28(
9297
9335
  "div",
9298
9336
  {
9299
9337
  style: {
@@ -9304,8 +9342,8 @@ var CreateSkillModal = ({
9304
9342
  marginTop: 8
9305
9343
  },
9306
9344
  children: [
9307
- /* @__PURE__ */ jsx47(Button19, { onClick: handleCancel, children: "Cancel" }),
9308
- /* @__PURE__ */ jsx47(Button19, { type: "primary", htmlType: "submit", loading, children: "Create Skill" })
9345
+ /* @__PURE__ */ jsx47(Button20, { onClick: handleCancel, children: "Cancel" }),
9346
+ /* @__PURE__ */ jsx47(Button20, { type: "primary", htmlType: "submit", loading, children: "Create Skill" })
9309
9347
  ]
9310
9348
  }
9311
9349
  )
@@ -9320,14 +9358,14 @@ var CreateSkillModal = ({
9320
9358
  var CreateSkillModal_default = CreateSkillModal;
9321
9359
 
9322
9360
  // src/components/Chat/SkillFlow.tsx
9323
- import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
9361
+ import { jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
9324
9362
  var SkillFlowInner = ({ onNodeClick }) => {
9325
9363
  const [nodes, setNodes, onNodesChange] = useNodesState2([]);
9326
9364
  const [edges, setEdges, onEdgesChange] = useEdgesState2([]);
9327
9365
  const [isCreateModalOpen, setIsCreateModalOpen] = useState27(false);
9328
9366
  const [skills, setSkills] = useState27([]);
9329
9367
  const [skillsLoading, setSkillsLoading] = useState27(false);
9330
- const { token } = theme6.useToken();
9368
+ const { token } = theme5.useToken();
9331
9369
  const { config } = useLatticeChatShellContext();
9332
9370
  const nodeTypes = useMemo12(
9333
9371
  () => ({
@@ -9508,8 +9546,8 @@ var SkillFlowInner = ({ onNodeClick }) => {
9508
9546
  }
9509
9547
  );
9510
9548
  }
9511
- return /* @__PURE__ */ jsxs28("div", { style: { width: "100%", height: "100%", background: "#fafafa", position: "relative" }, children: [
9512
- /* @__PURE__ */ jsxs28(
9549
+ return /* @__PURE__ */ jsxs29("div", { style: { width: "100%", height: "100%", background: "#fafafa", position: "relative" }, children: [
9550
+ /* @__PURE__ */ jsxs29(
9513
9551
  ReactFlow2,
9514
9552
  {
9515
9553
  nodes,
@@ -9534,7 +9572,7 @@ var SkillFlowInner = ({ onNodeClick }) => {
9534
9572
  zIndex: 10
9535
9573
  },
9536
9574
  children: /* @__PURE__ */ jsx48(
9537
- Button20,
9575
+ Button21,
9538
9576
  {
9539
9577
  type: "primary",
9540
9578
  size: "large",
@@ -9567,164 +9605,274 @@ var SkillFlowInner = ({ onNodeClick }) => {
9567
9605
  var SkillFlow = (props) => /* @__PURE__ */ jsx48(ReactFlowProvider2, { children: /* @__PURE__ */ jsx48(SkillFlowInner, { ...props }) });
9568
9606
  var SkillFlow_default = SkillFlow;
9569
9607
 
9570
- // src/components/Chat/ChatSidebar.tsx
9571
- import { Fragment as Fragment7, jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
9572
- var useStyles4 = createStyles13(({ token, css }) => ({
9573
- sidebar: css`
9574
- display: flex;
9575
- flex-direction: column;
9576
- height: 100%;
9577
- width: 100%;
9578
- position: relative;
9579
- background: transparent;
9580
- border-radius: ${token.borderRadiusLG}px;
9581
- overflow: visible;
9582
-
9583
- &.firstTimeHighlight {
9584
- border: 2px dashed ${token.colorPrimary};
9585
- background: ${token.colorPrimaryBg};
9586
- }
9587
- `,
9588
- content: css`
9589
- flex: 1;
9590
- overflow-y: auto;
9591
- overflow-x: hidden;
9592
- padding: ${token.paddingMD}px ${token.paddingSM}px;
9593
- padding-bottom: ${token.paddingLG}px;
9594
-
9595
- /* Custom scrollbar styling */
9596
- &::-webkit-scrollbar {
9597
- width: 6px;
9598
- }
9599
-
9600
- &::-webkit-scrollbar-track {
9601
- background: transparent;
9602
- }
9603
-
9604
- &::-webkit-scrollbar-thumb {
9605
- background: ${token.colorBorder};
9606
- border-radius: 3px;
9607
-
9608
- &:hover {
9609
- background: ${token.colorBorderSecondary};
9608
+ // src/components/Chat/ToolsList.tsx
9609
+ import { List as List4, Avatar as Avatar6, theme as theme6, Alert as Alert4, Button as Button22, Tag as Tag8 } from "antd";
9610
+ import { ReloadOutlined as ReloadOutlined3 } from "@ant-design/icons";
9611
+ import { useEffect as useEffect20, useState as useState28, useCallback as useCallback14 } from "react";
9612
+ import { jsx as jsx49, jsxs as jsxs30 } from "react/jsx-runtime";
9613
+ var ToolsList = ({
9614
+ onToolSelect,
9615
+ autoLoad = true
9616
+ }) => {
9617
+ const { token } = theme6.useToken();
9618
+ const { config } = useLatticeChatShellContext();
9619
+ const [state, setState] = useState28({
9620
+ tools: [],
9621
+ isLoading: false,
9622
+ error: null
9623
+ });
9624
+ const [selectedToolId, setSelectedToolId] = useState28(null);
9625
+ const fetchTools = useCallback14(async () => {
9626
+ setState((prev) => ({ ...prev, isLoading: true, error: null }));
9627
+ try {
9628
+ const headers = {};
9629
+ if (config.apiKey) {
9630
+ headers["Authorization"] = `Bearer ${config.apiKey}`;
9631
+ }
9632
+ const response = await fetch(`${config.baseURL}/api/tools`, {
9633
+ headers
9634
+ });
9635
+ if (response.ok) {
9636
+ const data = await response.json();
9637
+ if (data.success && data.data && Array.isArray(data.data.records)) {
9638
+ setState((prev) => ({
9639
+ ...prev,
9640
+ tools: data.data.records,
9641
+ isLoading: false
9642
+ }));
9643
+ } else {
9644
+ throw new Error("Invalid response format");
9645
+ }
9646
+ } else {
9647
+ throw new Error(`Failed to fetch tools: ${response.statusText}`);
9610
9648
  }
9649
+ } catch (error) {
9650
+ setState((prev) => ({
9651
+ ...prev,
9652
+ tools: [],
9653
+ isLoading: false,
9654
+ error: error instanceof Error ? error : new Error(String(error))
9655
+ }));
9611
9656
  }
9612
- `,
9613
- hoverOverlay: css`
9614
- position: fixed;
9615
- top: 0;
9616
- left: 0;
9617
- height: 100vh;
9618
- width: 240px;
9619
- background: ${token.colorBgContainer};
9620
- box-shadow: ${token.boxShadowSecondary};
9621
- border-radius: 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px 0;
9622
- z-index: 1000;
9623
- transform: translateX(-100%);
9624
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
9625
- overflow: hidden;
9626
- display: flex;
9627
- flex-direction: column;
9628
- padding-top: ${token.paddingMD}px;
9629
-
9630
- &.visible {
9631
- transform: translateX(0);
9657
+ }, [config]);
9658
+ const handleToolSelect = useCallback14(
9659
+ (tool) => {
9660
+ setSelectedToolId(tool.id);
9661
+ onToolSelect?.(tool);
9662
+ },
9663
+ [onToolSelect]
9664
+ );
9665
+ const handleRefresh = useCallback14(() => {
9666
+ fetchTools();
9667
+ }, [fetchTools]);
9668
+ useEffect20(() => {
9669
+ if (autoLoad) {
9670
+ fetchTools();
9632
9671
  }
9633
- `,
9634
- hoverContent: css`
9635
- flex: 1;
9636
- overflow-y: auto;
9637
- overflow-x: hidden;
9638
- padding: ${token.paddingMD}px ${token.paddingSM}px;
9639
- padding-bottom: ${token.paddingLG}px;
9640
-
9641
- /* Custom scrollbar styling */
9642
- &::-webkit-scrollbar {
9643
- width: 6px;
9644
- }
9645
-
9646
- &::-webkit-scrollbar-track {
9647
- background: transparent;
9648
- }
9649
-
9650
- &::-webkit-scrollbar-thumb {
9651
- background: ${token.colorBorder};
9652
- border-radius: 3px;
9653
-
9654
- &:hover {
9655
- background: ${token.colorBorderSecondary};
9672
+ }, [autoLoad, fetchTools]);
9673
+ const style = {
9674
+ width: "100%",
9675
+ height: "100%",
9676
+ background: "transparent",
9677
+ borderRadius: token.borderRadius,
9678
+ padding: token.paddingSM
9679
+ };
9680
+ if (state.error) {
9681
+ return /* @__PURE__ */ jsx49("div", { style, children: /* @__PURE__ */ jsx49(
9682
+ Alert4,
9683
+ {
9684
+ message: "Error Loading Tools",
9685
+ description: state.error.message,
9686
+ type: "error",
9687
+ showIcon: true,
9688
+ action: /* @__PURE__ */ jsx49(
9689
+ Button22,
9690
+ {
9691
+ size: "small",
9692
+ icon: /* @__PURE__ */ jsx49(ReloadOutlined3, {}),
9693
+ onClick: handleRefresh,
9694
+ children: "Retry"
9695
+ }
9696
+ )
9656
9697
  }
9657
- }
9658
- `,
9659
- section: css`
9660
- margin-bottom: ${token.marginLG}px;
9698
+ ) });
9699
+ }
9700
+ return /* @__PURE__ */ jsxs30("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
9701
+ /* @__PURE__ */ jsx49(
9702
+ "div",
9703
+ {
9704
+ style: {
9705
+ position: "absolute",
9706
+ top: token.paddingSM,
9707
+ right: token.paddingSM,
9708
+ zIndex: 1
9709
+ },
9710
+ children: /* @__PURE__ */ jsx49(
9711
+ Button22,
9712
+ {
9713
+ type: "text",
9714
+ size: "small",
9715
+ icon: /* @__PURE__ */ jsx49(ReloadOutlined3, {}),
9716
+ onClick: handleRefresh,
9717
+ title: "Refresh tools",
9718
+ style: {
9719
+ color: token.colorTextSecondary
9720
+ }
9721
+ }
9722
+ )
9723
+ }
9724
+ ),
9725
+ /* @__PURE__ */ jsx49(
9726
+ "div",
9727
+ {
9728
+ style: {
9729
+ width: "100%",
9730
+ height: "100%",
9731
+ overflowY: "auto",
9732
+ overflowX: "hidden",
9733
+ paddingTop: token.paddingLG
9734
+ },
9735
+ children: /* @__PURE__ */ jsx49(
9736
+ List4,
9737
+ {
9738
+ dataSource: state.tools,
9739
+ loading: state.isLoading,
9740
+ locale: {
9741
+ emptyText: /* @__PURE__ */ jsxs30(
9742
+ "div",
9743
+ {
9744
+ style: {
9745
+ display: "flex",
9746
+ flexDirection: "column",
9747
+ alignItems: "center",
9748
+ gap: token.marginSM,
9749
+ padding: token.paddingLG
9750
+ },
9751
+ children: [
9752
+ /* @__PURE__ */ jsx49("div", { style: { color: token.colorTextSecondary }, children: "No tools available" }),
9753
+ /* @__PURE__ */ jsx49(
9754
+ Button22,
9755
+ {
9756
+ icon: /* @__PURE__ */ jsx49(ReloadOutlined3, {}),
9757
+ onClick: handleRefresh,
9758
+ type: "dashed",
9759
+ size: "small",
9760
+ children: "Refresh"
9761
+ }
9762
+ )
9763
+ ]
9764
+ }
9765
+ )
9766
+ },
9767
+ style: {
9768
+ ...style,
9769
+ paddingTop: 0
9770
+ },
9771
+ renderItem: (tool) => /* @__PURE__ */ jsx49(
9772
+ List4.Item,
9773
+ {
9774
+ onClick: () => handleToolSelect(tool),
9775
+ style: {
9776
+ cursor: "pointer",
9777
+ padding: token.paddingSM,
9778
+ borderRadius: token.borderRadius,
9779
+ backgroundColor: selectedToolId === tool.id ? token.colorFillSecondary : "transparent",
9780
+ transition: "background-color 0.2s"
9781
+ },
9782
+ onMouseEnter: (e) => {
9783
+ if (selectedToolId !== tool.id) {
9784
+ e.currentTarget.style.backgroundColor = token.colorFillTertiary;
9785
+ }
9786
+ },
9787
+ onMouseLeave: (e) => {
9788
+ if (selectedToolId !== tool.id) {
9789
+ e.currentTarget.style.backgroundColor = "transparent";
9790
+ }
9791
+ },
9792
+ children: /* @__PURE__ */ jsx49(
9793
+ List4.Item.Meta,
9794
+ {
9795
+ avatar: /* @__PURE__ */ jsx49(
9796
+ Avatar6,
9797
+ {
9798
+ size: "small",
9799
+ style: {
9800
+ backgroundColor: token.colorFillSecondary,
9801
+ color: token.colorText
9802
+ },
9803
+ children: tool.name.charAt(0).toUpperCase()
9804
+ }
9805
+ ),
9806
+ title: /* @__PURE__ */ jsxs30(
9807
+ "div",
9808
+ {
9809
+ style: {
9810
+ display: "flex",
9811
+ alignItems: "center",
9812
+ gap: token.marginXS
9813
+ },
9814
+ children: [
9815
+ /* @__PURE__ */ jsx49("span", { children: tool.name }),
9816
+ tool.needUserApprove && /* @__PURE__ */ jsx49(
9817
+ Tag8,
9818
+ {
9819
+ color: "warning",
9820
+ style: {
9821
+ fontSize: "10px",
9822
+ padding: "2px 6px",
9823
+ margin: 0,
9824
+ lineHeight: "1.2"
9825
+ },
9826
+ children: "Requires approval"
9827
+ }
9828
+ )
9829
+ ]
9830
+ }
9831
+ ),
9832
+ description: /* @__PURE__ */ jsx49(
9833
+ "div",
9834
+ {
9835
+ style: {
9836
+ color: token.colorTextSecondary,
9837
+ fontSize: token.fontSizeSM,
9838
+ overflow: "hidden",
9839
+ textOverflow: "ellipsis",
9840
+ whiteSpace: "nowrap"
9841
+ },
9842
+ children: tool.description
9843
+ }
9844
+ )
9845
+ }
9846
+ )
9847
+ },
9848
+ tool.id
9849
+ )
9850
+ }
9851
+ )
9852
+ }
9853
+ )
9854
+ ] });
9855
+ };
9661
9856
 
9662
- &:last-child {
9663
- margin-bottom: 0;
9664
- }
9665
- `,
9666
- sectionTitle: css`
9667
- font-size: ${token.fontSizeSM}px;
9668
- font-weight: 600;
9669
- color: ${token.colorTextSecondary};
9670
- text-transform: uppercase;
9671
- letter-spacing: 0.5px;
9672
- padding: 0 ${token.paddingXS}px;
9673
- margin-bottom: ${token.marginSM}px;
9857
+ // src/components/Chat/ChatSidebar.tsx
9858
+ import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
9859
+ var useStyles4 = createStyles13(({ token, css }) => ({
9860
+ sidebar: css`
9674
9861
  display: flex;
9675
- align-items: center;
9676
- justify-content: space-between;
9677
- `,
9678
- sectionTitleButton: css`
9679
- font-size: ${token.fontSizeSM}px;
9680
- padding: 0;
9681
- height: auto;
9682
- color: ${token.colorTextSecondary};
9683
- border: none;
9862
+ flex-direction: column;
9863
+ height: 100%;
9864
+ width: 100%;
9865
+ position: relative;
9684
9866
  background: transparent;
9685
-
9686
- &:hover {
9687
- color: ${token.colorPrimary};
9688
- background: transparent;
9689
- }
9867
+ border-radius: ${token.borderRadiusLG}px;
9868
+ overflow: visible;
9869
+ padding: ${token.paddingMD}px ${token.paddingSM}px;
9690
9870
  `,
9691
- footer: css`
9871
+ buttonContainer: css`
9692
9872
  display: flex;
9693
- justify-content: center;
9873
+ flex-direction: column;
9874
+ gap: ${token.marginSM}px;
9694
9875
  align-items: center;
9695
- padding: ${token.paddingSM}px;
9696
- background: transparent;
9697
- border-top: 1px solid ${token.colorBorderSecondary};
9698
- gap: ${token.marginXS}px;
9699
- flex-shrink: 0;
9700
- position: relative;
9701
-
9702
- &::before {
9703
- content: "";
9704
- position: absolute;
9705
- top: 0;
9706
- left: 0;
9707
- right: 0;
9708
- height: 1px;
9709
- background: linear-gradient(
9710
- 90deg,
9711
- transparent,
9712
- ${token.colorBorder},
9713
- transparent
9714
- );
9715
- }
9716
-
9717
- &.collapsed {
9718
- border: 0;
9719
- &::before {
9720
- content: "";
9721
- position: absolute;
9722
- top: 0;
9723
- left: 0;
9724
- right: 0;
9725
- height: 0px;
9726
- }
9727
- }
9728
9876
  `,
9729
9877
  actionButton: css`
9730
9878
  display: flex;
@@ -9754,252 +9902,74 @@ var useStyles4 = createStyles13(({ token, css }) => ({
9754
9902
  .anticon {
9755
9903
  font-size: 16px;
9756
9904
  }
9757
- `,
9758
- divider: css`
9759
- margin: ${token.marginMD}px 0;
9760
- border-color: ${token.colorBorderSecondary};
9761
- `,
9762
- hintTooltip: css`
9763
- position: absolute;
9764
- top: ${token.paddingMD}px;
9765
- left: ${token.paddingMD}px;
9766
- right: ${token.paddingMD}px;
9767
- padding: ${token.paddingSM}px ${token.paddingMD}px;
9768
- background: ${token.colorPrimary};
9769
- color: ${token.colorTextLightSolid};
9770
- border-radius: ${token.borderRadius}px;
9771
- font-size: ${token.fontSizeSM}px;
9772
- z-index: 1001;
9773
- animation: slideIn 0.3s ease-out;
9774
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
9775
-
9776
- @keyframes slideIn {
9777
- from {
9778
- opacity: 0;
9779
- transform: translateY(-10px);
9780
- }
9781
- to {
9782
- opacity: 1;
9783
- transform: translateY(0);
9784
- }
9785
- }
9786
9905
  `
9787
9906
  }));
9788
- var FIRST_COLLAPSE_KEY = "chat-sidebar-first-collapse-seen";
9789
9907
  var ChatSidebar = ({
9790
- onSettingsClick,
9791
- defaultCollapsed = false
9908
+ onSettingsClick
9792
9909
  }) => {
9793
9910
  const { styles } = useStyles4();
9794
- const { setMenuCollapsed, menuCollapsed, sideAppVisible } = useChatUIContext();
9795
- const { setSettingsModalOpen, config } = useLatticeChatShellContext();
9911
+ const { setSettingsModalOpen } = useLatticeChatShellContext();
9796
9912
  const { selectAssistant } = useAssistantContext();
9797
- const [isHovered, setIsHovered] = useState28(false);
9798
- const [isFirstCollapse, setIsFirstCollapse] = useState28(false);
9799
- const [isFlowModalOpen, setIsFlowModalOpen] = useState28(false);
9800
- const [isSkillFlowModalOpen, setIsSkillFlowModalOpen] = useState28(false);
9801
- const prevIsCollapsedRef = useRef13(false);
9802
- const handleToggleCollapse = () => {
9803
- setMenuCollapsed(!menuCollapsed);
9804
- };
9913
+ const [isFlowModalOpen, setIsFlowModalOpen] = useState29(false);
9914
+ const [isSkillFlowModalOpen, setIsSkillFlowModalOpen] = useState29(false);
9915
+ const [isToolsModalOpen, setIsToolsModalOpen] = useState29(false);
9805
9916
  const handleSettingsClick = () => {
9806
9917
  setSettingsModalOpen(true);
9807
9918
  onSettingsClick?.();
9808
9919
  };
9920
+ const handleAssistantFlowClick = () => {
9921
+ setIsFlowModalOpen(true);
9922
+ };
9809
9923
  const handleSkillFlowClick = () => {
9810
9924
  setIsSkillFlowModalOpen(true);
9811
9925
  };
9812
- const isCollapsed = menuCollapsed || sideAppVisible;
9813
- useEffect20(() => {
9814
- const prevIsCollapsed = prevIsCollapsedRef.current;
9815
- if (isCollapsed) {
9816
- const hasSeenFirstCollapse = localStorage.getItem(FIRST_COLLAPSE_KEY);
9817
- if (!hasSeenFirstCollapse) {
9818
- setIsFirstCollapse(true);
9819
- }
9820
- } else if (prevIsCollapsed && !isCollapsed) {
9821
- setIsFirstCollapse((prev) => {
9822
- if (prev) {
9823
- return false;
9824
- }
9825
- return prev;
9826
- });
9827
- }
9828
- prevIsCollapsedRef.current = isCollapsed;
9829
- }, [isCollapsed]);
9830
- const handleMouseEnter = () => {
9831
- if (isCollapsed) {
9832
- setIsHovered(true);
9833
- if (isFirstCollapse) {
9834
- localStorage.setItem(FIRST_COLLAPSE_KEY, "true");
9835
- setIsFirstCollapse(false);
9836
- }
9837
- }
9838
- };
9839
- const handleMouseLeave = () => {
9840
- setIsHovered(false);
9926
+ const handleToolsClick = () => {
9927
+ setIsToolsModalOpen(true);
9841
9928
  };
9842
- const {
9843
- enableThreadCreation = true,
9844
- enableThreadList = true
9845
- } = config || {};
9846
- return /* @__PURE__ */ jsxs29(Fragment7, { children: [
9847
- /* @__PURE__ */ jsxs29(
9848
- "div",
9849
- {
9850
- className: `${styles.sidebar} ${isFirstCollapse ? "firstTimeHighlight" : ""}`,
9851
- onMouseEnter: handleMouseEnter,
9852
- onMouseLeave: handleMouseLeave,
9853
- children: [
9854
- /* @__PURE__ */ jsx49(
9855
- Tooltip10,
9856
- {
9857
- title: "Move the mouse over the collapsed sidebar to see the assistants and threads",
9858
- open: isFirstCollapse,
9859
- placement: "right",
9860
- children: isFirstCollapse && /* @__PURE__ */ jsx49("div", { style: { marginTop: "400px" } })
9861
- }
9862
- ),
9863
- !isCollapsed && /* @__PURE__ */ jsxs29(Fragment7, { children: [
9864
- /* @__PURE__ */ jsxs29("div", { className: styles.content, children: [
9865
- /* @__PURE__ */ jsxs29("div", { className: styles.section, children: [
9866
- /* @__PURE__ */ jsxs29("div", { className: styles.sectionTitle, children: [
9867
- /* @__PURE__ */ jsx49("span", { children: "Assistants" }),
9868
- /* @__PURE__ */ jsx49(
9869
- Button21,
9870
- {
9871
- type: "text",
9872
- icon: /* @__PURE__ */ jsx49(ApartmentOutlined, {}),
9873
- onClick: () => setIsFlowModalOpen(true),
9874
- className: styles.sectionTitleButton,
9875
- title: "View Assistant Flow Canvas",
9876
- size: "small"
9877
- }
9878
- )
9879
- ] }),
9880
- /* @__PURE__ */ jsx49(AssistantList, {})
9881
- ] }),
9882
- /* @__PURE__ */ jsx49(Divider4, { className: styles.divider }),
9883
- enableThreadList && /* @__PURE__ */ jsxs29("div", { className: styles.section, children: [
9884
- /* @__PURE__ */ jsx49("div", { className: styles.sectionTitle, children: "Threads" }),
9885
- /* @__PURE__ */ jsx49(
9886
- AgentConversations,
9887
- {
9888
- enableThreadCreation,
9889
- enableThreadList
9890
- }
9891
- )
9892
- ] })
9893
- ] }),
9894
- /* @__PURE__ */ jsxs29("div", { className: styles.footer, children: [
9895
- /* @__PURE__ */ jsx49(
9896
- "button",
9897
- {
9898
- className: styles.actionButton,
9899
- onClick: handleToggleCollapse,
9900
- title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9901
- "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9902
- children: isCollapsed ? /* @__PURE__ */ jsx49(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx49(MenuFoldOutlined, {})
9903
- }
9904
- ),
9905
- /* @__PURE__ */ jsx49(
9906
- "button",
9907
- {
9908
- className: styles.actionButton,
9909
- onClick: handleSkillFlowClick,
9910
- title: "Skill Flow Canvas",
9911
- "aria-label": "Skill Flow Canvas",
9912
- children: /* @__PURE__ */ jsx49(ThunderboltOutlined2, {})
9913
- }
9914
- ),
9915
- /* @__PURE__ */ jsx49(
9916
- "button",
9917
- {
9918
- className: styles.actionButton,
9919
- onClick: handleSettingsClick,
9920
- title: "Settings",
9921
- "aria-label": "Settings",
9922
- children: /* @__PURE__ */ jsx49(SettingOutlined2, {})
9923
- }
9924
- )
9925
- ] })
9926
- ] })
9927
- ]
9928
- }
9929
- ),
9930
- isCollapsed && /* @__PURE__ */ jsxs29(
9931
- "div",
9932
- {
9933
- className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
9934
- onMouseEnter: handleMouseEnter,
9935
- onMouseLeave: handleMouseLeave,
9936
- children: [
9937
- /* @__PURE__ */ jsxs29("div", { className: styles.hoverContent, children: [
9938
- /* @__PURE__ */ jsxs29("div", { className: styles.section, children: [
9939
- /* @__PURE__ */ jsxs29("div", { className: styles.sectionTitle, children: [
9940
- /* @__PURE__ */ jsx49("span", { children: "Assistants" }),
9941
- /* @__PURE__ */ jsx49(
9942
- Button21,
9943
- {
9944
- type: "text",
9945
- icon: /* @__PURE__ */ jsx49(ApartmentOutlined, {}),
9946
- onClick: () => setIsFlowModalOpen(true),
9947
- className: styles.sectionTitleButton,
9948
- title: "View Assistant Flow Canvas",
9949
- size: "small"
9950
- }
9951
- )
9952
- ] }),
9953
- /* @__PURE__ */ jsx49(AssistantList, {})
9954
- ] }),
9955
- /* @__PURE__ */ jsx49(Divider4, { className: styles.divider }),
9956
- enableThreadList && /* @__PURE__ */ jsxs29("div", { className: styles.section, children: [
9957
- /* @__PURE__ */ jsx49("div", { className: styles.sectionTitle, children: "Threads" }),
9958
- /* @__PURE__ */ jsx49(
9959
- AgentConversations,
9960
- {
9961
- enableThreadCreation,
9962
- enableThreadList
9963
- }
9964
- )
9965
- ] })
9966
- ] }),
9967
- /* @__PURE__ */ jsxs29("div", { className: styles.footer, children: [
9968
- /* @__PURE__ */ jsx49(
9969
- "button",
9970
- {
9971
- className: styles.actionButton,
9972
- onClick: handleToggleCollapse,
9973
- title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9974
- "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
9975
- children: isCollapsed ? /* @__PURE__ */ jsx49(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx49(MenuFoldOutlined, {})
9976
- }
9977
- ),
9978
- /* @__PURE__ */ jsx49(
9979
- "button",
9980
- {
9981
- className: styles.actionButton,
9982
- onClick: handleSkillFlowClick,
9983
- title: "Skill Flow Canvas",
9984
- "aria-label": "Skill Flow Canvas",
9985
- children: /* @__PURE__ */ jsx49(ThunderboltOutlined2, {})
9986
- }
9987
- ),
9988
- /* @__PURE__ */ jsx49(
9989
- "button",
9990
- {
9991
- className: styles.actionButton,
9992
- onClick: handleSettingsClick,
9993
- title: "Settings",
9994
- "aria-label": "Settings",
9995
- children: /* @__PURE__ */ jsx49(SettingOutlined2, {})
9996
- }
9997
- )
9998
- ] })
9999
- ]
10000
- }
10001
- ),
10002
- /* @__PURE__ */ jsx49(
9929
+ return /* @__PURE__ */ jsxs31(Fragment7, { children: [
9930
+ /* @__PURE__ */ jsx50("div", { className: styles.sidebar, children: /* @__PURE__ */ jsxs31("div", { className: styles.buttonContainer, children: [
9931
+ /* @__PURE__ */ jsx50(
9932
+ "button",
9933
+ {
9934
+ className: styles.actionButton,
9935
+ onClick: handleAssistantFlowClick,
9936
+ title: "Assistant Flow Canvas",
9937
+ "aria-label": "Assistant Flow Canvas",
9938
+ children: /* @__PURE__ */ jsx50(ApartmentOutlined, {})
9939
+ }
9940
+ ),
9941
+ /* @__PURE__ */ jsx50(
9942
+ "button",
9943
+ {
9944
+ className: styles.actionButton,
9945
+ onClick: handleSkillFlowClick,
9946
+ title: "Skill Flow Canvas",
9947
+ "aria-label": "Skill Flow Canvas",
9948
+ children: /* @__PURE__ */ jsx50(ThunderboltOutlined2, {})
9949
+ }
9950
+ ),
9951
+ /* @__PURE__ */ jsx50(
9952
+ "button",
9953
+ {
9954
+ className: styles.actionButton,
9955
+ onClick: handleToolsClick,
9956
+ title: "Tools List",
9957
+ "aria-label": "Tools List",
9958
+ children: /* @__PURE__ */ jsx50(ToolOutlined3, {})
9959
+ }
9960
+ ),
9961
+ /* @__PURE__ */ jsx50(
9962
+ "button",
9963
+ {
9964
+ className: styles.actionButton,
9965
+ onClick: handleSettingsClick,
9966
+ title: "Settings",
9967
+ "aria-label": "Settings",
9968
+ children: /* @__PURE__ */ jsx50(SettingOutlined2, {})
9969
+ }
9970
+ )
9971
+ ] }) }),
9972
+ /* @__PURE__ */ jsx50(
10003
9973
  Modal3,
10004
9974
  {
10005
9975
  destroyOnHidden: true,
@@ -10013,7 +9983,7 @@ var ChatSidebar = ({
10013
9983
  height: "calc(100vh - 120px)",
10014
9984
  padding: 0
10015
9985
  },
10016
- children: /* @__PURE__ */ jsx49("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx49(
9986
+ children: /* @__PURE__ */ jsx50("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx50(
10017
9987
  AssistantFlow_default,
10018
9988
  {
10019
9989
  onNodeClick: (assistant) => {
@@ -10024,7 +9994,7 @@ var ChatSidebar = ({
10024
9994
  ) })
10025
9995
  }
10026
9996
  ),
10027
- /* @__PURE__ */ jsx49(
9997
+ /* @__PURE__ */ jsx50(
10028
9998
  Modal3,
10029
9999
  {
10030
10000
  destroyOnHidden: true,
@@ -10038,7 +10008,7 @@ var ChatSidebar = ({
10038
10008
  height: "calc(100vh - 120px)",
10039
10009
  padding: 0
10040
10010
  },
10041
- children: /* @__PURE__ */ jsx49("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx49(
10011
+ children: /* @__PURE__ */ jsx50("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx50(
10042
10012
  SkillFlow_default,
10043
10013
  {
10044
10014
  onNodeClick: (skill) => {
@@ -10047,19 +10017,45 @@ var ChatSidebar = ({
10047
10017
  }
10048
10018
  ) })
10049
10019
  }
10020
+ ),
10021
+ /* @__PURE__ */ jsx50(
10022
+ Modal3,
10023
+ {
10024
+ destroyOnHidden: true,
10025
+ title: "Tools Overview",
10026
+ open: isToolsModalOpen,
10027
+ onCancel: () => setIsToolsModalOpen(false),
10028
+ footer: null,
10029
+ width: "90%",
10030
+ style: { top: 20 },
10031
+ bodyStyle: {
10032
+ height: "calc(100vh - 120px)",
10033
+ padding: 0
10034
+ },
10035
+ children: /* @__PURE__ */ jsx50("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx50(
10036
+ ToolsList,
10037
+ {
10038
+ onToolSelect: (tool) => {
10039
+ console.log("Tool selected:", tool);
10040
+ }
10041
+ }
10042
+ ) })
10043
+ }
10050
10044
  )
10051
10045
  ] });
10052
10046
  };
10053
10047
 
10054
10048
  // src/components/Chat/LatticeChatView.tsx
10055
- import { jsx as jsx50 } from "react/jsx-runtime";
10049
+ import { jsx as jsx51 } from "react/jsx-runtime";
10056
10050
  var LatticeChatView = (props) => {
10051
+ const shellContext = useContext8(LatticeChatShellContext);
10052
+ const { showSideMenu } = shellContext.config;
10057
10053
  const { assistantId, thread } = useConversationContext();
10058
10054
  const { currentAssistant } = useAssistantContext();
10059
10055
  const {
10060
10056
  config: { baseURL }
10061
10057
  } = useLatticeChatShellContext();
10062
- return assistantId && thread ? /* @__PURE__ */ jsx50(
10058
+ return assistantId && thread ? /* @__PURE__ */ jsx51(
10063
10059
  AxiomLatticeProvider,
10064
10060
  {
10065
10061
  config: {
@@ -10068,14 +10064,14 @@ var LatticeChatView = (props) => {
10068
10064
  assistantId,
10069
10065
  transport: "sse"
10070
10066
  },
10071
- children: /* @__PURE__ */ jsx50(
10067
+ children: /* @__PURE__ */ jsx51(
10072
10068
  LatticeChat,
10073
10069
  {
10074
10070
  thread_id: thread?.id,
10075
10071
  assistant_id: assistantId,
10076
10072
  name: currentAssistant?.name,
10077
10073
  description: currentAssistant?.description,
10078
- menu: /* @__PURE__ */ jsx50(ChatSidebar, {})
10074
+ menu: showSideMenu ? /* @__PURE__ */ jsx51(ChatSidebar, {}) : void 0
10079
10075
  }
10080
10076
  )
10081
10077
  }
@@ -10083,24 +10079,24 @@ var LatticeChatView = (props) => {
10083
10079
  };
10084
10080
 
10085
10081
  // src/components/Chat/SettingsModal.tsx
10086
- import { useState as useState29, useEffect as useEffect21, useRef as useRef14 } from "react";
10082
+ import { useState as useState30, useEffect as useEffect21, useRef as useRef13 } from "react";
10087
10083
  import {
10088
10084
  Modal as Modal4,
10089
10085
  Input as Input3,
10090
- Button as Button22,
10086
+ Button as Button24,
10091
10087
  message as message7,
10092
- Typography as Typography18,
10093
- Alert as Alert4,
10088
+ Typography as Typography19,
10089
+ Alert as Alert5,
10094
10090
  Select,
10095
10091
  Switch,
10096
- Space as Space18,
10092
+ Space as Space19,
10097
10093
  Tabs as Tabs2
10098
10094
  } from "antd";
10099
10095
  import {
10100
10096
  SaveOutlined,
10101
10097
  EnvironmentOutlined,
10102
- ReloadOutlined as ReloadOutlined3,
10103
- CheckCircleOutlined as CheckCircleOutlined5,
10098
+ ReloadOutlined as ReloadOutlined4,
10099
+ CheckCircleOutlined as CheckCircleOutlined6,
10104
10100
  ApiOutlined as ApiOutlined2,
10105
10101
  LinkOutlined,
10106
10102
  CheckCircleFilled,
@@ -10109,8 +10105,8 @@ import {
10109
10105
  CloudServerOutlined
10110
10106
  } from "@ant-design/icons";
10111
10107
  import { createStyles as createStyles14 } from "antd-style";
10112
- import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
10113
- var { Text: Text16, Title: Title3 } = Typography18;
10108
+ import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
10109
+ var { Text: Text17, Title: Title3 } = Typography19;
10114
10110
  var { TextArea: TextArea3 } = Input3;
10115
10111
  var useStyles5 = createStyles14(({ token, css }) => ({
10116
10112
  // settingsModal: css`
@@ -10458,12 +10454,12 @@ var SETTINGS_MENU_ITEMS = [
10458
10454
  {
10459
10455
  key: "environment",
10460
10456
  label: "Environment Variables",
10461
- icon: /* @__PURE__ */ jsx51(EnvironmentOutlined, {})
10457
+ icon: /* @__PURE__ */ jsx52(EnvironmentOutlined, {})
10462
10458
  },
10463
10459
  {
10464
10460
  key: "models",
10465
10461
  label: "Model Configuration",
10466
- icon: /* @__PURE__ */ jsx51(ApiOutlined2, {})
10462
+ icon: /* @__PURE__ */ jsx52(ApiOutlined2, {})
10467
10463
  }
10468
10464
  ];
10469
10465
  var SettingsModal = ({
@@ -10472,7 +10468,7 @@ var SettingsModal = ({
10472
10468
  }) => {
10473
10469
  const { styles } = useStyles5();
10474
10470
  const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
10475
- const [connections, setConnections] = useState29(() => {
10471
+ const [connections, setConnections] = useState30(() => {
10476
10472
  if (typeof window !== "undefined") {
10477
10473
  try {
10478
10474
  const stored = localStorage.getItem("lattice_server_connections");
@@ -10495,21 +10491,21 @@ var SettingsModal = ({
10495
10491
  }
10496
10492
  return [];
10497
10493
  });
10498
- const [serverConfigs, setServerConfigs] = useState29({});
10499
- const connectionsRef = useRef14(connections);
10494
+ const [serverConfigs, setServerConfigs] = useState30({});
10495
+ const connectionsRef = useRef13(connections);
10500
10496
  useEffect21(() => {
10501
10497
  connectionsRef.current = connections;
10502
10498
  }, [connections]);
10503
- const [activeTabKey, setActiveTabKey] = useState29(
10499
+ const [activeTabKey, setActiveTabKey] = useState30(
10504
10500
  connections.length > 0 ? connections[0].id : ""
10505
10501
  );
10506
- const [activeMenu, setActiveMenu] = useState29("environment");
10507
- const [loading, setLoading] = useState29(false);
10508
- const [showAddServerModal, setShowAddServerModal] = useState29(false);
10509
- const [newServerUrl, setNewServerUrl] = useState29("");
10510
- const [newServerName, setNewServerName] = useState29("");
10511
- const [newServerApiKey, setNewServerApiKey] = useState29("");
10512
- const [addingServer, setAddingServer] = useState29(false);
10502
+ const [activeMenu, setActiveMenu] = useState30("environment");
10503
+ const [loading, setLoading] = useState30(false);
10504
+ const [showAddServerModal, setShowAddServerModal] = useState30(false);
10505
+ const [newServerUrl, setNewServerUrl] = useState30("");
10506
+ const [newServerName, setNewServerName] = useState30("");
10507
+ const [newServerApiKey, setNewServerApiKey] = useState30("");
10508
+ const [addingServer, setAddingServer] = useState30(false);
10513
10509
  const saveConnections = (newConnections) => {
10514
10510
  setConnections(newConnections);
10515
10511
  if (typeof window !== "undefined") {
@@ -10909,25 +10905,25 @@ var SettingsModal = ({
10909
10905
  }
10910
10906
  }));
10911
10907
  };
10912
- return /* @__PURE__ */ jsxs30("div", { className: styles.formContainer, children: [
10913
- /* @__PURE__ */ jsx51(
10914
- Alert4,
10908
+ return /* @__PURE__ */ jsxs32("div", { className: styles.formContainer, children: [
10909
+ /* @__PURE__ */ jsx52(
10910
+ Alert5,
10915
10911
  {
10916
10912
  message: "Configuration Effect",
10917
- description: /* @__PURE__ */ jsxs30("div", { children: [
10918
- /* @__PURE__ */ jsxs30("div", { style: { marginBottom: 8 }, children: [
10919
- /* @__PURE__ */ jsx51(
10920
- CheckCircleOutlined5,
10913
+ description: /* @__PURE__ */ jsxs32("div", { children: [
10914
+ /* @__PURE__ */ jsxs32("div", { style: { marginBottom: 8 }, children: [
10915
+ /* @__PURE__ */ jsx52(
10916
+ CheckCircleOutlined6,
10921
10917
  {
10922
10918
  style: { color: "#52c41a", marginRight: 8 }
10923
10919
  }
10924
10920
  ),
10925
- /* @__PURE__ */ jsx51("strong", { children: "Immediately effective:" }),
10921
+ /* @__PURE__ */ jsx52("strong", { children: "Immediately effective:" }),
10926
10922
  " QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
10927
10923
  ] }),
10928
- /* @__PURE__ */ jsxs30("div", { children: [
10929
- /* @__PURE__ */ jsx51(ReloadOutlined3, { style: { color: "#faad14", marginRight: 8 } }),
10930
- /* @__PURE__ */ jsx51("strong", { children: "Requires restart:" }),
10924
+ /* @__PURE__ */ jsxs32("div", { children: [
10925
+ /* @__PURE__ */ jsx52(ReloadOutlined4, { style: { color: "#faad14", marginRight: 8 } }),
10926
+ /* @__PURE__ */ jsx52("strong", { children: "Requires restart:" }),
10931
10927
  " PORT (server must be restarted to change port)"
10932
10928
  ] })
10933
10929
  ] }),
@@ -10936,8 +10932,8 @@ var SettingsModal = ({
10936
10932
  className: styles.alertCard
10937
10933
  }
10938
10934
  ),
10939
- /* @__PURE__ */ jsx51("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx51(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." }) }),
10940
- /* @__PURE__ */ jsx51(
10935
+ /* @__PURE__ */ jsx52("div", { style: { marginBottom: 24 }, children: /* @__PURE__ */ jsx52(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." }) }),
10936
+ /* @__PURE__ */ jsx52(
10941
10937
  TextArea3,
10942
10938
  {
10943
10939
  value: config.envText,
@@ -11014,10 +11010,10 @@ QUEUE_NAME=tasks`,
11014
11010
  }));
11015
11011
  }
11016
11012
  };
11017
- return /* @__PURE__ */ jsxs30("div", { className: styles.formContainer, children: [
11018
- /* @__PURE__ */ jsx51("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx51(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." }) }),
11019
- config.models.map((model, index) => /* @__PURE__ */ jsxs30("div", { className: styles.card, children: [
11020
- /* @__PURE__ */ jsxs30(
11013
+ return /* @__PURE__ */ jsxs32("div", { className: styles.formContainer, children: [
11014
+ /* @__PURE__ */ jsx52("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx52(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." }) }),
11015
+ config.models.map((model, index) => /* @__PURE__ */ jsxs32("div", { className: styles.card, children: [
11016
+ /* @__PURE__ */ jsxs32(
11021
11017
  "div",
11022
11018
  {
11023
11019
  style: {
@@ -11029,13 +11025,13 @@ QUEUE_NAME=tasks`,
11029
11025
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
11030
11026
  },
11031
11027
  children: [
11032
- /* @__PURE__ */ jsxs30("div", { children: [
11033
- /* @__PURE__ */ jsxs30(Text16, { strong: true, style: { fontSize: 16 }, children: [
11028
+ /* @__PURE__ */ jsxs32("div", { children: [
11029
+ /* @__PURE__ */ jsxs32(Text17, { strong: true, style: { fontSize: 16 }, children: [
11034
11030
  "Model ",
11035
11031
  index + 1
11036
11032
  ] }),
11037
- model.key && /* @__PURE__ */ jsxs30(
11038
- Text16,
11033
+ model.key && /* @__PURE__ */ jsxs32(
11034
+ Text17,
11039
11035
  {
11040
11036
  type: "secondary",
11041
11037
  style: { marginLeft: 8, fontSize: 12 },
@@ -11047,8 +11043,8 @@ QUEUE_NAME=tasks`,
11047
11043
  }
11048
11044
  )
11049
11045
  ] }),
11050
- config.models.length > 1 && /* @__PURE__ */ jsx51(
11051
- Button22,
11046
+ config.models.length > 1 && /* @__PURE__ */ jsx52(
11047
+ Button24,
11052
11048
  {
11053
11049
  type: "text",
11054
11050
  danger: true,
@@ -11064,10 +11060,10 @@ QUEUE_NAME=tasks`,
11064
11060
  ]
11065
11061
  }
11066
11062
  ),
11067
- /* @__PURE__ */ jsxs30(Space18, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11068
- /* @__PURE__ */ jsxs30("div", { children: [
11069
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Key *" }),
11070
- /* @__PURE__ */ jsx51(
11063
+ /* @__PURE__ */ jsxs32(Space19, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11064
+ /* @__PURE__ */ jsxs32("div", { children: [
11065
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Key *" }),
11066
+ /* @__PURE__ */ jsx52(
11071
11067
  Input3,
11072
11068
  {
11073
11069
  placeholder: "e.g., default, gpt-4, claude",
@@ -11076,11 +11072,11 @@ QUEUE_NAME=tasks`,
11076
11072
  style: { height: 40 }
11077
11073
  }
11078
11074
  ),
11079
- /* @__PURE__ */ jsx51(Text16, { className: styles.formDescription, children: "Unique identifier for this model" })
11075
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formDescription, children: "Unique identifier for this model" })
11080
11076
  ] }),
11081
- /* @__PURE__ */ jsxs30("div", { children: [
11082
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Provider *" }),
11083
- /* @__PURE__ */ jsx51(
11077
+ /* @__PURE__ */ jsxs32("div", { children: [
11078
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Provider *" }),
11079
+ /* @__PURE__ */ jsx52(
11084
11080
  Select,
11085
11081
  {
11086
11082
  style: { width: "100%", height: 40 },
@@ -11096,9 +11092,9 @@ QUEUE_NAME=tasks`,
11096
11092
  }
11097
11093
  )
11098
11094
  ] }),
11099
- /* @__PURE__ */ jsxs30("div", { children: [
11100
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Model Name *" }),
11101
- /* @__PURE__ */ jsx51(
11095
+ /* @__PURE__ */ jsxs32("div", { children: [
11096
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Model Name *" }),
11097
+ /* @__PURE__ */ jsx52(
11102
11098
  Input3,
11103
11099
  {
11104
11100
  placeholder: "e.g., gpt-4, claude-3-opus, kimi-k2-250905",
@@ -11108,9 +11104,9 @@ QUEUE_NAME=tasks`,
11108
11104
  }
11109
11105
  )
11110
11106
  ] }),
11111
- /* @__PURE__ */ jsxs30("div", { children: [
11112
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "API Key" }),
11113
- /* @__PURE__ */ jsx51(
11107
+ /* @__PURE__ */ jsxs32("div", { children: [
11108
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "API Key" }),
11109
+ /* @__PURE__ */ jsx52(
11114
11110
  Input3.Password,
11115
11111
  {
11116
11112
  placeholder: "Enter your API key",
@@ -11119,11 +11115,11 @@ QUEUE_NAME=tasks`,
11119
11115
  style: { height: 40 }
11120
11116
  }
11121
11117
  ),
11122
- /* @__PURE__ */ jsx51(Text16, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
11118
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
11123
11119
  ] }),
11124
- /* @__PURE__ */ jsxs30("div", { children: [
11125
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Base URL" }),
11126
- /* @__PURE__ */ jsx51(
11120
+ /* @__PURE__ */ jsxs32("div", { children: [
11121
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Base URL" }),
11122
+ /* @__PURE__ */ jsx52(
11127
11123
  Input3,
11128
11124
  {
11129
11125
  placeholder: "e.g., https://api.openai.com/v1",
@@ -11132,22 +11128,22 @@ QUEUE_NAME=tasks`,
11132
11128
  style: { height: 40 }
11133
11129
  }
11134
11130
  ),
11135
- /* @__PURE__ */ jsx51(Text16, { className: styles.formDescription, children: "Optional custom base URL for the API" })
11131
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formDescription, children: "Optional custom base URL for the API" })
11136
11132
  ] }),
11137
- /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsxs30(Space18, { children: [
11138
- /* @__PURE__ */ jsx51(
11133
+ /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsxs32(Space19, { children: [
11134
+ /* @__PURE__ */ jsx52(
11139
11135
  Switch,
11140
11136
  {
11141
11137
  checked: model.streaming,
11142
11138
  onChange: (checked) => handleModelChange(index, "streaming", checked)
11143
11139
  }
11144
11140
  ),
11145
- /* @__PURE__ */ jsx51(Text16, { children: "Enable Streaming" })
11141
+ /* @__PURE__ */ jsx52(Text17, { children: "Enable Streaming" })
11146
11142
  ] }) }),
11147
- /* @__PURE__ */ jsxs30("div", { style: { display: "flex", gap: 20 }, children: [
11148
- /* @__PURE__ */ jsxs30("div", { style: { flex: 1 }, children: [
11149
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Max Tokens" }),
11150
- /* @__PURE__ */ jsx51(
11143
+ /* @__PURE__ */ jsxs32("div", { style: { display: "flex", gap: 20 }, children: [
11144
+ /* @__PURE__ */ jsxs32("div", { style: { flex: 1 }, children: [
11145
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Max Tokens" }),
11146
+ /* @__PURE__ */ jsx52(
11151
11147
  Input3,
11152
11148
  {
11153
11149
  type: "number",
@@ -11162,9 +11158,9 @@ QUEUE_NAME=tasks`,
11162
11158
  }
11163
11159
  )
11164
11160
  ] }),
11165
- /* @__PURE__ */ jsxs30("div", { style: { flex: 1 }, children: [
11166
- /* @__PURE__ */ jsx51(Text16, { className: styles.formLabel, children: "Temperature" }),
11167
- /* @__PURE__ */ jsx51(
11161
+ /* @__PURE__ */ jsxs32("div", { style: { flex: 1 }, children: [
11162
+ /* @__PURE__ */ jsx52(Text17, { className: styles.formLabel, children: "Temperature" }),
11163
+ /* @__PURE__ */ jsx52(
11168
11164
  Input3,
11169
11165
  {
11170
11166
  type: "number",
@@ -11183,8 +11179,8 @@ QUEUE_NAME=tasks`,
11183
11179
  ] })
11184
11180
  ] })
11185
11181
  ] }, index)),
11186
- /* @__PURE__ */ jsx51(
11187
- Button22,
11182
+ /* @__PURE__ */ jsx52(
11183
+ Button24,
11188
11184
  {
11189
11185
  type: "dashed",
11190
11186
  onClick: handleAddModel,
@@ -11211,8 +11207,8 @@ QUEUE_NAME=tasks`,
11211
11207
  );
11212
11208
  const currentConnection = connections.find((c) => c.id === activeTabKey);
11213
11209
  const renderTabLabel = (connection) => {
11214
- return /* @__PURE__ */ jsxs30("div", { style: { display: "flex", alignItems: "center" }, children: [
11215
- /* @__PURE__ */ jsx51(
11210
+ return /* @__PURE__ */ jsxs32("div", { style: { display: "flex", alignItems: "center" }, children: [
11211
+ /* @__PURE__ */ jsx52(
11216
11212
  CloudServerOutlined,
11217
11213
  {
11218
11214
  style: {
@@ -11221,14 +11217,14 @@ QUEUE_NAME=tasks`,
11221
11217
  }
11222
11218
  }
11223
11219
  ),
11224
- /* @__PURE__ */ jsx51("span", { children: connection.name }),
11225
- connection.connected && /* @__PURE__ */ jsx51(
11220
+ /* @__PURE__ */ jsx52("span", { children: connection.name }),
11221
+ connection.connected && /* @__PURE__ */ jsx52(
11226
11222
  CheckCircleFilled,
11227
11223
  {
11228
11224
  style: { color: "#52c41a", fontSize: 12, marginLeft: 8 }
11229
11225
  }
11230
11226
  ),
11231
- connection.error && !connection.connecting && /* @__PURE__ */ jsx51(
11227
+ connection.error && !connection.connecting && /* @__PURE__ */ jsx52(
11232
11228
  CloseCircleFilled,
11233
11229
  {
11234
11230
  style: { color: "#ff4d4f", fontSize: 12, marginLeft: 8 }
@@ -11239,35 +11235,35 @@ QUEUE_NAME=tasks`,
11239
11235
  const tabItems = connections.map((connection) => ({
11240
11236
  key: connection.id,
11241
11237
  label: renderTabLabel(connection),
11242
- children: /* @__PURE__ */ jsx51("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx51(Fragment8, { children: /* @__PURE__ */ jsxs30("div", { style: { display: "flex", height: "100%" }, children: [
11243
- /* @__PURE__ */ jsx51("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs30(
11238
+ children: /* @__PURE__ */ jsx52("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx52(Fragment8, { children: /* @__PURE__ */ jsxs32("div", { style: { display: "flex", height: "100%" }, children: [
11239
+ /* @__PURE__ */ jsx52("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs32(
11244
11240
  "div",
11245
11241
  {
11246
11242
  className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
11247
11243
  onClick: () => setActiveMenu(item.key),
11248
11244
  children: [
11249
- /* @__PURE__ */ jsx51("span", { className: styles.menuItemIcon, children: item.icon }),
11250
- /* @__PURE__ */ jsx51("span", { className: styles.menuItemText, children: item.label })
11245
+ /* @__PURE__ */ jsx52("span", { className: styles.menuItemIcon, children: item.icon }),
11246
+ /* @__PURE__ */ jsx52("span", { className: styles.menuItemText, children: item.label })
11251
11247
  ]
11252
11248
  },
11253
11249
  item.key
11254
11250
  )) }),
11255
- /* @__PURE__ */ jsxs30("div", { className: styles.content, children: [
11256
- /* @__PURE__ */ jsxs30("div", { className: styles.contentHeader, children: [
11257
- /* @__PURE__ */ jsxs30("div", { className: styles.contentHeaderLeft, children: [
11258
- /* @__PURE__ */ jsx51(Title3, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
11259
- /* @__PURE__ */ jsxs30(Text16, { className: styles.contentDescription, children: [
11251
+ /* @__PURE__ */ jsxs32("div", { className: styles.content, children: [
11252
+ /* @__PURE__ */ jsxs32("div", { className: styles.contentHeader, children: [
11253
+ /* @__PURE__ */ jsxs32("div", { className: styles.contentHeaderLeft, children: [
11254
+ /* @__PURE__ */ jsx52(Title3, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
11255
+ /* @__PURE__ */ jsxs32(Text17, { className: styles.contentDescription, children: [
11260
11256
  activeMenu === "environment" && "Manage environment variables for the gateway server",
11261
11257
  activeMenu === "models" && "Configure and register model lattices for use by agents"
11262
11258
  ] })
11263
11259
  ] }),
11264
- /* @__PURE__ */ jsxs30("div", { className: styles.contentHeaderRight, children: [
11265
- /* @__PURE__ */ jsx51(Button22, { onClick: onClose, children: "Cancel" }),
11266
- /* @__PURE__ */ jsx51(
11267
- Button22,
11260
+ /* @__PURE__ */ jsxs32("div", { className: styles.contentHeaderRight, children: [
11261
+ /* @__PURE__ */ jsx52(Button24, { onClick: onClose, children: "Cancel" }),
11262
+ /* @__PURE__ */ jsx52(
11263
+ Button24,
11268
11264
  {
11269
11265
  type: "primary",
11270
- icon: /* @__PURE__ */ jsx51(SaveOutlined, {}),
11266
+ icon: /* @__PURE__ */ jsx52(SaveOutlined, {}),
11271
11267
  onClick: handleSave,
11272
11268
  loading,
11273
11269
  children: "Save Configuration"
@@ -11275,9 +11271,9 @@ QUEUE_NAME=tasks`,
11275
11271
  )
11276
11272
  ] })
11277
11273
  ] }),
11278
- /* @__PURE__ */ jsx51("div", { className: styles.contentBody, children: renderContent(connection.id) })
11274
+ /* @__PURE__ */ jsx52("div", { className: styles.contentBody, children: renderContent(connection.id) })
11279
11275
  ] })
11280
- ] }) }) : /* @__PURE__ */ jsx51(
11276
+ ] }) }) : /* @__PURE__ */ jsx52(
11281
11277
  "div",
11282
11278
  {
11283
11279
  style: {
@@ -11289,29 +11285,29 @@ QUEUE_NAME=tasks`,
11289
11285
  gap: 16,
11290
11286
  padding: 48
11291
11287
  },
11292
- children: connection.connecting ? /* @__PURE__ */ jsxs30(Fragment8, { children: [
11293
- /* @__PURE__ */ jsx51(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
11294
- /* @__PURE__ */ jsx51(Title3, { level: 4, children: "Connecting..." }),
11295
- /* @__PURE__ */ jsxs30(Text16, { type: "secondary", style: { textAlign: "center" }, children: [
11288
+ children: connection.connecting ? /* @__PURE__ */ jsxs32(Fragment8, { children: [
11289
+ /* @__PURE__ */ jsx52(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
11290
+ /* @__PURE__ */ jsx52(Title3, { level: 4, children: "Connecting..." }),
11291
+ /* @__PURE__ */ jsxs32(Text17, { type: "secondary", style: { textAlign: "center" }, children: [
11296
11292
  "Connecting to ",
11297
11293
  connection.url
11298
11294
  ] })
11299
- ] }) : /* @__PURE__ */ jsxs30(Fragment8, { children: [
11300
- /* @__PURE__ */ jsx51(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
11301
- /* @__PURE__ */ jsx51(Title3, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
11302
- /* @__PURE__ */ jsx51(
11303
- Text16,
11295
+ ] }) : /* @__PURE__ */ jsxs32(Fragment8, { children: [
11296
+ /* @__PURE__ */ jsx52(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
11297
+ /* @__PURE__ */ jsx52(Title3, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
11298
+ /* @__PURE__ */ jsx52(
11299
+ Text17,
11304
11300
  {
11305
11301
  type: "secondary",
11306
11302
  style: { textAlign: "center", maxWidth: 400 },
11307
11303
  children: connection.error ? `Failed to connect to ${connection.url}. Please check the server URL and try again.` : `Click "Reconnect" to connect to ${connection.url}`
11308
11304
  }
11309
11305
  ),
11310
- /* @__PURE__ */ jsx51(
11311
- Button22,
11306
+ /* @__PURE__ */ jsx52(
11307
+ Button24,
11312
11308
  {
11313
11309
  type: "primary",
11314
- icon: /* @__PURE__ */ jsx51(LinkOutlined, {}),
11310
+ icon: /* @__PURE__ */ jsx52(LinkOutlined, {}),
11315
11311
  onClick: () => checkConnection(connection.id),
11316
11312
  loading: connection.connecting,
11317
11313
  style: { marginTop: 16 },
@@ -11323,8 +11319,8 @@ QUEUE_NAME=tasks`,
11323
11319
  ) }),
11324
11320
  closable: connections.length > 1
11325
11321
  }));
11326
- return /* @__PURE__ */ jsxs30(Fragment8, { children: [
11327
- /* @__PURE__ */ jsx51(
11322
+ return /* @__PURE__ */ jsxs32(Fragment8, { children: [
11323
+ /* @__PURE__ */ jsx52(
11328
11324
  Modal4,
11329
11325
  {
11330
11326
  open,
@@ -11333,7 +11329,7 @@ QUEUE_NAME=tasks`,
11333
11329
  width: "80%",
11334
11330
  footer: null,
11335
11331
  title: "Settings",
11336
- children: /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
11332
+ children: /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52(
11337
11333
  Tabs2,
11338
11334
  {
11339
11335
  activeKey: activeTabKey,
@@ -11347,7 +11343,7 @@ QUEUE_NAME=tasks`,
11347
11343
  }
11348
11344
  },
11349
11345
  items: tabItems,
11350
- addIcon: /* @__PURE__ */ jsxs30(
11346
+ addIcon: /* @__PURE__ */ jsxs32(
11351
11347
  "div",
11352
11348
  {
11353
11349
  style: {
@@ -11357,8 +11353,8 @@ QUEUE_NAME=tasks`,
11357
11353
  padding: "4px 8px"
11358
11354
  },
11359
11355
  children: [
11360
- /* @__PURE__ */ jsx51(PlusOutlined5, {}),
11361
- /* @__PURE__ */ jsx51("span", { children: "Add Server" })
11356
+ /* @__PURE__ */ jsx52(PlusOutlined5, {}),
11357
+ /* @__PURE__ */ jsx52("span", { children: "Add Server" })
11362
11358
  ]
11363
11359
  }
11364
11360
  )
@@ -11366,7 +11362,7 @@ QUEUE_NAME=tasks`,
11366
11362
  ) })
11367
11363
  }
11368
11364
  ),
11369
- /* @__PURE__ */ jsx51(
11365
+ /* @__PURE__ */ jsx52(
11370
11366
  Modal4,
11371
11367
  {
11372
11368
  title: "Add New Server",
@@ -11380,10 +11376,10 @@ QUEUE_NAME=tasks`,
11380
11376
  },
11381
11377
  confirmLoading: addingServer,
11382
11378
  className: styles.addServerModal,
11383
- children: /* @__PURE__ */ jsxs30(Space18, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11384
- /* @__PURE__ */ jsxs30("div", { children: [
11385
- /* @__PURE__ */ jsx51(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
11386
- /* @__PURE__ */ jsx51(
11379
+ children: /* @__PURE__ */ jsxs32(Space19, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
11380
+ /* @__PURE__ */ jsxs32("div", { children: [
11381
+ /* @__PURE__ */ jsx52(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
11382
+ /* @__PURE__ */ jsx52(
11387
11383
  Input3,
11388
11384
  {
11389
11385
  placeholder: "e.g., Production Server",
@@ -11392,11 +11388,11 @@ QUEUE_NAME=tasks`,
11392
11388
  onPressEnter: handleAddServer
11393
11389
  }
11394
11390
  ),
11395
- /* @__PURE__ */ jsx51(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
11391
+ /* @__PURE__ */ jsx52(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
11396
11392
  ] }),
11397
- /* @__PURE__ */ jsxs30("div", { children: [
11398
- /* @__PURE__ */ jsx51(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
11399
- /* @__PURE__ */ jsx51(
11393
+ /* @__PURE__ */ jsxs32("div", { children: [
11394
+ /* @__PURE__ */ jsx52(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
11395
+ /* @__PURE__ */ jsx52(
11400
11396
  Input3,
11401
11397
  {
11402
11398
  placeholder: "e.g., http://localhost:4001",
@@ -11405,11 +11401,11 @@ QUEUE_NAME=tasks`,
11405
11401
  onPressEnter: handleAddServer
11406
11402
  }
11407
11403
  ),
11408
- /* @__PURE__ */ jsx51(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
11404
+ /* @__PURE__ */ jsx52(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
11409
11405
  ] }),
11410
- /* @__PURE__ */ jsxs30("div", { children: [
11411
- /* @__PURE__ */ jsx51(Text16, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
11412
- /* @__PURE__ */ jsx51(
11406
+ /* @__PURE__ */ jsxs32("div", { children: [
11407
+ /* @__PURE__ */ jsx52(Text17, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
11408
+ /* @__PURE__ */ jsx52(
11413
11409
  Input3.Password,
11414
11410
  {
11415
11411
  placeholder: "Optional: Enter API key for authentication",
@@ -11418,7 +11414,7 @@ QUEUE_NAME=tasks`,
11418
11414
  onPressEnter: handleAddServer
11419
11415
  }
11420
11416
  ),
11421
- /* @__PURE__ */ jsx51(Text16, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
11417
+ /* @__PURE__ */ jsx52(Text17, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: API key for server authentication" })
11422
11418
  ] })
11423
11419
  ] })
11424
11420
  }
@@ -11427,10 +11423,10 @@ QUEUE_NAME=tasks`,
11427
11423
  };
11428
11424
 
11429
11425
  // src/components/Chat/AgentServerSetting.tsx
11430
- import { jsx as jsx52 } from "react/jsx-runtime";
11426
+ import { jsx as jsx53 } from "react/jsx-runtime";
11431
11427
  var AgentServerSetting = () => {
11432
11428
  const { settingsModalOpen, setSettingsModalOpen } = useLatticeChatShellContext();
11433
- return /* @__PURE__ */ jsx52(
11429
+ return /* @__PURE__ */ jsx53(
11434
11430
  SettingsModal,
11435
11431
  {
11436
11432
  open: settingsModalOpen,
@@ -11440,11 +11436,12 @@ var AgentServerSetting = () => {
11440
11436
  };
11441
11437
 
11442
11438
  // src/components/Chat/LatticeChatShell.tsx
11443
- import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
11439
+ import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
11444
11440
  var LatticeChatShell = (props) => {
11445
- return /* @__PURE__ */ jsxs31(LatticeChatShellContextProvider, { ...props, children: [
11446
- /* @__PURE__ */ jsx53(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx53(ConversationContextProvider, { children: /* @__PURE__ */ jsx53(LatticeChatView, {}) }) }),
11447
- /* @__PURE__ */ jsx53(AgentServerSetting, {})
11441
+ const { initialConfig } = props;
11442
+ return /* @__PURE__ */ jsxs33(LatticeChatShellContextProvider, { ...props, children: [
11443
+ /* @__PURE__ */ jsx54(AssistantContextProvider, { autoLoad: true, initialAssistantId: initialConfig?.assistantId, children: /* @__PURE__ */ jsx54(ConversationContextProvider, { children: /* @__PURE__ */ jsx54(LatticeChatView, {}) }) }),
11444
+ /* @__PURE__ */ jsx54(AgentServerSetting, {})
11448
11445
  ] });
11449
11446
  };
11450
11447
  export {