From fcc400941396e879778f208d74ca3221392a6a4a Mon Sep 17 00:00:00 2001 From: Stanislas Polu Date: Wed, 29 Nov 2023 10:08:12 +0100 Subject: [PATCH] front: minor code simplification (#2698) --- front/lib/api/assistant/conversation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/front/lib/api/assistant/conversation.ts b/front/lib/api/assistant/conversation.ts index 59c80dfb815e..741df5118fb0 100644 --- a/front/lib/api/assistant/conversation.ts +++ b/front/lib/api/assistant/conversation.ts @@ -279,7 +279,6 @@ async function batchRenderAgentMessages( messages: Message[] ) { const agentMessages = messages.filter((m) => !!m.agentMessage); - const userMessages = messages.filter((m) => !!m.userMessage); const [agentConfigurations, agentRetrievalActions, agentDustAppRunActions] = await Promise.all([ @@ -377,7 +376,7 @@ async function batchRenderAgentMessages( visibility: message.visibility, version: message.version, parentMessageId: - userMessages.find((m) => m.id === message.parentId)?.sId ?? null, + messages.find((m) => m.id === message.parentId)?.sId ?? null, status: agentMessage.status, action, content: agentMessage.content,