mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
added #poe_api-presets ID to auto-switching routine
This commit is contained in:
@ -828,7 +828,7 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) {
|
||||
mes = mes.replace(/\n/g, "<br/>");
|
||||
mes = mes.trim();
|
||||
|
||||
mes = mes.replace(/<code>[\s\S]*?<\/code>/g, function(match) {
|
||||
mes = mes.replace(/<code>[\s\S]*?<\/code>/g, function (match) {
|
||||
return match.replace(/&/g, '&');
|
||||
});
|
||||
}
|
||||
@ -1646,7 +1646,7 @@ async function Generate(type, automatic_trigger, force_name2) {
|
||||
'seed': textgenerationwebui_settings.seed,
|
||||
}
|
||||
];
|
||||
generate_data = { "data": [ JSON.stringify(data) ]};
|
||||
generate_data = { "data": [JSON.stringify(data)] };
|
||||
}
|
||||
|
||||
if (main_api == 'novel') {
|
||||
@ -1961,8 +1961,8 @@ async function saveChat(chat_name) {
|
||||
chat[i].mes = str;
|
||||
chat[i].name = default_user_name;
|
||||
} else if (i !== chat.length - 1 && chat[i].swipe_id !== undefined) {
|
||||
// delete chat[i].swipes;
|
||||
// delete chat[i].swipe_id;
|
||||
// delete chat[i].swipes;
|
||||
// delete chat[i].swipe_id;
|
||||
}
|
||||
});
|
||||
var save_chat = [
|
||||
@ -2134,7 +2134,7 @@ function changeMainAPI() {
|
||||
"poe": {
|
||||
apiSettings: $("#poe_settings"),
|
||||
apiConnector: $("#poe_api"),
|
||||
apiPresets: $(""),
|
||||
apiPresets: $("#poe_api-presets"),
|
||||
apiRanges: $("#range_block_poe"),
|
||||
maxContextElem: $("#max_context_block"),
|
||||
amountGenElem: $("#amount_gen_block"),
|
||||
@ -2819,7 +2819,7 @@ function setExtensionPrompt(key, value, position, depth) {
|
||||
}
|
||||
|
||||
function updateChatMetadata(newValues, reset) {
|
||||
chat_metadata = reset? { ...newValues } : { ...chat_metadata, ...newValues };
|
||||
chat_metadata = reset ? { ...newValues } : { ...chat_metadata, ...newValues };
|
||||
}
|
||||
|
||||
function callPopup(text, type) {
|
||||
@ -3032,7 +3032,7 @@ function closeMessageEditor() {
|
||||
|
||||
function setGenerationProgress(progress) {
|
||||
if (!progress) {
|
||||
$('#send_textarea').css({'background': '', 'transition': ''});
|
||||
$('#send_textarea').css({ 'background': '', 'transition': '' });
|
||||
}
|
||||
else {
|
||||
$('#send_textarea').css({
|
||||
@ -3087,7 +3087,7 @@ $(document).ready(function () {
|
||||
///// SWIPE BUTTON CLICKS ///////
|
||||
|
||||
$(document).on('click', '.swipe_right', function () { //when we click swipe right button
|
||||
if (chat.length -1 === Number(this_edit_mes_id)) {
|
||||
if (chat.length - 1 === Number(this_edit_mes_id)) {
|
||||
closeMessageEditor();
|
||||
}
|
||||
|
||||
@ -3227,7 +3227,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(document).on('click', '.swipe_left', function () { // when we swipe left..but no generation.
|
||||
if (chat.length -1 === Number(this_edit_mes_id)) {
|
||||
if (chat.length - 1 === Number(this_edit_mes_id)) {
|
||||
closeMessageEditor();
|
||||
}
|
||||
|
||||
@ -4292,9 +4292,9 @@ $(document).ready(function () {
|
||||
this_edit_mes_id = undefined;
|
||||
});
|
||||
|
||||
$(document).on("click", ".mes_edit_up", function() {
|
||||
$(document).on("click", ".mes_edit_up", function () {
|
||||
if (is_send_press || this_edit_mes_id <= 0) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
hideSwipeButtons();
|
||||
@ -4617,9 +4617,9 @@ $(document).ready(function () {
|
||||
$(this).closest('.inline-drawer').find('.inline-drawer-content').slideToggle();
|
||||
});
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
$(document).keyup(function (e) {
|
||||
if (e.key === "Escape") {
|
||||
closeMessageEditor();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
|
Reference in New Issue
Block a user