feat: create IComfyApp interface for type-only imports

- Create appInterface.ts with IComfyApp interface
- Update ComfyExtension to use IComfyApp instead of ComfyApp
- Update ComfyWidgetConstructor to use IComfyApp
- ComfyApp now implements IComfyApp
- Breaks ~300 circular dependency cycles through type imports

Amp-Thread-ID: https://ampcode.com/threads/T-019bfe73-6a29-7638-8160-8de515af8707
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-01-27 00:25:04 -08:00
parent 7ad43c689c
commit bccc693430
10 changed files with 92 additions and 29 deletions

View File

@@ -15,7 +15,7 @@ import type {
TaskOutput
} from '@/schemas/apiSchema'
import { api } from '@/scripts/api'
import type { ComfyApp } from '@/scripts/app'
import type { IComfyApp } from '@/types/appInterface'
import { useExtensionService } from '@/services/extensionService'
import { getJobDetail } from '@/services/jobOutputCache'
import { useNodeOutputStore } from '@/stores/imagePreviewStore'
@@ -408,7 +408,7 @@ export class TaskItemImpl {
return new TaskItemImpl(this.job, jobDetail.outputs)
}
public async loadWorkflow(app: ComfyApp) {
public async loadWorkflow(app: IComfyApp) {
if (!this.isHistory) {
return
}