mirror of
https://github.com/langgenius/dify.git
synced 2026-07-22 03:08:33 +08:00
20 lines
628 B
TypeScript
20 lines
628 B
TypeScript
import { useHooksStore } from '@/app/components/workflow/hooks-store'
|
|
|
|
export const useWorkflowRun = () => {
|
|
const handleBackupDraft = useHooksStore((s) => s.handleBackupDraft)
|
|
const handleLoadBackupDraft = useHooksStore((s) => s.handleLoadBackupDraft)
|
|
const handleRestoreFromPublishedWorkflow = useHooksStore(
|
|
(s) => s.handleRestoreFromPublishedWorkflow,
|
|
)
|
|
const handleRun = useHooksStore((s) => s.handleRun)
|
|
const handleStopRun = useHooksStore((s) => s.handleStopRun)
|
|
|
|
return {
|
|
handleBackupDraft,
|
|
handleLoadBackupDraft,
|
|
handleRun,
|
|
handleStopRun,
|
|
handleRestoreFromPublishedWorkflow,
|
|
}
|
|
}
|