Files
new-api/web/src/components
Apple\Apple ec4dbcd7d8 🐛 fix: Role switching not updating UI immediately in playground
Fix role toggle functionality where switching message roles (assistant/system)
did not update the UI immediately and required page refresh to see changes.

Changes:
- Add message.role comparison in OptimizedMessageContent memo function
- Add message.role comparison in OptimizedMessageActions memo function

The issue was caused by React.memo optimization that wasn't tracking role
changes, preventing re-renders when only the message role property changed.
Now role switches are reflected immediately in both message content display
and action button states.

Fixes: Role switching requires page refresh to display correctly
2025-06-01 17:19:45 +08:00
..
2025-04-04 17:37:27 +08:00
2025-04-04 17:37:27 +08:00
2025-05-26 22:25:38 +08:00
2025-05-20 23:47:29 +08:00
2025-05-20 10:38:31 +08:00
2025-04-04 17:37:27 +08:00
2024-03-23 21:24:39 +08:00
2025-05-05 23:56:15 +08:00
2025-06-01 13:13:32 +08:00
2025-04-04 17:37:27 +08:00
2025-05-20 04:43:11 +08:00