diff --git a/src/store/migrate.ts b/src/store/migrate.ts index 1b777a2..3e53c2e 100644 --- a/src/store/migrate.ts +++ b/src/store/migrate.ts @@ -1,5 +1,9 @@ import { LocalStorageInterface } from '@type/chat'; +import { defaultChatConfig } from '@constants/chat'; export const migrateV0 = (persistedState: LocalStorageInterface) => { - persistedState.chats.forEach((chat) => (chat.titleSet = false)); + persistedState.chats.forEach((chat) => { + chat.titleSet = false; + if (!chat.config) chat.config = { ...defaultChatConfig }; + }); };