refactor(chat): remove commented-out code in guestSession

This commit is contained in:
2026-06-18 15:47:24 +08:00
parent a347b39001
commit d87bfcc859
2 changed files with 15 additions and 135 deletions
-8
View File
@@ -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 stateinitializing / 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,