mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#781 Don't add You stopping string for non-Pygmalion models
This commit is contained in:
@ -1227,7 +1227,7 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
mes = DOMPurify.sanitize(mes);
|
mes = DOMPurify.sanitize(mes);
|
||||||
|
|
||||||
return mes;
|
return mes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1635,6 +1635,10 @@ function getStoppingStrings(isImpersonate, addSpace) {
|
|||||||
|
|
||||||
result.push(userString);
|
result.push(userString);
|
||||||
|
|
||||||
|
if (!is_pygmalion && result.includes(youString)) {
|
||||||
|
result.splice(result.indexOf(youString), 1);
|
||||||
|
}
|
||||||
|
|
||||||
// Add other group members as the stopping strings
|
// Add other group members as the stopping strings
|
||||||
if (selected_group) {
|
if (selected_group) {
|
||||||
const group = groups.find(x => x.id === selected_group);
|
const group = groups.find(x => x.id === selected_group);
|
||||||
@ -6878,10 +6882,10 @@ function doCharListDisplaySwitch() {
|
|||||||
/**
|
/**
|
||||||
* Function to handle the deletion of a character, given a specific popup type and character ID.
|
* Function to handle the deletion of a character, given a specific popup type and character ID.
|
||||||
* If popup type equals "del_ch", it will proceed with deletion otherwise it will exit the function.
|
* If popup type equals "del_ch", it will proceed with deletion otherwise it will exit the function.
|
||||||
* It fetches the delete character route, sending necessary parameters, and in case of success,
|
* It fetches the delete character route, sending necessary parameters, and in case of success,
|
||||||
* it proceeds to delete character from UI and saves settings.
|
* it proceeds to delete character from UI and saves settings.
|
||||||
* In case of error during the fetch request, it logs the error details.
|
* In case of error during the fetch request, it logs the error details.
|
||||||
*
|
*
|
||||||
* @param {string} popup_type - The type of popup currently active.
|
* @param {string} popup_type - The type of popup currently active.
|
||||||
* @param {string} this_chid - The character ID to be deleted.
|
* @param {string} this_chid - The character ID to be deleted.
|
||||||
*/
|
*/
|
||||||
@ -6913,13 +6917,13 @@ export async function handleDeleteCharacter(popup_type, this_chid) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to delete a character from UI after character deletion API success.
|
* Function to delete a character from UI after character deletion API success.
|
||||||
* It manages necessary UI changes such as closing advanced editing popup, unsetting
|
* It manages necessary UI changes such as closing advanced editing popup, unsetting
|
||||||
* character ID, resetting characters array and chat metadata, deselecting character's tab
|
* character ID, resetting characters array and chat metadata, deselecting character's tab
|
||||||
* panel, removing character name from navigation tabs, clearing chat, removing character's
|
* panel, removing character name from navigation tabs, clearing chat, removing character's
|
||||||
* avatar from tag_map, fetching updated list of characters and updating the 'deleted
|
* avatar from tag_map, fetching updated list of characters and updating the 'deleted
|
||||||
* character' message.
|
* character' message.
|
||||||
* It also ensures to save the settings after all the operations.
|
* It also ensures to save the settings after all the operations.
|
||||||
*
|
*
|
||||||
* @param {string} name - The name of the character to be deleted.
|
* @param {string} name - The name of the character to be deleted.
|
||||||
* @param {string} avatar - The avatar URL of the character to be deleted.
|
* @param {string} avatar - The avatar URL of the character to be deleted.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user