chore(chat): refactor chat init into separate quota and history actors
Split `chatInitActor` into `loadQuotaActor` (guest quota fetch) and `loadHistoryActor` (local → network → save sync), and add `quotaLoaded` / `historyLoaded` state flags so the UI can display loading status during the new local-first history hydration flow. Also drop the now-unused `ChatInit` event and pipe Next.js stdout/stderr to a persistent log file in the post-receive hook for easier troubleshooting.
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
* chat-screen **不**直接创建 ChatWebSocket / 不读 AuthStorage(除 token 取值)。
|
||||
*/
|
||||
export type ChatEvent =
|
||||
// 内部 UI 事件
|
||||
| { type: "ChatInit" }
|
||||
// 鉴权生命周期(**用户**显式触发登录后由 chat-screen 派)
|
||||
| { type: "ChatGuestLogin" }
|
||||
| { type: "ChatNonGuestLogin"; token: string }
|
||||
|
||||
Reference in New Issue
Block a user