diff --git a/models/chaite/cloud.js b/models/chaite/cloud.js index f33f294..bd3b669 100644 --- a/models/chaite/cloud.js +++ b/models/chaite/cloud.js @@ -30,6 +30,7 @@ import { SQLiteProcessorsStorage } from './storage/sqlite/processors_storage.js' import { SQLiteUserStateStorage } from './storage/sqlite/user_state_storage.js' import { SQLiteToolsGroupStorage } from './storage/sqlite/tool_groups_storage.js' import { checkMigrate } from './storage/sqlite/migrate.js' +import { SQLiteHistoryManager } from './storage/sqlite/history_manager.js' /** * 认证,以便共享上传 @@ -144,6 +145,7 @@ export async function initChaite () { await userStateStorage.initialize() toolsGroupStorage = new SQLiteToolsGroupStorage(dbPath) await toolsGroupStorage.initialize() + historyStorage = new SQLiteHistoryManager(dbPath, path.join(dataDir, 'images')) await checkMigrate() break } diff --git a/models/chaite/storage/lowdb/user_state_storage.js b/models/chaite/storage/lowdb/user_state_storage.js index 935f082..d1e8bc6 100644 --- a/models/chaite/storage/lowdb/user_state_storage.js +++ b/models/chaite/storage/lowdb/user_state_storage.js @@ -13,7 +13,7 @@ export class YunzaiUserState { this.settings = {} this.current = { conversationId, - messageId: '' + messageId: crypto.randomUUID() } } }