import { XCircle, PlusCircleIcon, Wrench } from 'lucide-react'; import type { TPlugin, AgentToolType } from 'librechat-data-provider'; import { useLocalize } from '~/hooks'; type ToolItemProps = { tool: TPlugin | AgentToolType; onAddTool: () => void; onRemoveTool: () => void; isInstalled?: boolean; }; function ToolItem({ tool, onAddTool, onRemoveTool, isInstalled = false }: ToolItemProps) { const localize = useLocalize(); const handleClick = () => { if (isInstalled) { onRemoveTool(); } else { onAddTool(); } }; const name = (tool as AgentToolType).metadata?.name || (tool as AgentToolType).tool_id || (tool as TPlugin).name; const description = (tool as AgentToolType).metadata?.description || (tool as TPlugin).description || ''; const icon = (tool as AgentToolType).metadata?.icon || (tool as TPlugin).icon; return (