Fix hidden reasoning not allowing manual parsing

b0a2f241d20a826ef2e5c3d0cf8e3c88151cb4af

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +3 -2Ignore whitespace
public/scripts/reasoning.js+3 -2
@@ -338,14 +338,15 @@ export class ReasoningHandler {
338 return mesChanged;338 return mesChanged;
339 }339 }
340340
341 if (this.state === ReasoningState.None) {341 if (this.state === ReasoningState.None || this.#isHiddenReasoningModel) {
342 // If streamed message starts with the opening, cut it out and put all inside reasoning342 // If streamed message starts with the opening, cut it out and put all inside reasoning
343 if (message.mes.startsWith(power_user.reasoning.prefix) && message.mes.length > power_user.reasoning.prefix.length) {343 if (message.mes.startsWith(power_user.reasoning.prefix) && message.mes.length > power_user.reasoning.prefix.length) {
344 this.#isParsingReasoning = true;344 this.#isParsingReasoning = true;
345345
346 // Manually set starting state here, as we might already have received the ending suffix346 // Manually set starting state here, as we might already have received the ending suffix
347 this.state = ReasoningState.Thinking;347 this.state = ReasoningState.Thinking;
348 this.startTime = this.initialTime;348 this.startTime = this.startTime ?? this.initialTime;
349 this.endTime = null;
349 }350 }
350 }351 }
351352