mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@ -3287,7 +3287,7 @@ class StreamingProcessor {
|
||||
chat[messageId]['extra']['time_to_first_token'] = this.timeToFirstToken;
|
||||
|
||||
// Update reasoning
|
||||
await this.reasoningHandler.process(messageId, mesChanged);
|
||||
await this.reasoningHandler.process(messageId, mesChanged, this.promptReasoning);
|
||||
processedText = chat[messageId]['mes'];
|
||||
|
||||
// Token count update.
|
||||
@ -5953,7 +5953,7 @@ export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayInc
|
||||
getMessage = trimToEndSentence(getMessage);
|
||||
}
|
||||
|
||||
if (power_user.trim_spaces) {
|
||||
if (power_user.trim_spaces && !PromptReasoning.getLatestPrefix()) {
|
||||
getMessage = getMessage.trim();
|
||||
}
|
||||
|
||||
@ -6147,13 +6147,17 @@ export function syncMesToSwipe(messageId = null) {
|
||||
}
|
||||
|
||||
const targetMessageId = messageId ?? chat.length - 1;
|
||||
if (chat.length > targetMessageId || targetMessageId < 0) {
|
||||
if (targetMessageId >= chat.length || targetMessageId < 0) {
|
||||
console.warn(`[syncMesToSwipe] Invalid message ID: ${messageId}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
const targetMessage = chat[targetMessageId];
|
||||
|
||||
if (!targetMessage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// No swipe data there yet, exit out
|
||||
if (typeof targetMessage.swipe_id !== 'number') {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user