From b0a2f241d20a826ef2e5c3d0cf8e3c88151cb4af Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Fri, 21 Feb 2025 18:01:25 +0100 Subject: [PATCH] Fix hidden reasoning not allowing manual parsing --- public/scripts/reasoning.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/scripts/reasoning.js b/public/scripts/reasoning.js index 44927d83f..2d4711db2 100644 --- a/public/scripts/reasoning.js +++ b/public/scripts/reasoning.js @@ -338,14 +338,15 @@ export class ReasoningHandler { return mesChanged; } - if (this.state === ReasoningState.None) { + if (this.state === ReasoningState.None || this.#isHiddenReasoningModel) { // If streamed message starts with the opening, cut it out and put all inside reasoning if (message.mes.startsWith(power_user.reasoning.prefix) && message.mes.length > power_user.reasoning.prefix.length) { this.#isParsingReasoning = true; // Manually set starting state here, as we might already have received the ending suffix this.state = ReasoningState.Thinking; - this.startTime = this.initialTime; + this.startTime = this.startTime ?? this.initialTime; + this.endTime = null; } }