refactor(chat): remove UUID generation and update HomePage to use NewChatBootstrap
Merged
AH
6mo ago+17+17+01234567890123456789-17-17-01234567890123456789
This commit eliminates the server-side UUID generation in Home and updates the HomePage component to use NewChatBootstrap instead of Chat. The changes streamline the chat initialization process by relying on the NewChatBootstrap for session management and message provisioning.
Summary by cubic
Replaced direct Chat mount with NewChatBootstrap, removed server-side UUIDs, and added legacy auto-login for non-bootstrap chat routes. This centralizes chat bootstrap and ensures auth so sessionId and chatId are ready before rendering.
-
Refactors
- Removed
generateUUIDandidprop fromapp/page.tsxandHomePage. - Updated
HomePageto renderNewChatBootstrapwithinitialMessages. - Added
useAutoLogin()inNewChatBootstrapto ensure auth before chat init.
- Removed
-
New Features
- Introduced
LegacyAutoLogininChatto prompt sign-in whensessionIdis missing on legacy mounts.
- Introduced
Summary by CodeRabbit
-
New Features
- Integrated automatic login functionality into the new chat initialization flow, improving the session start experience.
-
Refactor
- Streamlined chat component initialization process by restructuring internal component dependencies.