mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Token breakdown for swipes
This commit is contained in:
@ -1209,7 +1209,8 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newMessage = $(`#chat [mesid="${count_view_mes}"]`);
|
const newMessageId = type == 'swipe' ? count_view_mes - 1 : count_view_mes;
|
||||||
|
const newMessage = $(`#chat [mesid="${newMessageId}"]`);
|
||||||
const isSmallSys = mes?.extra?.isSmallSys;
|
const isSmallSys = mes?.extra?.isSmallSys;
|
||||||
newMessage.data("isSystem", isSystem);
|
newMessage.data("isSystem", isSystem);
|
||||||
|
|
||||||
@ -1235,6 +1236,7 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true
|
|||||||
for (var i = 0; i < itemizedPrompts.length; i++) {
|
for (var i = 0; i < itemizedPrompts.length; i++) {
|
||||||
if (itemizedPrompts[i].mesId === mesIdToFind) {
|
if (itemizedPrompts[i].mesId === mesIdToFind) {
|
||||||
newMessage.find(".mes_prompt").show();
|
newMessage.find(".mes_prompt").show();
|
||||||
|
break;
|
||||||
//console.log(`showing prompt for mesID ${params.mesId} from ${params.characterName}`);
|
//console.log(`showing prompt for mesID ${params.mesId} from ${params.characterName}`);
|
||||||
} else {
|
} else {
|
||||||
//console.log(`no cache obj for mesID ${mesIdToFind}, hiding prompt button and continuing search`);
|
//console.log(`no cache obj for mesID ${mesIdToFind}, hiding prompt button and continuing search`);
|
||||||
@ -2300,7 +2302,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
let additionalPromptStuff = {
|
let additionalPromptStuff = {
|
||||||
...thisPromptBits[currentArrayEntry],
|
...thisPromptBits[currentArrayEntry],
|
||||||
rawPrompt: generate_data.prompt,
|
rawPrompt: generate_data.prompt,
|
||||||
mesId: Number(count_view_mes),
|
mesId: type == 'swipe' ? Number(count_view_mes - 1) : Number(count_view_mes),
|
||||||
worldInfoBefore: worldInfoBefore,
|
worldInfoBefore: worldInfoBefore,
|
||||||
allAnchors: allAnchors,
|
allAnchors: allAnchors,
|
||||||
summarizeString: (extension_prompts['1_memory']?.value || ''),
|
summarizeString: (extension_prompts['1_memory']?.value || ''),
|
||||||
|
@ -391,7 +391,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) {
|
|||||||
let typingIndicator = $("#chat .typing_indicator");
|
let typingIndicator = $("#chat .typing_indicator");
|
||||||
|
|
||||||
if (!group || !Array.isArray(group.members) || !group.members.length) {
|
if (!group || !Array.isArray(group.members) || !group.members.length) {
|
||||||
sendSystemMessage(system_message_types.EMPTY);
|
sendSystemMessage(system_message_types.EMPTY, '', { isSmallSys: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user