@agentman/chat-widget
Version:
Agentman Chat Widget for easy integration with web applications
19 lines (18 loc) • 703 B
TypeScript
import type { Message } from '../types/types';
import type { MessageRendererOptions } from './types';
import type { MarkdownConfig } from '../utils/MarkdownLoader';
export interface MessageRendererConfig {
options?: Partial<MessageRendererOptions>;
markdownConfig?: MarkdownConfig;
}
export declare class MessageRenderer {
private static readonly defaultOptions;
private readonly options;
private readonly textProcessor;
private readonly svgProcessor;
private readonly customRenderer;
constructor(config?: MessageRendererConfig | Partial<MessageRendererOptions>);
render(message: Message): Promise<string>;
private processTextWithSvg;
private sanitizeHtml;
}