From 7512d67ab68fe97bcd52fbb9a1275ef7e7c72a98 Mon Sep 17 00:00:00 2001 From: Webifi Date: Sun, 11 Jun 2023 18:21:52 -0500 Subject: [PATCH] Clean up types --- src/lib/EditMessage.svelte | 2 +- src/lib/Storage.svelte | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/EditMessage.svelte b/src/lib/EditMessage.svelte index 849dfc0..513d504 100644 --- a/src/lib/EditMessage.svelte +++ b/src/lib/EditMessage.svelte @@ -37,7 +37,7 @@ onMount(() => { original = message.content - defaultModel = chatSettings.model as any + defaultModel = chatSettings.model }) const edit = () => { diff --git a/src/lib/Storage.svelte b/src/lib/Storage.svelte index 4fce498..b9f7ba1 100644 --- a/src/lib/Storage.svelte +++ b/src/lib/Storage.svelte @@ -406,7 +406,7 @@ } export const deleteCustomProfile = (chatId:number, profileId:string) => { - if (isStaticProfile(profileId as any)) { + if (isStaticProfile(profileId)) { throw new Error('Sorry, you can\'t delete a static profile.') } const chats = get(chatsStorage) @@ -440,7 +440,7 @@ if (!profile.characterName || profile.characterName.length < 3) { throw new Error('Your profile\'s character needs a valid name.') } - if (isStaticProfile(profile.profile as any)) { + if (isStaticProfile(profile.profile)) { // throw new Error('Sorry, you can\'t modify a static profile. You can clone it though!') // Save static profile as new custom profile.profileName = newNameForProfile(profile.profileName)