@axiom-lattice/react-sdk 2.1.19 → 2.1.20

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
@@ -972,8 +972,8 @@ var useStyle = createStyles(({ token, css }) => {
972
972
  font-family: ${token.fontFamily}, sans-serif;
973
973
  position: relative;
974
974
  overflow: hidden;
975
- padding: 16px;
976
- gap: 16px;
975
+ padding: 8px;
976
+ gap: 8px;
977
977
 
978
978
  .ant-prompts {
979
979
  color: ${token.colorText};
@@ -994,14 +994,14 @@ var useStyle = createStyles(({ token, css }) => {
994
994
  &.open {
995
995
  background: transparent;
996
996
  box-shadow: none;
997
- margin-left: -16px;
997
+ margin-left: -8px;
998
998
  height: 100%;
999
999
  }
1000
1000
 
1001
1001
  &.collapsed {
1002
- width: 16px;
1002
+ width: 8px;
1003
1003
  height: 100%;
1004
- margin-right: -16px;
1004
+ margin-right: -8px;
1005
1005
  .ant-conversations {
1006
1006
  width: 64px;
1007
1007
  }
@@ -3819,7 +3819,17 @@ var AgentHeader = (props) => {
3819
3819
  style: { padding: 8 },
3820
3820
  variant: "borderless",
3821
3821
  description: description ? /* @__PURE__ */ jsx29(Text10, { ellipsis: { tooltip: description }, children: description }) : void 0,
3822
- icon: avatar ? /* @__PURE__ */ jsx29(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx29(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() }),
3822
+ icon: /* @__PURE__ */ jsx29(
3823
+ "div",
3824
+ {
3825
+ style: {
3826
+ display: "flex",
3827
+ alignItems: "center",
3828
+ justifyContent: "center"
3829
+ },
3830
+ children: avatar ? /* @__PURE__ */ jsx29(Avatar2, { src: avatar, size: 48 }) : /* @__PURE__ */ jsx29(Avatar2, { size: 48, children: name?.charAt(0).toUpperCase() })
3831
+ }
3832
+ ),
3823
3833
  title: name ? name : void 0,
3824
3834
  extra: /* @__PURE__ */ jsxs16(Space12, { children: [
3825
3835
  extra,
@@ -4511,9 +4521,9 @@ var SideAppViewBrowser = () => {
4511
4521
  };
4512
4522
 
4513
4523
  // src/components/Chat/LatticeChat.tsx
4514
- import { jsx as jsx34 } from "react/jsx-runtime";
4524
+ import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
4515
4525
  var LatticeChat = (props) => {
4516
- const { assistant_id, thread_id = "", menu, ...chatingProps } = props;
4526
+ const { assistant_id, thread_id = "", menu, header, ...chatingProps } = props;
4517
4527
  return /* @__PURE__ */ jsx34(
4518
4528
  AgentThreadProvider,
4519
4529
  {
@@ -4524,12 +4534,26 @@ var LatticeChat = (props) => {
4524
4534
  enableReturnStateWhenStreamCompleted: true,
4525
4535
  enableResumeStream: true
4526
4536
  },
4527
- children: /* @__PURE__ */ jsx34(ChatUIContextProvider, { children: /* @__PURE__ */ jsx34(
4528
- ColumnLayout,
4537
+ children: /* @__PURE__ */ jsx34(ChatUIContextProvider, { children: /* @__PURE__ */ jsxs20(
4538
+ "div",
4529
4539
  {
4530
- menu,
4531
- left: thread_id ? /* @__PURE__ */ jsx34(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx34("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4532
- right: /* @__PURE__ */ jsx34(SideAppViewBrowser, {})
4540
+ style: {
4541
+ display: "flex",
4542
+ flexDirection: "column",
4543
+ width: "100%",
4544
+ height: "100%"
4545
+ },
4546
+ children: [
4547
+ header,
4548
+ /* @__PURE__ */ jsx34(
4549
+ ColumnLayout,
4550
+ {
4551
+ menu,
4552
+ left: thread_id ? /* @__PURE__ */ jsx34(Chating, { ...chatingProps }) : /* @__PURE__ */ jsx34("div", { children: "\u9700\u8981\u5148\u521B\u5EFA\u4F1A\u8BDD" }),
4553
+ right: /* @__PURE__ */ jsx34(SideAppViewBrowser, {})
4554
+ }
4555
+ )
4556
+ ]
4533
4557
  }
4534
4558
  ) })
4535
4559
  }
@@ -5287,8 +5311,8 @@ var AgentConversations = () => {
5287
5311
  };
5288
5312
 
5289
5313
  // src/components/Chat/ChatSidebar.tsx
5290
- import { useState as useState21 } from "react";
5291
- import { Divider as Divider2 } from "antd";
5314
+ import { useState as useState21, useEffect as useEffect14, useRef as useRef11 } from "react";
5315
+ import { Divider as Divider2, Tooltip as Tooltip4 } from "antd";
5292
5316
  import {
5293
5317
  MenuFoldOutlined,
5294
5318
  MenuUnfoldOutlined,
@@ -5337,7 +5361,7 @@ var AssistantList = () => {
5337
5361
 
5338
5362
  // src/components/Chat/ChatSidebar.tsx
5339
5363
  import { createStyles as createStyles11 } from "antd-style";
5340
- import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
5364
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
5341
5365
  var useStyles3 = createStyles11(({ token, css }) => ({
5342
5366
  sidebar: css`
5343
5367
  display: flex;
@@ -5348,6 +5372,11 @@ var useStyles3 = createStyles11(({ token, css }) => ({
5348
5372
  background: transparent;
5349
5373
  border-radius: ${token.borderRadiusLG}px;
5350
5374
  overflow: visible;
5375
+
5376
+ &.firstTimeHighlight {
5377
+ border: 2px dashed ${token.colorPrimary};
5378
+ background: ${token.colorPrimaryBg};
5379
+ }
5351
5380
  `,
5352
5381
  content: css`
5353
5382
  flex: 1;
@@ -5506,8 +5535,34 @@ var useStyles3 = createStyles11(({ token, css }) => ({
5506
5535
  divider: css`
5507
5536
  margin: ${token.marginMD}px 0;
5508
5537
  border-color: ${token.colorBorderSecondary};
5538
+ `,
5539
+ hintTooltip: css`
5540
+ position: absolute;
5541
+ top: ${token.paddingMD}px;
5542
+ left: ${token.paddingMD}px;
5543
+ right: ${token.paddingMD}px;
5544
+ padding: ${token.paddingSM}px ${token.paddingMD}px;
5545
+ background: ${token.colorPrimary};
5546
+ color: ${token.colorTextLightSolid};
5547
+ border-radius: ${token.borderRadius}px;
5548
+ font-size: ${token.fontSizeSM}px;
5549
+ z-index: 1001;
5550
+ animation: slideIn 0.3s ease-out;
5551
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
5552
+
5553
+ @keyframes slideIn {
5554
+ from {
5555
+ opacity: 0;
5556
+ transform: translateY(-10px);
5557
+ }
5558
+ to {
5559
+ opacity: 1;
5560
+ transform: translateY(0);
5561
+ }
5562
+ }
5509
5563
  `
5510
5564
  }));
5565
+ var FIRST_COLLAPSE_KEY = "chat-sidebar-first-collapse-seen";
5511
5566
  var ChatSidebar = ({
5512
5567
  onSettingsClick,
5513
5568
  defaultCollapsed = false
@@ -5516,6 +5571,8 @@ var ChatSidebar = ({
5516
5571
  const { setMenuCollapsed, menuCollapsed, sideAppVisible } = useChatUIContext();
5517
5572
  const { setSettingsModalOpen } = useLatticeChatShellContext();
5518
5573
  const [isHovered, setIsHovered] = useState21(false);
5574
+ const [isFirstCollapse, setIsFirstCollapse] = useState21(false);
5575
+ const prevIsCollapsedRef = useRef11(false);
5519
5576
  const handleToggleCollapse = () => {
5520
5577
  setMenuCollapsed(!menuCollapsed);
5521
5578
  };
@@ -5524,77 +5581,109 @@ var ChatSidebar = ({
5524
5581
  onSettingsClick?.();
5525
5582
  };
5526
5583
  const isCollapsed = menuCollapsed || sideAppVisible;
5584
+ useEffect14(() => {
5585
+ const prevIsCollapsed = prevIsCollapsedRef.current;
5586
+ if (isCollapsed) {
5587
+ const hasSeenFirstCollapse = localStorage.getItem(FIRST_COLLAPSE_KEY);
5588
+ if (!hasSeenFirstCollapse) {
5589
+ setIsFirstCollapse(true);
5590
+ }
5591
+ } else if (prevIsCollapsed && !isCollapsed) {
5592
+ setIsFirstCollapse((prev) => {
5593
+ if (prev) {
5594
+ return false;
5595
+ }
5596
+ return prev;
5597
+ });
5598
+ }
5599
+ prevIsCollapsedRef.current = isCollapsed;
5600
+ }, [isCollapsed]);
5527
5601
  const handleMouseEnter = () => {
5528
5602
  if (isCollapsed) {
5529
5603
  setIsHovered(true);
5604
+ if (isFirstCollapse) {
5605
+ localStorage.setItem(FIRST_COLLAPSE_KEY, "true");
5606
+ setIsFirstCollapse(false);
5607
+ }
5530
5608
  }
5531
5609
  };
5532
5610
  const handleMouseLeave = () => {
5533
5611
  setIsHovered(false);
5534
5612
  };
5535
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
5536
- /* @__PURE__ */ jsx40(
5613
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
5614
+ /* @__PURE__ */ jsxs21(
5537
5615
  "div",
5538
5616
  {
5539
- className: styles.sidebar,
5617
+ className: `${styles.sidebar} ${isFirstCollapse ? "firstTimeHighlight" : ""}`,
5540
5618
  onMouseEnter: handleMouseEnter,
5541
5619
  onMouseLeave: handleMouseLeave,
5542
- children: !isCollapsed && /* @__PURE__ */ jsxs20(Fragment5, { children: [
5543
- /* @__PURE__ */ jsxs20("div", { className: styles.content, children: [
5544
- /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5545
- /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Assistants" }),
5546
- /* @__PURE__ */ jsx40(AssistantList, {})
5620
+ children: [
5621
+ /* @__PURE__ */ jsx40(
5622
+ Tooltip4,
5623
+ {
5624
+ title: "Move the mouse over the collapsed sidebar to see the assistants and threads",
5625
+ open: isFirstCollapse,
5626
+ placement: "right",
5627
+ children: isFirstCollapse && /* @__PURE__ */ jsx40("div", { style: { marginTop: "400px" } })
5628
+ }
5629
+ ),
5630
+ !isCollapsed && /* @__PURE__ */ jsxs21(Fragment5, { children: [
5631
+ /* @__PURE__ */ jsxs21("div", { className: styles.content, children: [
5632
+ /* @__PURE__ */ jsxs21("div", { className: styles.section, children: [
5633
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Assistants" }),
5634
+ /* @__PURE__ */ jsx40(AssistantList, {})
5635
+ ] }),
5636
+ /* @__PURE__ */ jsx40(Divider2, { className: styles.divider }),
5637
+ /* @__PURE__ */ jsxs21("div", { className: styles.section, children: [
5638
+ /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Threads" }),
5639
+ /* @__PURE__ */ jsx40(AgentConversations, {})
5640
+ ] })
5547
5641
  ] }),
5548
- /* @__PURE__ */ jsx40(Divider2, { className: styles.divider }),
5549
- /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5550
- /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Threads" }),
5551
- /* @__PURE__ */ jsx40(AgentConversations, {})
5642
+ /* @__PURE__ */ jsxs21("div", { className: styles.footer, children: [
5643
+ /* @__PURE__ */ jsx40(
5644
+ "button",
5645
+ {
5646
+ className: styles.actionButton,
5647
+ onClick: handleToggleCollapse,
5648
+ title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5649
+ "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5650
+ children: isCollapsed ? /* @__PURE__ */ jsx40(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx40(MenuFoldOutlined, {})
5651
+ }
5652
+ ),
5653
+ /* @__PURE__ */ jsx40(
5654
+ "button",
5655
+ {
5656
+ className: styles.actionButton,
5657
+ onClick: handleSettingsClick,
5658
+ title: "Settings",
5659
+ "aria-label": "Settings",
5660
+ children: /* @__PURE__ */ jsx40(SettingOutlined, {})
5661
+ }
5662
+ )
5552
5663
  ] })
5553
- ] }),
5554
- /* @__PURE__ */ jsxs20("div", { className: styles.footer, children: [
5555
- /* @__PURE__ */ jsx40(
5556
- "button",
5557
- {
5558
- className: styles.actionButton,
5559
- onClick: handleToggleCollapse,
5560
- title: isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5561
- "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
5562
- children: isCollapsed ? /* @__PURE__ */ jsx40(MenuUnfoldOutlined, {}) : /* @__PURE__ */ jsx40(MenuFoldOutlined, {})
5563
- }
5564
- ),
5565
- /* @__PURE__ */ jsx40(
5566
- "button",
5567
- {
5568
- className: styles.actionButton,
5569
- onClick: handleSettingsClick,
5570
- title: "Settings",
5571
- "aria-label": "Settings",
5572
- children: /* @__PURE__ */ jsx40(SettingOutlined, {})
5573
- }
5574
- )
5575
5664
  ] })
5576
- ] })
5665
+ ]
5577
5666
  }
5578
5667
  ),
5579
- isCollapsed && /* @__PURE__ */ jsxs20(
5668
+ isCollapsed && /* @__PURE__ */ jsxs21(
5580
5669
  "div",
5581
5670
  {
5582
5671
  className: `${styles.hoverOverlay} ${isHovered ? "visible" : ""}`,
5583
5672
  onMouseEnter: handleMouseEnter,
5584
5673
  onMouseLeave: handleMouseLeave,
5585
5674
  children: [
5586
- /* @__PURE__ */ jsxs20("div", { className: styles.hoverContent, children: [
5587
- /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5675
+ /* @__PURE__ */ jsxs21("div", { className: styles.hoverContent, children: [
5676
+ /* @__PURE__ */ jsxs21("div", { className: styles.section, children: [
5588
5677
  /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Assistants" }),
5589
5678
  /* @__PURE__ */ jsx40(AssistantList, {})
5590
5679
  ] }),
5591
5680
  /* @__PURE__ */ jsx40(Divider2, { className: styles.divider }),
5592
- /* @__PURE__ */ jsxs20("div", { className: styles.section, children: [
5681
+ /* @__PURE__ */ jsxs21("div", { className: styles.section, children: [
5593
5682
  /* @__PURE__ */ jsx40("div", { className: styles.sectionTitle, children: "Threads" }),
5594
5683
  /* @__PURE__ */ jsx40(AgentConversations, {})
5595
5684
  ] })
5596
5685
  ] }),
5597
- /* @__PURE__ */ jsxs20("div", { className: styles.footer, children: [
5686
+ /* @__PURE__ */ jsxs21("div", { className: styles.footer, children: [
5598
5687
  /* @__PURE__ */ jsx40(
5599
5688
  "button",
5600
5689
  {
@@ -5654,7 +5743,7 @@ var LatticeChatView = (props) => {
5654
5743
  };
5655
5744
 
5656
5745
  // src/components/Chat/SettingsModal.tsx
5657
- import { useState as useState22, useEffect as useEffect14, useRef as useRef11 } from "react";
5746
+ import { useState as useState22, useEffect as useEffect15, useRef as useRef12 } from "react";
5658
5747
  import {
5659
5748
  Modal,
5660
5749
  Input,
@@ -5680,7 +5769,7 @@ import {
5680
5769
  CloudServerOutlined
5681
5770
  } from "@ant-design/icons";
5682
5771
  import { createStyles as createStyles12 } from "antd-style";
5683
- import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
5772
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
5684
5773
  var { Text: Text13, Title: Title2 } = Typography15;
5685
5774
  var { TextArea } = Input;
5686
5775
  var useStyles4 = createStyles12(({ token, css }) => ({
@@ -6067,8 +6156,8 @@ var SettingsModal = ({
6067
6156
  return [];
6068
6157
  });
6069
6158
  const [serverConfigs, setServerConfigs] = useState22({});
6070
- const connectionsRef = useRef11(connections);
6071
- useEffect14(() => {
6159
+ const connectionsRef = useRef12(connections);
6160
+ useEffect15(() => {
6072
6161
  connectionsRef.current = connections;
6073
6162
  }, [connections]);
6074
6163
  const [activeTabKey, setActiveTabKey] = useState22(
@@ -6270,7 +6359,7 @@ var SettingsModal = ({
6270
6359
  console.error("Failed to load models configuration:", error);
6271
6360
  }
6272
6361
  };
6273
- useEffect14(() => {
6362
+ useEffect15(() => {
6274
6363
  if (open && activeTabKey) {
6275
6364
  initializeServerConfig(activeTabKey);
6276
6365
  const connection = connections.find((c) => c.id === activeTabKey);
@@ -6279,7 +6368,7 @@ var SettingsModal = ({
6279
6368
  }
6280
6369
  }
6281
6370
  }, [open, activeTabKey]);
6282
- useEffect14(() => {
6371
+ useEffect15(() => {
6283
6372
  if (open && activeTabKey) {
6284
6373
  const connection = connections.find((c) => c.id === activeTabKey);
6285
6374
  if (connection?.connected) {
@@ -6480,13 +6569,13 @@ var SettingsModal = ({
6480
6569
  }
6481
6570
  }));
6482
6571
  };
6483
- return /* @__PURE__ */ jsxs21("div", { className: styles.formContainer, children: [
6572
+ return /* @__PURE__ */ jsxs22("div", { className: styles.formContainer, children: [
6484
6573
  /* @__PURE__ */ jsx42(
6485
6574
  Alert3,
6486
6575
  {
6487
6576
  message: "Configuration Effect",
6488
- description: /* @__PURE__ */ jsxs21("div", { children: [
6489
- /* @__PURE__ */ jsxs21("div", { style: { marginBottom: 8 }, children: [
6577
+ description: /* @__PURE__ */ jsxs22("div", { children: [
6578
+ /* @__PURE__ */ jsxs22("div", { style: { marginBottom: 8 }, children: [
6490
6579
  /* @__PURE__ */ jsx42(
6491
6580
  CheckCircleOutlined4,
6492
6581
  {
@@ -6496,7 +6585,7 @@ var SettingsModal = ({
6496
6585
  /* @__PURE__ */ jsx42("strong", { children: "Immediately effective:" }),
6497
6586
  " QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
6498
6587
  ] }),
6499
- /* @__PURE__ */ jsxs21("div", { children: [
6588
+ /* @__PURE__ */ jsxs22("div", { children: [
6500
6589
  /* @__PURE__ */ jsx42(ReloadOutlined2, { style: { color: "#faad14", marginRight: 8 } }),
6501
6590
  /* @__PURE__ */ jsx42("strong", { children: "Requires restart:" }),
6502
6591
  " PORT (server must be restarted to change port)"
@@ -6585,10 +6674,10 @@ QUEUE_NAME=tasks`,
6585
6674
  }));
6586
6675
  }
6587
6676
  };
6588
- return /* @__PURE__ */ jsxs21("div", { className: styles.formContainer, children: [
6677
+ return /* @__PURE__ */ jsxs22("div", { className: styles.formContainer, children: [
6589
6678
  /* @__PURE__ */ jsx42("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure model lattices. Each model will be registered with the provided key and can be used by agents." }) }),
6590
- config.models.map((model, index) => /* @__PURE__ */ jsxs21("div", { className: styles.card, children: [
6591
- /* @__PURE__ */ jsxs21(
6679
+ config.models.map((model, index) => /* @__PURE__ */ jsxs22("div", { className: styles.card, children: [
6680
+ /* @__PURE__ */ jsxs22(
6592
6681
  "div",
6593
6682
  {
6594
6683
  style: {
@@ -6600,12 +6689,12 @@ QUEUE_NAME=tasks`,
6600
6689
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
6601
6690
  },
6602
6691
  children: [
6603
- /* @__PURE__ */ jsxs21("div", { children: [
6604
- /* @__PURE__ */ jsxs21(Text13, { strong: true, style: { fontSize: 16 }, children: [
6692
+ /* @__PURE__ */ jsxs22("div", { children: [
6693
+ /* @__PURE__ */ jsxs22(Text13, { strong: true, style: { fontSize: 16 }, children: [
6605
6694
  "Model ",
6606
6695
  index + 1
6607
6696
  ] }),
6608
- model.key && /* @__PURE__ */ jsxs21(
6697
+ model.key && /* @__PURE__ */ jsxs22(
6609
6698
  Text13,
6610
6699
  {
6611
6700
  type: "secondary",
@@ -6635,8 +6724,8 @@ QUEUE_NAME=tasks`,
6635
6724
  ]
6636
6725
  }
6637
6726
  ),
6638
- /* @__PURE__ */ jsxs21(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6639
- /* @__PURE__ */ jsxs21("div", { children: [
6727
+ /* @__PURE__ */ jsxs22(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6728
+ /* @__PURE__ */ jsxs22("div", { children: [
6640
6729
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Key *" }),
6641
6730
  /* @__PURE__ */ jsx42(
6642
6731
  Input,
@@ -6649,7 +6738,7 @@ QUEUE_NAME=tasks`,
6649
6738
  ),
6650
6739
  /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "Unique identifier for this model" })
6651
6740
  ] }),
6652
- /* @__PURE__ */ jsxs21("div", { children: [
6741
+ /* @__PURE__ */ jsxs22("div", { children: [
6653
6742
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Provider *" }),
6654
6743
  /* @__PURE__ */ jsx42(
6655
6744
  Select,
@@ -6667,7 +6756,7 @@ QUEUE_NAME=tasks`,
6667
6756
  }
6668
6757
  )
6669
6758
  ] }),
6670
- /* @__PURE__ */ jsxs21("div", { children: [
6759
+ /* @__PURE__ */ jsxs22("div", { children: [
6671
6760
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Model Name *" }),
6672
6761
  /* @__PURE__ */ jsx42(
6673
6762
  Input,
@@ -6679,7 +6768,7 @@ QUEUE_NAME=tasks`,
6679
6768
  }
6680
6769
  )
6681
6770
  ] }),
6682
- /* @__PURE__ */ jsxs21("div", { children: [
6771
+ /* @__PURE__ */ jsxs22("div", { children: [
6683
6772
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "API Key" }),
6684
6773
  /* @__PURE__ */ jsx42(
6685
6774
  Input.Password,
@@ -6692,7 +6781,7 @@ QUEUE_NAME=tasks`,
6692
6781
  ),
6693
6782
  /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
6694
6783
  ] }),
6695
- /* @__PURE__ */ jsxs21("div", { children: [
6784
+ /* @__PURE__ */ jsxs22("div", { children: [
6696
6785
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Base URL" }),
6697
6786
  /* @__PURE__ */ jsx42(
6698
6787
  Input,
@@ -6705,7 +6794,7 @@ QUEUE_NAME=tasks`,
6705
6794
  ),
6706
6795
  /* @__PURE__ */ jsx42(Text13, { className: styles.formDescription, children: "Optional custom base URL for the API" })
6707
6796
  ] }),
6708
- /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsxs21(Space14, { children: [
6797
+ /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsxs22(Space14, { children: [
6709
6798
  /* @__PURE__ */ jsx42(
6710
6799
  Switch,
6711
6800
  {
@@ -6715,8 +6804,8 @@ QUEUE_NAME=tasks`,
6715
6804
  ),
6716
6805
  /* @__PURE__ */ jsx42(Text13, { children: "Enable Streaming" })
6717
6806
  ] }) }),
6718
- /* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: 20 }, children: [
6719
- /* @__PURE__ */ jsxs21("div", { style: { flex: 1 }, children: [
6807
+ /* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: 20 }, children: [
6808
+ /* @__PURE__ */ jsxs22("div", { style: { flex: 1 }, children: [
6720
6809
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Max Tokens" }),
6721
6810
  /* @__PURE__ */ jsx42(
6722
6811
  Input,
@@ -6733,7 +6822,7 @@ QUEUE_NAME=tasks`,
6733
6822
  }
6734
6823
  )
6735
6824
  ] }),
6736
- /* @__PURE__ */ jsxs21("div", { style: { flex: 1 }, children: [
6825
+ /* @__PURE__ */ jsxs22("div", { style: { flex: 1 }, children: [
6737
6826
  /* @__PURE__ */ jsx42(Text13, { className: styles.formLabel, children: "Temperature" }),
6738
6827
  /* @__PURE__ */ jsx42(
6739
6828
  Input,
@@ -6782,7 +6871,7 @@ QUEUE_NAME=tasks`,
6782
6871
  );
6783
6872
  const currentConnection = connections.find((c) => c.id === activeTabKey);
6784
6873
  const renderTabLabel = (connection) => {
6785
- return /* @__PURE__ */ jsxs21("div", { style: { display: "flex", alignItems: "center" }, children: [
6874
+ return /* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center" }, children: [
6786
6875
  /* @__PURE__ */ jsx42(
6787
6876
  CloudServerOutlined,
6788
6877
  {
@@ -6810,8 +6899,8 @@ QUEUE_NAME=tasks`,
6810
6899
  const tabItems = connections.map((connection) => ({
6811
6900
  key: connection.id,
6812
6901
  label: renderTabLabel(connection),
6813
- children: /* @__PURE__ */ jsx42("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsxs21("div", { style: { display: "flex", height: "100%" }, children: [
6814
- /* @__PURE__ */ jsx42("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs21(
6902
+ children: /* @__PURE__ */ jsx42("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsxs22("div", { style: { display: "flex", height: "100%" }, children: [
6903
+ /* @__PURE__ */ jsx42("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs22(
6815
6904
  "div",
6816
6905
  {
6817
6906
  className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
@@ -6823,16 +6912,16 @@ QUEUE_NAME=tasks`,
6823
6912
  },
6824
6913
  item.key
6825
6914
  )) }),
6826
- /* @__PURE__ */ jsxs21("div", { className: styles.content, children: [
6827
- /* @__PURE__ */ jsxs21("div", { className: styles.contentHeader, children: [
6828
- /* @__PURE__ */ jsxs21("div", { className: styles.contentHeaderLeft, children: [
6915
+ /* @__PURE__ */ jsxs22("div", { className: styles.content, children: [
6916
+ /* @__PURE__ */ jsxs22("div", { className: styles.contentHeader, children: [
6917
+ /* @__PURE__ */ jsxs22("div", { className: styles.contentHeaderLeft, children: [
6829
6918
  /* @__PURE__ */ jsx42(Title2, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
6830
- /* @__PURE__ */ jsxs21(Text13, { className: styles.contentDescription, children: [
6919
+ /* @__PURE__ */ jsxs22(Text13, { className: styles.contentDescription, children: [
6831
6920
  activeMenu === "environment" && "Manage environment variables for the gateway server",
6832
6921
  activeMenu === "models" && "Configure and register model lattices for use by agents"
6833
6922
  ] })
6834
6923
  ] }),
6835
- /* @__PURE__ */ jsxs21("div", { className: styles.contentHeaderRight, children: [
6924
+ /* @__PURE__ */ jsxs22("div", { className: styles.contentHeaderRight, children: [
6836
6925
  /* @__PURE__ */ jsx42(Button14, { onClick: onClose, children: "Cancel" }),
6837
6926
  /* @__PURE__ */ jsx42(
6838
6927
  Button14,
@@ -6860,14 +6949,14 @@ QUEUE_NAME=tasks`,
6860
6949
  gap: 16,
6861
6950
  padding: 48
6862
6951
  },
6863
- children: connection.connecting ? /* @__PURE__ */ jsxs21(Fragment6, { children: [
6952
+ children: connection.connecting ? /* @__PURE__ */ jsxs22(Fragment6, { children: [
6864
6953
  /* @__PURE__ */ jsx42(LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
6865
6954
  /* @__PURE__ */ jsx42(Title2, { level: 4, children: "Connecting..." }),
6866
- /* @__PURE__ */ jsxs21(Text13, { type: "secondary", style: { textAlign: "center" }, children: [
6955
+ /* @__PURE__ */ jsxs22(Text13, { type: "secondary", style: { textAlign: "center" }, children: [
6867
6956
  "Connecting to ",
6868
6957
  connection.url
6869
6958
  ] })
6870
- ] }) : /* @__PURE__ */ jsxs21(Fragment6, { children: [
6959
+ ] }) : /* @__PURE__ */ jsxs22(Fragment6, { children: [
6871
6960
  /* @__PURE__ */ jsx42(LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
6872
6961
  /* @__PURE__ */ jsx42(Title2, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
6873
6962
  /* @__PURE__ */ jsx42(
@@ -6894,7 +6983,7 @@ QUEUE_NAME=tasks`,
6894
6983
  ) }),
6895
6984
  closable: connections.length > 1
6896
6985
  }));
6897
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
6986
+ return /* @__PURE__ */ jsxs22(Fragment6, { children: [
6898
6987
  /* @__PURE__ */ jsx42(
6899
6988
  Modal,
6900
6989
  {
@@ -6918,7 +7007,7 @@ QUEUE_NAME=tasks`,
6918
7007
  }
6919
7008
  },
6920
7009
  items: tabItems,
6921
- addIcon: /* @__PURE__ */ jsxs21(
7010
+ addIcon: /* @__PURE__ */ jsxs22(
6922
7011
  "div",
6923
7012
  {
6924
7013
  style: {
@@ -6951,8 +7040,8 @@ QUEUE_NAME=tasks`,
6951
7040
  },
6952
7041
  confirmLoading: addingServer,
6953
7042
  className: styles.addServerModal,
6954
- children: /* @__PURE__ */ jsxs21(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
6955
- /* @__PURE__ */ jsxs21("div", { children: [
7043
+ children: /* @__PURE__ */ jsxs22(Space14, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
7044
+ /* @__PURE__ */ jsxs22("div", { children: [
6956
7045
  /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
6957
7046
  /* @__PURE__ */ jsx42(
6958
7047
  Input,
@@ -6965,7 +7054,7 @@ QUEUE_NAME=tasks`,
6965
7054
  ),
6966
7055
  /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
6967
7056
  ] }),
6968
- /* @__PURE__ */ jsxs21("div", { children: [
7057
+ /* @__PURE__ */ jsxs22("div", { children: [
6969
7058
  /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
6970
7059
  /* @__PURE__ */ jsx42(
6971
7060
  Input,
@@ -6978,7 +7067,7 @@ QUEUE_NAME=tasks`,
6978
7067
  ),
6979
7068
  /* @__PURE__ */ jsx42(Text13, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
6980
7069
  ] }),
6981
- /* @__PURE__ */ jsxs21("div", { children: [
7070
+ /* @__PURE__ */ jsxs22("div", { children: [
6982
7071
  /* @__PURE__ */ jsx42(Text13, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
6983
7072
  /* @__PURE__ */ jsx42(
6984
7073
  Input.Password,
@@ -7011,9 +7100,9 @@ var AgentServerSetting = () => {
7011
7100
  };
7012
7101
 
7013
7102
  // src/components/Chat/LatticeChatShell.tsx
7014
- import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
7103
+ import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
7015
7104
  var LatticeChatShell = (props) => {
7016
- return /* @__PURE__ */ jsxs22(LatticeChatShellContextProvider, { ...props, children: [
7105
+ return /* @__PURE__ */ jsxs23(LatticeChatShellContextProvider, { ...props, children: [
7017
7106
  /* @__PURE__ */ jsx44(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx44(ConversationContextProvider, { children: /* @__PURE__ */ jsx44(LatticeChatView, {}) }) }),
7018
7107
  /* @__PURE__ */ jsx44(AgentServerSetting, {})
7019
7108
  ] });