Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
85b2a63b
Commit
85b2a63b
authored
May 16, 2024
by
Timothy J. Baek
Browse files
fix: matplotlib
parent
ef300248
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/lib/components/chat/Messages/CodeBlock.svelte
src/lib/components/chat/Messages/CodeBlock.svelte
+2
-2
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+2
-2
No files found.
src/lib/components/chat/Messages/CodeBlock.svelte
View file @
85b2a63b
...
@@ -148,7 +148,7 @@
...
@@ -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`);
...
@@ -314,6 +314,6 @@ __builtins__.input = input`);
</div>
</div>
{/if}
{/if}
<div id="plt-canvas" />
<div id="plt-canvas
-{id}
" />
</div>
</div>
{/if}
{/if}
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
85b2a63b
...
@@ -434,10 +434,10 @@
...
@@ -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)}
/>
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment