Commit Graph
201 Commits
Author SHA1 Message Date
科林_Cyril Pilgrim 4cc17d77e1 feat(ui): add ModelScope SVG icon 2026-03-04 14:49:51 +08:00
科林_Cyril Pilgrim e872ee5120 feat(ui): add icons for StepFun, SenseChat (SenseNova), MiniMax, and Baichuan 2026-03-04 14:46:19 +08:00
科林_Cyril Pilgrim f956459146 feat(ui): add Moonshot SVG icon 2026-03-04 14:43:50 +08:00
科林_Cyril Pilgrim 23864745bf feat(ui): add icons for Doubao, Spark, and GLM; fix syntax error in provider_manager.js 2026-03-04 14:39:04 +08:00
科林_Cyril Pilgrim bd59723eff feat(ui): add DeepSeek SVG icon 2026-03-04 14:27:34 +08:00
科林_Cyril Pilgrim 6a46c3dcc4 feat(ui): add infrastructure for provider specific SVG icons and add Qwen icon 2026-03-04 14:22:39 +08:00
科林_Cyril Pilgrim 35a8d75bf8 chore(deps): remove redundant numpy dependency
Motivation:
Numpy 在插件代码中并未被直接导入,且作为 ComfyUI 宿主环境(PyTorch/Pillow)的核心前置依赖已经默认存在,显式声明属于冗余行为。

Implementation:
从 requirements.txt 和 pyproject.toml 的依赖项列表中移除了 numpy,实现了插件依赖声明的极致精简。
2026-03-04 14:13:44 +08:00
科林_Cyril Pilgrim b7983e344b fix(ui): convert inline CSS text to style objects to avoid CSSStyleDeclaration TypeError 2026-03-03 21:59:01 +08:00
科林_Cyril Pilgrim 4a464a9e39 chore: cleanup debug logging from __init__.py 2026-03-03 21:52:14 +08:00
科林_Cyril Pilgrim 2dc32b21e5 fix(routes): use decorator-based route registration matching ComfyUI-Manager pattern 2026-03-03 21:28:14 +08:00
科林_Cyril Pilgrim 3f13462cfb fix(routes): use app.router.add_route fallback for post-init route registration 2026-03-03 21:11:43 +08:00
科林_Cyril Pilgrim fda6944164 fix(usage): handle 404 gracefully when route not yet loaded, prompt restart 2026-03-03 20:06:50 +08:00
科林_Cyril Pilgrim db3c46b586 fix(usage): harden usage tracking - gitignore, thread lock, rotation, error logging, summary cards 2026-03-03 19:37:05 +08:00
科林_Cyril Pilgrim a59f774c7d feat(llm): implement usage statistics tracking and dashboard UI 2026-03-03 19:14:18 +08:00
科林_Cyril Pilgrim 36c5f3028c refactor(web): extract 300+ line CSS into dedicated provider_manager.css 2026-03-03 19:06:43 +08:00
科林_Cyril Pilgrim 75de8c4f25 feat(ui): add double-click to edit model tags
Motivation:
Users found it cumbersome to delete and re-type a model name if they made a typo.

Implementation:
Added ondblclick listener and pointer cursor to model tags. Reuses the new custom showPrompt dialog for editing.
2026-03-03 18:32:17 +08:00
科林_Cyril Pilgrim 8688e1e1bb perf(api): optimize Check API to prevent token consumption
Motivation:
Users clicking 'Check API' were being charged for a minimal chat completion request, which feels punitive for just verifying connection status.

Implementation:
1. Added list_models() method to LLMClient that hits the standard /models endpoint.
2. Updated check_provider route to attempt /models first.
3. Fallbacks to /chat/completions with max_tokens=1 if /models is unsupported by the provider.
2026-03-03 18:13:49 +08:00
科林_Cyril Pilgrim 6c5f5e1934 feat(nodes): filter out disabled providers from node dropdown
Motivation:
With 12 system providers, the provider dropdown menu in ComfyUI was too cluttered. Users only configure 1-2 providers on average.

Implementation:
1. Updated default_providers.json to disable most system providers out of the box (except Qwen and DeepSeek).
2. Filtered out disabled providers from INPUT_TYPES in openai_compatible.py.
3. Added equivalent filter to dynamic model dropdown logic in provider_manager.js.
2026-03-03 18:08:22 +08:00
科林_Cyril Pilgrim e90cb97eda feat(ui): replace native alerts with custom dialogs and apply English localization
Motivation:
1. Native browser alerts/confirms block the main thread and break aesthetic immersion.
2. The UI had mixed Chinese and English text, confusing international users.

Implementation:
1. Created unified showDialog, showPrompt, showAlert, and showConfirm components.
2. Migrated delete confirmation and connection checks to the new asynchronous UI dialogs.
3. Updated 'providers.json' templates to use purely English names for consistency.
2026-03-03 17:31:11 +08:00
科林_Cyril Pilgrim 74eefa17cf fix(ui): resolve critical UX issues in provider manager
Motivation:
Users faced data loss when navigating without saving, lacked visual feedback after saving, and the model dropdown logic was broken for the new LLM_CONFIG mode.

Implementation:
1. Replaced 'Custom/手动输入' with 'LLM_CONFIG (from input)' in nodeCreated event.
2. Added visual toast and temporary color change to 'Save' button.
3. Implemented hasUnsavedChanges() and canNavigateAway() pattern to warn users before discarding modified provider data.
2026-03-03 17:17:04 +08:00
科林_Cyril Pilgrim b3b776f3f9 feat(ui): add visibility toggle for API key input
Motivation:
Users need a way to verify they have entered their API keys correctly without the keys being permanently visible.

Implementation:
Added a toggle button with an eye icon next to the API key input in the Provider Manager UI. It switches the input type between 'password' and 'text'.
2026-03-03 16:28:57 +08:00
科林_Cyril Pilgrim 52f199d7c1 chore(git): ignore .github directory and remove from index
Motivation:
The .github directory was accidentally committed and should not be tracked.

Implementation:
1. Added .github/ to .gitignore.
2. Removed .github/ from git cache using 'git rm -r --cached'.
2026-03-03 11:43:22 +08:00
科林_Cyril Pilgrim cbead14599 feat(nodes): enhance LLM adapter with explicit config passthrough
Motivation:
Users were confused by implicit configuration fallback and inconsistent category naming. The adapter also had a bug where unparsed dropdown values were sent to the API.

Implementation:
1. Re-categorized node under 'LLM'.
2. Added 'LLM_CONFIG (from input)' to provider/model dropdowns for explicit passthrough.
3. Updated default prompts to English/hello.
4. Ensured all API requests use resolved 'actual_model' instead of raw dropdown values.
2026-03-03 11:41:38 +08:00
科林 KELIN 92472d4a95 Merge pull request #4 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2026-03-03 11:22:12 +08:00
科林 KELIN c3d03f09fb Merge pull request #3 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2026-03-03 11:21:21 +08:00
科林_Cyril Pilgrim e5486eadfc feat(nodes): refactor openai adapter and improve user experience
Motivation:
1. Clarify node classification by moving from 'OpenAI' to 'LLM' category.
2. Improve default prompt/system_prompt for better UX.
3. Resolve ambiguity in configuration passthrough from LLMs Loader node.

Implementation:
1. Updated CATEGORY to 🚦ComfyUI_LLMs_Toolkit/LLM.
2. Changed default system_prompt to English and set default prompt to 'hello'.
3. Added 'LLM_CONFIG (from input)' option to provider and model dropdowns to explicitly handle external configuration.
4. Fixed a bug where unresolved 'model' parameter was sent to the API instead of 'actual_model'.
2026-03-03 11:20:18 +08:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") 0ab5dd9386 chore(publish): Add Github Action for Publishing to Comfy Registry 2026-03-03 02:50:19 +00:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") fb48e6440a chore(pyproject): Add pyproject.toml for Custom Node Registry 2026-03-03 02:49:54 +00:00
科林_Cyril Pilgrim d21b704917 style(ui): shorten 'Save Provider' button text to 'Save'
Motivation:
The button text 'Save Provider' was slightly too long and generic 'Save' is cleaner and more professional for the UI.

Implementation:
1. Updated the button innerHTML in provider_manager.js from 'Save Provider' to 'Save'.
2. Updated the corresponding references in both README.md and README_CN.md.
2026-03-02 17:23:57 +08:00
科林_Cyril Pilgrim 15e8408bec style(nodes/ui): remove redundant id suffix from provider dropdown labels
Motivation:
Labels in the provider dropdown were showing redundant internal IDs like '(iflow)', which looked cluttered and unprofessional to end users.

Implementation:
1. Modified openai_compatible.py to generate clean name-only labels.
2. Updated both backend lookup logic and frontend nodeCreated hook in provider_manager.js to align with the name-only matching scheme.
2026-03-02 17:02:24 +08:00
科林_Cyril Pilgrim 18f1b90a1a docs(asset): add banner image for readme
Motivation:
上一次提交 README 重构内容时,遗漏了尚未被 Git 追踪的 `asset/` 目录。这导致在 GitHub 页面上,主页的 Banner 图片无法加载。

Implementation:
1. 添加入库 `asset/banner.png` 图片以便能在 GitHub 正确渲染。
2026-03-02 13:42:34 +08:00
科林_Cyril Pilgrim cb66d43201 docs(readme): rewrite structure and remove emojis for professional tone
Motivation:
社区用户反馈原说明文档缺乏安装与快速上手指南,且带有过多的 Emoji,不够专业。需要一套包含项目架构、节点目录且无花哨表情符号的沉淀说明。

Implementation:
1. 在中英两份 README 文件中完全移除了标题和列表的 Emoji。
2. 增加 `<div align="center">` 让项目大标题 ComfyUI-LLMs-Toolkit 居中。
3. 补充了对 Provider Manager UI 的功能说明以及 JSON 工具箱列表介绍。
2026-03-02 13:41:05 +08:00
科林_Cyril Pilgrim 5c7d1c0bf3 feat(vision): add multi-image support to Image Preprocessor and remove from changelog
Added image_2, image_3, image_4 pins to ImagePreprocessor to allow multiple parallel connections without needing a batch node. Also removed the vision feature update from the changelog per user request, as it is considered a minor utility addition.
2026-03-02 10:09:00 +08:00
科林_Cyril Pilgrim 502f0aada3 feat(vision): upgrade ImagePreprocessor node with PIL format safety and OpenAI compatible integration
Kept the user-preferred ImagePreprocessor naming convention while adding logic to safely ignore quality parameters on incompatible image formats (like PNG). Ensured JSON arrays outputted by the node map flawlessly into the shared LLM client payload.
2026-03-02 09:59:08 +08:00
科林_Cyril Pilgrim f14b358945 docs: remove minor token pin update from changelog and enforce major-only rule in AI guidelines 2026-03-01 23:53:27 +08:00
科林_Cyril Pilgrim 45032ea3c2 refactor(nodes): remove redundant token output pins from openai compatible node
Motivation: Input/output token metrics are now dynamically rendered over the node canvas via JS. The raw integer pins are redundant and eat up valuable canvas space.

Implementation: Removed input_tokens and output_tokens from RETURN_TYPES. Updated _success and _error_result tuple lengths to 2.
2026-03-01 23:50:40 +08:00
科林_Cyril Pilgrim 0b461a7b89 docs: separate english and chinese changelogs into respective readmes 2026-03-01 23:43:50 +08:00
科林_Cyril Pilgrim 20be3a0bb1 docs: migrate changelog into readme and establish local AI rules
Moved the version history to the main README to centralize documentation. Created an AI_CHANGELOG_GUIDELINES.md (ignored in .gitignore) as a prompt instruction for future AI agents to maintain the changelog uniformly.
2026-03-01 23:39:19 +08:00
科林_Cyril Pilgrim 89af6745cb docs: establish standard CHANGELOG for project history 2026-03-01 23:33:54 +08:00
科林_Cyril Pilgrim b4b54882d0 fix(api): add standard user-agent to bypass cloudflare 1010 error on custom providers 2026-03-01 23:27:32 +08:00
科林_Cyril Pilgrim 8eea73f574 feat(nodes): add dedicated reasoning output pin for deepseek models
Motivation: Expose the parsed reasoning_content to downstream ComfyUI nodes so users can route or display the internal thoughts of models like DeepSeek.

Implementation: Appended 'reasoning' to RETURN_TYPES and RETURN_NAMES in openai_compatible.py. Updated _success and _error_result standard return tuple length from 3 to 4.
2026-03-01 23:18:39 +08:00
科林_Cyril Pilgrim 8d66620e59 feat(nodes): integrate o1/o3 role downgrade and deepseek reasoning extraction
Motivation: Absorbing robust API handling strategies from comfyui_LLM_party to enhance compatibility with newer models (o1/o3) and models that return internal thought processes (DeepSeek/R1).

Implementation: 1. o1/o3 Compatibility: Intercept payload building to convert unsupported 'system' roles to 'user' roles and spoof an 'assistant' acknowledgment. 2. DeepSeek Readiness: Parse official 'reasoning_content' or fallback to regex extraction of 'think' blocks, stripping them from the main ComfyUI text output to keep prompts clean.
2026-03-01 23:06:15 +08:00
科林_Cyril Pilgrim a35f9cc67e fix(nodes): append assistant response to conversation history to enable true multi-turn memory
Motivation:
The enable_memory feature was incomplete because it only stored the user's prompts in the history array without appending the assistant's previous replies. This resulted in context-blind multi-turn interactions.

Implementation:
Added logic to append the assistant's response to self._conversation_history right before returning the success result, completing the conversational loop.
2026-03-01 22:45:16 +08:00
科林_Cyril Pilgrim 26ed2a055c fix(ui): move token usage display below the node's bottom boundary to prevent overlapping with existing bottom widgets 2026-03-01 17:04:41 +08:00
科林_Cyril Pilgrim 2832338a9a chore(git): remove task_plan.md and untrack test_api.py
Motivation:
Internal planning files and temporary test scripts should not be part of the public repository.

Implementation:
1. Deleted task_plan.md and removed from git tracking.
2. Untracked test_api.py (keeping local copy) and added both to .gitignore.
2026-03-01 16:45:13 +08:00
科林_Cyril Pilgrim 7ec2e455cb feat(ui): migrate token display to native canvas rendering on the right side to completely avoid widget serialization issues 2026-03-01 16:16:08 +08:00
科林_Cyril Pilgrim bfecfe5f81 style(ui): increase token display widget height for better readability 2026-03-01 16:06:42 +08:00
科林_Cyril Pilgrim 162d65e239 fix(ui): prevent dynamically added token display widget from corrupting node parameter serialization indices 2026-03-01 14:36:39 +08:00
科林_Cyril Pilgrim 8a983d1e2b fix(nodes): fix json combine and seed payload compliance
Motivation:
JSONCombine was failing with 'dict' has no attribute 'strip' when receiving dictionary inputs, and strict APIs (like Qwen) returned 400 Errors when receiving the non-standard 'seed' field in the payload.

Implementation:
Updated JSONCombine in json_builder.py to handle both string and dict types safely. Removed the seed field from the API payload in openai_compatible.py to strictly follow CONTRIBUTING.md Rule 3.1 and ensure standard OpenAI compatibility.
2026-02-28 22:30:22 +08:00
科林_Cyril Pilgrim c418732d4c fix(nodes): cast seed to int to satisfy strict API provider type checks 2026-02-28 20:57:17 +08:00