Persona: add None position, fix double insert on In-chat position
| @@ -4553,6 +4553,7 @@ | ||
| 4553 | 4553 | <div data-newbie-hidden> |
| 4554 | 4554 | <label for="persona_description_position" data-i18n="Position:">Position:</label> |
| 4555 | 4555 | <select id="persona_description_position"> |
| 4556 | + <option value="9" data-i18n="None (disabled)">None (disabled)</option> | |
| 4556 | 4557 | <option value="0" data-i18n="In Story String / Prompt Manager">In Story String / Prompt Manager</option> |
| 4557 | 4558 | <option value="2" data-i18n="Top of Author's Note">Top of Author's Note</option> |
| 4558 | 4559 | <option value="3" data-i18n="Bottom of Author's Note">Bottom of Author's Note</option> |
| @@ -2705,7 +2705,7 @@ function addPersonaDescriptionExtensionPrompt() { | ||
| 2705 | 2705 | const INJECT_TAG = 'PERSONA_DESCRIPTION'; |
| 2706 | 2706 | setExtensionPrompt(INJECT_TAG, '', extension_prompt_types.IN_PROMPT, 0); |
| 2707 | 2707 | |
| 2708 | 2708 | if (!power_user.persona_description || power_user.persona_description_position === persona_description_positions.NONE) { |
| 2709 | 2709 | return; |
| 2710 | 2710 | } |
| 2711 | 2711 | |
| @@ -3726,7 +3726,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 3726 | 3726 | const storyStringParams = { |
| 3727 | 3727 | description: description, |
| 3728 | 3728 | personality: personality, |
| 3729 | - persona: persona, | |
| 3729 | + persona: power_user.persona_description_position == persona_description_positions.IN_PROMPT ? persona : '', | |
| 3730 | 3730 | scenario: scenario, |
| 3731 | 3731 | system: isInstruct ? system : '', |
| 3732 | 3732 | char: name2, |
| @@ -4302,7 +4302,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 4302 | 4302 | padding: power_user.token_padding, |
| 4303 | 4303 | main_api: main_api, |
| 4304 | 4304 | instruction: isInstruct ? substituteParams(power_user.prefer_character_prompt && system ? system : power_user.instruct.system_prompt) : '', |
| 4305 | 4305 | userPersona: (power_user.persona_descriptionpersona_description_position == persona_description_positions.IN_PROMPT ? (persona || '') : ''), |
| 4306 | 4306 | }; |
| 4307 | 4307 | |
| 4308 | 4308 | //console.log(additionalPromptStuff); |
| @@ -107,6 +107,7 @@ export const persona_description_positions = { | ||
| 107 | 107 | TOP_AN: 2, |
| 108 | 108 | BOTTOM_AN: 3, |
| 109 | 109 | AT_DEPTH: 4, |
| 110 | + NONE: 9, | |
| 110 | 111 | }; |
| 111 | 112 | |
| 112 | 113 | let power_user = { |