[feat] made creator and character version editable

This commit is contained in:
kwaroran
2023-05-13 11:18:50 +09:00
parent 50db99dd47
commit a33fb084eb
3 changed files with 14 additions and 3 deletions

View File

@@ -72,7 +72,6 @@ export const languageEnglish = {
scenario: "A brief description about character's scenario. \n\n**It is not recommended to use this option. Describe it in character description instead.**",
utilityBot: "When activated, it ignores main prompt. \n\n**It is not recommended to use this option. Modifiy system prompt instead.**",
loreSelective: "If Selective mode is toggled, both Activation Key and Secondary key should have a match to activate the lore."
},
setup: {
chooseProvider: "Choose AI Provider",
@@ -240,5 +239,7 @@ export const languageEnglish = {
selective: "Selective",
SecondaryKeys: 'Secondary keys',
useGlobalSettings: "Use Global Settings",
recursiveScanning: "Recursive Scanning"
recursiveScanning: "Recursive Scanning",
creator: "Creator",
CharVersion: "Character Version"
}

View File

@@ -472,6 +472,12 @@
<textarea class="bg-transparent input-text mt-2 mb-2 text-gray-200 text-xs resize-none h-20 focus:bg-selected" autocomplete="off" bind:value={currentChar.data.scenario}></textarea>
{/if}
<span class="text-neutral-200">{language.creator}</span>
<input class="bg-transparent input-text mt-2 mb-2 text-gray-200 text-xs resize-none h-20 focus:bg-selected" autocomplete="off" bind:value={currentChar.data.additionalData.creator} />
<span class="text-neutral-200">{language.CharVersion}</span>
<input class="bg-transparent input-text mt-2 mb-2 text-gray-200 text-xs resize-none h-20 focus:bg-selected" autocomplete="off" bind:value={currentChar.data.additionalData.character_version} type="number" />
<span class="text-neutral-200 mt-2">{language.altGreet}</span>
<table class="contain w-full max-w-full tabler mt-2">
<tr>
@@ -513,7 +519,6 @@
</tr>
{/each}
</table>
{#if $DataBase.showUnrecommended || currentChar.data.utilityBot}
<div class="flex items-center mt-4">

View File

@@ -281,6 +281,11 @@ export function characterFormatUpdate(index:number|character){
cha.personality = cha.personality ?? ''
cha.scenario = cha.scenario ?? ''
cha.firstMsgIndex = cha.firstMsgIndex ?? -1
cha.additionalData = cha.additionalData ?? {
tag: [],
creator: '',
character_version: 0
}
}
if(checkNullish(cha.customscript)){