@wallavi/widget 1.11.1 → 1.12.2

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,9 +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;
119
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[];
120
140
  showThinking?: boolean;
121
141
  regenerateMessage?: boolean;
122
142
  /**
@@ -282,7 +302,32 @@ interface BubbleWidgetProps extends Partial<ChatWidgetConfig> {
282
302
  }
283
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;
284
304
 
285
- 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, clientActions, }: 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;
286
331
 
287
332
  interface UseChatOptions {
288
333
  agentId: string;
@@ -366,17 +411,20 @@ interface DebugTrace {
366
411
  }
367
412
  declare function useChat({ agentId, workspaceId, envId, source, userContext, persist, onNavigate, playgroundOverrides, customBackend, }: UseChatOptions): UseChatReturn;
368
413
 
369
- declare function PlanCard({ part, onSend, disabled, }: {
414
+ declare function PlanCard({ part, onSend, disabled, locale, }: {
370
415
  part: PlanPart;
371
416
  onSend?: (text: string) => void;
372
417
  disabled?: boolean;
418
+ locale?: "en" | "es" | null;
373
419
  }): react_jsx_runtime.JSX.Element;
374
420
 
375
- declare function ToolCallBadge({ part }: {
421
+ declare function ToolCallBadge({ part, locale, }: {
376
422
  part: ToolPart;
423
+ locale?: "en" | "es" | null;
377
424
  }): react_jsx_runtime.JSX.Element;
378
- declare function ReasoningBlock({ text }: {
425
+ declare function ReasoningBlock({ text, locale, }: {
379
426
  text: string;
427
+ locale?: "en" | "es" | null;
380
428
  }): react_jsx_runtime.JSX.Element;
381
429
 
382
430
  interface UseSupportChatOptions {
@@ -398,8 +446,9 @@ interface UseSupportChatOptions {
398
446
  * @example "Volver a chatear con la IA"
399
447
  */
400
448
  returnToAiLabel?: string;
449
+ locale?: "en" | "es" | null;
401
450
  }
402
- declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, }: UseSupportChatOptions): CustomBackend;
451
+ declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, locale, }: UseSupportChatOptions): CustomBackend;
403
452
 
404
453
  type VoiceState = "idle" | "recording" | "transcribing" | "error";
405
454
  interface UseVoiceOptions {
@@ -439,4 +488,4 @@ interface UseAttachmentsReturn {
439
488
  }
440
489
  declare function useAttachments({ agentId, apiUrl, maxFiles, }: UseAttachmentsOptions): UseAttachmentsReturn;
441
490
 
442
- 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,9 +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;
119
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[];
120
140
  showThinking?: boolean;
121
141
  regenerateMessage?: boolean;
122
142
  /**
@@ -282,7 +302,32 @@ interface BubbleWidgetProps extends Partial<ChatWidgetConfig> {
282
302
  }
283
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;
284
304
 
285
- 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, clientActions, }: 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;
286
331
 
287
332
  interface UseChatOptions {
288
333
  agentId: string;
@@ -366,17 +411,20 @@ interface DebugTrace {
366
411
  }
367
412
  declare function useChat({ agentId, workspaceId, envId, source, userContext, persist, onNavigate, playgroundOverrides, customBackend, }: UseChatOptions): UseChatReturn;
368
413
 
369
- declare function PlanCard({ part, onSend, disabled, }: {
414
+ declare function PlanCard({ part, onSend, disabled, locale, }: {
370
415
  part: PlanPart;
371
416
  onSend?: (text: string) => void;
372
417
  disabled?: boolean;
418
+ locale?: "en" | "es" | null;
373
419
  }): react_jsx_runtime.JSX.Element;
374
420
 
375
- declare function ToolCallBadge({ part }: {
421
+ declare function ToolCallBadge({ part, locale, }: {
376
422
  part: ToolPart;
423
+ locale?: "en" | "es" | null;
377
424
  }): react_jsx_runtime.JSX.Element;
378
- declare function ReasoningBlock({ text }: {
425
+ declare function ReasoningBlock({ text, locale, }: {
379
426
  text: string;
427
+ locale?: "en" | "es" | null;
380
428
  }): react_jsx_runtime.JSX.Element;
381
429
 
382
430
  interface UseSupportChatOptions {
@@ -398,8 +446,9 @@ interface UseSupportChatOptions {
398
446
  * @example "Volver a chatear con la IA"
399
447
  */
400
448
  returnToAiLabel?: string;
449
+ locale?: "en" | "es" | null;
401
450
  }
402
- declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, }: UseSupportChatOptions): CustomBackend;
451
+ declare function useSupportChat({ inboxToken, apiBase, requestHumanLabel, returnToAiLabel, locale, }: UseSupportChatOptions): CustomBackend;
403
452
 
404
453
  type VoiceState = "idle" | "recording" | "transcribing" | "error";
405
454
  interface UseVoiceOptions {
@@ -439,4 +488,4 @@ interface UseAttachmentsReturn {
439
488
  }
440
489
  declare function useAttachments({ agentId, apiUrl, maxFiles, }: UseAttachmentsOptions): UseAttachmentsReturn;
441
490
 
442
- 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 };