refactor(chat): remove commented-out code in guestSession
This commit is contained in:
@@ -219,9 +219,6 @@ export const chatMachine = setup({
|
||||
},
|
||||
},
|
||||
|
||||
// ========================================================================
|
||||
// guestSession(游客会话 —— 不连 WS,2 个 init 任务并行)
|
||||
// ========================================================================
|
||||
guestSession: {
|
||||
on: {
|
||||
ChatLogout: "#chat.idle",
|
||||
@@ -342,13 +339,9 @@ export const chatMachine = setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
// 删除 loadingMore(游客无翻页)
|
||||
},
|
||||
},
|
||||
|
||||
// ========================================================================
|
||||
// userSession(非游客会话 —— WS 父级 + history 子级)
|
||||
// ========================================================================
|
||||
userSession: {
|
||||
// 父级 on:把 WS / AI 流句 事件从 ready.on 上提到 userSession.on
|
||||
// —— 任何 child state(initializing / ready / sendingViaWs / sendingViaHttp / loadingMore)
|
||||
@@ -360,7 +353,6 @@ export const chatMachine = setup({
|
||||
// —— XState v5: child handler 替换 parent;复制 action
|
||||
on: {
|
||||
ChatLogout: "#chat.idle",
|
||||
ChatGuestLogin: "#chat.guestSession",
|
||||
ChatNonGuestLogin: {
|
||||
target: "#chat.userSession",
|
||||
reenter: true,
|
||||
|
||||
Reference in New Issue
Block a user