mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
enh: automatic artifacts toggle
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import Markdown from './Markdown.svelte';
|
||||
import LightBlub from '$lib/components/icons/LightBlub.svelte';
|
||||
import { showArtifacts, showControls, showOverview } from '$lib/stores';
|
||||
|
||||
export let id;
|
||||
export let content;
|
||||
@@ -69,6 +70,13 @@
|
||||
on:update={(e) => {
|
||||
dispatch('update', e.detail);
|
||||
}}
|
||||
on:code={(e) => {
|
||||
const { lang } = e.detail;
|
||||
if (lang === 'html') {
|
||||
showArtifacts.set(true);
|
||||
showControls.set(true);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user