From f9b4c3134441f4c2547ad4613d2fb1800e7e1ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 27 Nov 2025 11:22:49 +0800 Subject: [PATCH] fix: MCP tool time configuration not work (#28740) --- web/app/components/tools/mcp/modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx index 68f97703bf..836fc5e0aa 100644 --- a/web/app/components/tools/mcp/modal.tsx +++ b/web/app/components/tools/mcp/modal.tsx @@ -99,8 +99,8 @@ const MCPModal = ({ const [appIcon, setAppIcon] = useState(() => getIcon(data)) const [showAppIconPicker, setShowAppIconPicker] = useState(false) const [serverIdentifier, setServerIdentifier] = React.useState(data?.server_identifier || '') - const [timeout, setMcpTimeout] = React.useState(data?.timeout || 30) - const [sseReadTimeout, setSseReadTimeout] = React.useState(data?.sse_read_timeout || 300) + const [timeout, setMcpTimeout] = React.useState(data?.configuration?.timeout || 30) + const [sseReadTimeout, setSseReadTimeout] = React.useState(data?.configuration?.sse_read_timeout || 300) const [headers, setHeaders] = React.useState( Object.entries(data?.masked_headers || {}).map(([key, value]) => ({ id: uuid(), key, value })), ) @@ -118,8 +118,8 @@ const MCPModal = ({ setUrl(data.server_url || '') setName(data.name || '') setServerIdentifier(data.server_identifier || '') - setMcpTimeout(data.timeout || 30) - setSseReadTimeout(data.sse_read_timeout || 300) + setMcpTimeout(data.configuration?.timeout || 30) + setSseReadTimeout(data.configuration?.sse_read_timeout || 300) setHeaders(Object.entries(data.masked_headers || {}).map(([key, value]) => ({ id: uuid(), key, value }))) setAppIcon(getIcon(data)) setIsDynamicRegistration(data.is_dynamic_registration)