When ByteDance (or any node) is wired to the trigger input, the JS extension
reads its resolution, aspect_ratio and duration_s widgets by name (with positional
fallback at indices 2/3/4) and mirrors them into CreditDisplay automatically.
Widget callbacks on the upstream node are patched on connection so any change
to ByteDance settings immediately recalculates the cost display.
Made-with: Cursor
- _get_balance() calls /api/credits or /internal/credits via urllib (no deps)
- _format_output() gains Balance / After run / Status lines when balance available
- CreditDisplay gains check_balance (BOOLEAN) and block_if_insufficient (BOOLEAN)
- block_if_insufficient=True raises RuntimeError before the model runs if funds are low
- New output slot: balance_after (FLOAT)
- JS updated to show balance placeholder and read check_balance widget
Made-with: Cursor