Execution Error Dialog Revamp (One click issue searching and filing) (#595)

* Add basic error dialog

* 2 level error report

* Add find issue button

* nit

* Add file issue button

* Single dialog

* nit

* Fix long text wrapping

* Merge component

* Test execution error dialog
This commit is contained in:
Chenlei Hu
2024-08-22 15:55:38 -04:00
committed by GitHub
parent 0466c79725
commit 3e457f812d
15 changed files with 410 additions and 36 deletions

View File

@@ -43,7 +43,10 @@ import {
} from '@/stores/nodeDefStore'
import { Vector2 } from '@comfyorg/litegraph'
import _ from 'lodash'
import { showLoadWorkflowWarning } from '@/services/dialogService'
import {
showExecutionErrorDialog,
showLoadWorkflowWarning
} from '@/services/dialogService'
import { useSettingStore } from '@/stores/settingStore'
import { useToastStore } from '@/stores/toastStore'
import type { ToastMessageOptions } from 'primevue/toast'
@@ -1666,8 +1669,7 @@ export class ComfyApp {
api.addEventListener('execution_error', ({ detail }) => {
this.lastExecutionError = detail
const formattedError = this.#formatExecutionError(detail)
this.ui.dialog.show(formattedError)
showExecutionErrorDialog(detail)
this.canvas.draw(true, true)
})
@@ -2552,18 +2554,6 @@ export class ComfyApp {
return '(unknown error)'
}
#formatExecutionError(error) {
if (error == null) {
return '(unknown error)'
}
const traceback = error.traceback.join('')
const nodeId = error.node_id
const nodeType = error.node_type
return `Error occurred when executing ${nodeType}:\n\n${error.exception_message}\n\n${traceback}`
}
async queuePrompt(number, batchCount = 1) {
this.#queueItems.push({ number, batchCount })