mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
enh: restore tags from chat import
This commit is contained in:
@@ -35,6 +35,7 @@ export const createNewChat = async (token: string, chat: object) => {
|
||||
export const importChat = async (
|
||||
token: string,
|
||||
chat: object,
|
||||
meta: object | null,
|
||||
pinned?: boolean,
|
||||
folderId?: string | null
|
||||
) => {
|
||||
@@ -49,6 +50,7 @@ export const importChat = async (
|
||||
},
|
||||
body: JSON.stringify({
|
||||
chat: chat,
|
||||
meta: meta ?? {},
|
||||
pinned: pinned,
|
||||
folder_id: folderId
|
||||
})
|
||||
|
||||
@@ -211,8 +211,9 @@
|
||||
const importChatHandler = async (items, pinned = false, folderId = null) => {
|
||||
console.log('importChatHandler', items, pinned, folderId);
|
||||
for (const item of items) {
|
||||
console.log(item);
|
||||
if (item.chat) {
|
||||
await importChat(localStorage.token, item.chat, pinned, folderId);
|
||||
await importChat(localStorage.token, item.chat, item?.meta ?? {}, pinned, folderId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user