Files
new-api/web
Apple\Apple 26ef7aae38 🐛 fix: resolve duplicate toast notifications when toggling message roles
- Remove duplicate onRoleToggle prop passing to ChatArea component in Playground/index.js
- Move Toast notification outside setMessage callback in useMessageActions hook
- Prevent multiple event bindings that caused repeated role switch notifications
- Add early return validation for role toggle eligibility

This fixes the issue where users would see multiple success toasts when switching
between Assistant and System roles in the chat interface.

Files changed:
- web/src/pages/Playground/index.js
- web/src/hooks/useMessageActions.js
2025-06-01 17:44:36 +08:00
..
2025-05-20 23:21:48 +08:00
2023-04-22 20:39:27 +08:00
2025-04-04 17:37:27 +08:00
2025-04-04 17:37:27 +08:00
2025-05-06 01:36:23 +08:00
2024-03-23 21:24:39 +08:00
2025-05-06 01:36:23 +08:00
2023-04-22 20:39:27 +08:00
2025-05-06 01:36:23 +08:00

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.

Reference

  1. https://github.com/OIerDb-ng/OIerDb
  2. https://github.com/cornflourblue/react-hooks-redux-registration-login-example