mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
/dupe
This commit is contained in:
@ -1084,6 +1084,17 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
|
||||
mes = mes.replaceAll(`${ch_name}:`, "");
|
||||
}
|
||||
|
||||
//function to hide any <tags> from AI response output
|
||||
/* if (power_user.removeXML && ch_name && !isUser && !isSystem) {
|
||||
//console.log('incoming mes')
|
||||
//console.log(mes)
|
||||
mes = mes.replaceAll(/</g, "<");
|
||||
mes = mes.replaceAll(/>/g, ">");
|
||||
mes = mes.replaceAll(/<<[^>>]+>>/g, "");
|
||||
//console.log('mes after removed <tags>')
|
||||
//console.log(mes)
|
||||
} */
|
||||
|
||||
return mes;
|
||||
}
|
||||
|
||||
@ -2796,6 +2807,11 @@ function getMultigenAmount() {
|
||||
}
|
||||
|
||||
async function DupeChar() {
|
||||
if (!this_chid) {
|
||||
toastr.warning('You must first select a character to duplicate!')
|
||||
return;
|
||||
}
|
||||
|
||||
const body = { avatar_url: characters[this_chid].avatar };
|
||||
const response = await fetch('/dupecharacter', {
|
||||
method: 'POST',
|
||||
@ -5987,6 +6003,8 @@ if (isPwaMode) { $("body").addClass('PWA') }
|
||||
$(document).ready(function () {
|
||||
//////////INPUT BAR FOCUS-KEEPING LOGIC/////////////
|
||||
|
||||
registerSlashCommand('dupe', DupeChar, [], "– duplicates the currently selected character", true, true);
|
||||
|
||||
setTimeout(function () {
|
||||
$("#groupControlsToggle").trigger('click');
|
||||
$("#groupCurrentMemberListToggle .inline-drawer-icon").trigger('click');
|
||||
|
Reference in New Issue
Block a user