fixed knowledge attachment using # not filtering out knowledge files

This commit is contained in:
expruc 2025-10-17 21:34:57 +03:00
parent aeb43f038c
commit d42e8d2b67

View file

@ -13,7 +13,7 @@
import Database from '$lib/components/icons/Database.svelte';
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
import Youtube from '$lib/components/icons/Youtube.svelte';
import { folders } from '$lib/stores';
import { folders, config } from '$lib/stores';
import Folder from '$lib/components/icons/Folder.svelte';
const i18n = getContext('i18n');
@ -167,6 +167,16 @@
};
});
// if ($config?.features?.enable_individual_knowledge_file_attachments) {
// items = items.filter((item) => item.type === 'file');
// }
// else {
// items = items.filter((item) => item.type === 'collection');
// }
if (!($config?.features?.enable_individual_knowledge_file_attachments ?? true)) {
items = items.filter((it) => it.type !== 'file');
}
fuse = new Fuse(items, {
keys: ['name', 'description']
});