mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 06:35:10 +00:00
fix(ext-api): correct NodeMode doc-comments to match LGraphEventMode
Per AUDIT-LG.4 finding: the previous doc-comments had numeric values mapped to wrong names (claimed 1=Never, 2=Bypass, 3=once, 4=trigger, but the actual LiteGraph runtime enum is 0=ALWAYS, 1=ON_EVENT, 2=NEVER, 3=ON_TRIGGER, 4=BYPASS). An extension following the old docs and writing setMode(3) for 'execute once' would actually wire the dead ON_TRIGGER plumbing. Also notes that slots 1 and 3 are legacy ABI-reserved positions for the dead trigger/action subsystem flagged for removal by AUDIT-LG.5. Cross-ref: research/architecture/audit-litegraph-pruning.md \xc2\xa7AUDIT-LG.4 \xc2\xa7AUDIT-LG.5
This commit is contained in:
@@ -53,11 +53,22 @@ export type Size = [width: number, height: number]
|
|||||||
/**
|
/**
|
||||||
* LiteGraph node execution mode.
|
* LiteGraph node execution mode.
|
||||||
*
|
*
|
||||||
* - `0` — Always execute.
|
* Numeric values match `LGraphEventMode` in the LiteGraph runtime.
|
||||||
* - `1` — Never execute (muted).
|
*
|
||||||
* - `2` — Bypass (passthrough).
|
* - `0` — `ALWAYS`: execute every run (default).
|
||||||
* - `3` — Execute once.
|
* - `1` — `ON_EVENT`: legacy slot for the dead trigger/action subsystem;
|
||||||
* - `4` — Execute on trigger.
|
* has no behavioural effect in the current scheduler. Reserved for ABI
|
||||||
|
* compatibility — do not use in new extensions.
|
||||||
|
* - `2` — `NEVER`: muted; node is skipped during execution.
|
||||||
|
* - `3` — `ON_TRIGGER`: legacy slot for the dead trigger/action subsystem;
|
||||||
|
* gated behind `LiteGraph.do_add_triggers_slots` (always `false`). Reserved
|
||||||
|
* for ABI compatibility — do not use in new extensions.
|
||||||
|
* - `4` — `BYPASS`: passthrough; inputs are forwarded to outputs without
|
||||||
|
* running the node.
|
||||||
|
*
|
||||||
|
* Practical extension code should use `0` (always) or `2` (never/muted) or
|
||||||
|
* `4` (bypass). Slots `1` and `3` are documented for completeness but their
|
||||||
|
* runtime semantics are pending the AUDIT-LG trigger-subsystem cleanup.
|
||||||
*
|
*
|
||||||
* @stability stable
|
* @stability stable
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user