@wallavi/widget 1.11.0 → 1.12.1

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.d.mts CHANGED
@@ -52,6 +52,17 @@ interface ContextEntity {
52
52
  id: string;
53
53
  name: string;
54
54
  }
55
+ /** RAG topic summary surfaced in the Command Center sidebar. */
56
+ interface RagTopicInfo {
57
+ name: string;
58
+ summary: string | null;
59
+ }
60
+ /** RAG document summary surfaced in the Command Center sidebar. */
61
+ interface RagDocumentInfo {
62
+ name: string;
63
+ summary: string | null;
64
+ url: string | null;
65
+ }
55
66
  interface PageContext {
56
67
  /** Current URL or path (e.g. "/dashboard/agent/abc/agent-studio") */
57
68
  url?: string;
@@ -114,8 +125,18 @@ interface ChatWidgetConfig {
114
125
  watermark?: boolean;
115
126
  watermarkLogoUrl?: string;
116
127
  footer?: string | null;
117
- theme?: "light" | "dark";
128
+ theme?: "light" | "dark" | "system";
118
129
  widgetLayout?: "bubble" | "center";
130
+ showCommandPanel?: boolean;
131
+ showRagTopics?: boolean;
132
+ showRagDocuments?: boolean;
133
+ showQuickActions?: boolean;
134
+ locale?: "en" | "es" | null;
135
+ clientActions?: any[];
136
+ /** RAG topics from the agent's knowledge base — used in Command Center */
137
+ ragTopics?: RagTopicInfo[];
138
+ /** RAG documents from the agent's knowledge base — used in Command Center */
139
+ ragDocuments?: RagDocumentInfo[];
119
140
  showThinking?: boolean;
120
141
  regenerateMessage?: boolean;
121
142
  /**
@@ -281,7 +302,32 @@ interface BubbleWidgetProps extends Partial<ChatWidgetConfig> {
281
302
  }
282
303
  declare function BubbleWidget({ inboxToken, supportApiBase, requestHumanLabel, returnToAiLabel, position: positionProp, width: widthProp, height: heightProp, expandedWidth, expandedHeight, keyboardShortcut: keyboardShortcutProp, shortcutKey, autoOpen: autoOpenProp, bubbleIconUrl: bubbleIconUrlProp, bubbleSize: bubbleSizeProp, panelClassName, autoConfig, hideBubble, isOpen: isOpenProp, onOpenChange, ...chatProps }: BubbleWidgetProps): react_jsx_runtime.JSX.Element;
283
304
 
284
- declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, enableVoice, voiceAutoSend, enableAttachments, customBackend, className, onClose, onReset, onExpand, expanded, embedded, envId, onDebugTrace, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
305
+ declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, enableVoice, voiceAutoSend, enableAttachments, customBackend, className, onClose, onReset, onExpand, expanded, embedded, envId, onDebugTrace, widgetLayout, showCommandPanel, showRagTopics, showRagDocuments, showQuickActions, locale, clientActions, ragTopics, ragDocuments, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
306
+
307
+ declare function IconTarget({ className }: {
308
+ className?: string;
309
+ }): react_jsx_runtime.JSX.Element;
310
+ declare function LiveDot({ size }: {
311
+ size?: "sm" | "md";
312
+ }): react_jsx_runtime.JSX.Element;
313
+ interface CommandPanelProps {
314
+ /** "sidebar" renders as a vertical panel; "inline" renders as a horizontal welcome grid */
315
+ mode: "sidebar" | "inline";
316
+ pageUrl?: string;
317
+ pageTitle?: string;
318
+ clientActions?: any[];
319
+ ragTopics?: RagTopicInfo[];
320
+ ragDocuments?: RagDocumentInfo[];
321
+ onSend: (text: string) => void;
322
+ onExecuteAction?: (steps: any[]) => void;
323
+ accentColor?: string;
324
+ isDark?: boolean;
325
+ watermark?: boolean;
326
+ watermarkLogoUrl?: string;
327
+ footer?: string | null;
328
+ locale?: "en" | "es" | null;
329
+ }
330
+ declare function CommandPanel({ mode, pageUrl, pageTitle, clientActions, ragTopics, ragDocuments, onSend, onExecuteAction, accentColor, watermark, watermarkLogoUrl, footer, locale, }: CommandPanelProps): react_jsx_runtime.JSX.Element | null;
285
331
 
286
332
  interface UseChatOptions {
287
333
  agentId: string;
@@ -365,17 +411,20 @@ interface DebugTrace {
365
411
  }
366
412
  declare function useChat({ agentId, workspaceId, envId, source, userContext, persist, onNavigate, playgroundOverrides, customBackend, }: UseChatOptions): UseChatReturn;
367
413
 
368
- declare function PlanCard({ part, onSend, disabled, }: {
414
+ declare function PlanCard({ part, onSend, disabled, locale, }: {
369
415
  part: PlanPart;
370
416
  onSend?: (text: string) => void;
371
417
  disabled?: boolean;
418
+ locale?: "en" | "es" | null;
372
419
  }): react_jsx_runtime.JSX.Element;
373
420
 
374
- declare function ToolCallBadge({ part }: {
421
+ declare function ToolCallBadge({ part, locale, }: {
375
422
  part: ToolPart;
423
+ locale?: "en" | "es" | null;
376
424
  }): react_jsx_runtime.JSX.Element;
377
- declare function ReasoningBlock({ text }: {
425
+ declare function ReasoningBlock({ text, locale, }: {
378
426
  text: string;
427
+ locale?: "en" | "es" | null;
379
428
  }): react_jsx_runtime.JSX.Element;
380
429
 
381
430
  interface UseSupportChatOptions {
@@ -397,8 +446,9 @@ interface UseSupportChatOptions {
397
446
  * @example "Volver a chatear con la IA"
398
447
  */
399
448
  returnToAiLabel?: string;
449
+ locale?: "en" | "es" | null;
400
450
  }
401
- declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, }: UseSupportChatOptions): CustomBackend;
451
+ declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, locale, }: UseSupportChatOptions): CustomBackend;
402
452
 
403
453
  type VoiceState = "idle" | "recording" | "transcribing" | "error";
404
454
  interface UseVoiceOptions {
@@ -438,4 +488,4 @@ interface UseAttachmentsReturn {
438
488
  }
439
489
  declare function useAttachments({ agentId, apiUrl, maxFiles, }: UseAttachmentsOptions): UseAttachmentsReturn;
440
490
 
441
- export { type Attachment, type AttachmentContentType, type AttachmentPayload, type AttachmentStatus, BubbleWidget, type BubbleWidgetProps, ChatWidget, type ChatWidgetConfig, type ChatWidgetProps, type CustomBackend, type DebugTrace, type Message, type MessagePart, type PageContext, PlanCard, type PlanPart, ReasoningBlock, ToolCallBadge, type ToolPart, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseChatOptions, type UseChatReturn, type UseSupportChatOptions, type UseVoiceOptions, type UseVoiceReturn, type UserContext, type VoiceState, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };
491
+ export { type Attachment, type AttachmentContentType, type AttachmentPayload, type AttachmentStatus, BubbleWidget, type BubbleWidgetProps, ChatWidget, type ChatWidgetConfig, type ChatWidgetProps, CommandPanel, type CustomBackend, type DebugTrace, IconTarget, LiveDot, type Message, type MessagePart, type PageContext, PlanCard, type PlanPart, type RagDocumentInfo, type RagTopicInfo, ReasoningBlock, ToolCallBadge, type ToolPart, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseChatOptions, type UseChatReturn, type UseSupportChatOptions, type UseVoiceOptions, type UseVoiceReturn, type UserContext, type VoiceState, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };
package/dist/index.d.ts CHANGED
@@ -52,6 +52,17 @@ interface ContextEntity {
52
52
  id: string;
53
53
  name: string;
54
54
  }
55
+ /** RAG topic summary surfaced in the Command Center sidebar. */
56
+ interface RagTopicInfo {
57
+ name: string;
58
+ summary: string | null;
59
+ }
60
+ /** RAG document summary surfaced in the Command Center sidebar. */
61
+ interface RagDocumentInfo {
62
+ name: string;
63
+ summary: string | null;
64
+ url: string | null;
65
+ }
55
66
  interface PageContext {
56
67
  /** Current URL or path (e.g. "/dashboard/agent/abc/agent-studio") */
57
68
  url?: string;
@@ -114,8 +125,18 @@ interface ChatWidgetConfig {
114
125
  watermark?: boolean;
115
126
  watermarkLogoUrl?: string;
116
127
  footer?: string | null;
117
- theme?: "light" | "dark";
128
+ theme?: "light" | "dark" | "system";
118
129
  widgetLayout?: "bubble" | "center";
130
+ showCommandPanel?: boolean;
131
+ showRagTopics?: boolean;
132
+ showRagDocuments?: boolean;
133
+ showQuickActions?: boolean;
134
+ locale?: "en" | "es" | null;
135
+ clientActions?: any[];
136
+ /** RAG topics from the agent's knowledge base — used in Command Center */
137
+ ragTopics?: RagTopicInfo[];
138
+ /** RAG documents from the agent's knowledge base — used in Command Center */
139
+ ragDocuments?: RagDocumentInfo[];
119
140
  showThinking?: boolean;
120
141
  regenerateMessage?: boolean;
121
142
  /**
@@ -281,7 +302,32 @@ interface BubbleWidgetProps extends Partial<ChatWidgetConfig> {
281
302
  }
282
303
  declare function BubbleWidget({ inboxToken, supportApiBase, requestHumanLabel, returnToAiLabel, position: positionProp, width: widthProp, height: heightProp, expandedWidth, expandedHeight, keyboardShortcut: keyboardShortcutProp, shortcutKey, autoOpen: autoOpenProp, bubbleIconUrl: bubbleIconUrlProp, bubbleSize: bubbleSizeProp, panelClassName, autoConfig, hideBubble, isOpen: isOpenProp, onOpenChange, ...chatProps }: BubbleWidgetProps): react_jsx_runtime.JSX.Element;
283
304
 
284
- declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, enableVoice, voiceAutoSend, enableAttachments, customBackend, className, onClose, onReset, onExpand, expanded, embedded, envId, onDebugTrace, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
305
+ declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, enableVoice, voiceAutoSend, enableAttachments, customBackend, className, onClose, onReset, onExpand, expanded, embedded, envId, onDebugTrace, widgetLayout, showCommandPanel, showRagTopics, showRagDocuments, showQuickActions, locale, clientActions, ragTopics, ragDocuments, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
306
+
307
+ declare function IconTarget({ className }: {
308
+ className?: string;
309
+ }): react_jsx_runtime.JSX.Element;
310
+ declare function LiveDot({ size }: {
311
+ size?: "sm" | "md";
312
+ }): react_jsx_runtime.JSX.Element;
313
+ interface CommandPanelProps {
314
+ /** "sidebar" renders as a vertical panel; "inline" renders as a horizontal welcome grid */
315
+ mode: "sidebar" | "inline";
316
+ pageUrl?: string;
317
+ pageTitle?: string;
318
+ clientActions?: any[];
319
+ ragTopics?: RagTopicInfo[];
320
+ ragDocuments?: RagDocumentInfo[];
321
+ onSend: (text: string) => void;
322
+ onExecuteAction?: (steps: any[]) => void;
323
+ accentColor?: string;
324
+ isDark?: boolean;
325
+ watermark?: boolean;
326
+ watermarkLogoUrl?: string;
327
+ footer?: string | null;
328
+ locale?: "en" | "es" | null;
329
+ }
330
+ declare function CommandPanel({ mode, pageUrl, pageTitle, clientActions, ragTopics, ragDocuments, onSend, onExecuteAction, accentColor, watermark, watermarkLogoUrl, footer, locale, }: CommandPanelProps): react_jsx_runtime.JSX.Element | null;
285
331
 
286
332
  interface UseChatOptions {
287
333
  agentId: string;
@@ -365,17 +411,20 @@ interface DebugTrace {
365
411
  }
366
412
  declare function useChat({ agentId, workspaceId, envId, source, userContext, persist, onNavigate, playgroundOverrides, customBackend, }: UseChatOptions): UseChatReturn;
367
413
 
368
- declare function PlanCard({ part, onSend, disabled, }: {
414
+ declare function PlanCard({ part, onSend, disabled, locale, }: {
369
415
  part: PlanPart;
370
416
  onSend?: (text: string) => void;
371
417
  disabled?: boolean;
418
+ locale?: "en" | "es" | null;
372
419
  }): react_jsx_runtime.JSX.Element;
373
420
 
374
- declare function ToolCallBadge({ part }: {
421
+ declare function ToolCallBadge({ part, locale, }: {
375
422
  part: ToolPart;
423
+ locale?: "en" | "es" | null;
376
424
  }): react_jsx_runtime.JSX.Element;
377
- declare function ReasoningBlock({ text }: {
425
+ declare function ReasoningBlock({ text, locale, }: {
378
426
  text: string;
427
+ locale?: "en" | "es" | null;
379
428
  }): react_jsx_runtime.JSX.Element;
380
429
 
381
430
  interface UseSupportChatOptions {
@@ -397,8 +446,9 @@ interface UseSupportChatOptions {
397
446
  * @example "Volver a chatear con la IA"
398
447
  */
399
448
  returnToAiLabel?: string;
449
+ locale?: "en" | "es" | null;
400
450
  }
401
- declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, }: UseSupportChatOptions): CustomBackend;
451
+ declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, locale, }: UseSupportChatOptions): CustomBackend;
402
452
 
403
453
  type VoiceState = "idle" | "recording" | "transcribing" | "error";
404
454
  interface UseVoiceOptions {
@@ -438,4 +488,4 @@ interface UseAttachmentsReturn {
438
488
  }
439
489
  declare function useAttachments({ agentId, apiUrl, maxFiles, }: UseAttachmentsOptions): UseAttachmentsReturn;
440
490
 
441
- export { type Attachment, type AttachmentContentType, type AttachmentPayload, type AttachmentStatus, BubbleWidget, type BubbleWidgetProps, ChatWidget, type ChatWidgetConfig, type ChatWidgetProps, type CustomBackend, type DebugTrace, type Message, type MessagePart, type PageContext, PlanCard, type PlanPart, ReasoningBlock, ToolCallBadge, type ToolPart, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseChatOptions, type UseChatReturn, type UseSupportChatOptions, type UseVoiceOptions, type UseVoiceReturn, type UserContext, type VoiceState, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };
491
+ export { type Attachment, type AttachmentContentType, type AttachmentPayload, type AttachmentStatus, BubbleWidget, type BubbleWidgetProps, ChatWidget, type ChatWidgetConfig, type ChatWidgetProps, CommandPanel, type CustomBackend, type DebugTrace, IconTarget, LiveDot, type Message, type MessagePart, type PageContext, PlanCard, type PlanPart, type RagDocumentInfo, type RagTopicInfo, ReasoningBlock, ToolCallBadge, type ToolPart, type UseAttachmentsOptions, type UseAttachmentsReturn, type UseChatOptions, type UseChatReturn, type UseSupportChatOptions, type UseVoiceOptions, type UseVoiceReturn, type UserContext, type VoiceState, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };