mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-02 17:57:57 -05:00
fix: Fork in a side chat never opens the copy (#34187)
In a side chat, the Fork chat button and /fork made the copy but the side chat stayed on the original conversation, while a fork in the main chat opens right away. The copy now opens in place of the side chat, with its whole conversation, and the sidebar lists it at once as it does for a fork from the main chat. Fixes #34182
This commit is contained in:
1 parent
c981f76614
commit
301a69d401
1 file changed
+7
-1
@@ -3290,7 +3290,10 @@
|
||||
sanitizeHistory(history);
|
||||
|
||||
chatTitle.set(chatContent.title);
|
||||
branchPointMessageId = parentChatId ? (chatContent.branchPointMessageId ?? null) : null;
|
||||
branchPointMessageId =
|
||||
chatContent.originalChatId === parentChatId
|
||||
? (chatContent.branchPointMessageId ?? null)
|
||||
: null;
|
||||
if (side) await onEmbeddedChatTitle?.(id, chatContent.title);
|
||||
|
||||
params = structuredClone(chatContent?.params ?? {});
|
||||
@@ -4148,6 +4151,9 @@
|
||||
if (!embedded) {
|
||||
await goto(`/c/${result.id}`);
|
||||
await refreshChatList(localStorage.token, { refreshPinned: true });
|
||||
} else if (side) {
|
||||
await onSelectEmbeddedChat?.(result.id);
|
||||
await refreshChatList(localStorage.token, { refreshPinned: true });
|
||||
}
|
||||
toast.success($i18n.t('Chat forked'), { id: toastId });
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user