🐛 fix: prevent first assistant message re-animation on assistantGroup transition#13320
Conversation
… transition When tool calls arrive during streaming, the message transitions from assistant to assistantGroup, causing a full React remount. The first content block's text was re-animating because isGenerating was still true. Pass isFirstBlock prop through the render chain to disable animation for the first block, since its text is guaranteed complete by the time the group forms. Fixes LOBE-6414 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
isFirstBlock already covers the first block case, and subsequent blocks should not have animation disabled just because they are single-line with tools — they may still be streaming. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@ONLY-yours - This is a streaming animation bug fix in the AssistantGroup conversation messages. Please take a look. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #13320 +/- ##
=========================================
Coverage 66.76% 66.76%
=========================================
Files 1889 1888 -1
Lines 151446 151436 -10
Branches 14506 17264 +2758
=========================================
- Hits 101112 101111 -1
+ Misses 50222 50213 -9
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
❤️ Great PR @arvinxx ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
Summary
Group→GroupItem→ContentBlock→MessageContent传递isFirstBlock属性,确保 group 中第一个 content block 不执行流式动画根因分析
当 tool call 到达时,消息从
role: 'assistant'转换为role: 'assistantGroup',导致 React 组件完全卸载/重新挂载。此时isGenerating仍为true(tool 执行中),使得已显示完成的文本内容重新执行 fade-in 动画。Fixes LOBE-6414
Test plan
🤖 Generated with Claude Code