prototype - eager execution

This commit is contained in:
Terry Jia
2025-11-22 22:24:29 -05:00
parent 9da82f47ef
commit 3e316ac9b7
4 changed files with 377 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import { useEagerExecutionStore } from '@/stores/eagerExecutionStore'
import {
getAllNonIoNodesInSubgraph,
getExecutionIdsForSelectedNodes
@@ -1225,6 +1226,25 @@ export function useCoreCommands(): ComfyCommand[] {
icon: 'pi pi-database',
label: 'toggle linear mode',
function: () => (canvasStore.linearMode = !canvasStore.linearMode)
},
{
id: 'Comfy.ToggleEagerExecution',
icon: 'pi pi-bolt',
label: 'Toggle Eager Execution',
function: () => {
const eagerExecutionStore = useEagerExecutionStore()
eagerExecutionStore.toggle()
toastStore.add({
severity: 'info',
summary: eagerExecutionStore.enabled
? t('Eager execution enabled')
: t('Eager execution disabled'),
detail: eagerExecutionStore.enabled
? t('Nodes will auto-execute when ancestors change')
: t('Auto-execution disabled'),
life: 3000
})
}
}
]