mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-13 01:02:25 -06:00
fix: persist control revert to loaded value (#25793)
This commit is contained in:
@@ -2948,9 +2948,14 @@
|
||||
const loaded = chat?.chat ?? {};
|
||||
if (equal(params, loaded.params ?? {}) && equal(chatFiles, loaded.files ?? [])) return;
|
||||
|
||||
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
|
||||
console.error('[controls autosave]', err)
|
||||
const res = await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
|
||||
(err) => {
|
||||
console.error('[controls autosave]', err);
|
||||
return null;
|
||||
}
|
||||
);
|
||||
// Refresh the dedupe baseline so a later revert still saves.
|
||||
if (res) chat = res;
|
||||
};
|
||||
|
||||
const MAX_DRAFT_LENGTH = 5000;
|
||||
|
||||
Reference in New Issue
Block a user