mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
caption extension now adds the caption to the img title attribute
This commit is contained in:
@ -724,6 +724,7 @@ function appendImageToMessage(mes, messageElement) {
|
||||
if (mes.extra?.image) {
|
||||
const image = document.createElement("img");
|
||||
image.src = mes.extra?.image;
|
||||
image.title = mes.title;
|
||||
image.classList.add("img_extra");
|
||||
messageElement.find(".mes_text").prepend(image);
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ async function sendCaptionedMessage(caption, image) {
|
||||
send_date: Date.now(),
|
||||
mes: messageText,
|
||||
extra: { image: image },
|
||||
title: caption
|
||||
};
|
||||
context.chat.push(message);
|
||||
context.addOneMessage(message);
|
||||
|
Reference in New Issue
Block a user