fix(chatbot): preserve historical message order during SSE playback

This commit is contained in:
yiling
2026-07-11 15:12:59 +08:00
parent 6a5f8db0d6
commit 35db3fc49e
-1
View File
@@ -200,7 +200,6 @@ export const useChatbotStore = create<ChatbotState>((set) => ({
// Replace temp/optimistic message when the real user message streams back
const filtered = s.messages.filter(
(m) =>
m.id !== entry.id &&
!(entry.role === 'user' && !isExisting && m.id.startsWith('temp-')),
)