From 82c2ff4c53a811f243cb8ad362ef9b2134724dae Mon Sep 17 00:00:00 2001 From: Markov Date: Fri, 27 Feb 2026 11:55:24 +0100 Subject: [PATCH] Tool log UI: collapsible block under agent messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows 🔧 Инструменты (N) with tool names and truncated results. Displayed between thinking and message content. --- src/components/ChatPanel.tsx | 19 +++++++++++++++++++ src/lib/api.ts | 1 + 2 files changed, 20 insertions(+) diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx index 5c45679..b466dcc 100644 --- a/src/components/ChatPanel.tsx +++ b/src/components/ChatPanel.tsx @@ -297,6 +297,25 @@ export default function ChatPanel({ chatId, projectId }: Props) { )} + {msg.tool_log && msg.tool_log.length > 0 && ( +
+ + 🔧 Инструменты ({msg.tool_log.length}) + +
+ {msg.tool_log.map((t, i) => ( +
+ {t.name} + {t.result && ( +
+ → {t.result.slice(0, 150)}{t.result.length > 150 ? '…' : ''} +
+ )} +
+ ))} +
+
+ )}
{renderContent(msg.content)}
{renderAttachments(msg.attachments)} diff --git a/src/lib/api.ts b/src/lib/api.ts index 5aaeee7..6dda759 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -147,6 +147,7 @@ export interface Message { author: MemberBrief | null; content: string; thinking: string | null; + tool_log: Array<{name: string; args?: string; result?: string; error?: boolean}> | null; mentions: MemberBrief[]; actor: MemberBrief | null; voice_url: string | null;