refac
This commit is contained in:
1 parent
517cd8d102
commit
55cb98ff56
2 files changed
+5
-6
No files matched your search
@@ -2977,12 +2977,13 @@
|
|||||||
const loaded = chat?.chat ?? {};
|
const loaded = chat?.chat ?? {};
|
||||||
if (equal(params, loaded.params ?? {}) && equal(chatFiles, loaded.files ?? [])) return;
|
if (equal(params, loaded.params ?? {}) && equal(chatFiles, loaded.files ?? [])) return;
|
||||||
|
|
||||||
const res = await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
|
const res = await updateChatById(localStorage.token, $chatId, {
|
||||||
(err) => {
|
params,
|
||||||
|
files: chatFiles
|
||||||
|
}).catch((err) => {
|
||||||
console.error('[controls autosave]', err);
|
console.error('[controls autosave]', err);
|
||||||
return null;
|
return null;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
// Refresh the dedupe baseline so a later revert still saves.
|
// Refresh the dedupe baseline so a later revert still saves.
|
||||||
if (res) chat = res;
|
if (res) chat = res;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -254,8 +254,6 @@
|
|||||||
return allModels;
|
return allModels;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const enableAllHandler = async () => {
|
const enableAllHandler = async () => {
|
||||||
const allModels = await fetchAllWorkspaceModels();
|
const allModels = await fetchAllWorkspaceModels();
|
||||||
const modelsToEnable = allModels.filter((m) => !(m.is_active ?? true));
|
const modelsToEnable = allModels.filter((m) => !(m.is_active ?? true));
|
||||||
|
|||||||
Reference in new issue
Block a user