refac
This commit is contained in:
1 parent
83890f18b9
commit
7594823edd
1 file changed
+4
@@ -181,6 +181,7 @@
|
|||||||
let files = [];
|
let files = [];
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
|
|
||||||
$: if (chatIdProp) {
|
$: if (chatIdProp) {
|
||||||
navigateHandler();
|
navigateHandler();
|
||||||
}
|
}
|
||||||
@@ -2824,6 +2825,9 @@
|
|||||||
|
|
||||||
const saveControls = async () => {
|
const saveControls = async () => {
|
||||||
if (!$chatId || $temporaryChatEnabled) return;
|
if (!$chatId || $temporaryChatEnabled) return;
|
||||||
|
const loaded = chat?.chat ?? {};
|
||||||
|
if (equal(params, loaded.params ?? {}) && equal(chatFiles, loaded.files ?? [])) return;
|
||||||
|
|
||||||
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
|
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
|
||||||
console.error('[controls autosave]', err)
|
console.error('[controls autosave]', err)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user