enabled count

pull/12372/head
JzoNg 1 year ago
parent 3c85363392
commit 891a76f2fa

@ -34,6 +34,7 @@ const MultipleToolSelector = ({
onChange, onChange,
}: Props) => { }: Props) => {
const { t } = useTranslation() const { t } = useTranslation()
const enabledCount = value.filter(item => item.enabled).length
// collapse control // collapse control
const [collapse, setCollapse] = React.useState(false) const [collapse, setCollapse] = React.useState(false)
const handleCollapse = () => { const handleCollapse = () => {
@ -101,7 +102,7 @@ const MultipleToolSelector = ({
{value.length > 0 && ( {value.length > 0 && (
<> <>
<div className='flex items-center gap-1 text-text-tertiary system-xs-medium'> <div className='flex items-center gap-1 text-text-tertiary system-xs-medium'>
<span>{`${value.length}/${value.length}`}</span> <span>{`${enabledCount}/${value.length}`}</span>
<span>{t('appDebug.agent.tools.enabled')}</span> <span>{t('appDebug.agent.tools.enabled')}</span>
</div> </div>
<Divider type='vertical' className='ml-3 mr-1 h-3' /> <Divider type='vertical' className='ml-3 mr-1 h-3' />

Loading…
Cancel
Save