diff --git a/web/src/components/Layout/BasicAuthLayout.tsx b/web/src/components/Layout/BasicAuthLayout.tsx
index 2f40ac37..094493c5 100644
--- a/web/src/components/Layout/BasicAuthLayout.tsx
+++ b/web/src/components/Layout/BasicAuthLayout.tsx
@@ -19,6 +19,7 @@
import { Outlet } from 'react-router-dom';
import { useEffect, type FC } from 'react';
+import { Layout } from 'antd';
import { useUser } from '@/store/user';
@@ -35,10 +36,10 @@ const BasicAuthLayout: FC = () => {
}, [getUserInfo]);
return (
-
+
{/* Render child routes without additional UI */}
-
+
)
};
diff --git a/web/src/views/Skills/components/ToolList/ToolList.tsx b/web/src/views/Skills/components/ToolList/ToolList.tsx
index 785e0a54..0df4da58 100644
--- a/web/src/views/Skills/components/ToolList/ToolList.tsx
+++ b/web/src/views/Skills/components/ToolList/ToolList.tsx
@@ -12,7 +12,7 @@
import { type FC, useRef, useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
-import { Space, Button, List } from 'antd'
+import { Space, Button, Flex } from 'antd'
import Card from '@/views/ApplicationConfig/components/Card'
import type {
@@ -22,6 +22,7 @@ import type {
import Empty from '@/components/Empty'
import ToolModal from './ToolModal'
import { getToolMethods, getToolDetail } from '@/api/tools'
+import Tag from '@/components/Tag'
/**
* Tool List Component Props
@@ -61,6 +62,7 @@ const ToolList: FC = ({value, onChange}) => {
const mcpFilterItem = (methods as any[]).find(vo => vo.name === item.operation)
return {
...item,
+ is_active: (toolDetail as any).is_active,
label: mcpFilterItem?.description,
method_id: mcpFilterItem?.method_id,
value: mcpFilterItem?.name,
@@ -74,6 +76,7 @@ const ToolList: FC = ({value, onChange}) => {
const builtinFilterItem = (methods as any[]).find(vo => vo.name === item.operation)
return {
...item,
+ is_active: (toolDetail as any).is_active,
label: builtinFilterItem?.description,
method_id: builtinFilterItem?.method_id,
value: builtinFilterItem?.name,
@@ -84,6 +87,7 @@ const ToolList: FC = ({value, onChange}) => {
// Single method: Use first method
return {
...item,
+ is_active: (toolDetail as any).is_active,
label: (methods as any[])[0]?.description,
method_id: (methods as any[])[0]?.method_id,
value: (methods as any[])[0]?.name,
@@ -96,6 +100,7 @@ const ToolList: FC = ({value, onChange}) => {
const customFilterItem = (methods as any[]).find(vo => vo.method_id === item.operation)
return {
...item,
+ is_active: (toolDetail as any).is_active,
label: customFilterItem?.name,
method_id: customFilterItem?.method_id,
value: customFilterItem?.name,
@@ -129,7 +134,10 @@ const ToolList: FC = ({value, onChange}) => {
* @param tool - Tool to add
*/
const updateTools = (tool: ToolOption) => {
- const list = [...toolList, tool]
+ const list = [...toolList, {
+ ...tool,
+ is_active: true,
+ }]
setToolList(list)
onChange && onChange(list)
}
@@ -146,42 +154,35 @@ const ToolList: FC = ({value, onChange}) => {
}
return (
-
- + {t('application.addTool')}
-
+
}
>
- {/* Show empty state or tool list */}
{toolList.length === 0
- ?
- :
- (
-
- {/* Tool card with delete button */}
-
- {/* Tool label/description */}
-
- {item.label}
-
-
- {/* Delete button with hover effect */}
- handleDeleteTool(index)}
- >
-
+ ?
+ :
+ {toolList.map((item, index) => (
+
+
+
+ {item.label}
-
- )}
- />
+
+ {item.is_active ? t('common.enable') : t('common.deleted')}
+
+
+
+ handleDeleteTool(index)}
+ >
+
+
+ ))}
+
}
- {/* Tool selection modal */}
{
const { message } = App.useApp()
const [loading, setLoading] = useState(false)
const [form] = Form.useForm();
+ const [data, setData] = useState(null)
/**
* Effect: Load skill data if editing existing skill
@@ -70,6 +70,7 @@ const SkillConfig: FC = () => {
getSkillDetail(id)
.then(res => {
form.setFieldsValue(res as SkillFormData)
+ setData(res as SkillFormData)
})
.finally(() => {
setLoading(false)
@@ -131,93 +132,103 @@ const SkillConfig: FC = () => {
}
return (
-
- {/* Back button */}
-
-

-
{t('common.exit')}
-
-
-
}
+ onClick={handleBack}
>
-
-
-
-
-
-
-
-
-
+ {t('common.return')}
+
+
+ }
+ />
+
+
-
- {/* AI Prompt Generation Modal */}
-
-
+
+
+
+ {/* AI Prompt Generation Modal */}
+
+
+
)
}