Compare commits

...

1 Commits

Author SHA1 Message Date
CodeRabbit Fixer
4b51823da3 fix: Remove deprecated error getters from ComfyApp (app.ts) (#9066)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:36:31 +01:00
4 changed files with 8 additions and 5 deletions

View File

@@ -236,7 +236,7 @@ export class ComfyApp {
/**
* The node errors from the previous execution.
* @deprecated Use app.extensionManager.lastNodeErrors instead
* @deprecated Use useExecutionErrorStore().lastNodeErrors instead
*/
get lastNodeErrors(): Record<NodeId, NodeError> | null {
return useExecutionErrorStore().lastNodeErrors
@@ -244,7 +244,7 @@ export class ComfyApp {
/**
* The error from the previous execution.
* @deprecated Use app.extensionManager.lastExecutionError instead
* @deprecated Use useExecutionErrorStore().lastExecutionError instead
*/
get lastExecutionError(): ExecutionErrorWsMessage | null {
return useExecutionErrorStore().lastExecutionError

View File

@@ -8,6 +8,7 @@ import type { JobListItem } from '@/platform/remote/comfyui/jobs/jobTypes'
import { useTelemetry } from '@/platform/telemetry'
import { useLitegraphService } from '@/services/litegraphService'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import { api } from './api'
@@ -707,7 +708,7 @@ export class ComfyUI {
status.exec_info.queue_remaining == 0 &&
this.autoQueueEnabled &&
(this.autoQueueMode === 'instant' || this.graphHasChanged) &&
!app.lastExecutionError
!useExecutionErrorStore().lastExecutionError
) {
app.queuePrompt(0, this.batchCount)
status.exec_info.queue_remaining += this.batchCount

View File

@@ -1,5 +1,6 @@
import { api } from '@/scripts/api'
import { app } from '@/scripts/app'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import {
isInstantRunningMode,
useQueuePendingTaskCountStore,
@@ -28,7 +29,7 @@ export function setupAutoQueueHandler() {
queueCountStore.$subscribe(
async () => {
internalCount = queueCountStore.count
if (!internalCount && !app.lastExecutionError) {
if (!internalCount && !useExecutionErrorStore().lastExecutionError) {
if (
isInstantRunningMode(queueSettingsStore.mode) ||
(queueSettingsStore.mode === 'change' && graphHasChanged)

View File

@@ -54,6 +54,7 @@ import { ComfyApp, app } from '@/scripts/app'
import { isComponentWidget, isDOMWidget } from '@/scripts/domWidget'
import { $el } from '@/scripts/ui'
import { useDomWidgetStore } from '@/stores/domWidgetStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
import { useExecutionStore } from '@/stores/executionStore'
import { useNodeOutputStore } from '@/stores/nodeOutputStore'
import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
@@ -205,7 +206,7 @@ export const useLitegraphService = () => {
}
}
node.strokeStyles['executionError'] = function (this: LGraphNode) {
if (app.lastExecutionError?.node_id == this.id) {
if (useExecutionErrorStore().lastExecutionError?.node_id == this.id) {
return { color: '#f0f', lineWidth: 3 }
}
}