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