mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Option to disable name forcing for instruct groups and personas
This commit is contained in:
@ -1846,7 +1846,7 @@
|
|||||||
<span data-i18n="Trim Incomplete Sentences">Trim Incomplete Sentences</span>
|
<span data-i18n="Trim Incomplete Sentences">Trim Incomplete Sentences</span>
|
||||||
</label>
|
</label>
|
||||||
<!-- Add margin since this is a child of above -->
|
<!-- Add margin since this is a child of above -->
|
||||||
<label style="margin-left: 1em;" class="checkbox_label" for="include_newline_checkbox">
|
<label class="checkbox_label indent20p" for="include_newline_checkbox">
|
||||||
<input id="include_newline_checkbox" type="checkbox" />
|
<input id="include_newline_checkbox" type="checkbox" />
|
||||||
<span data-i18n="Include Newline">Include Newline</span>
|
<span data-i18n="Include Newline">Include Newline</span>
|
||||||
</label>
|
</label>
|
||||||
@ -1890,6 +1890,10 @@
|
|||||||
<input id="instruct_names" type="checkbox" />
|
<input id="instruct_names" type="checkbox" />
|
||||||
<span data-i18n="Include Names">Include Names</span>
|
<span data-i18n="Include Names">Include Names</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label for="instruct_names_force_groups" class="checkbox_label indent20p">
|
||||||
|
<input id="instruct_names_force_groups" type="checkbox" />
|
||||||
|
<span data-i18n="Force for Groups and Personas">Force for Groups and Personas</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<label for="instruct_presets">
|
<label for="instruct_presets">
|
||||||
<span data-i18n="Presets">Presets</span>
|
<span data-i18n="Presets">Presets</span>
|
||||||
|
@ -177,6 +177,7 @@ let power_user = {
|
|||||||
preset: 'Alpaca',
|
preset: 'Alpaca',
|
||||||
separator_sequence: '',
|
separator_sequence: '',
|
||||||
macro: false,
|
macro: false,
|
||||||
|
names_force_groups: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
personas: {},
|
personas: {},
|
||||||
@ -853,6 +854,7 @@ function loadInstructMode() {
|
|||||||
{ id: "instruct_stop_sequence", property: "stop_sequence", isCheckbox: false },
|
{ id: "instruct_stop_sequence", property: "stop_sequence", isCheckbox: false },
|
||||||
{ id: "instruct_names", property: "names", isCheckbox: true },
|
{ id: "instruct_names", property: "names", isCheckbox: true },
|
||||||
{ id: "instruct_macro", property: "macro", isCheckbox: true },
|
{ id: "instruct_macro", property: "macro", isCheckbox: true },
|
||||||
|
{ id: "instruct_names_force_groups", property: "names_force_groups", isCheckbox: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
controls.forEach(control => {
|
controls.forEach(control => {
|
||||||
@ -929,7 +931,12 @@ export function fuzzySearchCharacters(searchValue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvatar, name1, name2) {
|
export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvatar, name1, name2) {
|
||||||
const includeNames = isNarrator ? false : (power_user.instruct.names || !!selected_group || !!forceAvatar);
|
let includeNames = isNarrator ? false : power_user.instruct.names;
|
||||||
|
|
||||||
|
if (!isNarrator && power_user.instruct.names_force_groups && (selected_group || forceAvatar)) {
|
||||||
|
includeNames = true;
|
||||||
|
}
|
||||||
|
|
||||||
let sequence = (isUser || isNarrator) ? power_user.instruct.input_sequence : power_user.instruct.output_sequence;
|
let sequence = (isUser || isNarrator) ? power_user.instruct.input_sequence : power_user.instruct.output_sequence;
|
||||||
|
|
||||||
if (power_user.instruct.macro) {
|
if (power_user.instruct.macro) {
|
||||||
|
Reference in New Issue
Block a user