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 076d171108..db684ea2df 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
@@ -17,8 +17,10 @@ import type { ToolWithProvider } from '../../../types'
import { CollectionType } from '@/app/components/tools/types'
import useGetIcon from '@/app/components/plugins/install-plugin/base/use-get-icon'
import { useStrategyInfo } from '../../agent/use-config'
+import { SwitchPluginVersion } from './switch-plugin-version'
import PluginList from '@/app/components/workflow/block-selector/market-place-plugin/list'
import { useMarketplacePlugins } from '@/app/components/plugins/marketplace/hooks'
+import { ToolTipContent } from '@/app/components/base/tooltip/content'
const NotFoundWarn = (props: {
title: ReactNode,
@@ -102,14 +104,15 @@ export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) =>
value?.agent_strategy_name,
)
- // plugin not found and is not found in marketplace
- const showPluginNotInstalledWarn = !strategyStatus?.isExistInPlugin && strategyStatus?.plugin?.source === 'external'
+ const showPluginNotInstalledWarn = strategyStatus?.plugin?.source === 'external'
&& !strategyStatus.plugin.installed
- // strategy not found
- const showUnsupportedStrategy = !strategyStatus?.isExistInPlugin
+ const showUnsupportedStrategy = strategyStatus?.plugin.source === 'external'
+ && !strategyStatus?.isExistInPlugin
+
+ const showSwitchVersion = !strategyStatus?.isExistInPlugin
+ && strategyStatus?.plugin.source === 'marketplace' && strategyStatus.plugin.installed
- // plugin not found and is founded in marketplace
const showInstallButton = !strategyStatus?.isExistInPlugin
&& strategyStatus?.plugin.source === 'marketplace' && !strategyStatus.plugin.installed
@@ -174,6 +177,16 @@ export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) =>
/>
:
}
+ {showSwitchVersion &&
+ {t('workflow.nodes.agent.strategyNotFoundDescAndSwitchVersion')}
+ }
+ onChange={() => {
+ // TODO: refresh all strategies
+ }}
+ />}
}
diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts
index b494a48e5b..279654a857 100644
--- a/web/i18n/en-US/workflow.ts
+++ b/web/i18n/en-US/workflow.ts
@@ -740,6 +740,7 @@ const translation = {
unsupportedStrategy: 'Unsupported strategy',
pluginNotFoundDesc: 'This plugin is installed from GitHub. Please go to Plugins to reinstall',
strategyNotFoundDesc: 'The installed plugin version does not provide this strategy.',
+ strategyNotFoundDescAndSwitchVersion: 'The installed plugin version does not provide this strategy. Click to switch version.',
modelSelectorTooltips: {
deprecated: 'This model is deprecated',
},
diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts
index ded2a712a7..80c53702ab 100644
--- a/web/i18n/zh-Hans/workflow.ts
+++ b/web/i18n/zh-Hans/workflow.ts
@@ -740,6 +740,7 @@ const translation = {
unsupportedStrategy: '不支持的策略',
strategyNotFoundDesc: '安装的插件版本不提供此策略。',
pluginNotFoundDesc: '此插件安装自 GitHub。请转到插件重新安装。',
+ strategyNotFoundDescAndSwitchVersion: '安装的插件版本不提供此策略。点击切换版本。',
modelSelectorTooltips: {
deprecated: '此模型已弃用',
},