diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index 5d7ae3f8e..bebc482f9 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -204,6 +204,12 @@ __builtins__.input = input`); console.log(result); console.log(stdout); console.log(stderr); + + const pltCanvasElement = document.getElementById(`plt-canvas-${id}`); + + if (pltCanvasElement?.innerHTML !== '') { + pltCanvasElement.classList.add('px-4', 'pt-4'); + } } catch (error) { console.error('Error:', error); stderr = error; @@ -302,6 +308,8 @@ __builtins__.input = input`); class="language-{lang} rounded-t-none whitespace-pre">{@html highlightedCode || code} +
+ {#if executing}