mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix old message left swipe
This commit is contained in:
@@ -6029,7 +6029,7 @@ function swipe_left() { // when we swipe left..but no generation.
|
||||
this_mes_div.css('height', this_mes_div_height);
|
||||
const this_mes_block_height = this_mes_block[0].scrollHeight;
|
||||
chat[chat.length - 1]['mes'] = chat[chat.length - 1]['swipes'][chat[chat.length - 1]['swipe_id']];
|
||||
chat[chat.length - 1]['send_date'] = chat[chat.length - 1]['swipe_info'][chat[chat.length - 1]['swipe_id']]['send_date']; //load the last mes box with the latest generation
|
||||
chat[chat.length - 1]['send_date'] = chat[chat.length - 1].swipe_info[chat[chat.length - 1]['swipe_id']]?.send_date || chat[chat.length - 1].send_date; //load the last mes box with the latest generation
|
||||
|
||||
if (chat[chat.length - 1].extra) {
|
||||
// if message has memory attached - remove it to allow regen
|
||||
@@ -6143,7 +6143,7 @@ const swipe_right = () => {
|
||||
if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array
|
||||
chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0
|
||||
chat[chat.length - 1]['swipes'] = []; // empty the array
|
||||
chat[chat.length - 1]['swipe_info'] = [];
|
||||
chat[chat.length - 1]['swipe_info'] = [];
|
||||
chat[chat.length - 1]['swipes'][0] = chat[chat.length - 1]['mes']; //assign swipe array with last message from chat
|
||||
chat[chat.length - 1]['swipe_info'][0] = { 'send_date': chat[chat.length - 1]['send_date'], 'gen_started': chat[chat.length - 1]['gen_started'], 'gen_finished': chat[chat.length - 1]['gen_finished'] }; //assign swipe info array with last message from chat
|
||||
}
|
||||
|
Reference in New Issue
Block a user