revert lorebook decorator handling for now

This commit is contained in:
kwaroran
2024-04-17 10:42:56 +09:00
parent e6dcedb86a
commit b17b980227

View File

@@ -187,23 +187,14 @@ export async function loadLoreBookPrompt(){
prompt:string prompt:string
}[] = [] }[] = []
activatiedPrompt = activatiedPrompt.filter((v) => { activatiedPrompt = activatiedPrompt.filter((v) => {
const decorated = decoratorParser(v) if(v.startsWith("@@@end")){
if(decorated.decorators['dont_activate']){ sactivated.push(v.replace('@@@end','').trim())
return false return false
} }
if(decorated.decorators['depth'] && decorated.decorators['depth'][0] === '0'){ if(v.startsWith('@@end')){
sactivated.push(decorated.prompt) sactivated.push(v.replace('@@end','').trim())
return false return false
} }
if(decorated.decorators['position']){
decoratedArray.push({
depth: -1,
pos: decorated.decorators['position'][0],
prompt: decorated.prompt
})
return false
}
if(decorated.decorators)
return true return true
}) })