@axiom-lattice/react-sdk 2.1.53 → 2.1.54

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
@@ -18892,6 +18892,7 @@ var Chating = ({
18892
18892
  showSender = true,
18893
18893
  showHITL = true,
18894
18894
  showRefreshButton = false,
18895
+ showEmptyState = true,
18895
18896
  emptyStateGreeting,
18896
18897
  emptyStateQuestion = "Ready to turn data into insightful charts in seconds?",
18897
18898
  welcomePrefix = "Hey"
@@ -18930,9 +18931,13 @@ var Chating = ({
18930
18931
  return () => clearInterval(interval);
18931
18932
  }, [isStreaming]);
18932
18933
  const conversationContext = useConversationContext();
18933
- const [isEmptyState, setIsEmptyState] = useState52(messages.length === 0 && !pendingMessages?.length);
18934
+ const [isEmptyState, setIsEmptyState] = useState52(showEmptyState && messages.length === 0 && !pendingMessages?.length);
18934
18935
  const [isTransitioning, setIsTransitioning] = useState52(false);
18935
18936
  useEffect34(() => {
18937
+ if (!showEmptyState) {
18938
+ setIsEmptyState(false);
18939
+ return;
18940
+ }
18936
18941
  const isEmpty = messages.length === 0 && !pendingMessages?.length;
18937
18942
  if (!isEmpty && isEmptyState) {
18938
18943
  setIsTransitioning(true);
@@ -18943,7 +18948,7 @@ var Chating = ({
18943
18948
  } else if (isEmpty && !isEmptyState) {
18944
18949
  setIsEmptyState(true);
18945
18950
  }
18946
- }, [messages.length, pendingMessages?.length, isEmptyState]);
18951
+ }, [messages.length, pendingMessages?.length, isEmptyState, showEmptyState]);
18947
18952
  const { config } = useLatticeChatShellContext();
18948
18953
  const { baseURL } = config;
18949
18954
  const user = useAuthOptional()?.user;
@@ -19154,10 +19159,10 @@ var Chating = ({
19154
19159
  )
19155
19160
  }
19156
19161
  );
19157
- const showDatabaseSlot = config.enableDatabaseSlot !== false;
19158
- const showSkillSlot = config.enableSkillSlot !== false;
19159
- const showAgentSlot = config.enableAgentSlot !== false;
19160
- const showMetricsDataSourceSlot = config.enableMetricsDataSourceSlot !== false;
19162
+ const showDatabaseSlot = config.enableDatabaseSlot;
19163
+ const showSkillSlot = config.enableSkillSlot;
19164
+ const showAgentSlot = config.enableAgentSlot;
19165
+ const showMetricsDataSourceSlot = config.enableMetricsDataSourceSlot;
19161
19166
  const senderFooter = (actionNode) => {
19162
19167
  const hasSlotButtons = showAgentSlot || showDatabaseSlot || showSkillSlot || showMetricsDataSourceSlot;
19163
19168
  return /* @__PURE__ */ jsxs52(Flex5, { justify: "space-between", align: "center", style: { padding: "8px 0" }, children: [