| 181 | : $(messageIdOrElement)[0]; | 181 | : $(messageIdOrElement)[0]; |
| 182 | const messageId = Number(messageElement.getAttribute('mesid')); | 182 | const messageId = Number(messageElement.getAttribute('mesid')); |
| 183 | | 183 | |
| 184 | if (isNaN(messageId)) return; | 184 | if (isNaN(messageId) || !chat[messageId]) return; |
| 185 | | 185 | |
| | 186 | if (!chat[messageId].extra) { |
| | 187 | chat[messageId].extra = {}; |
| | 188 | } |
| 186 | const extra = chat[messageId].extra; | 189 | const extra = chat[messageId].extra; |
| 187 | | 190 | |
| 188 | if (extra.reasoning) { | 191 | if (extra.reasoning) { |