diff --git a/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx b/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx index e82e66776f..d34f5699cb 100644 --- a/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx +++ b/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx @@ -1,13 +1,16 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem' import { useState } from 'react' -import AllTools from '../../../block-selector/all-tools' import type { Strategy } from './agent-strategy' import classNames from '@/utils/classnames' -import { RiArrowDownSLine, RiErrorWarningFill } from '@remixicon/react' +import { RiArrowDownSLine, RiArrowRightUpLine, RiErrorWarningFill } from '@remixicon/react' import { useAllBuiltInTools } from '@/service/use-tools' import Tooltip from '@/app/components/base/tooltip' import Link from 'next/link' import { InstallPluginButton } from './install-plugin-button' +import SearchInput from '@/app/components/base/search-input' +import ViewTypeSelect, { ViewType } from '../../../block-selector/view-type-select' +import Tools from '../../../block-selector/tools' +import { MARKETPLACE_URL_PREFIX } from '@/config' const ExternalNotInstallWarn = () => { // TODO: add i18n label @@ -36,11 +39,13 @@ export const AgentStrategySelector = (props: AgentStrategySelectorProps) => { const { value, onChange } = props const [open, setOpen] = useState(false) const list = useAllBuiltInTools() + const [viewType, setViewType] = useState(ViewType.flat) // TODO: should be replaced by real data const isExternalInstalled = true - return + return
setOpen(true)}> + {/* eslint-disable-next-line @next/next/no-img-element */} {list.data && coll, @@ -56,31 +61,41 @@ export const AgentStrategySelector = (props: AgentStrategySelectorProps) => { {value?.agent_strategy_name || 'Select agentic strategy'}

- e.preventDefault()} /> + e.stopPropagation()} size={'small'} /> {isExternalInstalled ? : }
- {list.data && { - if (!tool) { - // TODO: should not be called, try it - return - } - onChange({ - agent_strategy_name: tool.title, - agent_strategy_provider_name: tool.provider_name, - agent_parameters: {}, - }) - }} - />} +
+
+ + +
+
+ { + onChange({ + agent_strategy_name: tool!.title, + agent_strategy_provider_name: tool!.provider_name, + agent_parameters: tool!.params, + }) + setOpen(false) + }} + hasSearchText={false} + showWorkflowEmpty + /> +
+ Find more in + {/** //TODO: replace URL */} + + Marketplace + +
+
+
}