| 338 | 338 | return mesChanged; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | if (this.state === ReasoningState.None || this.#isHiddenReasoningModel) { |
| 342 | 342 | // If streamed message starts with the opening, cut it out and put all inside reasoning |
| 343 | 343 | if (message.mes.startsWith(power_user.reasoning.prefix) && message.mes.length > power_user.reasoning.prefix.length) { |
| 344 | 344 | this.#isParsingReasoning = true; |
| 345 | 345 | |
| 346 | 346 | // Manually set starting state here, as we might already have received the ending suffix |
| 347 | 347 | this.state = ReasoningState.Thinking; |
| 348 | 348 | this.startTime = this.startTime ?? this.initialTime; |
| 349 | + this.endTime = null; |
| 349 | 350 | } |
| 350 | 351 | } |
| 351 | 352 | |