mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac
This commit is contained in:
parent
9677871ce7
commit
af34e414e1
2 changed files with 6 additions and 1 deletions
|
|
@ -508,6 +508,7 @@
|
|||
const savedModelIds = async () => {
|
||||
if (
|
||||
$selectedFolder &&
|
||||
selectedModels.filter((modelId) => modelId !== '').length > 0 &&
|
||||
JSON.stringify($selectedFolder?.data?.model_ids) !== JSON.stringify(selectedModels)
|
||||
) {
|
||||
const res = await updateFolderById(localStorage.token, $selectedFolder.id, {
|
||||
|
|
|
|||
|
|
@ -39,9 +39,13 @@
|
|||
};
|
||||
|
||||
$: if (selectedModels.length > 0 && $models.length > 0) {
|
||||
selectedModels = selectedModels.map((model) =>
|
||||
const _selectedModels = selectedModels.map((model) =>
|
||||
$models.map((m) => m.id).includes(model) ? model : ''
|
||||
);
|
||||
|
||||
if (JSON.stringify(_selectedModels) !== JSON.stringify(selectedModels)) {
|
||||
selectedModels = _selectedModels;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue