import React from 'react'; import { X, Wrench, Bot, Copy, Check, Globe, Users } from 'lucide-react'; import { computeBadges, deriveSourceServer } from './toolBadges'; import { ToolStatusBadge } from './ToolStatusBadge'; export function ToolDetailDrawer({ item, onClose }) { const { kind, data } = item; const isA2A = kind === 'a2a_agent'; const a2aData = isA2A ? data : null; const toolUrl = kind === 'tool' ? data.url : undefined; const sourceServer = deriveSourceServer(toolUrl); const badges = computeBadges(data.name, data.description || '', isA2A ? 'A2A' : undefined, toolUrl); const [copied, setCopied] = React.useState(false); const copyId = () => { navigator.clipboard.writeText(data.id).catch(() => { }); setCopied(true); setTimeout(() => setCopied(false), 1500); }; const Icon = isA2A ? Bot : Wrench; const iconColor = isA2A ? 'text-violet-400' : 'text-cyan-400'; const gradientFrom = isA2A ? 'from-violet-500/20' : 'from-cyan-500/20'; const gradientTo = isA2A ? 'to-purple-500/20' : 'to-blue-500/20'; return (
{data.description || 'No description available.'}
This A2A agent can be selected as a connected agent in your personas or agent projects. When enabled, your agents can delegate tasks to it.
{a2aData.endpoint_url}