mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
[Feature Request] Can we please have <xml_tags> visibility back? #907
This commit is contained in:
@ -2482,11 +2482,11 @@
|
|||||||
<div id="power-user-options-block" class="flex-container drawer33pWidth">
|
<div id="power-user-options-block" class="flex-container drawer33pWidth">
|
||||||
<div id="power-user-option-checkboxes">
|
<div id="power-user-option-checkboxes">
|
||||||
<h4 data-i18n="Power User Options">Power User Options</h4>
|
<h4 data-i18n="Power User Options">Power User Options</h4>
|
||||||
<label for="swipes-checkbox">
|
<label class="checkbox_label" for="swipes-checkbox">
|
||||||
<input id="swipes-checkbox" type="checkbox" />
|
<input id="swipes-checkbox" type="checkbox" />
|
||||||
<span data-i18n="Swipes">Swipes</span>
|
<span data-i18n="Swipes">Swipes</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="fuzzy_search_checkbox">
|
<label class="checkbox_label" for="fuzzy_search_checkbox">
|
||||||
<input id="fuzzy_search_checkbox" type="checkbox" />
|
<input id="fuzzy_search_checkbox" type="checkbox" />
|
||||||
<span data-i18n="Advanced Character Search">Advanced Character Search</span>
|
<span data-i18n="Advanced Character Search">Advanced Character Search</span>
|
||||||
</label>
|
</label>
|
||||||
@ -2504,13 +2504,15 @@
|
|||||||
Press "Send" to continue
|
Press "Send" to continue
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="auto-load-chat-checkbox"><input id="auto-load-chat-checkbox" type="checkbox" />
|
<label class="checkbox_label" for="auto-load-chat-checkbox">
|
||||||
|
<input id="auto-load-chat-checkbox" type="checkbox" />
|
||||||
<span data-i18n="Auto-load Last Chat">Auto-load Last Chat</span>
|
<span data-i18n="Auto-load Last Chat">Auto-load Last Chat</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="auto_save_msg_edits"><input id="auto_save_msg_edits" type="checkbox" />
|
<label class="checkbox_label" for="auto_save_msg_edits">
|
||||||
|
<input id="auto_save_msg_edits" type="checkbox" />
|
||||||
<span data-i18n="Auto-save Message Edits">Auto-save Message Edits</span>
|
<span data-i18n="Auto-save Message Edits">Auto-save Message Edits</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="auto_fix_generated_markdown">
|
<label class="checkbox_label" for="auto_fix_generated_markdown">
|
||||||
<input id="auto_fix_generated_markdown" type="checkbox" />
|
<input id="auto_fix_generated_markdown" type="checkbox" />
|
||||||
<span data-i18n="Auto-fix Markdown">Auto-fix Markdown</span>
|
<span data-i18n="Auto-fix Markdown">Auto-fix Markdown</span>
|
||||||
</label>
|
</label>
|
||||||
@ -2522,37 +2524,43 @@
|
|||||||
<input id="allow_name1_display" type="checkbox" />
|
<input id="allow_name1_display" type="checkbox" />
|
||||||
<span data-i18n="Allow {{user}}: in bot messages">Show {{user}}: in responses</span>
|
<span data-i18n="Allow {{user}}: in bot messages">Show {{user}}: in responses</span>
|
||||||
</label>
|
</label>
|
||||||
<!-- <label class="checkbox_label" for="removeXML">
|
<label class="checkbox_label" for="encode_tags">
|
||||||
<input id="removeXML" type="checkbox" />
|
<input id="encode_tags" type="checkbox" />
|
||||||
<span data-i18n="Remove XML/HTML tags from responses">Remove <tags> from responses</span>
|
<span data-i18n="Show tags in responses">Show <tags> in responses</span>
|
||||||
</label> -->
|
</label>
|
||||||
<label for="console_log_prompts">
|
<label class="checkbox_label" for="console_log_prompts">
|
||||||
<input id="console_log_prompts" type="checkbox" />
|
<input id="console_log_prompts" type="checkbox" />
|
||||||
<span data-i18n="Log prompts to console">Log prompts to console</span>
|
<span data-i18n="Log prompts to console">Log prompts to console</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="render_formulas">
|
<label class="checkbox_label" for="render_formulas">
|
||||||
<input id="render_formulas" type="checkbox" />
|
<input id="render_formulas" type="checkbox" />
|
||||||
<span data-i18n="Render Formulas">Render Formulas</span>
|
<span data-i18n="Render Formulas">Render Formulas</span>
|
||||||
<a href="https://docs.sillytavern.app/usage/core-concepts/uicustomization/#formulas-rendering" class="notes-link" target="_blank">
|
<a href="https://docs.sillytavern.app/usage/core-concepts/uicustomization/#formulas-rendering" class="notes-link" target="_blank">
|
||||||
<span class="note-link-span">?</span>
|
<span class="note-link-span">?</span>
|
||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
||||||
<label for="never_resize_avatars"><input id="never_resize_avatars" type="checkbox" />
|
<label class="checkbox_label" for="never_resize_avatars">
|
||||||
|
<input id="never_resize_avatars" type="checkbox" />
|
||||||
<span data-i18n="Never resize avatars">Never resize avatars</span>
|
<span data-i18n="Never resize avatars">Never resize avatars</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="show_card_avatar_urls"><input id="show_card_avatar_urls" type="checkbox" />
|
<label class="checkbox_label" for="show_card_avatar_urls">
|
||||||
|
<input id="show_card_avatar_urls" type="checkbox" />
|
||||||
<span data-i18n="Show avatar filenames">Show avatar filenames</span>
|
<span data-i18n="Show avatar filenames">Show avatar filenames</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="import_card_tags"><input id="import_card_tags" type="checkbox" />
|
<label class="checkbox_label" for="import_card_tags">
|
||||||
|
<input id="import_card_tags" type="checkbox" />
|
||||||
<span data-i18n="Import Card Tags">Import Card Tags</span>
|
<span data-i18n="Import Card Tags">Import Card Tags</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="confirm_message_delete"><input id="confirm_message_delete" type="checkbox" />
|
<label class="checkbox_label" for="confirm_message_delete">
|
||||||
|
<input id="confirm_message_delete" type="checkbox" />
|
||||||
<span data-i18n="Confirm message deletion">Confirm message deletion</span>
|
<span data-i18n="Confirm message deletion">Confirm message deletion</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="spoiler_free_mode"><input id="spoiler_free_mode" type="checkbox" />
|
<label class="checkbox_label" for="spoiler_free_mode">
|
||||||
|
<input id="spoiler_free_mode" type="checkbox" />
|
||||||
<span data-i18n="Spoiler Free Mode">Spoiler Free Mode</span>
|
<span data-i18n="Spoiler Free Mode">Spoiler Free Mode</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="relaxed_api_urls" title="Reduce the formatting requirements on API URLS"><input id="relaxed_api_urls" type="checkbox" />
|
<label class="checkbox_label" for="relaxed_api_urls" title="Reduce the formatting requirements on API URLS">
|
||||||
|
<input id="relaxed_api_urls" type="checkbox" />
|
||||||
<span data-i18n="Relaxed API URLS">Relaxed API URLS</span>
|
<span data-i18n="Relaxed API URLS">Relaxed API URLS</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
@ -1269,8 +1269,10 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
|
|||||||
mes = fixMarkdown(mes);
|
mes = fixMarkdown(mes);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (this_chid != undefined && !isSystem)
|
if (!isSystem && power_user.encode_tags) {
|
||||||
// mes = mes.replaceAll("<", "<").replaceAll(">", ">"); //for welcome message
|
mes = mes.replaceAll("<", "<").replaceAll(">", ">");
|
||||||
|
}
|
||||||
|
|
||||||
if ((this_chid === undefined || this_chid === "invalid-safety-id") && !selected_group) {
|
if ((this_chid === undefined || this_chid === "invalid-safety-id") && !selected_group) {
|
||||||
mes = mes
|
mes = mes
|
||||||
.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>")
|
.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>")
|
||||||
|
@ -192,6 +192,7 @@ let power_user = {
|
|||||||
custom_stopping_strings: '',
|
custom_stopping_strings: '',
|
||||||
custom_stopping_strings_macro: true,
|
custom_stopping_strings_macro: true,
|
||||||
fuzzy_search: false,
|
fuzzy_search: false,
|
||||||
|
encode_tags: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
let themes = [];
|
let themes = [];
|
||||||
@ -686,6 +687,7 @@ function loadPowerUserSettings(settings, data) {
|
|||||||
$("#custom_stopping_strings_macro").prop("checked", power_user.custom_stopping_strings_macro);
|
$("#custom_stopping_strings_macro").prop("checked", power_user.custom_stopping_strings_macro);
|
||||||
$('#fuzzy_search_checkbox').prop("checked", power_user.fuzzy_search);
|
$('#fuzzy_search_checkbox').prop("checked", power_user.fuzzy_search);
|
||||||
$('#persona_show_notifications').prop("checked", power_user.persona_show_notifications);
|
$('#persona_show_notifications').prop("checked", power_user.persona_show_notifications);
|
||||||
|
$('#encode_tags').prop("checked", power_user.encode_tags);
|
||||||
|
|
||||||
$("#console_log_prompts").prop("checked", power_user.console_log_prompts);
|
$("#console_log_prompts").prop("checked", power_user.console_log_prompts);
|
||||||
$('#auto_fix_generated_markdown').prop("checked", power_user.auto_fix_generated_markdown);
|
$('#auto_fix_generated_markdown').prop("checked", power_user.auto_fix_generated_markdown);
|
||||||
@ -2032,6 +2034,12 @@ $(document).ready(() => {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#encode_tags').on('input', async function () {
|
||||||
|
power_user.encode_tags = !!$(this).prop('checked');
|
||||||
|
await reloadCurrentChat();
|
||||||
|
saveSettingsDebounced();
|
||||||
|
});
|
||||||
|
|
||||||
$(window).on('focus', function () {
|
$(window).on('focus', function () {
|
||||||
browser_has_focus = true;
|
browser_has_focus = true;
|
||||||
});
|
});
|
||||||
|
@ -2776,7 +2776,6 @@ input[type="range"]::-webkit-slider-thumb {
|
|||||||
#power-user-option-checkboxes {
|
#power-user-option-checkboxes {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: 5px;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user