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
}[] = []
activatiedPrompt = activatiedPrompt.filter((v) => {
const decorated = decoratorParser(v)
if(decorated.decorators['dont_activate']){
if(v.startsWith("@@@end")){
sactivated.push(v.replace('@@@end','').trim())
return false
}
if(decorated.decorators['depth'] && decorated.decorators['depth'][0] === '0'){
sactivated.push(decorated.prompt)
if(v.startsWith('@@end')){
sactivated.push(v.replace('@@end','').trim())
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
})