fix: history manager

This commit is contained in:
ikechan8370 2025-04-09 16:40:25 +08:00
parent 1788ee6d7d
commit 0c602d6cb3
2 changed files with 3 additions and 1 deletions

View file

@ -30,6 +30,7 @@ import { SQLiteProcessorsStorage } from './storage/sqlite/processors_storage.js'
import { SQLiteUserStateStorage } from './storage/sqlite/user_state_storage.js' import { SQLiteUserStateStorage } from './storage/sqlite/user_state_storage.js'
import { SQLiteToolsGroupStorage } from './storage/sqlite/tool_groups_storage.js' import { SQLiteToolsGroupStorage } from './storage/sqlite/tool_groups_storage.js'
import { checkMigrate } from './storage/sqlite/migrate.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() await userStateStorage.initialize()
toolsGroupStorage = new SQLiteToolsGroupStorage(dbPath) toolsGroupStorage = new SQLiteToolsGroupStorage(dbPath)
await toolsGroupStorage.initialize() await toolsGroupStorage.initialize()
historyStorage = new SQLiteHistoryManager(dbPath, path.join(dataDir, 'images'))
await checkMigrate() await checkMigrate()
break break
} }

View file

@ -13,7 +13,7 @@ export class YunzaiUserState {
this.settings = {} this.settings = {}
this.current = { this.current = {
conversationId, conversationId,
messageId: '' messageId: crypto.randomUUID()
} }
} }
} }