mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
fix: artifact preview sometimes closes the moment it auto-opens (#31653)
When a reply contained an artifact and the preview opened automatically, it could check for artifacts before they had been picked up from that reply, find none and close again. This happens occasionally in normal chats, with or without filters, and is older than 0.11.1. The preview now looks for artifacts again at the moment it opens, so it stays open. It is a separate cause from #31643, found while looking into that issue.
This commit is contained in:
parent
7e317fbada
commit
f453324997
1 changed files with 6 additions and 0 deletions
|
|
@ -1633,6 +1633,11 @@
|
|||
}
|
||||
});
|
||||
|
||||
// the artifacts pane reads this list when it opens, which can be before the debounced rebuild
|
||||
const showArtifactsSubscribe = showArtifacts.subscribe((value) => {
|
||||
if (value) getContents();
|
||||
});
|
||||
|
||||
const selectedFolderSubscribe = selectedFolder.subscribe(async (folder) => {
|
||||
await tick();
|
||||
// Folder default models apply to new chats only.
|
||||
|
|
@ -1685,6 +1690,7 @@
|
|||
}
|
||||
pageSubscribe();
|
||||
showControlsSubscribe();
|
||||
showArtifactsSubscribe();
|
||||
selectedFolderSubscribe();
|
||||
|
||||
// Clear the selected chat when leaving the chat surface (e.g. navigating
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue