Merge branch 'fix/v0.2.6_yjp' into release/v0.2.6

This commit is contained in:
yujiangping
2026-03-06 15:32:34 +08:00
2 changed files with 10 additions and 10 deletions

View File

@@ -672,9 +672,17 @@ const CreateModal = forwardRef<CreateModalRef, CreateModalRefProps>(({
{currentType !== 'Folder' && dynamicTypeList.map((tp) => {
const fieldKey = typeToFieldKey(tp);
// When tp is 'llm', merge llm and chat options
const options = tp.toLowerCase() === 'llm' || tp.toLowerCase() === 'image2text'
let options = tp.toLowerCase() === 'llm' || tp.toLowerCase() === 'image2text'
? [...(modelOptionsByType['llm'] || []), ...(modelOptionsByType['chat'] || [])]
: modelOptionsByType[tp] || [];
// When tp is 'image2text', filter to only include models with 'vision' capability
if (tp.toLowerCase() === 'image2text') {
options = options.filter((opt: any) => {
const model = models?.items?.find((m: any) => m.id === opt.value);
return model?.capability?.includes('vision');
});
}
return (
<Form.Item
key={tp}

View File

@@ -1,11 +1,3 @@
/*
* @Description:
* @Version: 0.0.1
* @Author: yujiangping
* @Date: 2026-01-05 17:22:23
* @LastEditors: yujiangping
* @LastEditTime: 2026-03-04 15:12:48
*/
import React, { useState } from 'react';
import { Tabs } from 'antd';
import { useTranslation } from 'react-i18next';
@@ -16,7 +8,7 @@ import Custom from './Custom';
import Market from './Market';
import Tag from '@/components/Tag'
const tabKeys = ['mcp', 'inner', 'custom', 'market']
const tabKeys = ['mcp', 'inner', 'custom'] // , 'market'
const ToolManagement: React.FC = () => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState('mcp');