| 236 | * @returns {boolean} - Returns true if the reasoning was changed, otherwise false | 236 | * @returns {boolean} - Returns true if the reasoning was changed, otherwise false |
| 237 | */ | 237 | */ |
| 238 | updateReasoning(messageId, reasoning = null, { persist = false } = {}) { | 238 | updateReasoning(messageId, reasoning = null, { persist = false } = {}) { |
| | 239 | if (messageId == -1 || !chat[messageId]) { |
| | 240 | return false; |
| | 241 | } |
| | 242 | |
| 239 | reasoning = reasoning ?? this.reasoning; | 243 | reasoning = reasoning ?? this.reasoning; |
| 240 | reasoning = power_user.trim_spaces ? reasoning.trim() : reasoning; | 244 | reasoning = power_user.trim_spaces ? reasoning.trim() : reasoning; |
| 241 | | 245 | |