diff --git a/public/script.js b/public/script.js index 3c381ed59..9451d6f75 100644 --- a/public/script.js +++ b/public/script.js @@ -102,6 +102,8 @@ export { saveChat, messageFormating, getExtensionPrompt, + showSwipeButtons, + hideSwipeButtons, chat, this_chid, settings, @@ -1722,7 +1724,7 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs"). console.log('entering chat update for groups'); let avatarImg = 'img/ai4.png'; if (characters[this_chid].avatar != 'none') { - avatarImg = `characters/${characters[this_chid].avatar}?${Date.now()}`; + avatarImg = `/thumbnail?type=avatar&file=${encodeURIComponent(characters[this_chid].avatar)}&${Date.now()}`; } chat[chat.length - 1]['is_name'] = true; chat[chat.length - 1]['force_avatar'] = avatarImg; @@ -2770,7 +2772,8 @@ function showSwipeButtons() { !swipes || $('.mes:last').attr('mesid') <= 0 || chat[chat.length - 1].is_user || - count_view_mes <= 1 + count_view_mes <= 1 || + (selected_group && is_group_generating) ) { return; } //had to add this to make the swipe counter work diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index b2d73756e..b4ed4aa34 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -33,6 +33,8 @@ import { setRightTabSelectedClass, default_ch_mes, deleteLastMessage, + showSwipeButtons, + hideSwipeButtons, } from "../script.js"; export { @@ -267,6 +269,7 @@ async function generateGroupWrapper(by_auto_mode, type=null) { } try { + hideSwipeButtons(); is_group_generating = true; setCharacterName(''); setCharacterId(undefined); @@ -339,6 +342,7 @@ async function generateGroupWrapper(by_auto_mode, type=null) { setSendButtonState(false); setCharacterId(undefined); setCharacterName(''); + showSwipeButtons(); } }