From 94ac7d613c27f59eedb5885658b2e1ad13795f2a Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sat, 25 Apr 2026 17:26:27 +0800 Subject: [PATCH] refactor: standardize event type naming for resync handling --- web/hooks/use-agent-conversation-realtime.ts | 2 +- web/lib/stores/kefu-chat.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/hooks/use-agent-conversation-realtime.ts b/web/hooks/use-agent-conversation-realtime.ts index c79aa24..f5e992c 100644 --- a/web/hooks/use-agent-conversation-realtime.ts +++ b/web/hooks/use-agent-conversation-realtime.ts @@ -88,7 +88,7 @@ export function useAgentConversationRealtime() { } const store = useAgentConversationsStore.getState() - if (eventType === "resync.required") { + if (eventType === "resyncRequired") { void store.resyncRealtimeData(conversationId).catch((error) => { toast.error(error instanceof Error ? error.message : "同步会话数据失败") }) diff --git a/web/lib/stores/kefu-chat.ts b/web/lib/stores/kefu-chat.ts index 1ddf1b7..813abf4 100644 --- a/web/lib/stores/kefu-chat.ts +++ b/web/lib/stores/kefu-chat.ts @@ -163,7 +163,7 @@ export const useKefuChatStore = create((set, get) => { return } const payload = event.data ?? event.payload - if (event.type === "resync.required") { + if (event.type === "resyncRequired") { void get().refreshMessages() return }