feat: workflow use common last run

This commit is contained in:
Joel
2025-07-14 15:10:21 +08:00
parent 928751a856
commit 7a9faf909e
18 changed files with 143 additions and 71 deletions

View File

@ -17,8 +17,8 @@ import {
import Toast from '../../base/toast'
import RestoringTitle from './restoring-title'
import Button from '@/app/components/base/button'
import { useStore as useAppStore } from '@/app/components/app/store'
import { useInvalidAllLastRun } from '@/service/use-workflow'
import { useHooksStore } from '../hooks-store'
export type HeaderInRestoringProps = {
onRestoreSettled?: () => void
@ -28,9 +28,8 @@ const HeaderInRestoring = ({
}: HeaderInRestoringProps) => {
const { t } = useTranslation()
const workflowStore = useWorkflowStore()
const appDetail = useAppStore.getState().appDetail
const invalidAllLastRun = useInvalidAllLastRun(appDetail!.id)
const configsMap = useHooksStore(s => s.configsMap)
const invalidAllLastRun = useInvalidAllLastRun(configsMap?.flowType, configsMap?.flowId)
const {
deleteAllInspectVars,
} = workflowStore.getState()