remove global regex and lorebook and add convertion to modules

This commit is contained in:
kwaroran
2024-02-07 02:50:18 +09:00
parent e414b317d1
commit 8ed4555b2f
4 changed files with 44 additions and 43 deletions

View File

@@ -12,6 +12,7 @@ import { calcString } from './process/infunctions';
import { findCharacterbyId } from './util';
import { getInlayImage } from './image';
import { autoMarkNew } from './plugins/automark';
import { getModuleLorebooks } from './process/modules';
const mconverted = new Marked({
gfm: true,
@@ -490,8 +491,7 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
const chat = selchar.chats[selchar.chatPage]
const characterLore = (achara.type === 'group') ? [] : (achara.globalLore ?? [])
const chatLore = chat.localLore ?? []
const globalLore = db.loreBook[db.loreBookPage]?.data ?? []
const fullLore = characterLore.concat(chatLore.concat(globalLore))
const fullLore = characterLore.concat(chatLore.concat(getModuleLorebooks()))
return fullLore.map((f) => {
return JSON.stringify(f)
}).join("§\n")