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

Feat: Add ChatGPT import functionality
This commit is contained in:
Timothy Jaeryang Baek 2024-01-17 14:50:28 -08:00 committed by GitHub
commit 578e78cb39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 110 additions and 21 deletions

View file

@ -200,8 +200,15 @@
await chatId.set('local');
}
await tick();
}
} else if (chat.chat["models"] != selectedModels) {
// If model is not saved in DB, then save selectedmodel when message is sent
chat = await updateChatById(localStorage.token, $chatId, {
models: selectedModels
});
await chats.set(await getChatList(localStorage.token));
}
// Reset chat input textarea
prompt = '';
files = [];
@ -696,7 +703,7 @@
<div class="min-h-screen w-full flex justify-center">
<div class=" py-2.5 flex flex-col justify-between w-full">
<div class="max-w-2xl mx-auto w-full px-3 md:px-0 mt-10">
<ModelSelector bind:selectedModels disabled={messages.length > 0} />
<ModelSelector bind:selectedModels disabled={messages.length > 0 && !selectedModels.includes('')} />
</div>
<div class=" h-full mt-10 mb-32 w-full flex flex-col">