fix: prevent rendering thinking part for final answer in chat list#288178
Merged
justschen merged 1 commit intomicrosoft:mainfrom Jan 25, 2026
Merged
fix: prevent rendering thinking part for final answer in chat list#288178justschen merged 1 commit intomicrosoft:mainfrom
justschen merged 1 commit intomicrosoft:mainfrom
Conversation
|
|
||
| return thinkingPart; | ||
| } | ||
|
|
There was a problem hiding this comment.
The removal of !isFinalAnswerPart check here could be confusing without context. Consider adding a comment explaining that this code is now inside a block that already excludes final answer parts (line 1827), making the additional check redundant. This would improve code maintainability and make the logic clearer for future readers.
Suggested change
| // Note: this block only runs for non-final answer parts (see condition at line 1827), | |
| // so we do not need to repeat an explicit !isFinalAnswerPart check here. |
| lastThinking.appendItem(markdownPart.domNode, markdownPart.codeblocksPartId, markdown, templateData.value); | ||
| } | ||
| } else if (!this.shouldPinPart(markdown, context.element) && !isFinalAnswerPart) { | ||
| } else if (!this.shouldPinPart(markdown, context.element)) { |
There was a problem hiding this comment.
Similar to the previous comment, the removal of !isFinalAnswerPart could benefit from a comment. Since this entire block (lines 1827-1856) is now gated on !isFinalAnswerPart, readers should understand that the removed checks are redundant rather than accidentally omitted.
Suggested change
| } else if (!this.shouldPinPart(markdown, context.element)) { | |
| } else if (!this.shouldPinPart(markdown, context.element)) { | |
| // The enclosing block is only executed for non-final answer parts (!isFinalAnswerPart), | |
| // so we intentionally do not repeat that check here. |
justschen
approved these changes
Jan 22, 2026
Tyriar
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: prevent rendering thinking part for final answer in chat list. Fix #287897
cc: @justschen