From a33fb084eb1afb7a5e537defc9c9cb0f82a4fa7d Mon Sep 17 00:00:00 2001 From: kwaroran Date: Sat, 13 May 2023 11:18:50 +0900 Subject: [PATCH] [feat] made creator and character version editable --- src/lang/en.ts | 5 +++-- src/lib/SideBars/CharConfig.svelte | 7 ++++++- src/ts/characters.ts | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index fbd2b0fa..fd3b9f89 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -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" } diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte index 945473fe..1169bef8 100644 --- a/src/lib/SideBars/CharConfig.svelte +++ b/src/lib/SideBars/CharConfig.svelte @@ -472,6 +472,12 @@ {/if} + {language.creator} + + + {language.CharVersion} + + {language.altGreet} @@ -513,7 +519,6 @@ {/each}
- {#if $DataBase.showUnrecommended || currentChar.data.utilityBot}
diff --git a/src/ts/characters.ts b/src/ts/characters.ts index 5cc19592..b9ff6089 100644 --- a/src/ts/characters.ts +++ b/src/ts/characters.ts @@ -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)){