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
aa9f3d06
"vscode:/vscode.git/clone" did not exist on "76435ca84ecd278b71b0614eb0d06838283b469e"
Commit
aa9f3d06
authored
May 16, 2024
by
Timothy J. Baek
Browse files
refac: styling
parent
85b2a63b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/lib/components/chat/Messages/CodeBlock.svelte
src/lib/components/chat/Messages/CodeBlock.svelte
+8
-2
No files found.
src/lib/components/chat/Messages/CodeBlock.svelte
View file @
aa9f3d06
...
...
@@ -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}</code
></pre>
<div id="plt-canvas-{id}" class="bg-[#202123] text-white" />
{#if executing}
<div class="bg-[#202123] text-white px-4 py-4 rounded-b-lg">
<div class=" text-gray-500 text-xs mb-1">STDOUT/STDERR</div>
...
...
@@ -313,7 +321,5 @@ __builtins__.input = input`);
<div class="text-sm">{stdout || stderr || result}</div>
</div>
{/if}
<div id="plt-canvas-{id}" />
</div>
{/if}
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