feat: label AI-generated conversation messages
This commit is contained in:
1 parent
3beb8aada2
commit
5ad7f1bf77
10 files changed
+69
-11
No files matched your search
@@ -32,6 +32,7 @@ function MessageHistory({ conversation }: { conversation: ConversationDetailResp
|
||||
<strong>{message.isSelf
|
||||
? `You${conversation.owner ? ` (u/${conversation.owner.redditUsername})` : ''}`
|
||||
: <RedditUsernameLink username={conversation.username} />}</strong>
|
||||
{message.isAi ? <span aria-label="Sent by AI" className="conversation-ai-badge">AI</span> : null}
|
||||
<time dateTime={new Date(message.timestamp).toISOString()}>{formatMessageTime(message.timestamp)}</time>
|
||||
</div>
|
||||
<p>{message.text}</p>
|
||||
|
||||
@@ -123,3 +123,17 @@
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.conversation-ai-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 1.25rem;
|
||||
padding: 0.125rem 0.4rem;
|
||||
border: 1px solid rgba(99, 102, 241, 0.35);
|
||||
border-radius: 999px;
|
||||
background: rgba(99, 102, 241, 0.12);
|
||||
color: #5558c9;
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
line-height: 1;
|
||||
}
|
||||
Reference in new issue
Block a user