Skip to content

Commit

Permalink
front: minor code simplification (#2698)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Nov 29, 2023
1 parent d264e84 commit fcc4009
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions front/lib/api/assistant/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fcc4009

Please sign in to comment.