mobile options

This commit is contained in:
Evgeny Poberezkin
2024-12-28 14:55:56 +00:00
parent 152679d46b
commit af21c9779a
+3 -2
View File
@@ -241,12 +241,13 @@ chatMigrateInitKey dbFilePrefix dbKey keepKey confirm backgroundMode = runExcept
agentStore <- migrate createAgentStore (agentStoreFile dbFilePrefix) confirmMigrations
liftIO $ initialize chatStore ChatDatabase {chatStore, agentStore}
where
opts = mobileChatOpts dbFilePrefix
initialize st db = do
user_ <- getActiveUser_ st
newChatController db user_ defaultMobileConfig (mobileChatOpts dbFilePrefix) backgroundMode
newChatController db user_ defaultMobileConfig opts backgroundMode
migrate createStore dbFile confirmMigrations =
ExceptT $
(first (DBMErrorMigration dbFile) <$> createStore dbFile dbKey keepKey confirmMigrations True)
(first (DBMErrorMigration dbFile) <$> createStore dbFile dbKey keepKey confirmMigrations (vaccumOnMigration $ coreOptions opts))
`catch` (pure . checkDBError)
`catchAll` (pure . dbError)
where