import { useFetchKnowledgeList } from '@/hooks/knowledgeHook'; import { PlusOutlined } from '@ant-design/icons'; import { Form, Input, Select, Switch, Upload } from 'antd'; import classNames from 'classnames'; import { ISegmentedContentProps } from '../interface'; import { useTranslate } from '@/hooks/commonHooks'; import styles from './index.less'; const AssistantSetting = ({ show }: ISegmentedContentProps) => { const { list: knowledgeList } = useFetchKnowledgeList(true); const knowledgeOptions = knowledgeList.map((x) => ({ label: x.name, value: x.id, })); const { t } = useTranslate('chat'); const normFile = (e: any) => { if (Array.isArray(e)) { return e; } return e?.fileList; }; const uploadButtion = ( {t('upload', { keyPrefix: 'common' })} ) return ( {show ? uploadButtion : null} ); }; export default AssistantSetting;