mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
Merge a927d3ba78 into b51e68fbb3
This commit is contained in:
commit
1c935685be
1 changed files with 10 additions and 2 deletions
|
|
@ -1929,6 +1929,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
if ($page.url.pathname === '/' || $page.url.pathname.startsWith('/folders/')) {
|
||||
tick().then(initNewChat);
|
||||
}
|
||||
|
||||
// the artifacts pane reads this list when it opens, which can be before the debounced rebuild
|
||||
const showArtifactsSubscribe = showArtifacts.subscribe((value) => {
|
||||
if (value) getContents();
|
||||
|
|
@ -2461,8 +2465,12 @@
|
|||
return () => bridge?.end();
|
||||
});
|
||||
// Only real navigation resets the chat; shallow sidebar state changes must preserve it.
|
||||
afterNavigate(async ({ to }) => {
|
||||
if (to?.url.pathname === '/' || to?.url.pathname.startsWith('/folders/')) {
|
||||
afterNavigate(async ({ from, to }) => {
|
||||
// A navigation that mounts this page starts its new chat in onMount.
|
||||
if (
|
||||
from?.route.id === to?.route.id &&
|
||||
(to?.url.pathname === '/' || to?.url.pathname.startsWith('/folders/'))
|
||||
) {
|
||||
await tick();
|
||||
initNewChat();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue