From 2210b6ae9f4a6a5b2d941d95318b820058aa100c Mon Sep 17 00:00:00 2001 From: Markov Date: Tue, 24 Feb 2026 12:32:56 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20colored=20message=20backgrounds=20?= =?UTF-8?q?=E2=80=94=20yellow=20for=20system,=20green=20for=20agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ChatPanel.tsx | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx index d13e672..775e570 100644 --- a/src/components/ChatPanel.tsx +++ b/src/components/ChatPanel.tsx @@ -202,14 +202,22 @@ export default function ChatPanel({ chatId, fullscreen = false }: Props) { {loadingOlder && (
Загрузка...
)} - {messages.map((msg) => ( -
- - {AUTHOR_ICON[msg.author_type] || "👤"} {msg.author_slug} - - {msg.content} -
- ))} + {messages.map((msg) => { + const bgClass = + msg.author_type === "system" + ? "bg-yellow-900/30 rounded px-2 py-1" + : msg.author_type === "agent" + ? "bg-green-900/30 rounded px-2 py-1" + : ""; + return ( +
+ + {AUTHOR_ICON[msg.author_type] || "👤"} {msg.author_slug} + + {msg.content} +
+ ); + })} {messages.length === 0 && (
Нет сообщений
)}