mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix reasoning not always being synced to swipe
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
moment,
|
moment,
|
||||||
} from '../lib.js';
|
} from '../lib.js';
|
||||||
import { chat, closeMessageEditor, event_types, eventSource, main_api, messageFormatting, saveChatConditional, saveChatDebounced, saveSettingsDebounced, substituteParams, updateMessageBlock } from '../script.js';
|
import { chat, closeMessageEditor, event_types, eventSource, main_api, messageFormatting, saveChatConditional, saveChatDebounced, saveSettingsDebounced, substituteParams, syncMesToSwipe, updateMessageBlock } from '../script.js';
|
||||||
import { getRegexedString, regex_placement } from './extensions/regex/engine.js';
|
import { getRegexedString, regex_placement } from './extensions/regex/engine.js';
|
||||||
import { getCurrentLocale, t, translate } from './i18n.js';
|
import { getCurrentLocale, t, translate } from './i18n.js';
|
||||||
import { MacrosParser } from './macros.js';
|
import { MacrosParser } from './macros.js';
|
||||||
@@ -1046,8 +1046,10 @@ function registerReasoningAppEvents() {
|
|||||||
message.mes = parsedReasoning.content;
|
message.mes = parsedReasoning.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find if a message already exists in DOM and must be updated
|
|
||||||
if (contentUpdated) {
|
if (contentUpdated) {
|
||||||
|
syncMesToSwipe();
|
||||||
|
|
||||||
|
// Find if a message already exists in DOM and must be updated
|
||||||
const messageRendered = document.querySelector(`.mes[mesid="${idx}"]`) !== null;
|
const messageRendered = document.querySelector(`.mes[mesid="${idx}"]`) !== null;
|
||||||
if (messageRendered) {
|
if (messageRendered) {
|
||||||
console.debug('[Reasoning] Updating message block', idx);
|
console.debug('[Reasoning] Updating message block', idx);
|
||||||
|
Reference in New Issue
Block a user