[Manager] Fix hot reload after install of missing node pack (#3397)

Co-authored-by: Chenlei Hu <huchenlei@proton.me>
This commit is contained in:
Christian Byrne
2025-04-12 00:55:02 +08:00
committed by GitHub
parent 25e6386b2a
commit 2337fe6f8e

View File

@@ -70,6 +70,7 @@ import { useI18n } from 'vue-i18n'
import { api } from '@/scripts/api'
import { useComfyManagerService } from '@/services/comfyManagerService'
import { useWorkflowService } from '@/services/workflowService'
import {
useComfyManagerStore,
useManagerProgressDialogStore
@@ -96,14 +97,21 @@ const currentTaskName = computed(() => {
})
const handleRestart = async () => {
await useComfyManagerService().rebootComfyUI()
closeDialog()
const onReconnect = async () => {
await useCommandStore().execute('Comfy.RefreshNodeDefinitions')
// Refresh manager state
comfyManagerStore.clearLogs()
comfyManagerStore.setStale()
// Refresh node definitions
await useCommandStore().execute('Comfy.RefreshNodeDefinitions')
// Reload workflow
await useWorkflowService().reloadCurrentWorkflow()
}
useEventListener(api, 'reconnected', onReconnect, { once: true })
await useComfyManagerService().rebootComfyUI()
closeDialog()
}
</script>