[feat] lorebook fullWordMatching

This commit is contained in:
kwaroran
2023-07-26 19:52:58 +09:00
parent dbf3d89e44
commit b4fbd4c1b4
5 changed files with 14 additions and 3 deletions

View File

@@ -275,7 +275,8 @@ async function importSpecv2(card:CharacterCardV2, img?:Uint8Array, mode?:'hub'|'
loresettings = {
tokenBudget:charbook.token_budget,
scanDepth:charbook.scan_depth,
recursiveScanning: charbook.recursive_scanning
recursiveScanning: charbook.recursive_scanning,
fullWordMatching: charbook?.extensions?.risu_fullWordMatching ?? false,
}
}
@@ -382,6 +383,9 @@ async function createBaseV2(char:character) {
case_sensitive: caseSensitive,
})
}
char.loreExt ??= {}
char.loreExt.risu_fullWordMatching = char.loreSettings?.fullWordMatching ?? false
const card:CharacterCardV2 = {
spec: "chara_card_v2",