feat: widgets and ai chat

This commit is contained in:
Rotimi Best
2026-04-27 11:40:38 +01:00
parent ae1801f85f
commit 5717dd8004
391 changed files with 28177 additions and 22467 deletions
@@ -0,0 +1,17 @@
import { marked } from 'marked';
// Configure marked for safe, minimal output
marked.setOptions({
breaks: true,
gfm: true
});
/**
* Convert markdown text to sanitized HTML for rendering in the chat.
* Agent responses come as markdown — this makes them render properly.
*/
export function renderMarkdown(text: string): string {
if (!text) return '';
return marked.parse(text, { async: false }) as string;
}