38 Commits
Author SHA1 Message Date
David Cage a4d9578ee3 Merge pull request #4 from realludan-sudo/bump/version-1.0.4
bump: version to 1.0.4
2026-03-26 17:12:18 +08:00
魏巍andClaude Opus 4.6 06d9b9bffb bump: version to 1.0.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 17:03:18 +08:00
David Cage 83896d7073 Merge pull request #3 from realludan-sudo/fix/settings-fallback
fix: add fallback for loading settings in ComfyUI Desktop
2026-03-25 19:04:26 +08:00
魏巍andClaude Opus 4.6 a4f7c24516 fix: add fallback for loading settings in ComfyUI Desktop
In newer versions of ComfyUI Desktop, `app.extensionManager.setting.get()`
may return empty values even when settings are properly configured via
the API. This causes the dynamic field widgets (including image upload
buttons) to fail to load when entering an aiToolsId.

This adds a fallback that fetches settings from the server API
(`/api/settings`) when the frontend settings return empty, ensuring
the dynamic fields load correctly across all ComfyUI versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:59:14 +08:00
wangzhuoran 3cf07c4c5c update version fix widget 2026-03-25 16:55:01 +08:00
wangzhuoran 7b99ea976c refactor: simplify TA_AIToolsNode by dynamically generating field widgets
Problem: The previous implementation defined 99 optional inputs in Python
and tried to hide/show them in frontend, which didn't work reliably on
ComfyUI Windows version - fields like fieldValue_99 remained visible.

Solution: Complete refactor to dynamically generate widgets:

Backend (TA_AITools.py):
- Remove INPUT_LIM and 99 pre-defined optional inputs
- Add single 'fieldData' STRING field to store serialized field values
- process() parses JSON from fieldData to build fieldInputs

Frontend (ta_aitools.js):
- Remove complex widget hiding logic
- When aiToolsId changes, fetch workflow fields from API
- Dynamically create widgets using node.addWidget()
- Serialize field values to fieldData on each change
- Clean up old widgets when switching workflows

Benefits:
- No more hidden widgets taking up space
- Works reliably on both native and Windows versions
- Cleaner code (304 lines removed, 192 added)
- Node size automatically adjusts to actual field count
2026-03-25 16:42:41 +08:00
wangzhuoran c39011d101 fix: directly modify widget properties to hide dynamic fields
Instead of calling toggleWidget which may have complex logic, directly set:
- widget.type = HIDDEN_TAG (to hide the widget)
- widget.computeSize = () => [0, -4] (to collapse its height)

This is a more direct approach to ensure all dynamic fields including
fieldValue_99 are properly hidden on Windows version of ComfyUI.
2026-03-25 16:39:07 +08:00
wangzhuoran e69809edff fix: use direct widget iteration to hide all dynamic fields
Instead of using handleWidgetVisibility which looks up widgets by name,
directly iterate through node.widgets array to find and hide all dynamic
fields matching the pattern (fieldValue_*, fieldName_*, nodeId_*).

This ensures that all 99 fields are properly hidden, including fieldValue_99
which was not being hidden due to potential lookup issues in Windows version.
2026-03-25 16:37:03 +08:00
wangzhuoran b2d6b4245c fix: add debug logs and increase timeout for Windows compatibility
- Increase setTimeout from 100ms to 500ms for Windows version
- Add debug console.log to track resetAIToolsNode execution
- Add setDirtyCanvas call to force refresh after hiding widgets

This helps diagnose why fieldValue_99 is not being hidden on Windows.
2026-03-25 16:33:49 +08:00
wangzhuoran 49a80e3b62 fix: properly hide all dynamic fields and inputs on node creation
1. Add handleInputsVisibility calls in resetAIToolsNode to hide input slots
   (left side connectors), not just widgets (right side inputs). This fixes
   the issue where node height remained at 99 fields tall.

2. Add null check for aiToolsName widget to prevent potential errors.

3. Move createLogic(node) call into setTimeout to ensure widgets are fully
   initialized before hiding, especially important for ComfyUI Windows version
   where timing may differ.
2026-03-25 16:24:51 +08:00
wangzhuoran 7288a4457b fix: allow hiding TA_AIToolsNode dynamic fields that have corresponding inputs
TA_AIToolsNode fields (fieldValue_*, fieldName_*, nodeId_*) are defined as
optional inputs in Python, so doesInputWithNameExist() returns true and
prevents them from being hidden. Add special handling to skip this check
for these dynamic fields so they can be properly hidden/shown based on
the aiToolsId response.

This fixes the issue where all 99 fields were displayed and filled the UI,
especially in ComfyUI Windows version.
2026-03-25 16:22:03 +08:00
wangzhuoran 6addb438a7 fix: comment out deprecated ComfyButtonGroup import to resolve deprecation warning
The ComfyButtonGroup import from buttonGroup.js is deprecated in ComfyUI.
Since the actual usage was already commented out, simply comment out the
import statement to eliminate the deprecation warning.
2026-03-25 16:19:04 +08:00
David Cage 5d5e8f5461 Update README.md 2025-04-02 16:31:41 +08:00
David Cage 433427b0ce Update README.zh.md 2025-04-02 16:30:10 +08:00
wangzhuoran 0258fbdb37 remove settingnode 2025-04-02 16:21:08 +08:00
wangzhuoran 4cc3fb512a add example 2025-03-27 16:55:39 +08:00
wangzhuoran 2f48345d89 add upload image node 2025-03-27 16:52:56 +08:00
wangzhuoran b6f02d537e update project info 2025-03-24 17:28:54 +08:00
wangzhuoran 6e2188d07e action 2025-03-24 17:23:38 +08:00
wangzhuoran ce15fb753e version update 2025-03-24 17:14:00 +08:00
wangzhuoran 9e4842dc49 Experience optimization 2025-03-24 17:12:26 +08:00
David Cage c7d98eabaa Merge pull request #1 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2025-03-24 11:58:35 +08:00
David Cage c652955281 Merge pull request #2 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2025-03-24 11:57:38 +08:00
snomiao be5539f900 chore(pyproject): Add pyproject.toml for Custom Node Registry 2025-03-22 03:57:15 +00:00
snomiao 74fe4ff303 chore(publish): Add Github Action for Publishing to Comfy Registry 2025-03-22 03:57:14 +00:00
David Cage 803487bea6 Update README.zh.md 2025-03-21 18:25:32 +08:00
David Cage 0e73d6ab02 Update README.md 2025-03-21 18:25:12 +08:00
wangzhuoran 8e48050c2b update default value 2025-03-21 17:38:22 +08:00
wangzhuoran 39f25bb266 examples 2025-03-21 17:36:12 +08:00
David Cage e7314ffc8a Create README.md 2025-03-21 17:31:20 +08:00
David Cage 5cb1c86150 Update and rename README.md to README.zh.md 2025-03-21 17:29:18 +08:00
wangzhuoran fcb71262b9 add feature 2025-03-21 17:07:53 +08:00
wangzhuoran 72ea2668e1 delete files 2025-03-20 19:31:23 +08:00
David Cage 33d125994a Update README.md 2025-03-20 19:26:12 +08:00
wangzhuoran d4fdd830fe delete files 2025-03-20 19:07:35 +08:00
wangzhuoran b861bf4403 ignore 2025-03-20 19:06:29 +08:00
wangzhuoran 7a1f3d960e init 2025-03-20 19:03:31 +08:00
David Cage 67988a237a Initial commit 2025-03-19 19:31:29 +08:00