feat(logs): add skill icon to trace spans (#3181)

Adds the AgentSkillsIcon to trace spans in logs when displaying the
load_skill tool. Previously, skills appeared with a default gray color.
Now they display with the proper skill icon and a purple (#8B5CF6)
background color, consistent with the skills icon used in the settings
modal and skill input components.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Emir Karabeg <emir-karabeg@users.noreply.github.com>
This commit is contained in:
Emir Karabeg
2026-02-10 12:46:21 -08:00
committed by GitHub
parent e321f883b0
commit 73540e3936

View File

@@ -16,7 +16,7 @@ import {
PopoverItem,
Tooltip,
} from '@/components/emcn'
import { WorkflowIcon } from '@/components/icons'
import { AgentSkillsIcon, WorkflowIcon } from '@/components/icons'
import { cn } from '@/lib/core/utils/cn'
import { formatDuration } from '@/lib/core/utils/formatting'
import { LoopTool } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/loop/loop-config'
@@ -118,6 +118,10 @@ function getBlockIconAndColor(
// Check for tool by name first (most specific)
if (lowerType === 'tool' && toolName) {
// Handle load_skill tool with the AgentSkillsIcon
if (toolName === 'load_skill') {
return { icon: AgentSkillsIcon, bgColor: '#8B5CF6' }
}
const toolBlock = getBlockByToolName(toolName)
if (toolBlock) {
return { icon: toolBlock.icon, bgColor: toolBlock.bgColor }