refactor(workflow): migrate legacy toast usage to ui toast (#34002)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
yyh
2026-03-25 12:42:18 +08:00
committed by GitHub
parent a9f2fb86a3
commit d7e49c388c
55 changed files with 329 additions and 426 deletions

View File

@ -12,7 +12,7 @@ import {
useNodesInitialized,
useViewport,
} from 'reactflow'
import Toast from '@/app/components/base/toast'
import { toast } from '@/app/components/base/ui/toast'
import { cn } from '@/utils/classnames'
import { IterationStartNodeDumb } from '../iteration-start'
import AddBlock from './add-block'
@ -34,11 +34,7 @@ const Node: FC<NodeProps<IterationNodeType>> = ({
if (nodesInitialized)
handleNodeIterationRerender(id)
if (data.is_parallel && showTips) {
Toast.notify({
type: 'warning',
message: t(`${i18nPrefix}.answerNodeWarningDesc`, { ns: 'workflow' }),
duration: 5000,
})
toast.warning(t(`${i18nPrefix}.answerNodeWarningDesc`, { ns: 'workflow' }))
setShowTips(false)
}
}, [nodesInitialized, id, handleNodeIterationRerender, data.is_parallel, showTips, t])