Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
1a06b0ce
Commit
1a06b0ce
authored
Jan 18, 2024
by
Timothy J. Baek
Browse files
fix: old chat log import issue
parent
4e6207f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/lib/components/chat/SettingsModal.svelte
src/lib/components/chat/SettingsModal.svelte
+9
-2
No files found.
src/lib/components/chat/SettingsModal.svelte
View file @
1a06b0ce
...
...
@@ -142,13 +142,20 @@
importChats(chats);
};
reader.readAsText(importFiles[0]);
if (importFiles.length > 0) {
reader.readAsText(importFiles[0]);
}
}
const importChats = async (_chats) => {
for (const chat of _chats) {
console.log(chat);
await createNewChat(localStorage.token, chat.chat);
if (chat.chat) {
await createNewChat(localStorage.token, chat.chat);
} else {
await createNewChat(localStorage.token, chat);
}
}
await chats.set(await getChatList(localStorage.token));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment