"src/vscode:/vscode.git/clone" did not exist on "69cc137a736b487761e27963dedd03be816a5924"
Unverified Commit 5e32db1c authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #486 from bhulston/fix/chat-imports

Fix/chat imports
parents 26f7a1c6 4b3acfa4
......@@ -141,7 +141,7 @@
const importChats = async (_chats) => {
for (const chat of _chats) {
console.log(chat);
await createNewChat(localStorage.token, chat);
await createNewChat(localStorage.token, chat.chat);
}
await chats.set(await getChatList(localStorage.token));
......
......@@ -7,7 +7,7 @@
import { page } from '$app/stores';
import { models, modelfiles, user, settings, chats, chatId, config } from '$lib/stores';
import { copyToClipboard, splitStream } from '$lib/utils';
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
import { generateChatCompletion, generateTitle } from '$lib/apis/ollama';
import { createNewChat, getChatById, getChatList, updateChatById } from '$lib/apis/chats';
......@@ -103,7 +103,7 @@
selectedModels =
(chatContent?.models ?? undefined) !== undefined
? chatContent.models
: [chatContent.model ?? ''];
: [chatContent.models ?? ''];
history =
(chatContent?.history ?? undefined) !== undefined
? chatContent.history
......
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