feat(agent): disable skills section and remove mcp integration

main
sp mac bookpro 2605 2026-05-26 00:00:22 +08:00
parent 1e810833ad
commit 2a5b4c472a
1 changed files with 7 additions and 76 deletions

View File

@ -606,87 +606,18 @@ export default function AgentEditor() {
},
{
key: 'skills',
collapsible: 'disabled',
label: (
<div
className="flex items-center gap-2 font-medium text-gray-700"
style={{ color: 'var(--color-text)' }}
className="flex items-center gap-2 font-medium text-gray-400 cursor-not-allowed"
title="技能功能开发中"
>
<ToolOutlined style={{ color: 'var(--color-brand)' }} />
& ({agent?.skills?.length ?? 0})
<ToolOutlined />
& ()
</div>
),
children: (
<div className="px-1">
<div className="flex justify-between items-center mb-4">
<span className="text-xs text-gray-500"> AI </span>
<Button
type="primary"
size="small"
ghost
style={{ borderRadius: 10 }}
onClick={() => {
setEditingSkillId(null);
setSkillEditorOpen(true);
}}
>
</Button>
</div>
<List
size="small"
dataSource={agent?.skills ?? []}
renderItem={(item) => (
<List.Item
className="bg-white mb-2 rounded-lg border border-gray-100 p-2"
actions={[
<Switch
key="toggle"
size="small"
checked={!!item.enabled}
onChange={(v) => AgentAPI.updateSkill(id!, item.id, { enabled: v }).then(refresh)}
/>,
<Button
key="edit"
type="text"
size="small"
style={{ borderRadius: 8 }}
onClick={() => {
setEditingSkillId(item.id);
setSkillEditorOpen(true);
}}
>
</Button>,
]}
>
<div className="flex items-center gap-2 overflow-hidden">
<Tag
color={TYPE_TAG[item.type].color}
className="m-0 text-[10px]"
>
{TYPE_TAG[item.type].label}
</Tag>
<span className="text-sm font-medium truncate">{item.name}</span>
</div>
</List.Item>
)}
/>
</div>
),
},
{
key: 'mcp',
label: (
<div
className="flex items-center gap-2 font-medium text-gray-700"
style={{ color: 'var(--color-text)' }}
>
<RocketOutlined style={{ color: 'var(--color-brand)' }} />
MCP
</div>
),
children: id ? <McpPanel agentId={id} /> : <div className="text-center text-gray-400 py-4"> MCP</div>,
},
children: null,
}
]}
/>