Skip to content

Commit

Permalink
System messages: improve menu
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Feb 28, 2024
1 parent ff1e1c2 commit 365f144
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/apps/chat/components/message/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export function ChatMessage(props: {
>

{isHovering ? (
<IconButton variant='soft' color={fromAssistant ? 'neutral' : 'primary'} sx={avatarIconSx}>
<IconButton variant='soft' color={(fromAssistant || fromSystem) ? 'neutral' : 'primary'} sx={avatarIconSx}>
<MoreVertIcon />
</IconButton>
) : (
Expand Down Expand Up @@ -509,6 +509,15 @@ export function ChatMessage(props: {
open anchorEl={opsMenuAnchor} onClose={closeOpsMenu}
sx={{ minWidth: 280 }}
>

{fromSystem && (
<ListItem>
<Typography level='body-sm'>
System message
</Typography>
</ListItem>
)}

{/* Edit / Copy */}
<Box sx={{ display: 'flex', alignItems: 'center' }}>
{!!props.onMessageEdit && (
Expand Down

0 comments on commit 365f144

Please sign in to comment.