import { useState } from 'react' import { useTranslation } from 'react-i18next' import { RiArrowDownSLine, RiArrowRightSLine, RiHammerFill, RiLoader2Line, } from '@remixicon/react' import type { ToolInfoInThought } from '../type' import cn from '@/utils/classnames' type ToolDetailProps = { payload: ToolInfoInThought } const ToolDetail = ({ payload, }: ToolDetailProps) => { const { t } = useTranslation() const { name, label, input, isFinished, output } = payload const toolLabel = name.startsWith('dataset_') ? t('dataset.knowledge') : label const [expand, setExpand] = useState(false) return (