mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
refactor: some field name in strategy status
This commit is contained in:
@ -89,9 +89,9 @@ const AgentNode: FC<NodeProps<AgentNodeType>> = (props) => {
|
||||
{inputs.agent_strategy_name
|
||||
? <SettingItem
|
||||
label={t('workflow.nodes.agent.strategy.shortLabel')}
|
||||
status={currentStrategyStatus?.strategy === 'not-found' ? 'error' : undefined}
|
||||
status={!currentStrategyStatus?.isExistInPlugin ? 'error' : undefined}
|
||||
tooltip={
|
||||
currentStrategyStatus?.strategy === 'not-found' ? t('workflow.nodes.agent.strategyNotInstallTooltip', {
|
||||
!currentStrategyStatus?.isExistInPlugin ? t('workflow.nodes.agent.strategyNotInstallTooltip', {
|
||||
plugin: pluginDetail?.declaration.label
|
||||
? renderI18nObject(pluginDetail?.declaration.label)
|
||||
: undefined,
|
||||
|
||||
@ -18,7 +18,7 @@ export type StrategyStatus = {
|
||||
source: 'external' | 'marketplace'
|
||||
installed: boolean
|
||||
}
|
||||
strategy: 'not-found' | 'normal'
|
||||
isExistInPlugin: boolean
|
||||
}
|
||||
|
||||
export const useStrategyInfo = (
|
||||
@ -46,7 +46,7 @@ export const useStrategyInfo = (
|
||||
source: isInMarketplace ? 'marketplace' : 'external',
|
||||
installed: isPluginInstalled,
|
||||
},
|
||||
strategy: strategyExist ? 'normal' : 'not-found',
|
||||
isExistInPlugin: strategyExist,
|
||||
}
|
||||
}, [strategy, marketplace, strategyProvider.isError, strategyProvider.isLoading])
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user