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
ff33aa37
Unverified
Commit
ff33aa37
authored
Jan 18, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Jan 18, 2024
Browse files
Merge pull request #522 from ollama-webui/import-chat-fix
fix: old chat log import issue
parents
4e6207f8
1a06b0ce
Changes
1
Show 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 @
ff33aa37
...
@@ -142,13 +142,20 @@
...
@@ -142,13 +142,20 @@
importChats(chats);
importChats(chats);
};
};
if (importFiles.length > 0) {
reader.readAsText(importFiles[0]);
reader.readAsText(importFiles[0]);
}
}
}
const importChats = async (_chats) => {
const importChats = async (_chats) => {
for (const chat of _chats) {
for (const chat of _chats) {
console.log(chat);
console.log(chat);
if (chat.chat) {
await createNewChat(localStorage.token, chat.chat);
await createNewChat(localStorage.token, chat.chat);
} else {
await createNewChat(localStorage.token, chat);
}
}
}
await chats.set(await getChatList(localStorage.token));
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