diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index a971b094..40aedcbf 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -142,6 +142,7 @@ const EditChannelModal = (props) => { const [groupOptions, setGroupOptions] = useState([]); const [basicModels, setBasicModels] = useState([]); const [fullModels, setFullModels] = useState([]); + const [modelGroups, setModelGroups] = useState([]); const [customModel, setCustomModel] = useState(''); const [modalImageUrl, setModalImageUrl] = useState(''); const [isModalOpenurl, setIsModalOpenurl] = useState(false); @@ -477,6 +478,17 @@ const EditChannelModal = (props) => { } }; + const fetchModelGroups = async () => { + try { + const res = await API.get('/api/prefill_group?type=model'); + if (res?.data?.success) { + setModelGroups(res.data.data || []); + } + } catch (error) { + // ignore + } + }; + useEffect(() => { const modelMap = new Map(); @@ -549,6 +561,7 @@ const EditChannelModal = (props) => { } else { formApiRef.current?.setValues(getInitValues()); } + fetchModelGroups(); // 重置手动输入模式状态 setUseManualInput(false); } else { @@ -1478,6 +1491,32 @@ const EditChannelModal = (props) => { > {t('复制所有模型')} + {modelGroups && modelGroups.length > 0 && modelGroups.map(group => ( + + ))} )} />