修复通知内部分组件显示异常;修复结束引导后无法正确连接后端服务的问题;优化了图片密钥的解析速度

This commit is contained in:
cc
2026-02-28 19:26:54 +08:00
parent d49cf08e21
commit b31ab46d11
8 changed files with 88 additions and 383 deletions

View File

@@ -86,15 +86,16 @@ export const useChatStore = create<ChatState>((set, get) => ({
if (m.localId && m.localId > 0) return `l:${m.localId}`
return `t:${m.createTime}:${m.sortSeq || 0}:${m.serverId || 0}`
}
const existingKeys = new Set(state.messages.map(getMsgKey))
const currentMessages = state.messages || []
const existingKeys = new Set(currentMessages.map(getMsgKey))
const filtered = newMessages.filter(m => !existingKeys.has(getMsgKey(m)))
if (filtered.length === 0) return state
return {
messages: prepend
? [...filtered, ...state.messages]
: [...state.messages, ...filtered]
? [...filtered, ...currentMessages]
: [...currentMessages, ...filtered]
}
}),