mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
refac: close artifacts if html codeblock is not found
This commit is contained in:
parent
3082d0de7a
commit
cdd024db81
@ -17,9 +17,12 @@
|
||||
|
||||
let iframeElement: HTMLIFrameElement;
|
||||
|
||||
$: if (history.currentId) {
|
||||
$: if (history) {
|
||||
messages = createMessagesList(history, history.currentId);
|
||||
getContents();
|
||||
} else {
|
||||
messages = [];
|
||||
getContents();
|
||||
}
|
||||
|
||||
function getContents() {
|
||||
@ -97,6 +100,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
if (messages.length === 0 || (messages.at(-1)?.done && contents.length === 0)) {
|
||||
showArtifacts.set(false);
|
||||
showControls.set(false);
|
||||
}
|
||||
selectedContentIdx = contents ? contents.length - 1 : 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user