diff --git a/web/app/components/app/configuration/config-vision/index.tsx b/web/app/components/app/configuration/config-vision/index.tsx index ae388615c0..7666fcb834 100644 --- a/web/app/components/app/configuration/config-vision/index.tsx +++ b/web/app/components/app/configuration/config-vision/index.tsx @@ -4,12 +4,15 @@ import React, { useCallback } from 'react' import { useTranslation } from 'react-i18next' import produce from 'immer' import { useContext } from 'use-context-selector' +import ParamConfig from './param-config' import { Vision } from '@/app/components/base/icons/src/vender/features' import Tooltip from '@/app/components/base/tooltip' -import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card' +// import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card' import ConfigContext from '@/context/debug-configuration' -import { Resolution } from '@/types/app' +// import { Resolution } from '@/types/app' import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks' +import Switch from '@/app/components/base/switch' +import type { FileUpload } from '@/app/components/base/features/types' const ConfigVision: FC = () => { const { t } = useTranslation() @@ -17,7 +20,7 @@ const ConfigVision: FC = () => { const file = useFeatures(s => s.features.file) const featuresStore = useFeaturesStore() - const handleChange = useCallback((resolution: Resolution) => { + const handleChange = useCallback((data: FileUpload) => { const { features, setFeatures, @@ -26,7 +29,8 @@ const ConfigVision: FC = () => { const newFeatures = produce(features, (draft) => { draft.file = { ...draft.file, - image: { detail: resolution }, + enabled: data.enabled, + image: { detail: data.image?.detail }, } }) setFeatures(newFeatures) @@ -53,7 +57,7 @@ const ConfigVision: FC = () => { />