| 338 | return mesChanged; | 338 | return mesChanged; |
| 339 | } | 339 | } |
| 340 | | 340 | |
| 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 reasoning | 342 | // 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; |
| 345 | | 345 | |
| 346 | // Manually set starting state here, as we might already have received the ending suffix | 346 | // 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 | } |
| 351 | | 352 | |