"vscode:/vscode.git/clone" did not exist on "71a6b899a506ab23638ae1317f81e70e74c34b09"
Unverified Commit ff33aa37 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #522 from ollama-webui/import-chat-fix

fix: old chat log import issue
parents 4e6207f8 1a06b0ce
......@@ -142,13 +142,20 @@
importChats(chats);
};
if (importFiles.length > 0) {
reader.readAsText(importFiles[0]);
}
}
const importChats = async (_chats) => {
for (const chat of _chats) {
console.log(chat);
if (chat.chat) {
await createNewChat(localStorage.token, chat.chat);
} else {
await createNewChat(localStorage.token, chat);
}
}
await chats.set(await getChatList(localStorage.token));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment