feat: enable regex for lorebook search
This commit is contained in:
@@ -125,6 +125,7 @@ export const languageEnglish = {
|
||||
dynamicAssets: "If enabled, if the asset name is not found when processing data, it will try to find the closest asset name by using vector search and replace it with the closest asset name.",
|
||||
dynamicAssetsEditDisplay: "If enabled, the dynamic assets will be applied to the Modify Display stage too. however, this can cause performance issues.",
|
||||
nickname: "Nickname would used be in {{char}} or <char> in chat instead of character's name if it is set.",
|
||||
useRegexLorebook: "If enabled, it will use regex for lorebook search, instead of string matching. it uses /regex/flags format.",
|
||||
},
|
||||
setup: {
|
||||
chooseProvider: "Choose AI Provider",
|
||||
@@ -606,4 +607,5 @@ export const languageEnglish = {
|
||||
risupresetDesc: "Risupreset format is a format specifically designed for RisuAI presets.",
|
||||
jsonDesc: "JSON format is a format that is easy to read and write for both humans and machines.",
|
||||
nickname: "Nickname",
|
||||
useRegexLorebook: "Use Regex"
|
||||
}
|
||||
@@ -56,7 +56,7 @@
|
||||
<span class="text-textcolor mt-6">{language.name} <Help key="loreName"/></span>
|
||||
<TextInput size="sm" bind:value={value.comment}/>
|
||||
{#if !lorePlus}
|
||||
{#if !value.alwaysActive}
|
||||
{#if !value.alwaysActive && !value.useRegex}
|
||||
<span class="text-textcolor mt-6">{language.activationKeys} <Help key="loreActivationKey"/></span>
|
||||
<span class="text-xs text-textcolor2">{language.activationKeysInfo}</span>
|
||||
<TextInput size="sm" bind:value={value.key}/>
|
||||
@@ -95,12 +95,18 @@
|
||||
<div class="flex items-center mt-4">
|
||||
<Check bind:check={value.alwaysActive} name={language.alwaysActive}/>
|
||||
</div>
|
||||
{#if !lorePlus}
|
||||
{#if !lorePlus && !value.useRegex}
|
||||
<div class="flex items-center mt-2">
|
||||
<Check bind:check={value.selective} name={language.selective}/>
|
||||
<Help key="loreSelective" name={language.selective}/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if !lorePlus && !value.alwaysActive}
|
||||
<div class="flex items-center mt-2">
|
||||
<Check bind:check={value.useRegex} name={language.useRegexLorebook}/>
|
||||
<Help key="useRegexLorebook" name={language.useRegexLorebook}/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if !lorePlus}
|
||||
<div class="flex items-center mt-2 mb-6">
|
||||
{#if value.activationPercent === undefined || value.activationPercent === null}
|
||||
|
||||
Reference in New Issue
Block a user