diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index 5fa4299eaf..33b0572f41 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -222,55 +222,59 @@ __builtins__.input = input`);
-
-
{@html lang}
+ {#if lang === 'mermaid'} +
{code}
+ {:else} +
+
{@html lang}
-
- {#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))} - {#if executing} -
Running
- {:else} - +
+ {#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))} + {#if executing} +
Running
+ {:else} + + {/if} {/if} - {/if} - + +
-
-
{#if highlightedCode}{@html highlightedCode}{:else}{code}{/if}
+
{#if highlightedCode}{@html highlightedCode}{:else}{code}{/if}
-
+
- {#if executing} -
-
STDOUT/STDERR
-
Running...
-
- {:else if stdout || stderr || result} -
-
STDOUT/STDERR
-
{stdout || stderr || result}
-
+ {#if executing} +
+
STDOUT/STDERR
+
Running...
+
+ {:else if stdout || stderr || result} +
+
STDOUT/STDERR
+
{stdout || stderr || result}
+
+ {/if} {/if}