diff --git a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx index bbc352b9b4..57d2e5f632 100644 --- a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx +++ b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx @@ -91,7 +91,7 @@ const AgentTools: FC = () => { provider_name: tool.provider_name, tool_name: tool.tool_name, tool_label: tool.tool_label, - tool_parameters: {}, + tool_parameters: tool.params, enabled: true, }) }) diff --git a/web/app/components/plugins/base/key-value-item.tsx b/web/app/components/plugins/base/key-value-item.tsx index 50d3b53535..faa81f64e7 100644 --- a/web/app/components/plugins/base/key-value-item.tsx +++ b/web/app/components/plugins/base/key-value-item.tsx @@ -46,7 +46,7 @@ const KeyValueItem: FC = ({
{label}
- + {value} diff --git a/web/app/components/plugins/plugin-page/plugins-panel.tsx b/web/app/components/plugins/plugin-page/plugins-panel.tsx index 8dbbf8eaa5..768af9d706 100644 --- a/web/app/components/plugins/plugin-page/plugins-panel.tsx +++ b/web/app/components/plugins/plugin-page/plugins-panel.tsx @@ -44,14 +44,16 @@ const PluginsPanel = () => {
- { - setCurrentPluginDetail(undefined) - setCurrentEndpoints([]) - }} - /> + {false && ( + { + setCurrentPluginDetail(undefined) + setCurrentEndpoints([]) + }} + /> + )} ) } 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 c233200b05..e33f625861 100644 --- a/web/app/components/workflow/block-selector/tool/action-item.tsx +++ b/web/app/components/workflow/block-selector/tool/action-item.tsx @@ -10,14 +10,12 @@ import { useGetLanguage } from '@/context/i18n' import BlockIcon from '../../block-icon' type Props = { - className?: string provider: ToolWithProvider payload: Tool onSelect: (type: BlockEnum, tool?: ToolDefaultValue) => void } const ToolItem: FC = ({ - className, provider, payload, onSelect, @@ -46,6 +44,12 @@ const ToolItem: FC = ({ key={payload.name} className='rounded-lg pl-[21px] hover:bg-state-base-hover cursor-pointer' onClick={() => { + const params: Record = {} + if (payload.parameters) { + payload.parameters.forEach((item) => { + params[item.name] = '' + }) + } onSelect(BlockEnum.Tool, { provider_id: provider.id, provider_type: provider.type, @@ -53,6 +57,7 @@ const ToolItem: FC = ({ tool_name: payload.name, tool_label: payload.label[language], title: payload.label[language], + params, }) }} > diff --git a/web/app/components/workflow/block-selector/tool/tool.tsx b/web/app/components/workflow/block-selector/tool/tool.tsx index 679f0b0e2e..f7433b8e60 100644 --- a/web/app/components/workflow/block-selector/tool/tool.tsx +++ b/web/app/components/workflow/block-selector/tool/tool.tsx @@ -66,6 +66,12 @@ const Tool: FC = ({ toggleFold() return } + // TODO: get workflow and custom tool params + // if (payload.parameters) { + // payload.parameters.forEach((item) => { + // params[item.name] = '' + // }) + // } onSelect(BlockEnum.Tool, { provider_id: payload.id, provider_type: payload.type, @@ -73,6 +79,7 @@ const Tool: FC = ({ tool_name: payload.name, tool_label: payload.label[language], title: payload.label[language], + params: {}, }) }} > diff --git a/web/app/components/workflow/block-selector/types.ts b/web/app/components/workflow/block-selector/types.ts index affa2488b9..9bdbf5cb3c 100644 --- a/web/app/components/workflow/block-selector/types.ts +++ b/web/app/components/workflow/block-selector/types.ts @@ -25,4 +25,5 @@ export type ToolDefaultValue = { tool_name: string tool_label: string title: string + params: Record }