From 9f8947f1ddde696c43674ecef57e8281eb881a16 Mon Sep 17 00:00:00 2001 From: "Junjie.M" <118170653@qq.com> Date: Mon, 14 Apr 2025 19:08:53 +0800 Subject: [PATCH] feat: plugin tool selector add tool default description (#18018) --- .../plugins/plugin-detail-panel/tool-selector/index.tsx | 3 ++- .../components/workflow/block-selector/tool/action-item.tsx | 1 + web/app/components/workflow/block-selector/types.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/index.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/index.tsx index 4f6acd4477..577de19484 100644 --- a/web/app/components/plugins/plugin-detail-panel/tool-selector/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/index.tsx @@ -125,11 +125,12 @@ const ToolSelector: FC = ({ type: tool.provider_type, tool_name: tool.tool_name, tool_label: tool.tool_label, + tool_description: tool.tool_description, settings: settingValues, parameters: paramValues, enabled: tool.is_team_authorization, extra: { - description: '', + description: tool.tool_description, }, schemas: tool.paramSchemas, } diff --git a/web/app/components/workflow/block-selector/tool/action-item.tsx b/web/app/components/workflow/block-selector/tool/action-item.tsx index ecada65e84..dc9b9b9114 100644 --- a/web/app/components/workflow/block-selector/tool/action-item.tsx +++ b/web/app/components/workflow/block-selector/tool/action-item.tsx @@ -65,6 +65,7 @@ const ToolItem: FC = ({ provider_name: provider.name, tool_name: payload.name, tool_label: payload.label[language], + tool_description: payload.description[language], title: payload.label[language], is_team_authorization: provider.is_team_authorization, output_schema: payload.output_schema, diff --git a/web/app/components/workflow/block-selector/types.ts b/web/app/components/workflow/block-selector/types.ts index 93a3242222..0abf7b9031 100644 --- a/web/app/components/workflow/block-selector/types.ts +++ b/web/app/components/workflow/block-selector/types.ts @@ -24,6 +24,7 @@ export type ToolDefaultValue = { provider_name: string tool_name: string tool_label: string + tool_description: string title: string is_team_authorization: boolean params: Record @@ -35,6 +36,7 @@ export type ToolValue = { provider_name: string tool_name: string tool_label: string + tool_description: string settings?: Record parameters?: Record enabled?: boolean