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
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.