mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-14 04:08:46 +00:00
fix: tools picked in a new chat are dropped after switching away and back (#32235)
A tool picked from the Integrations menu before the first message of a new chat stayed on only until the user left that chat. Coming back, the chat fell back to the model's default tools, so the tool was no longer offered to the model and the changed tool list broke prompt caching. The Web Search toggle was dropped the same way, and a picked skill was lost on reload. The picks are now kept for the chat from its first message on, like picks made later in the chat.
This commit is contained in:
parent
1369027db6
commit
40df1542ce
1 changed files with 3 additions and 0 deletions
|
|
@ -4243,6 +4243,8 @@
|
|||
});
|
||||
await chatId.set(res.chat_id);
|
||||
if (!$temporaryChatEnabled && !embedded) {
|
||||
// Carry the picks made on the new-chat page over to this chat
|
||||
saveDraft(getChatInputDraft(), res.chat_id, false);
|
||||
window.history.replaceState(window.history.state, '', `/c/${res.chat_id}`);
|
||||
await refreshChatList(localStorage.token);
|
||||
|
||||
|
|
@ -4505,6 +4507,7 @@
|
|||
await chatId.set(_chatId);
|
||||
|
||||
if (!embedded) {
|
||||
saveDraft(getChatInputDraft(), _chatId, false);
|
||||
window.history.replaceState(window.history.state, '', `/c/${_chatId}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue