Add support for dragging in multiple workflow files at once (#8757)

## Summary

Allows users to drag in multiple files that are/have embedded workflows
and loads each of them as tabs.
Previously it would only load the first one.

## Changes

- **What**: 
- process all files from drop event
- add defered errors so you don't get errors for non-visible workflows

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8757-Add-support-for-dragging-in-multiple-workflow-files-at-once-3026d73d365081c096e9dfb18ba01253)
by [Unito](https://www.unito.io)
This commit is contained in:
pythongosssss
2026-02-17 07:45:22 +00:00
committed by GitHub
parent efe78b799f
commit f5f5a77435
9 changed files with 429 additions and 107 deletions

View File

@@ -3,7 +3,19 @@ import { markRaw } from 'vue'
import { t } from '@/i18n'
import type { ChangeTracker } from '@/scripts/changeTracker'
import { UserFile } from '@/stores/userFileStore'
import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema'
import type {
ComfyWorkflowJSON,
ModelFile
} from '@/platform/workflow/validation/schemas/workflowSchema'
import type { MissingNodeType } from '@/types/comfy'
export interface PendingWarnings {
missingNodeTypes?: MissingNodeType[]
missingModels?: {
missingModels: ModelFile[]
paths: Record<string, string[]>
}
}
export class ComfyWorkflow extends UserFile {
static readonly basePath: string = 'workflows/'
@@ -17,6 +29,10 @@ export class ComfyWorkflow extends UserFile {
* Whether the workflow has been modified comparing to the initial state.
*/
_isModified: boolean = false
/**
* Warnings deferred from load time, shown when the workflow is first focused.
*/
pendingWarnings: PendingWarnings | null = null
/**
* @param options The path, modified, and size of the workflow.