mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 02:42:59 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			609 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			609 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,
 | |
|   }
 | |
| }
 | 
