From f8e9216270cc8cf7e6516b71c4f45cbab2b8a517 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Mon, 26 May 2025 16:24:19 +0800 Subject: [PATCH] refactor: remove early return for empty MCP servers in MCPToolsButton - Eliminated the conditional return for empty active MCP servers to streamline the component rendering logic. --- src/renderer/src/pages/home/Inputbar/MCPToolsButton.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/renderer/src/pages/home/Inputbar/MCPToolsButton.tsx b/src/renderer/src/pages/home/Inputbar/MCPToolsButton.tsx index e7826b7e20..b022377f18 100644 --- a/src/renderer/src/pages/home/Inputbar/MCPToolsButton.tsx +++ b/src/renderer/src/pages/home/Inputbar/MCPToolsButton.tsx @@ -450,10 +450,6 @@ const MCPToolsButton: FC = ({ ref, setInputValue, resizeTextArea, Toolbar openResourcesList })) - if (activedMcpServers.length === 0) { - return null - } - return (