@usecrow/ui 0.1.17 → 0.1.18

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.cjs CHANGED
@@ -2488,6 +2488,7 @@ function CrowWidget({
2488
2488
  styles: propStyles,
2489
2489
  previewMode = false,
2490
2490
  showThinking: showThinkingProp,
2491
+ agentName: agentNameProp,
2491
2492
  welcomeMessage: welcomeMessageProp,
2492
2493
  onReady,
2493
2494
  onIdentify,
@@ -2496,7 +2497,7 @@ function CrowWidget({
2496
2497
  const {
2497
2498
  styles,
2498
2499
  isLoading: isLoadingStyles,
2499
- agentName,
2500
+ agentName: agentNameFromAPI,
2500
2501
  browserUseEnabled,
2501
2502
  showThinking: showThinkingFromAPI,
2502
2503
  persistAnonymousConversations,
@@ -2507,6 +2508,7 @@ function CrowWidget({
2507
2508
  propStyles,
2508
2509
  skip: previewMode
2509
2510
  });
2511
+ const agentName = agentNameProp ?? agentNameFromAPI;
2510
2512
  const welcomeMessage = welcomeMessageProp ?? welcomeMessageFromAPI;
2511
2513
  console.log("[Crow Widget] persistAnonymousConversations from API:", persistAnonymousConversations, "isLoading:", isLoadingStyles);
2512
2514
  const showThinking = showThinkingProp ?? showThinkingFromAPI;
@@ -2773,6 +2775,8 @@ function CrowCopilot({
2773
2775
  productId,
2774
2776
  apiUrl = "",
2775
2777
  title = "Copilot",
2778
+ agentName: agentNameProp,
2779
+ welcomeMessage: welcomeMessageProp,
2776
2780
  position = "right",
2777
2781
  width = 400,
2778
2782
  showClose = false,
@@ -2782,12 +2786,14 @@ function CrowCopilot({
2782
2786
  className,
2783
2787
  onReady
2784
2788
  }) {
2785
- const { styles, isLoading: isLoadingStyles, agentName, persistAnonymousConversations, welcomeMessage } = useCopilotStyles({
2789
+ const { styles, isLoading: isLoadingStyles, agentName: agentNameFromAPI, persistAnonymousConversations, welcomeMessage: welcomeMessageFromAPI } = useCopilotStyles({
2786
2790
  productId,
2787
2791
  apiUrl,
2788
2792
  propStyles,
2789
2793
  skip: previewMode
2790
2794
  });
2795
+ const agentName = agentNameProp ?? agentNameFromAPI ?? title;
2796
+ const welcomeMessage = welcomeMessageProp ?? welcomeMessageFromAPI;
2791
2797
  const messagesContainerRef = React3.useRef(null);
2792
2798
  const executeClientToolRef = React3.useRef(null);
2793
2799
  const [showConversationList, setShowConversationList] = React3.useState(false);
@@ -2874,7 +2880,7 @@ function CrowCopilot({
2874
2880
  CopilotStyleProvider,
2875
2881
  {
2876
2882
  styles,
2877
- agentName: agentName || title,
2883
+ agentName,
2878
2884
  isLoading: isLoadingStyles,
2879
2885
  children: /* @__PURE__ */ jsxRuntime.jsxs(
2880
2886
  "div",
@@ -2908,7 +2914,7 @@ function CrowCopilot({
2908
2914
  color: styles.colors.text,
2909
2915
  fontSize: styles.typography.headerFontSize
2910
2916
  },
2911
- children: agentName || title
2917
+ children: agentName
2912
2918
  }
2913
2919
  ),
2914
2920
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "crow-flex crow-items-center crow-gap-1", children: [