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 key={msg.id} className="text-sm" style={bgStyle}>
<div className="flex items-center gap-1 text-xs text-[var(--muted)] mb-0.5"> <div className="flex items-center gap-1 text-xs text-[var(--muted)] mb-0.5">
<span>{AUTHOR_ICON[msg.author_type] || "👤"}</span> <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>·</span>
<span>{new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })}</span> <span>{new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })}</span>
</div> </div>

View File

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