From a06d2892f894c97071f34eef11db2cc6b032a4db Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 29 Sep 2025 16:51:14 +0800 Subject: [PATCH] fix(plugin): handle optional property in llm_description assignment - Updated the llm_description assignment in the ToolParameter to safely access the en_US property of paramDescription, ensuring it defaults to an empty string if not present. This change improves the robustness of the parameter handling in the plugin detail panel. --- .../plugins/plugin-detail-panel/trigger-events-list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/plugins/plugin-detail-panel/trigger-events-list.tsx b/web/app/components/plugins/plugin-detail-panel/trigger-events-list.tsx index 07092d708a..efa95f6d0e 100644 --- a/web/app/components/plugins/plugin-detail-panel/trigger-events-list.tsx +++ b/web/app/components/plugins/plugin-detail-panel/trigger-events-list.tsx @@ -52,7 +52,7 @@ const toToolParameter = (parameter: any): ToolParameter => { human_description: paramDescription || paramLabel, type: parameter.type, form: 'setting', - llm_description: typeof paramDescription === 'object' ? (paramDescription.en_US || '') : (paramDescription || ''), + llm_description: typeof paramDescription === 'object' ? (paramDescription?.en_US || '') : (paramDescription || ''), required: parameter.required ?? false, multiple: parameter.multiple ?? false, default: parameter.default ?? '',