Don't try to update reasoning for impersonation stream
| @@ -236,6 +236,10 @@ export class ReasoningHandler { | ||
| 236 | 236 | * @returns {boolean} - Returns true if the reasoning was changed, otherwise false |
| 237 | 237 | */ |
| 238 | 238 | updateReasoning(messageId, reasoning = null, { persist = false } = {}) { |
| 239 | + if (messageId == -1 || !chat[messageId]) { | |
| 240 | + return false; | |
| 241 | + } | |
| 242 | + | |
| 239 | 243 | reasoning = reasoning ?? this.reasoning; |
| 240 | 244 | reasoning = power_user.trim_spaces ? reasoning.trim() : reasoning; |
| 241 | 245 | |