Only show trash can when turnId is present

This commit is contained in:
sabaimran 2024-10-31 13:19:16 -07:00
parent e17dc9f7b5
commit a13760640c

View file

@ -744,16 +744,18 @@ const ChatMessage = forwardRef<HTMLDivElement, ChatMessageProps>((props, ref) =>
/> />
</button> </button>
))} ))}
<button {props.chatMessage.turnId && (
title="Delete" <button
className={`${styles.deleteButton}`} title="Delete"
onClick={() => deleteMessage(props.chatMessage)} className={`${styles.deleteButton}`}
> onClick={() => deleteMessage(props.chatMessage)}
<Trash >
alt="Delete Message" <Trash
className="hsl(var(--muted-foreground)) hover:text-red-500" alt="Delete Message"
/> className="hsl(var(--muted-foreground)) hover:text-red-500"
</button> />
</button>
)}
<button <button
title="Copy" title="Copy"
className={`${styles.copyButton}`} className={`${styles.copyButton}`}