diff --git a/src/components/ExternalToolEditor.tsx b/src/components/ExternalToolEditor.tsx index 855b500..fc6c774 100644 --- a/src/components/ExternalToolEditor.tsx +++ b/src/components/ExternalToolEditor.tsx @@ -121,18 +121,13 @@ function normalizeRouting(value: ToolApiRoutingFormValue | undefined, apiName: s throw new Error(`API ${apiName} 的路由规则不能为空`); } - const summary = value.summary?.trim(); - if (!summary) { - throw new Error(`API ${apiName} 的路由摘要不能为空`); - } - const useWhen = normalizeStringList(value.useWhen); if (useWhen.length < 1) { throw new Error(`API ${apiName} 的 useWhen 至少保留一项`); } return { - summary, + summary: value.summary?.trim() || '', useWhen, doNotUseWhen: normalizeStringList(value.doNotUseWhen), }; @@ -344,11 +339,7 @@ export default function ExternalToolEditor({ open, agentId, plugin, onClose, onS - +