Begin refactoring model providers to be less anti-pattern

This commit is contained in:
Webifi
2023-08-15 20:32:30 -05:00
parent 7624ef7999
commit fb2290308f
23 changed files with 667 additions and 604 deletions

View File

@@ -30,11 +30,6 @@
return get(apiKeyStorage)
}
export const hasActiveModels = (): boolean => {
const globalSettings = get(globalStorage) || {}
return !!get(apiKeyStorage) || !!globalSettings.enablePetals
}
export const newChatID = (): number => {
const chats = get(chatsStorage)
const chatId = chats.reduce((maxId, chat) => Math.max(maxId, chat.id), 0) + 1