@@ -13,7 +13,6 @@ import { useExecutionStore } from '@/stores/execution/store'
1313import { useConsoleStore } from '@/stores/panel/console/store'
1414import { useVariablesStore } from '@/stores/panel/variables/store'
1515import { useEnvironmentStore } from '@/stores/settings/environment/store'
16- import { useGeneralStore } from '@/stores/settings/general/store'
1716import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
1817import { mergeSubblockState } from '@/stores/workflows/utils'
1918import { generateLoopBlocks , generateParallelBlocks } from '@/stores/workflows/workflow/utils'
@@ -100,7 +99,6 @@ export function useWorkflowExecution() {
10099 const { activeWorkflowId, workflows } = useWorkflowRegistry ( )
101100 const { toggleConsole } = useConsoleStore ( )
102101 const { getAllVariables, loadWorkspaceEnvironment } = useEnvironmentStore ( )
103- const { isDebugModeEnabled } = useGeneralStore ( )
104102 const { getVariablesByWorkflowId, variables } = useVariablesStore ( )
105103 const {
106104 isExecuting,
@@ -145,19 +143,13 @@ export function useWorkflowExecution() {
145143 setExecutor ( null )
146144 setPendingBlocks ( [ ] )
147145 setActiveBlocks ( new Set ( ) )
148-
149- // Reset debug mode setting if it was enabled
150- if ( isDebugModeEnabled ) {
151- useGeneralStore . getState ( ) . toggleDebugMode ( )
152- }
153146 } , [
154147 setIsExecuting ,
155148 setIsDebugging ,
156149 setDebugContext ,
157150 setExecutor ,
158151 setPendingBlocks ,
159152 setActiveBlocks ,
160- isDebugModeEnabled ,
161153 ] )
162154
163155 /**
@@ -626,11 +618,10 @@ export function useWorkflowExecution() {
626618 }
627619 } else if ( result && 'success' in result ) {
628620 setExecutionResult ( result )
629- if ( ! isDebugModeEnabled ) {
630- setIsExecuting ( false )
631- setIsDebugging ( false )
632- setActiveBlocks ( new Set ( ) )
633- }
621+ // Reset execution state after successful non-debug execution
622+ setIsExecuting ( false )
623+ setIsDebugging ( false )
624+ setActiveBlocks ( new Set ( ) )
634625
635626 if ( isChatExecution ) {
636627 if ( ! result . metadata ) {
@@ -659,7 +650,6 @@ export function useWorkflowExecution() {
659650 getAllVariables ,
660651 loadWorkspaceEnvironment ,
661652 getVariablesByWorkflowId ,
662- isDebugModeEnabled ,
663653 setIsExecuting ,
664654 setIsDebugging ,
665655 setDebugContext ,
0 commit comments