mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: history单独存
This commit is contained in:
parent
fcbdf51eb8
commit
4216e64ed6
2 changed files with 15 additions and 2 deletions
|
|
@ -362,4 +362,17 @@ const ChatGPTStorage = new LowDBStorage({
|
|||
directory: dataDir
|
||||
})
|
||||
|
||||
if (ChatGPTStorage.db.data.collections.history) {
|
||||
ChatGPTStorage.dropCollection('history').then(() => {
|
||||
logger.debug('drop older version history collection')
|
||||
}).catch(err => {
|
||||
logger.warn('failed to drop older version history collection', err)
|
||||
})
|
||||
}
|
||||
|
||||
export const ChatGPTHistoryStorage = new LowDBStorage({
|
||||
filename: 'history.json',
|
||||
directory: dataDir
|
||||
})
|
||||
|
||||
export default ChatGPTStorage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue