Merge pull request #3531 from SillyTavern/fix-hidden-reasoning-plus-parsing Fix hidden reasoning models blocking auto-parsing from working

e8cdad0bf2d71327215a5c723fba68a20cce2c07

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

Signed
1 files changed, +3 -2Showing whitespace changes
public/scripts/reasoning.js+3 -2
@@ -338,14 +338,15 @@ export class ReasoningHandler {
338338 return mesChanged;
339339 }
340340
341341 if (this.state === ReasoningState.None || this.#isHiddenReasoningModel) {
342342 // If streamed message starts with the opening, cut it out and put all inside reasoning
343343 if (message.mes.startsWith(power_user.reasoning.prefix) && message.mes.length > power_user.reasoning.prefix.length) {
344344 this.#isParsingReasoning = true;
345345
346346 // Manually set starting state here, as we might already have received the ending suffix
347347 this.state = ReasoningState.Thinking;
348348 this.startTime = this.startTime ?? this.initialTime;
349+ this.endTime = null;
349350 }
350351 }
351352