Commit Graph
15 Commits
Author SHA1 Message Date
196ae0bf19 feat: support ComfyUI API Key for cloud nodes (#78) (#81)
Add comfy_api_key server config field to enable cloud API nodes
(Kling, Sora, Nano Banana, etc.) when calling ComfyUI via API.
The key is passed through extra_data.api_key_comfy_org in the
/prompt request, following ComfyUI's official API key integration.

Closes #78

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-30 10:27:47 +08:00
d883e0ab0c feat: add workflow dependency checker and installer (#76)
Add a three-tier dependency detection system for ComfyUI workflows:
1. ComfyUI Manager API — node status + import-fail diagnostics
2. ComfyUI Registry API — cloud search for unknown nodes
3. extension-node-map.json — offline fallback

Features:
- Detect missing custom nodes (not_installed / import_fail / unknown)
- Detect missing model files with auto-download support via Manager
- i18n text report formatting (zh/en) with UNIX-style layout
- Three-strategy node installer (Manager queue → cm-cli → git clone)
- Model download via Manager /manager/queue/install_model
- CLI command `check-deps` for Agent integration
- REST API endpoints with locale parameter
- 28 unit tests covering all detection and formatting logic

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-30 00:27:00 +08:00
Kelin 9ba0a36624 feat(api): add batch delete workflows endpoint
Add POST /api/servers/{server_id}/workflows/batch-delete to allow
deleting multiple workflows in a single request. Refactor
WorkflowOrderModel into a shared WorkflowIdsModel base class.
Also disable the list-level history entry point (has_history=False).
2026-03-24 09:16:01 +08:00
e948ab84c2 Add workflow execution history backend (#43)
* feat: add workflow execution history backend

* build: refresh bundled workflow history UI assets

* fix: simplify common workflow parameter aliases

* fix: resolve output_dir symlinks and allow workflows with no image output

---------

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-20 07:16:40 +08:00
lgldlk 6c610a0ad5 feat(ui): add bulk workflow import support 2026-03-18 02:07:38 +08:00
KelinandClaude Opus 4.6 3eaf82b692 feat: add authentication support for remote ComfyUI servers
Add optional auth field to server config. All HTTP requests to
ComfyUI (prompt, history, view, health check) now pass the
Authorization header when configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 07:09:26 +08:00
科林_Cyril Pilgrim 425cdd0db4 feat(ui): refactor data structure and enhance configuration migration
Motivation:
The previous data structure for workflows and schemas lacked cohesion and was difficult to maintain manually. Additionally, a more robust and flexible migration system was needed to transfer skill configurations across different environments.

Implementation:
1. Unified the data hierarchy into a directory-based structure: 'data/<server>/<workflow>/'.
2. Enhanced 'transfer_manager.py' and 'transfer_bundle.py' for environmental-aware configuration migration.
3. Updated frontend JS/CSS and Flask routes to support the new directory-centric asset management.
4. Revamped English and Chinese READMEs to prioritize safe installation and clear configuration workflows.
2026-03-12 15:05:40 +08:00
科林_Cyril Pilgrim f3a9919814 feat(ui): add configuration export and import flow
Motivation:
Allows users to easily migrate or back up their skill configurations, server settings, and workflow mappings across different environments, improving setup mobility.

Implementation:
Developed a bundle system in scripts/shared/transfer_bundle.py and scripts/transfer_manager.py for state serialization. Integrated this into the Flask backend and frontend UI, adding components for export/import actions with pre-check validation. Refactored README files to document the migration path and refined the installation guide.
2026-03-12 12:05:59 +08:00
科林_Cyril Pilgrim ae2fe8249f feat(ui): add workflow sorting and drag-and-drop reordering
Motivation:
As the number of workflows increases, it becomes difficult for users to quickly locate or prioritize frequently used workflows. The current list lacks flexible display order and intuitive custom management experience.

Implementation:
1. Introduced global state `workflowSortOrder` in config.js to track the currently applied sorting mode.
2. Updated core rendering logic in app.js, adding algorithms to sort by status, name, and custom order; implemented `bindWorkflowDragEvents` and `bindWorkflowSortEvents` to handle drag-and-drop and sorting interactions.
3. Modified DOM renderer in workflow-list.js to inject drag handles into cards when in custom sorting mode.
4. Added responsive `.workflow-toolbar` in styles.css to accommodate search and sorting controls, and added comprehensive visual feedback for list drag-and-drop interactions (e.g., .is-dragging, .is-drop-target).
2026-03-09 17:45:28 +08:00
科林_Cyril Pilgrim 3b78597f6a feat(ui): enhance parameter mapping toolbar and persist schema UI state
Motivation:
节点映射界面的工具栏过于紧凑且缺少单独的参数排序功能;每次重新加载会丢失参数界面的显示配置(如参数是否 Exposed/Required)。此外,DELETE 请求携带 Body 有客户端兼容风险,而保存工作流即退出编辑器的设计打断了用户的连续编辑心流。

Implementation:
1. 前后端扩展 ui_schema_params 字段的读写,支持在加载工作流时 Hydrate 并持久化保存工作流参数的 UI 状态。
2. 重构 mapping-toolbar 将其拆分为上下两层,新增参数级排序下拉框以及批量展开/折叠、重置过滤等快捷操作功能。
3. 优化编辑器保存交互,将 saveWorkflow 成功后的 exitEditor() 替换为 refreshEditorPanel(),以保持操作的连贯性。
4. 重构 Servers API 删除端点,将 delete_data 标识从 Request Body 移至 URL Query 传递。
2026-03-09 12:53:05 +08:00
科林_Cyril Pilgrim 1dbcf76e16 feat(ui): add optional local data deletion to server removal
Motivation:
允许用户在删除服务器时可选地清理关联的本地数据,提升存储管理体验;同时通过增加 Cookie fallback 机制强化了语言设置的持久化。

Implementation:
1. 后端:更新 models.py, app.py 和 services.py 以支持带有 delete_data 参数的删除操作。
2. 前端:在确认弹窗中集成复选框,更新交互逻辑与 API 调用方案。
3. 配置:更新 .gitignore 以忽略 AI 任务规划文件。
2026-03-09 12:31:33 +08:00
科林_Cyril Pilgrim b9917c57a9 fix(core): enhance Pydantic validation and ID slugification for multi-server logic
Motivation:
To resolve 422 Unprocessable Content errors caused by null values from the frontend and to improve ID generation for non-English server names.

Implementation:
- Added 'before' validators to handle None values for id, name, url, and output_dir.
- Updated _slugify_server_id to use Unicode-aware regex, ensuring non-Latin characters generate valid IDs instead of defaulting to 'server'.
2026-03-09 00:10:26 +08:00
科林_Cyril Pilgrim 3b580a01a2 feat(core): implement automatic server ID generation and enhanced validation
Motivation:
Requiring users to manually create unique URL-safe IDs for servers was a point of friction. Additionally, the system needed stronger validation to prevent invalid characters in identifiers.

Implementation:
- Introduced CreateServerModel with Pydantic validators for name, url, and optional id.
- Implemented slug-based auto-generation logic for server IDs in UIStorageService.
- Updated the API to return the fully normalized server object, including the generated ID, upon creation.
2026-03-08 23:39:50 +08:00
科林_Cyril Pilgrim bc4097ac2d refactor(backend): support multi-server workflow isolation and registry mapping
Motivation:
The backend previously assumed a single global ComfyUI server, making it impossible to switch between environments or add remote nodes.

Implementation:
Refactored UIStorageService and scripts to organize workflows into server-specific subdirectories. Introduced ServerModel and runtime configuration loader to handle multi-server routing.
2026-03-08 17:40:03 +08:00
lgldlk bb7deb8e08 refactor: restructure backend API code 2026-03-08 01:31:26 +08:00