diff --git a/public/backgrounds/__legacy SillyTavern Backgrounds (will be removed from github eventually).zip b/public/backgrounds/__legacy SillyTavern Backgrounds (will be removed from github eventually).zip deleted file mode 100644 index bb5fe109d..000000000 Binary files a/public/backgrounds/__legacy SillyTavern Backgrounds (will be removed from github eventually).zip and /dev/null differ diff --git a/public/script.js b/public/script.js index aaea89823..1f46e082d 100644 --- a/public/script.js +++ b/public/script.js @@ -1120,8 +1120,6 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true const newMessage = $(`#chat [mesid="${count_view_mes}"]`); newMessage.data("isSystem", isSystem); - appendImageToMessage(mes, newMessage); - if (isSystem) { newMessage.find(".mes_edit").hide(); } @@ -1134,6 +1132,7 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true if (type === 'swipe') { $("#chat").find(`[mesid="${count_view_mes - 1}"]`).find('.mes_text').html(''); $("#chat").find(`[mesid="${count_view_mes - 1}"]`).find('.mes_text').append(messageText); + appendImageToMessage(mes, $("#chat").find(`[mesid="${count_view_mes - 1}"]`)); $("#chat").find(`[mesid="${count_view_mes - 1}"]`).attr('title', title); if (mes.swipe_id == mes.swipes.length - 1) { @@ -1144,6 +1143,7 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true } } else { $("#chat").find(`[mesid="${count_view_mes}"]`).find('.mes_text').append(messageText); + appendImageToMessage(mes, newMessage); hideSwipeButtons(); count_view_mes++; } @@ -3773,6 +3773,7 @@ function showSwipeButtons() { !swipes || $('.mes:last').attr('mesid') <= 0 || chat[chat.length - 1].is_user || + chat[chat.length - 1].extra?.image || count_view_mes <= 1 || (selected_group && is_group_generating) ) { return; } @@ -3894,7 +3895,11 @@ function isHordeGenerationNotAllowed() { return false; } - +export function cancelTtsPlay() { + if (speechSynthesis) { + speechSynthesis.cancel(); + } +} window["SillyTavern"].getContext = function () { return { @@ -4305,6 +4310,7 @@ $(document).ready(function () { if (this_chid !== $(this).attr("chid")) { //if clicked on a different character from what was currently selected if (!is_send_press) { + cancelTtsPlay(); resetSelectedGroup(); this_edit_mes_id = undefined; selected_button = "character_edit"; @@ -5764,7 +5770,8 @@ $(document).ready(function () { $('.code-copied').css({ 'display': 'none' }); }); - $(document).on('beforeunload', () => { + $(window).on('beforeunload', () => { + cancelTtsPlay(); if (streamingProcessor) { console.log('Page reloaded. Aborting streaming...'); streamingProcessor.abortController.abort(); diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 273f551d2..98b5d6cbe 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -45,6 +45,7 @@ import { setMenuType, menu_type, select_selected_character, + cancelTtsPlay, } from "../script.js"; import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.js'; @@ -1006,6 +1007,7 @@ async function selectGroup() { if (!is_send_press && !is_group_generating) { if (selected_group !== groupId) { + cancelTtsPlay(); selected_group = groupId; setCharacterId(undefined); setCharacterName(''); diff --git a/readme.md b/readme.md index 05316fd7f..e182475a8 100644 --- a/readme.md +++ b/readme.md @@ -185,6 +185,14 @@ Try enabling the No Blur Effect (Fast UI) mode on the User settings panel. 2. Send bug reports without providing any context 3. Ask the questions that were already answered numerous times +## Where can I find the old backgrounds? + +We're moving to 100% original content only policy, so old background images have been removed from this repository. + +You can find them archived here: + +https://files.catbox.moe/1xevnc.zip + ## Screenshots image image