refactor: switch plugin version component to not accept version

This commit is contained in:
AkaraChen 2025-01-07 10:58:53 +08:00
parent a8c4870349
commit e24b04b30f
2 changed files with 3 additions and 2 deletions

View File

@ -30,8 +30,9 @@ export const SwitchPluginVersion: FC<SwitchPluginVersionProps> = (props) => {
const handleUpdatedFromMarketplace = useCallback(() => {
hideUpdateModal()
pluginDetails.refetch()
onChange?.(targetVersion!)
}, [hideUpdateModal, onChange, targetVersion])
}, [hideUpdateModal, onChange, pluginDetails, targetVersion])
return <Tooltip popupContent={!isShow && !isShowUpdateModal && tooltip} triggerMethod='hover'>
<div className='w-fit'>
{isShowUpdateModal && pluginDetail && <UpdateFromMarketplace

View File

@ -74,7 +74,7 @@ const useConfig = (id: string, payload: AgentNodeType) => {
)
const pluginId = inputs.agent_strategy_provider_name?.split('/').splice(0, 2).join('/')
const pluginDetail = useCheckInstalled({
pluginIds: [pluginId || ''],
pluginIds: [pluginId!],
enabled: Boolean(pluginId),
})
const formData = useMemo(() => {