Files
new-api/web
Apple\Apple 02bc3cde53 feat: improve thinking state management for better UX in reasoning display
Previously, the "thinking" indicator and loading icon would only disappear
after the entire message generation was complete, which created a poor user
experience where users had to wait for the full response to see that the
reasoning phase had finished.

Changes made:
- Add `isThinkingComplete` field to independently track reasoning state
- Update streaming logic to mark thinking complete when content starts flowing
- Detect closed `<think>` tags to mark reasoning completion
- Modify MessageContent component to use independent thinking state
- Update "思考中..." text and loading icon display conditions
- Ensure thinking state is properly set in all completion scenarios
  (non-stream, errors, manual stop)

Now the thinking section immediately shows as complete when reasoning ends,
rather than waiting for the entire message to finish, providing much better
real-time feedback to users.

Files modified:
- web/src/hooks/useApiRequest.js
- web/src/components/playground/MessageContent.js
- web/src/utils/messageUtils.js
2025-05-31 01:12:45 +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