Add reasoning regex on edit
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | import { chat, closeMessageEditor, saveChatConditional, saveSettingsDebounced, substituteParams, updateMessageBlock } from '../script.js'; |
| 2 | +import { getRegexedString, regex_placement } from './extensions/regex/engine.js'; | |
| 2 | 3 | import { t } from './i18n.js'; |
| 3 | 4 | import { MacrosParser } from './macros.js'; |
| 4 | 5 | import { Popup } from './popup.js'; |
| @@ -224,7 +225,7 @@ function setReasoningEventHandlers(){ | ||
| 224 | 225 | } |
| 225 | 226 | |
| 226 | 227 | const textarea = messageBlock.find('.reasoning_edit_textarea'); |
| 227 | 228 | const reasoning = getRegexedString(String(textarea.val()), regex_placement.REASONING, { isEdit: true }); |
| 228 | 229 | message.extra.reasoning = reasoning; |
| 229 | 230 | await saveChatConditional(); |
| 230 | 231 | updateMessageBlock(messageId, message); |