Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions apps/app/src/react-app/domains/session/surface/message-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,10 @@ function SessionTranscriptInner(props: SessionTranscriptProps) {
return (
<div
key={`message-${block.messageId}`}
className={`flex group ${block.isUser ? "justify-end" : "justify-start"}`.trim()}
className={`relative flex group ${block.isUser ? "justify-end" : "justify-start"}`.trim()}
data-message-role={block.isUser ? "user" : "assistant"}
data-message-id={block.messageId}
style={{ contain: "layout style paint", ...blockPerfStyle(blockIndex) }}
style={{ contain: block.isUser ? "layout style" : "layout style paint", ...blockPerfStyle(blockIndex) }}
>
<div
className={`${
Expand Down Expand Up @@ -1046,12 +1046,20 @@ function SessionTranscriptInner(props: SessionTranscriptProps) {
);
})}

{!isNestedVariant ? (
{!isNestedVariant && !block.isUser ? (
<div className="absolute bottom-2 right-2 flex justify-end opacity-100 pointer-events-auto md:opacity-0 md:pointer-events-none md:group-hover:opacity-100 md:group-hover:pointer-events-auto md:group-focus-within:opacity-100 md:group-focus-within:pointer-events-auto transition-opacity select-none">
<CopyButton text={messageToText(block.message)} />
</div>
) : null}
</div>

{!isNestedVariant && block.isUser ? (
<div className="absolute inset-x-0 top-full z-10 h-4 opacity-100 pointer-events-auto md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 transition-opacity select-none">
Comment thread
veeradyani222 marked this conversation as resolved.
Comment thread
veeradyani222 marked this conversation as resolved.
<div className="absolute right-0 top-1 flex justify-end">
<CopyButton text={messageToText(block.message)} />
</div>
</div>
) : null}
</div>
);
};
Expand Down
Loading