Files
César ValadezandClaude Sonnet 4.6 6d1541fbb7 fix: move wildcard dropdown to client-side JS extension
Three problems with the previous server-side approach:
1. wildcard_choices() called get_wildcard_manager() (full disk scan) on
   every INPUT_TYPES call, causing massive slowdown with large datasets.
2. Node execution went from ~0.2s to ~4.33s for the same reason.
3. Appending to the template server-side is wrong — selection should
   insert __name__ into the template textbox widget in the browser.

Fix:
- Remove wildcard_append from all Python nodes and wildcard_choices()
  from wildcards.py, restoring original execution performance.
- Add GET /dynamic_prompts/wildcards API route returning list_names()
  as JSON (loaded once per session, not per execution).
- Add web/wildcards.js extension that fetches the wildcard list once,
  injects a serialize:false COMBO widget into each node, and on
  selection appends __name__ to the template widget then resets.
- Register WEB_DIRECTORY = "web" in __init__.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 16:13:17 -06:00
..