From 7c253e6b102629d03445adf34afef07c722ecba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E9=9B=B2?= <137844255@qq.com> Date: Fri, 13 Feb 2026 20:07:13 +0800 Subject: [PATCH] fix: handle missing arguments in MCP tool calls to prevent GUI crash (#7143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 青雲 <137844255@qq.com> --- ui/desktop/src/components/ToolCallWithResponse.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/src/components/ToolCallWithResponse.tsx b/ui/desktop/src/components/ToolCallWithResponse.tsx index 06a91ce2dc..a4a6ea1ead 100644 --- a/ui/desktop/src/components/ToolCallWithResponse.tsx +++ b/ui/desktop/src/components/ToolCallWithResponse.tsx @@ -518,7 +518,7 @@ function ToolCallView({ // Function to create a descriptive representation of what the tool is doing const getToolDescription = (): string | null => { - const args = toolCall.arguments as Record; + const args = (toolCall.arguments ?? {}) as Record; const toolName = getToolName(toolCall.name); const getStringValue = (value: ToolCallArgumentValue): string => {