From 3797d53c78acc73309255a60812a6ffe80ffac5c Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 16 Sep 2025 16:42:15 +0800 Subject: [PATCH] fix: Update type handling in ToolNodeType to ensure proper formatting for unknown types --- web/app/components/workflow/nodes/tool/default.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/nodes/tool/default.ts b/web/app/components/workflow/nodes/tool/default.ts index 51946bf374..0ffd7b1883 100644 --- a/web/app/components/workflow/nodes/tool/default.ts +++ b/web/app/components/workflow/nodes/tool/default.ts @@ -99,8 +99,8 @@ const nodeDefault: NodeDefault = { const dataType = output.type const schemaType = getMatchedSchemaType(output, schemaTypeDefinitions) let type = dataType === 'array' - ? `array[${output.items?.type.slice(0, 1).toLocaleLowerCase()}${output.items?.type.slice(1)}]` - : `${output.type.slice(0, 1).toLocaleLowerCase()}${output.type.slice(1)}` + ? `Array[${output.items?.type ? output.items.type.slice(0, 1).toLocaleLowerCase() + output.items.type.slice(1) : 'Unknown'}]` + : `${output.type ? output.type.slice(0, 1).toLocaleLowerCase() + output.type.slice(1) : 'Unknown'}` if (type === VarType.object && schemaType === 'file') type = VarType.file