feat(web): 工具卡片统一格式,子智能体显示 '工具名 · 任务描述' 并移除下方徽章与时间

This commit is contained in:
oudecheng 2026-08-15 09:32:16 +08:00
parent f705536fb1
commit 9e503f2672

View File

@ -500,7 +500,9 @@ export const MessageBubble = memo(function MessageBubble({
}`}
/>
<span className="text-sm font-medium text-[var(--text-secondary)] truncate">
{isTaskTool ? taskDescription || '子智能体任务' : message.toolName || 'Tool'}
{isTaskTool
? `${message.toolName || 'Tool'}${taskDescription ? ` · ${taskDescription}` : ''}`
: message.toolName || 'Tool'}
</span>
<span
className={`flex-shrink-0 transition-all duration-300 ${
@ -717,15 +719,6 @@ export const MessageBubble = memo(function MessageBubble({
</div>
)}
</div>
<div className="mt-1 flex items-center gap-2 px-1">
<span className="text-xs text-[var(--text-muted)]">{message.toolName || 'Tool'}</span>
{isTaskTool && (
<span className="rounded bg-[var(--accent-purple)]/10 px-1.5 py-0.5 text-xs text-[var(--accent-purple)]">
·{subagentType}
</span>
)}
<span className="text-xs text-[var(--text-muted)]">{formatTime(message.timestamp)}</span>
</div>
{lightboxElement}
{showDetailModal && (
<ToolDetailModal