@axiom-lattice/react-sdk 2.1.26 → 2.1.27

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
@@ -4794,7 +4794,8 @@ var DEFAULT_CONFIG = {
4794
4794
  timeout: 3e5,
4795
4795
  headers: {},
4796
4796
  enableThreadCreation: true,
4797
- enableThreadList: true
4797
+ enableThreadList: true,
4798
+ showSideMenu: true
4798
4799
  };
4799
4800
  var LatticeChatShellContext = createContext4({
4800
4801
  config: DEFAULT_CONFIG,
@@ -6720,6 +6721,9 @@ var AgentConversations = ({
6720
6721
  );
6721
6722
  };
6722
6723
 
6724
+ // src/components/Chat/LatticeChatView.tsx
6725
+ import { useContext as useContext8 } from "react";
6726
+
6723
6727
  // src/components/Chat/ChatSidebar.tsx
6724
6728
  import { useState as useState28, useEffect as useEffect20, useRef as useRef13 } from "react";
6725
6729
  import { Divider as Divider4, Tooltip as Tooltip10, Modal as Modal3, Button as Button21 } from "antd";
@@ -10054,6 +10058,8 @@ var ChatSidebar = ({
10054
10058
  // src/components/Chat/LatticeChatView.tsx
10055
10059
  import { jsx as jsx50 } from "react/jsx-runtime";
10056
10060
  var LatticeChatView = (props) => {
10061
+ const shellContext = useContext8(LatticeChatShellContext);
10062
+ const { showSideMenu } = shellContext.config;
10057
10063
  const { assistantId, thread } = useConversationContext();
10058
10064
  const { currentAssistant } = useAssistantContext();
10059
10065
  const {
@@ -10075,7 +10081,7 @@ var LatticeChatView = (props) => {
10075
10081
  assistant_id: assistantId,
10076
10082
  name: currentAssistant?.name,
10077
10083
  description: currentAssistant?.description,
10078
- menu: /* @__PURE__ */ jsx50(ChatSidebar, {})
10084
+ menu: showSideMenu ? /* @__PURE__ */ jsx50(ChatSidebar, {}) : void 0
10079
10085
  }
10080
10086
  )
10081
10087
  }
@@ -11442,8 +11448,9 @@ var AgentServerSetting = () => {
11442
11448
  // src/components/Chat/LatticeChatShell.tsx
11443
11449
  import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
11444
11450
  var LatticeChatShell = (props) => {
11451
+ const { initialConfig } = props;
11445
11452
  return /* @__PURE__ */ jsxs31(LatticeChatShellContextProvider, { ...props, children: [
11446
- /* @__PURE__ */ jsx53(AssistantContextProvider, { autoLoad: true, children: /* @__PURE__ */ jsx53(ConversationContextProvider, { children: /* @__PURE__ */ jsx53(LatticeChatView, {}) }) }),
11453
+ /* @__PURE__ */ jsx53(AssistantContextProvider, { autoLoad: true, initialAssistantId: initialConfig?.assistantId, children: /* @__PURE__ */ jsx53(ConversationContextProvider, { children: /* @__PURE__ */ jsx53(LatticeChatView, {}) }) }),
11447
11454
  /* @__PURE__ */ jsx53(AgentServerSetting, {})
11448
11455
  ] });
11449
11456
  };