[verified] Fix group chat agent member sync (#877)

This commit is contained in:
Zhicheng Han
2026-05-20 11:13:15 +02:00
committed by GitHub
parent 51c3f0c62a
commit 6578873d9e
6 changed files with 246 additions and 32 deletions
@@ -618,8 +618,9 @@ export const useGroupChatStore = defineStore('groupChat', () => {
async function removeAgentFromRoom(roomId: string, agentId: string) {
try {
await removeAgent(roomId, agentId)
agents.value = agents.value.filter(a => a.id !== agentId)
const res = await removeAgent(roomId, agentId)
agents.value = res.agents ?? agents.value.filter(a => a.id !== agentId && a.agentId !== agentId)
if (res.members) members.value = res.members
} catch (err: any) {
error.value = err.message
throw err