Skip to content

Commit

Permalink
Reapply commit on main (#2034)
Browse files Browse the repository at this point in the history
  • Loading branch information
PopDaph authored Oct 10, 2023
1 parent 15ccc36 commit 592a5cd
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions front/components/assistant/conversation/AgentMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,9 @@ export function AgentMessage({
);
}

// Messages with no action and text
if (agentMessage.action === null && agentMessage.content) {
return (
<RenderMessageMarkdown
content={agentMessage.content}
blinkingCursor={streaming}
/>
);
}
// Messages with action
if (agentMessage.action) {
return (
<>
return (
<>
{agentMessage.action && (
<div
className={
agentMessage.content && agentMessage.content !== ""
Expand All @@ -315,20 +305,25 @@ export function AgentMessage({
>
<AgentAction action={agentMessage.action} />
</div>
{agentMessage.content && agentMessage.content !== "" && (
<>
<div className="pt-4">
<RenderMessageMarkdown
content={agentMessage.content}
blinkingCursor={streaming}
references={references}
/>
</div>
</>
)}
</>
);
}
)}
{agentMessage.content && agentMessage.content !== "" && (
<div className={agentMessage.action ? "pt-4" : ""}>
<RenderMessageMarkdown
content={agentMessage.content}
blinkingCursor={streaming}
references={references}
/>
</div>
)}
{agentMessage.status === "cancelled" && (
<Chip
label="Message generation was cancelled"
size="xs"
className="mt-4"
/>
)}
</>
);
}

async function retryHandler(agentMessage: AgentMessageType) {
Expand Down

0 comments on commit 592a5cd

Please sign in to comment.