mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 07:28:19 +00:00
fix(chatbot): preserve historical message order during SSE playback
This commit is contained in:
@@ -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-')),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user