mirror of
https://github.com/open-webui/open-webui
synced 2025-02-21 12:29:29 +00:00
refac: legacy detection
This commit is contained in:
parent
8f41db2f2e
commit
0c618b8145
@ -104,7 +104,7 @@
|
|||||||
items = [...$knowledge, ...legacy_collections].map((item) => {
|
items = [...$knowledge, ...legacy_collections].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
...{ legacy: item?.legacy ?? item?.meta?.document ?? undefined }
|
...(item?.legacy || item?.meta?.legacy || item?.meta?.document ? { legacy: true } : {})
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -44,7 +44,14 @@
|
|||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
items = [...$knowledge, ...legacy_collections];
|
items = [...$knowledge, ...legacy_collections].map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
...(item?.legacy || item?.meta?.legacy || item?.meta?.document ? { legacy: true } : {})
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(items);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user