UNPKG

plazbot

Version:

Official Plazbot SDK for creating AI agents for WhatsApp, portals, and developers.

32 lines (31 loc) 1.45 kB
import type { CSSProperties, ComponentType } from 'react'; import type { ActionExecuted } from '../../sdk-types'; import type { ChatMessage } from '../../types'; import type { PoweredByProps } from '../identity/PoweredBy'; export interface ChatProps { /** Mostrar header con info del agente */ showHeader?: boolean; /** Mostrar "Powered by Plazbot". true=default, false=oculto, objeto=custom */ showPoweredBy?: boolean | PoweredByProps; /** Placeholder del input */ placeholder?: string; /** Permitir adjuntar archivos */ allowAttachments?: boolean; /** Preguntas sugeridas (override de agent.examples) */ suggestedQuestions?: string[]; /** Renderers custom de tool results por intent */ customCardRenderers?: Record<string, ComponentType<{ action: ActionExecuted; }>>; /** Callback cuando el agente responde */ onMessage?: (message: ChatMessage) => void; /** Callback cuando el agente ejecuta una accion */ onActionExecuted?: (action: ActionExecuted) => void; /** Callback en error */ onError?: (error: string) => void; /** Clase CSS del contenedor */ className?: string; /** Estilos del contenedor */ style?: CSSProperties; } export declare function Chat({ showHeader, showPoweredBy, placeholder, allowAttachments, suggestedQuestions, onMessage, onActionExecuted, onError, className, style, }: ChatProps): import("react/jsx-runtime").JSX.Element;