feat: add probability decorator

This commit is contained in:
kwaroran
2024-06-04 19:36:09 +09:00
parent 658f14ec4e
commit 0e5e587c90
5 changed files with 34 additions and 2 deletions

View File

@@ -707,6 +707,7 @@ export interface loreBook{
data:string[]
},
useRegex?:boolean
bookVersion?:number
}
export interface character{

View File

@@ -33,6 +33,7 @@ import { startObserveDom } from "../observer";
import { removeDefaultHandler } from "src/main";
import { updateGuisize } from "../gui/guisize";
import { encodeCapKeySafe } from "./mobileStorage";
import { updateLorebooks } from "../characters";
//@ts-ignore
export const isTauri = !!window.__TAURI__
@@ -891,6 +892,12 @@ async function checkNewFormat() {
return v !== null
})
db.modules = (db.modules ?? []).map((v) => {
if(v.lorebook){
v.lorebook = updateLorebooks(v.lorebook)
}
return v
})
if(!db.formatversion){
function checkParge(data:string){