From f61077d4ee776a708b9547ceb4205fceafe7349e Mon Sep 17 00:00:00 2001 From: iliya Date: Fri, 6 Mar 2026 16:21:27 +0200 Subject: [PATCH] feat: enhance LeadThoughtsGroup UI and tool preview handling - Updated LeadThoughtsGroup component to visually distinguish 'Agent' and 'TaskCreate' tool calls with specific styling and icons. - Increased the character limit for tool previews from 60 to 200 in the extractToolPreview function, allowing for more detailed descriptions. - Improved overall tooltip display for better user insights into tool usage. --- .../team/activity/LeadThoughtsGroup.tsx | 24 ++++++++++++++----- src/shared/utils/toolSummary.ts | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/team/activity/LeadThoughtsGroup.tsx b/src/renderer/components/team/activity/LeadThoughtsGroup.tsx index fe0d2540..cc42e2e9 100644 --- a/src/renderer/components/team/activity/LeadThoughtsGroup.tsx +++ b/src/renderer/components/team/activity/LeadThoughtsGroup.tsx @@ -115,12 +115,24 @@ function ToolSummaryTooltipContent({
{toolCalls.length} {toolCalls.length === 1 ? 'tool call' : 'tool calls'}
- {toolCalls.map((tc, i) => ( -
- {tc.name} - {tc.preview && {tc.preview}} -
- ))} + {toolCalls.map((tc, i) => { + const isAgent = tc.name === 'Agent' || tc.name === 'TaskCreate'; + return ( +
+ + {isAgent ? '🤖 ' : ''} + {tc.name} + + {tc.preview && ( + + {tc.preview} + + )} +
+ ); + })} ); } diff --git a/src/shared/utils/toolSummary.ts b/src/shared/utils/toolSummary.ts index df3c72be..8f8c3ce2 100644 --- a/src/shared/utils/toolSummary.ts +++ b/src/shared/utils/toolSummary.ts @@ -96,9 +96,9 @@ export function extractToolPreview( case 'Agent': case 'TaskCreate': return typeof input.prompt === 'string' - ? truncateStr(input.prompt, 60) + ? truncateStr(input.prompt, 200) : typeof input.description === 'string' - ? truncateStr(input.description, 60) + ? truncateStr(input.description, 200) : undefined; case 'WebFetch': if (typeof input.url === 'string') {