diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx index 6cf7449..ae7a6ae 100644 --- a/src/components/ChatPanel.tsx +++ b/src/components/ChatPanel.tsx @@ -130,17 +130,25 @@ export default function ChatPanel({ chatId, fullscreen = false }: Props) { } }; - const renderMessage = (msg: Message) => ( -
-
- {AUTHOR_ICON[msg.author_type] || "👤"} - {msg.author_slug} - · - {new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })} + const renderMessage = (msg: Message) => { + const bgStyle = + msg.author_type === "system" + ? { backgroundColor: "rgba(161, 120, 0, 0.2)", borderRadius: 6, padding: "4px 8px" } + : msg.author_type === "agent" + ? { backgroundColor: "rgba(0, 120, 60, 0.2)", borderRadius: 6, padding: "4px 8px" } + : undefined; + return ( +
+
+ {AUTHOR_ICON[msg.author_type] || "👤"} + {msg.author_slug} + · + {new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })} +
+
{msg.content}
-
{msg.content}
-
- ); + ); + }; if (fullscreen) { return (