From cc5b69a816ea6e5171d217d99cff32bff8d8ca65 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 8 Nov 2023 14:51:38 +0900 Subject: [PATCH] [feat] charjs --- src/lang/en.ts | 2 ++ src/lib/SideBars/CharConfig.svelte | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/lang/en.ts b/src/lang/en.ts index 93d44064..dbaff67e 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -95,6 +95,7 @@ export const languageEnglish = { + "\n\n Additionaly, you can use these with additional assets:" + "\n - `{{bg::}}`: inject the background as asset", additionalText: "The text that would be added to Character Description only when ai thinks its needed, so you can put long texts here. seperate with double newlines.", + charjs: "A javascript code that would run with character. for example, you can check `getCharacter()` function in the source code.", }, setup: { chooseProvider: "Choose AI Provider", @@ -438,4 +439,5 @@ export const languageEnglish = { defaultPrompt: "Default Prompt", additionalText: 'Additional Description', seed: "Seed", + charjs: "CharacterJS" } \ No newline at end of file diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte index 7ca95044..75068ebe 100644 --- a/src/lib/SideBars/CharConfig.svelte +++ b/src/lib/SideBars/CharConfig.svelte @@ -515,6 +515,9 @@ currentChar.data.triggerscript = script } }}> + + {language.charjs} + {/if} {:else if subMenu === 5} {#if currentChar.type === 'character'}