Fix reasoning not always being synced to swipe

8bdc00e0b9181fd7bfe8ca694b904af777261998

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +4 -2Ignore whitespace
public/scripts/reasoning.js+4 -2
@@ -1,7 +1,7 @@
11import {
22 moment,
33} from '../lib.js';
44import { chat, closeMessageEditor, event_types, eventSource, main_api, messageFormatting, saveChatConditional, saveChatDebounced, saveSettingsDebounced, substituteParams, syncMesToSwipe, updateMessageBlock } from '../script.js';
55import { getRegexedString, regex_placement } from './extensions/regex/engine.js';
66import { getCurrentLocale, t, translate } from './i18n.js';
77import { MacrosParser } from './macros.js';
@@ -1046,8 +1046,10 @@ function registerReasoningAppEvents() {
10461046 message.mes = parsedReasoning.content;
10471047 }
10481048
1049- // Find if a message already exists in DOM and must be updated
10501049 if (contentUpdated) {
1050+ syncMesToSwipe();
1051+
1052+ // Find if a message already exists in DOM and must be updated
10511053 const messageRendered = document.querySelector(`.mes[mesid="${idx}"]`) !== null;
10521054 if (messageRendered) {
10531055 console.debug('[Reasoning] Updating message block', idx);