mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac: legacy detection
This commit is contained in:
parent
8f41db2f2e
commit
0c618b8145
2 changed files with 9 additions and 2 deletions
|
|
@ -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 a new issue