Summary This commit addresses two critical issues affecting the real-time chat experience in the Playground: 1. Optimized re-rendering of reasoning content • Added `reasoningContent` to the comparison function of `OptimizedMessageContent` (`web/src/components/playground/OptimizedComponents.js`). • Ensures the component re-renders while reasoning text streams, resolving the bug where only the first characters (“好,”) were shown until the stream finished. 2. Defensive checks for SSE message updates • Added early-return guards in `streamMessageUpdate` (`web/src/hooks/useApiRequest.js`). • Skips updates when `lastMessage` is undefined or the last message isn’t from the assistant, preventing `TypeError: Cannot read properties of undefined (reading 'status')` during rapid SSE responses. Impact • Real-time reasoning content now appears progressively, enhancing user feedback. • Eliminates runtime crashes caused by undefined message references, improving overall stability.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| common | Loading commit data... | |
| playground | Loading commit data... | |
| AuthRedirect.js | Loading commit data... | |
| ChannelsTable.js | Loading commit data... | |
| Footer.js | Loading commit data... | |
| HeaderBar.js | Loading commit data... | |
| Loading.js | Loading commit data... | |
| LoginForm.js | Loading commit data... | |
| LogsTable.js | Loading commit data... | |
| MjLogsTable.js | Loading commit data... | |
| ModelPricing.js | Loading commit data... | |
| ModelSetting.js | Loading commit data... | |
| NoticeModal.js | Loading commit data... | |
| OAuth2Callback.js | Loading commit data... | |
| OperationSetting.js | Loading commit data... | |
| OtherSetting.js | Loading commit data... | |
| PageLayout.js | Loading commit data... | |
| PasswordResetConfirm.js | Loading commit data... | |
| PasswordResetForm.js | Loading commit data... | |
| PersonalSetting.js | Loading commit data... | |
| PrivateRoute.js | Loading commit data... | |
| RateLimitSetting.js | Loading commit data... | |
| RedemptionsTable.js | Loading commit data... | |
| RegisterForm.js | Loading commit data... | |
| SetupCheck.js | Loading commit data... | |
| SiderBar.js | Loading commit data... | |
| SystemSetting.js | Loading commit data... | |
| TaskLogsTable.js | Loading commit data... | |
| TokensTable.js | Loading commit data... | |
| UsersTable.js | Loading commit data... | |
| fetchTokenKeys.js | Loading commit data... | |
| utils.js | Loading commit data... |