mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24679
Author: @Classic298
Created: 5/13/2026
Status: 🔄 Open
Base:
dev← Head:fix/default-tools-persist-existing-chats📝 Commits (1)
c7a26a2fix: always apply model default tools on chat open (#24677)📊 Changes
1 file changed (+6 additions, -17 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+6 -17)📄 Description
Previously the chat-open flow was
if (storageChatInput) restore from draft; else setDefaults()— mutually exclusive. Because MessageInput's$: onChangereactive fires saveDraft on every state change (including theselectedToolIds = []reset performed inside navigateHandler before loadChat completes), the per-chat sessionStorage entry could end up withselectedToolIds: []whenever the 500ms saveDraft debounce beat the subsequent setDefaults-triggered save (e.g. a slow getChatById, quick re-navigation, or anything that delays setDefaults beyond the timer). Once that empty state was persisted, every subsequent visit took the restore branch and never re-applied the model's defaults — default tools silently disappeared for that chat.Decouple the two concerns: setDefaults() now always runs on chat open, so tools/filters/features are driven by the current model config. The sessionStorage draft only restores the user-typed prompt and uploaded files (the genuine "draft" state).
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.