mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 06:45:24 +00:00
fixed knowledge attachment using # not filtering out knowledge files
This commit is contained in:
parent
aeb43f038c
commit
d42e8d2b67
1 changed files with 11 additions and 1 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
import Database from '$lib/components/icons/Database.svelte';
|
import Database from '$lib/components/icons/Database.svelte';
|
||||||
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
|
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
|
||||||
import Youtube from '$lib/components/icons/Youtube.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';
|
import Folder from '$lib/components/icons/Folder.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
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, {
|
fuse = new Fuse(items, {
|
||||||
keys: ['name', 'description']
|
keys: ['name', 'description']
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue