mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 聊天记录适配TRSS+chronocat
This commit is contained in:
parent
dce7503c41
commit
95e730f250
3 changed files with 47 additions and 9 deletions
33
utils/version.js
Normal file
33
utils/version.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import fs from 'fs'
|
||||
|
||||
/**
|
||||
* from miao-plugin
|
||||
*
|
||||
* @type {any}
|
||||
*/
|
||||
let packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
||||
|
||||
const yunzaiVersion = packageJson.version
|
||||
const isV3 = yunzaiVersion[0] === '3'
|
||||
let isMiao = false; let isTrss = false
|
||||
let name = 'Yunzai-Bot'
|
||||
if (packageJson.name === 'miao-yunzai') {
|
||||
isMiao = true
|
||||
name = 'Miao-Yunzai'
|
||||
} else if (packageJson.name === 'trss-yunzai') {
|
||||
isMiao = true
|
||||
isTrss = true
|
||||
name = 'TRSS-Yunzai'
|
||||
}
|
||||
|
||||
let Version = {
|
||||
isV3,
|
||||
isMiao,
|
||||
isTrss,
|
||||
name,
|
||||
get yunzai () {
|
||||
return yunzaiVersion
|
||||
}
|
||||
}
|
||||
|
||||
export default Version
|
||||
Loading…
Add table
Add a link
Reference in a new issue