Fix reasoning not always being synced to swipe
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { |
| 2 | 2 | moment, |
| 3 | 3 | } from '../lib.js'; |
| 4 | 4 | import { chat, closeMessageEditor, event_types, eventSource, main_api, messageFormatting, saveChatConditional, saveChatDebounced, saveSettingsDebounced, substituteParams, syncMesToSwipe, updateMessageBlock } from '../script.js'; |
| 5 | 5 | import { getRegexedString, regex_placement } from './extensions/regex/engine.js'; |
| 6 | 6 | import { getCurrentLocale, t, translate } from './i18n.js'; |
| 7 | 7 | import { MacrosParser } from './macros.js'; |
| @@ -1046,8 +1046,10 @@ function registerReasoningAppEvents() { | ||
| 1046 | 1046 | message.mes = parsedReasoning.content; |
| 1047 | 1047 | } |
| 1048 | 1048 | |
| 1049 | - // Find if a message already exists in DOM and must be updated | |
| 1050 | 1049 | if (contentUpdated) { |
| 1050 | + syncMesToSwipe(); | |
| 1051 | + | |
| 1052 | + // Find if a message already exists in DOM and must be updated | |
| 1051 | 1053 | const messageRendered = document.querySelector(`.mes[mesid="${idx}"]`) !== null; |
| 1052 | 1054 | if (messageRendered) { |
| 1053 | 1055 | console.debug('[Reasoning] Updating message block', idx); |