fix: matplotlib

This commit is contained in:
Timothy J. Baek 2024-05-16 23:15:39 -10:00
parent ef300248ba
commit 85b2a63b6d
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@
executing = true; executing = true;
document.pyodideMplTarget = document.getElementById('plt-canvas'); document.pyodideMplTarget = document.getElementById(`plt-canvas-${id}`);
let pyodide = await loadPyodide({ let pyodide = await loadPyodide({
indexURL: '/pyodide/', indexURL: '/pyodide/',
@ -314,6 +314,6 @@ __builtins__.input = input`);
</div> </div>
{/if} {/if}
<div id="plt-canvas" /> <div id="plt-canvas-{id}" />
</div> </div>
{/if} {/if}

View File

@ -434,10 +434,10 @@
{:else if message.content === ''} {:else if message.content === ''}
<Skeleton /> <Skeleton />
{:else} {:else}
{#each tokens as token} {#each tokens as token, tokenIdx}
{#if token.type === 'code'} {#if token.type === 'code'}
<CodeBlock <CodeBlock
id={message.id} id={`${message.id}-${tokenIdx}`}
lang={token.lang} lang={token.lang}
code={revertSanitizedResponseContent(token.text)} code={revertSanitizedResponseContent(token.text)}
/> />