Files
new-api-oiss/web/src
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-05-23 00:24:08 +08:00
2025-06-01 13:13:32 +08:00
2025-05-20 00:23:47 +08:00
2025-05-06 01:38:44 +08:00