Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: plugin tool selector add tool default description (#18018)

Junjie.M9f8947f1ddde
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 4f6acd44777..577de194843 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<Props> = ({
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 ecada65e84a..dc9b9b91143 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<Props> = ({
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 93a32422224..0abf7b90315 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<string, any>
@@ -35,6 +36,7 @@ export type ToolValue = {
provider_name: string
tool_name: string
tool_label: string
+ tool_description: string
settings?: Record<string, any>
parameters?: Record<string, any>
enabled?: boolean