Merge branch 'main' into chat-like-conversation

This commit is contained in:
Michael Tanzer 2023-03-06 15:15:14 +00:00
commit 63a64417f1
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,12 @@
$: sortedChats = $chatsStorage.sort((a, b) => b.id - a.id); $: sortedChats = $chatsStorage.sort((a, b) => b.id - a.id);
$: apiKey = $apiKeyStorage; $: apiKey = $apiKeyStorage;
// Check if the API key is passed in as a "key" query parameter - if so, save it
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.has("key")) {
apiKeyStorage.set(urlParams.get("key")!);
}
let activeChatId: number; let activeChatId: number;
</script> </script>