feat: persona binding
This commit is contained in:
@@ -595,6 +595,7 @@ export interface Database{
|
||||
name:string
|
||||
icon:string
|
||||
largePortrait?:boolean
|
||||
id?:string
|
||||
}[]
|
||||
assetWidth:number
|
||||
animationSpeed:number
|
||||
@@ -1005,6 +1006,7 @@ export interface Chat{
|
||||
scriptstate?:{[key:string]:string|number|boolean}
|
||||
modules?:string[]
|
||||
id?:string
|
||||
bindedPersona?:string
|
||||
}
|
||||
|
||||
export interface Message{
|
||||
|
||||
@@ -923,6 +923,11 @@ async function checkNewFormat() {
|
||||
return v
|
||||
})
|
||||
|
||||
db.personas = (db.personas ?? []).map((v) => {
|
||||
v.id ??= uuidv4()
|
||||
return v
|
||||
})
|
||||
|
||||
if(!db.formatversion){
|
||||
function checkParge(data:string){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user