From c9053bccc5328e4dfc1cf5db8b043d73f118c8dc Mon Sep 17 00:00:00 2001 From: Syngnat Date: Thu, 11 Jun 2026 15:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ai):=20=E5=AE=8C=E5=96=84=20MC?= =?UTF-8?q?P=20Docker=20=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0=E6=8C=87?= =?UTF-8?q?=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 Docker MCP 启动模板和参数顺序提示 - 校验 docker run、-i 和镜像名等易漏参数 - 同步 MCP 设置页说明、空状态和单元测试 --- .../components/ai/AIMCPServerFormPanel.tsx | 6 +- .../ai/AISettingsMCPSection.test.tsx | 28 +++++++++- .../components/ai/AISettingsMCPSection.tsx | 4 +- frontend/src/utils/mcpArgumentHints.test.ts | 9 +++ frontend/src/utils/mcpArgumentHints.ts | 43 ++++++++++++++ frontend/src/utils/mcpServerGuidance.ts | 24 ++++---- frontend/src/utils/mcpServerTemplates.ts | 13 +++++ .../src/utils/mcpServerValidation.test.ts | 32 +++++++++++ frontend/src/utils/mcpServerValidation.ts | 56 ++++++++++++++++++- 9 files changed, 196 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/ai/AIMCPServerFormPanel.tsx b/frontend/src/components/ai/AIMCPServerFormPanel.tsx index 4db3dcc..5821aa5 100644 --- a/frontend/src/components/ai/AIMCPServerFormPanel.tsx +++ b/frontend/src/components/ai/AIMCPServerFormPanel.tsx @@ -75,11 +75,11 @@ const AIMCPServerFormPanel: React.FC = ({ options={[{ label: 'stdio', value: 'stdio' }]} /> - + onChange({ command: event.target.value })} - placeholder="启动命令,例如:npx / node / uvx / python" + placeholder="启动命令,例如:npx / node / uvx / python / docker" style={{ borderRadius: 10, background: inputBg, border: `1px solid ${cardBorder}` }} /> @@ -122,7 +122,7 @@ const AIMCPServerFormPanel: React.FC = ({ - +