The refactor in #28 accidentally used format name (PNG/JPEG) instead of
quality level (High/Medium/Low) to look up the resize size_map, causing
Medium and Low quality settings to always fall back to 1024px.
Co-authored-by: shanfang <shanfang@localhost>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move non-widget inputs (llm_config, prep_img) after widget-creating inputs
in the optional dict to avoid positional index misalignment in ComfyUI's
widgets_values serialization.
Closes#25
Co-authored-by: shanfang <shanfang@localhost>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the global SSL-disabled context with a per-provider
skipSSLVerify option. SSL verification is now ON by default,
with Chinese API providers pre-configured to skip verification.
Adds a toggle switch in the Provider Manager UI.
* fix: mask API keys in provider endpoint responses
The GET /llm_toolkit/providers endpoint now returns masked keys
(e.g. "sk-••••••xxxx") instead of full API keys. The POST save
handler preserves existing keys when it receives a masked value,
and the check-connectivity endpoint accepts a providerId to look
up the real key server-side instead of requiring it from the frontend.
* fix: prioritize user-typed key over stored key in check endpoint
The config file contains API keys and should only be readable by the
file owner. Set chmod 0600 after every write in _save_providers and
_ensure_providers_file, with try/except for Windows compatibility.
Motivation:
Users needed a more convenient way to select LLM providers and models directly on the LLM Translator node without mandatory external configuration nodes, and requested clearer guidance on how to use the glossary feature.
Implementation:
- Refactored llm_translator.py to dynamically read from providers.json and support standalone configuration.
- Extended the provider_manager.js frontend extension to support the LLMTranslator node for dynamic dropdown syncing.
- Enhanced widget placeholders with detailed multi-line instructions and examples.
- Updated .gitignore to exclude session-specific documents.
Motivation:
ESC worked only on first open because the listener was registered inside the first-time DOM creation block. On close(), it was detached. On subsequent show() calls, the modal DOM already existed so the function returned early — the listener was NEVER re-attached.
Implementation:
Extracted listener management into two symmetric private methods: _attachEscListener() and _detachEscListener(). show() now calls _attachEscListener on EVERY open (both first-time and subsequent). _closeModal is stored as an instance method so it can be referenced on re-opens. closeModal() calls _detachEscListener() symmetrically. This pattern is leak-proof and correctly re-attaches on every modal activation.
Motivation:
Keep the root directory clean and organized by moving test scripts to a dedicated folder.
Implementation:
Moved test_api.py to tests/test_api.py
Motivation:
User feedback indicated that the strong spring animation felt rigid and 'blocking' during interactions.
Implementation:
Adjusted CSS transition cubic-bezier curves from an aggressive spring (.34,1.56,.64,1) to a smoother, faster ease-out curve (.25,1.1,.5,1). Reduced transition durations to 0.2s-0.28s to make the interaction feel instantaneous and fluid.
Motivation:
When the UI completely re-renders (like when switching between English and Chinese), the old DOM gets destroyed but the window event listener was not properly cleared and the new modal failed to reattach the listener effectively, breaking the ESC key to close.
Implementation:
Added cleanup logic before attaching a new 'keydown' listener to the window object to ensure the _escListener stays active.
Motivation:
The previous toggle switch animation was abrupt and rigid. The clickable area also spanned the entire row width, which led to unintentional clicks.
Implementation:
- CSS: Replaced static transitions with cubic-bezier spring physics, hardware-accelerated transforms (translate), and pressed-state squish feedback.
- JS: Wrapped the switch in a constrained flex container, replacing the full-width <label> wrapper to fix the clickable area.
Motivation:
Ensure the project's visual assets, such as the banner, stay up-to-date with the latest branding or design requirements.
Implementation:
Replaced the existing 'asset/banner.png' with the newly updated version.
Motivation:
The save button's style was originally an overly bright gradient, making it feel out of place compared to the frosted glass aesthetics. Additionally, the user requested the ability to close the modal using the Escape key.
Implementation:
1. Updated '.llm-pm-actions-right button:last-child' CSS to use a restrained translucent background similar to the sidebar items, keeping it cohesive with the glassmorphism design.
2. Added a global 'keydown' listener on 'Escape' inside 'ProviderManager.show()' which correctly triggers 'closeModal()' (also checking for unsaved changes) and automatically removes itself when closed.
Motivation:
The language switcher's change event listener was never registered because () does not support an initialization callback as its 4th argument. Additionally, the Chinese translation for 'LLM Manager' was inaccurate (模型管家).
Implementation:
1. Replaced the unsupported callback with an IIFE to manually create the select element, set its value, and add the 'change' event listener.
2. Updated 'I18N_DICT' to change '模型管家' to 'LLM 管理器' for better accuracy.