System messages show actor name, mentions as objects

This commit is contained in:
Markov 2026-02-27 08:33:43 +01:00
parent a1854eb4f5
commit 4eeba5a81e
2 changed files with 7 additions and 2 deletions

View File

@ -279,7 +279,11 @@ export default function ChatPanel({ chatId, projectSlug }: Props) {
<div key={msg.id} className="text-sm" style={bgStyle}>
<div className="flex items-center gap-1 text-xs text-[var(--muted)] mb-0.5">
<span>{AUTHOR_ICON[msg.author_type] || "👤"}</span>
<span className="font-medium">{msg.author_type === "system" ? "System" : (msg.author?.name || msg.author?.slug || "Unknown")}</span>
<span className="font-medium">
{msg.author_type === "system"
? (msg.actor ? `Система (${msg.actor.name})` : "Система")
: (msg.author?.name || msg.author?.slug || "Unknown")}
</span>
<span>·</span>
<span>{new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })}</span>
</div>

View File

@ -147,7 +147,8 @@ export interface Message {
author: MemberBrief | null;
content: string;
thinking: string | null;
mentions: string[];
mentions: MemberBrief[];
actor: MemberBrief | null;
voice_url: string | null;
attachments: Attachment[];
created_at: string;