diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index d0dcc8973..8b699cf1a 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -276,6 +276,10 @@ __builtins__.input = input`); onMount(async () => { console.log('codeblock', lang, code); + + if (lang) { + dispatch('code', { lang }); + } if (document.documentElement.classList.contains('dark')) { mermaid.initialize({ startOnLoad: true,