mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Removed unused toast import & Code Format
This commit is contained in:
parent
8538d1b2cb
commit
fa2534a529
2 changed files with 6 additions and 8 deletions
|
|
@ -330,9 +330,9 @@
|
|||
mermaidHtml = await renderMermaidDiagram(code);
|
||||
} catch (error) {
|
||||
console.error('Failed to render mermaid diagram:', error);
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
toast.error($i18n.t('Failed to render diagram') + `: ${errorMsg}`);
|
||||
mermaidHtml = null;
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
toast.error($i18n.t('Failed to render diagram') + `: ${errorMsg}`);
|
||||
mermaidHtml = null;
|
||||
}
|
||||
} else if (
|
||||
(lang === 'vega' || lang === 'vega-lite') &&
|
||||
|
|
@ -342,9 +342,9 @@
|
|||
vegaHtml = await renderVegaVisualization(code);
|
||||
} catch (error) {
|
||||
console.error('Failed to render Vega visualization:', error);
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
toast.error($i18n.t('Failed to render diagram') + `: ${errorMsg}`);
|
||||
vegaHtml = null;
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
toast.error($i18n.t('Failed to render diagram') + `: ${errorMsg}`);
|
||||
vegaHtml = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ import markedExtension from '$lib/utils/marked/extension';
|
|||
import markedKatexExtension from '$lib/utils/marked/katex-extension';
|
||||
import hljs from 'highlight.js';
|
||||
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
||||
//////////////////////////
|
||||
// Helper functions
|
||||
//////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in a new issue