mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
68d8fd69c0
commit
6c8a15fae2
1 changed files with 0 additions and 7 deletions
|
|
@ -216,7 +216,6 @@ __builtins__.input = input`);
|
||||||
let debounceTimeout;
|
let debounceTimeout;
|
||||||
|
|
||||||
const drawMermaidDiagram = async () => {
|
const drawMermaidDiagram = async () => {
|
||||||
console.log('drawMermaidDiagram');
|
|
||||||
try {
|
try {
|
||||||
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
const { svg } = await mermaid.render(`mermaid-${uuidv4()}`, code);
|
||||||
mermaidHtml = svg;
|
mermaidHtml = svg;
|
||||||
|
|
@ -242,12 +241,6 @@ __builtins__.input = input`);
|
||||||
debounceTimeout = setTimeout(highlightCode, 10);
|
debounceTimeout = setTimeout(highlightCode, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
|
||||||
if (lang === 'mermaid' && (token?.raw ?? '').slice(-4).includes('```')) {
|
|
||||||
await drawMermaidDiagram();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="my-2" dir="ltr">
|
<div class="my-2" dir="ltr">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue