diff --git a/src/components/dialog/content/ConfirmationDialogContent.vue b/src/components/dialog/content/ConfirmationDialogContent.vue index 556379b3f..32e147d49 100644 --- a/src/components/dialog/content/ConfirmationDialogContent.vue +++ b/src/components/dialog/content/ConfirmationDialogContent.vue @@ -99,7 +99,7 @@ import { useI18n } from 'vue-i18n' import Button from '@/components/ui/button/Button.vue' import { useSettingStore } from '@/platform/settings/settingStore' -import type { ConfirmationDialogType } from '@/services/dialogService' +import type { ConfirmationDialogType } from '@/services/dialogTypes' import { useDialogStore } from '@/stores/dialogStore' const props = defineProps<{ diff --git a/src/components/queue/job/useJobErrorReporting.ts b/src/components/queue/job/useJobErrorReporting.ts index b008238a6..c1a3f9148 100644 --- a/src/components/queue/job/useJobErrorReporting.ts +++ b/src/components/queue/job/useJobErrorReporting.ts @@ -1,7 +1,7 @@ import { computed } from 'vue' import type { ComputedRef } from 'vue' -import type { ExecutionErrorDialogInput } from '@/services/dialogService' +import type { ExecutionErrorDialogInput } from '@/services/dialogTypes' import type { TaskItemImpl } from '@/stores/queueStore' type CopyHandler = (value: string) => void | Promise diff --git a/src/lib/litegraph/constants.ts b/src/lib/litegraph/constants.ts new file mode 100644 index 000000000..1a4299010 --- /dev/null +++ b/src/lib/litegraph/constants.ts @@ -0,0 +1,14 @@ +/** + * Symbols used for widget configuration in litegraph nodes. + * Extracted to break circular dependencies between litegraphService and extensions. + */ + +/** + * Symbol used to access the config object on a widget. + */ +export const CONFIG = Symbol('CONFIG') + +/** + * Symbol used to access the config getter function on a widget. + */ +export const GET_CONFIG = Symbol('GET_CONFIG') diff --git a/src/services/dialogService.ts b/src/services/dialogService.ts index 3154c54d6..1209f7c40 100644 --- a/src/services/dialogService.ts +++ b/src/services/dialogService.ts @@ -34,26 +34,15 @@ import NodeConflictHeader from '@/workbench/extensions/manager/components/manage import type { ConflictDetectionResult } from '@/workbench/extensions/manager/types/conflictDetectionTypes' import type { ComponentAttrs } from 'vue-component-type-helpers' -export type ConfirmationDialogType = - | 'default' - | 'overwrite' - | 'overwriteBlueprint' - | 'delete' - | 'dirtyClose' - | 'reinstall' - | 'info' +import type { + ConfirmationDialogType, + ExecutionErrorDialogInput +} from './dialogTypes' -/** - * Minimal interface for execution error dialogs. - * Satisfied by both ExecutionErrorWsMessage (WebSocket) and ExecutionError (Jobs API). - */ -export interface ExecutionErrorDialogInput { - exception_type: string - exception_message: string - node_id: string | number - node_type: string - traceback: string[] -} +export type { + ConfirmationDialogType, + ExecutionErrorDialogInput +} from './dialogTypes' export const useDialogService = () => { const dialogStore = useDialogStore() diff --git a/src/services/dialogTypes.ts b/src/services/dialogTypes.ts new file mode 100644 index 000000000..2b1094c65 --- /dev/null +++ b/src/services/dialogTypes.ts @@ -0,0 +1,25 @@ +/** + * Type definitions for dialog service. + * Extracted to break circular dependencies between dialogService and dialog components. + */ + +export type ConfirmationDialogType = + | 'default' + | 'overwrite' + | 'overwriteBlueprint' + | 'delete' + | 'dirtyClose' + | 'reinstall' + | 'info' + +/** + * Minimal interface for execution error dialogs. + * Satisfied by both ExecutionErrorWsMessage (WebSocket) and ExecutionError (Jobs API). + */ +export interface ExecutionErrorDialogInput { + exception_type: string + exception_message: string + node_id: string | number + node_type: string + traceback: string[] +}