Don't try to update reasoning for impersonation stream

d6bf3439b479aa4cbd66c3af9dbec4cdf862b8db

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -0Showing whitespace changes
public/scripts/reasoning.js+4 -0
@@ -236,6 +236,10 @@ export class ReasoningHandler {
236236 * @returns {boolean} - Returns true if the reasoning was changed, otherwise false
237237 */
238238 updateReasoning(messageId, reasoning = null, { persist = false } = {}) {
239+ if (messageId == -1 || !chat[messageId]) {
240+ return false;
241+ }
242+
239243 reasoning = reasoning ?? this.reasoning;
240244 reasoning = power_user.trim_spaces ? reasoning.trim() : reasoning;
241245