@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 +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -215,6 +215,8 @@ interface CrowWidgetProps {
|
|
|
215
215
|
previewMode?: boolean;
|
|
216
216
|
/** Whether to show AI thinking/reasoning to users (overrides API setting if provided) */
|
|
217
217
|
showThinking?: boolean;
|
|
218
|
+
/** Custom agent name shown in header (overrides API setting if provided) */
|
|
219
|
+
agentName?: string;
|
|
218
220
|
/** Custom welcome message (overrides API setting if provided) */
|
|
219
221
|
welcomeMessage?: string;
|
|
220
222
|
/** Callback when widget is ready */
|
|
@@ -227,15 +229,19 @@ interface CrowWidgetProps {
|
|
|
227
229
|
/** Client-side tools the agent can call */
|
|
228
230
|
tools?: ToolsMap;
|
|
229
231
|
}
|
|
230
|
-
declare function CrowWidget({ productId, apiUrl, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
declare function CrowWidget({ productId, apiUrl, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
|
|
231
233
|
|
|
232
234
|
interface CrowCopilotProps {
|
|
233
235
|
/** Product ID for this copilot */
|
|
234
236
|
productId: string;
|
|
235
237
|
/** API URL (defaults to relative path) */
|
|
236
238
|
apiUrl?: string;
|
|
237
|
-
/** Title shown in header */
|
|
239
|
+
/** Title shown in header (fallback if agentName not provided) */
|
|
238
240
|
title?: string;
|
|
241
|
+
/** Custom agent name shown in header (overrides API setting if provided) */
|
|
242
|
+
agentName?: string;
|
|
243
|
+
/** Custom welcome message (overrides API setting if provided) */
|
|
244
|
+
welcomeMessage?: string;
|
|
239
245
|
/** Position of the sidebar */
|
|
240
246
|
position?: "left" | "right";
|
|
241
247
|
/** Width of the sidebar */
|
|
@@ -253,7 +259,7 @@ interface CrowCopilotProps {
|
|
|
253
259
|
/** Callback when copilot is ready */
|
|
254
260
|
onReady?: () => void;
|
|
255
261
|
}
|
|
256
|
-
declare function CrowCopilot({ productId, apiUrl, title, position, width, showClose, onClose, styles: propStyles, previewMode, className, onReady, }: CrowCopilotProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
declare function CrowCopilot({ productId, apiUrl, title, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, position, width, showClose, onClose, styles: propStyles, previewMode, className, onReady, }: CrowCopilotProps): react_jsx_runtime.JSX.Element;
|
|
257
263
|
|
|
258
264
|
interface CrowProviderProps extends CrowClientConfig {
|
|
259
265
|
children: React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -215,6 +215,8 @@ interface CrowWidgetProps {
|
|
|
215
215
|
previewMode?: boolean;
|
|
216
216
|
/** Whether to show AI thinking/reasoning to users (overrides API setting if provided) */
|
|
217
217
|
showThinking?: boolean;
|
|
218
|
+
/** Custom agent name shown in header (overrides API setting if provided) */
|
|
219
|
+
agentName?: string;
|
|
218
220
|
/** Custom welcome message (overrides API setting if provided) */
|
|
219
221
|
welcomeMessage?: string;
|
|
220
222
|
/** Callback when widget is ready */
|
|
@@ -227,15 +229,19 @@ interface CrowWidgetProps {
|
|
|
227
229
|
/** Client-side tools the agent can call */
|
|
228
230
|
tools?: ToolsMap;
|
|
229
231
|
}
|
|
230
|
-
declare function CrowWidget({ productId, apiUrl, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
declare function CrowWidget({ productId, apiUrl, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
|
|
231
233
|
|
|
232
234
|
interface CrowCopilotProps {
|
|
233
235
|
/** Product ID for this copilot */
|
|
234
236
|
productId: string;
|
|
235
237
|
/** API URL (defaults to relative path) */
|
|
236
238
|
apiUrl?: string;
|
|
237
|
-
/** Title shown in header */
|
|
239
|
+
/** Title shown in header (fallback if agentName not provided) */
|
|
238
240
|
title?: string;
|
|
241
|
+
/** Custom agent name shown in header (overrides API setting if provided) */
|
|
242
|
+
agentName?: string;
|
|
243
|
+
/** Custom welcome message (overrides API setting if provided) */
|
|
244
|
+
welcomeMessage?: string;
|
|
239
245
|
/** Position of the sidebar */
|
|
240
246
|
position?: "left" | "right";
|
|
241
247
|
/** Width of the sidebar */
|
|
@@ -253,7 +259,7 @@ interface CrowCopilotProps {
|
|
|
253
259
|
/** Callback when copilot is ready */
|
|
254
260
|
onReady?: () => void;
|
|
255
261
|
}
|
|
256
|
-
declare function CrowCopilot({ productId, apiUrl, title, position, width, showClose, onClose, styles: propStyles, previewMode, className, onReady, }: CrowCopilotProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
declare function CrowCopilot({ productId, apiUrl, title, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, position, width, showClose, onClose, styles: propStyles, previewMode, className, onReady, }: CrowCopilotProps): react_jsx_runtime.JSX.Element;
|
|
257
263
|
|
|
258
264
|
interface CrowProviderProps extends CrowClientConfig {
|
|
259
265
|
children: React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -2462,6 +2462,7 @@ function CrowWidget({
|
|
|
2462
2462
|
styles: propStyles,
|
|
2463
2463
|
previewMode = false,
|
|
2464
2464
|
showThinking: showThinkingProp,
|
|
2465
|
+
agentName: agentNameProp,
|
|
2465
2466
|
welcomeMessage: welcomeMessageProp,
|
|
2466
2467
|
onReady,
|
|
2467
2468
|
onIdentify,
|
|
@@ -2470,7 +2471,7 @@ function CrowWidget({
|
|
|
2470
2471
|
const {
|
|
2471
2472
|
styles,
|
|
2472
2473
|
isLoading: isLoadingStyles,
|
|
2473
|
-
agentName,
|
|
2474
|
+
agentName: agentNameFromAPI,
|
|
2474
2475
|
browserUseEnabled,
|
|
2475
2476
|
showThinking: showThinkingFromAPI,
|
|
2476
2477
|
persistAnonymousConversations,
|
|
@@ -2481,6 +2482,7 @@ function CrowWidget({
|
|
|
2481
2482
|
propStyles,
|
|
2482
2483
|
skip: previewMode
|
|
2483
2484
|
});
|
|
2485
|
+
const agentName = agentNameProp ?? agentNameFromAPI;
|
|
2484
2486
|
const welcomeMessage = welcomeMessageProp ?? welcomeMessageFromAPI;
|
|
2485
2487
|
console.log("[Crow Widget] persistAnonymousConversations from API:", persistAnonymousConversations, "isLoading:", isLoadingStyles);
|
|
2486
2488
|
const showThinking = showThinkingProp ?? showThinkingFromAPI;
|
|
@@ -2747,6 +2749,8 @@ function CrowCopilot({
|
|
|
2747
2749
|
productId,
|
|
2748
2750
|
apiUrl = "",
|
|
2749
2751
|
title = "Copilot",
|
|
2752
|
+
agentName: agentNameProp,
|
|
2753
|
+
welcomeMessage: welcomeMessageProp,
|
|
2750
2754
|
position = "right",
|
|
2751
2755
|
width = 400,
|
|
2752
2756
|
showClose = false,
|
|
@@ -2756,12 +2760,14 @@ function CrowCopilot({
|
|
|
2756
2760
|
className,
|
|
2757
2761
|
onReady
|
|
2758
2762
|
}) {
|
|
2759
|
-
const { styles, isLoading: isLoadingStyles, agentName, persistAnonymousConversations, welcomeMessage } = useCopilotStyles({
|
|
2763
|
+
const { styles, isLoading: isLoadingStyles, agentName: agentNameFromAPI, persistAnonymousConversations, welcomeMessage: welcomeMessageFromAPI } = useCopilotStyles({
|
|
2760
2764
|
productId,
|
|
2761
2765
|
apiUrl,
|
|
2762
2766
|
propStyles,
|
|
2763
2767
|
skip: previewMode
|
|
2764
2768
|
});
|
|
2769
|
+
const agentName = agentNameProp ?? agentNameFromAPI ?? title;
|
|
2770
|
+
const welcomeMessage = welcomeMessageProp ?? welcomeMessageFromAPI;
|
|
2765
2771
|
const messagesContainerRef = useRef(null);
|
|
2766
2772
|
const executeClientToolRef = useRef(null);
|
|
2767
2773
|
const [showConversationList, setShowConversationList] = useState(false);
|
|
@@ -2848,7 +2854,7 @@ function CrowCopilot({
|
|
|
2848
2854
|
CopilotStyleProvider,
|
|
2849
2855
|
{
|
|
2850
2856
|
styles,
|
|
2851
|
-
agentName
|
|
2857
|
+
agentName,
|
|
2852
2858
|
isLoading: isLoadingStyles,
|
|
2853
2859
|
children: /* @__PURE__ */ jsxs(
|
|
2854
2860
|
"div",
|
|
@@ -2882,7 +2888,7 @@ function CrowCopilot({
|
|
|
2882
2888
|
color: styles.colors.text,
|
|
2883
2889
|
fontSize: styles.typography.headerFontSize
|
|
2884
2890
|
},
|
|
2885
|
-
children: agentName
|
|
2891
|
+
children: agentName
|
|
2886
2892
|
}
|
|
2887
2893
|
),
|
|
2888
2894
|
/* @__PURE__ */ jsxs("div", { className: "crow-flex crow-items-center crow-gap-1", children: [
|