feat(ui): add collapsible reasoning summaries#29858
Open
cola0908 wants to merge 4 commits into
Open
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
- Add Collapsible wrapper to reasoning part with TextShimmer animation - Pass working prop through MessagePartProps to determine active state - Show 'Reasoning' with shimmer while thinking, 'Reasoning Summary' when done - Add i18n translations for all 18 languages - Add CSS for reasoning-part-trigger layout
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.
Issue for this PR
Closes #15257
Closes #14405
Type of change
What does this PR do?
Add collapsible UI for reasoning summary parts, matching the existing "Explored" pattern. Shows "Reasoning" with shimmer animation while the model is thinking, then transitions to "Reasoning Summary" as a collapsible section (open by default) when complete.
So it basically shows:
Reasoningwhen working, animated, following the other tools like exploring, etc.Reasoning Summarywhen it's doneChanges:
packages/ui/src/components/message-part.tsx: Addworkingprop toMessagePartProps, pass it throughAssistantParts→Part→ReasoningPartDisplay. Wrap reasoning content inCollapsiblewithTextShimmerheader.packages/ui/src/components/message-part.css: Add styles forreasoning-part-triggerlayout, reduce markdown margin-top from 16px to 4px.ui.sessionTurn.status.reasoningandui.sessionTurn.status.reasoningSummarytranslations.How did you verify your code works?
tsc --noEmit)Screenshots / recordings
N/A (UI change requires running TUI to demonstrate)
Checklist