Files
DumiFlex-ComfyUI-Wildcard-P…/wp_nodes/assembler_node.py
T
DumiFlex 79bdb457cb feat: polish suite — MVP frontend + subgraph support + DX + a11y
Lands the P4 frontend MVP plus 9 follow-up polish batches (88 commits squashed).

* Pipeline Context, Prompt Assembler, Debug Viewer widgets
* PIPELINE_CONTEXT chain crosses subgraph boundaries
* Conflict badges on SubgraphNodes containing WP nodes
* Empty-state hero, soft-delete + Undo toasts, corrupt-workflow recovery
* Bundled Inter + JetBrains Mono variable fonts, brand identity end-to-end
* Settings panel: Reduce motion + Contrast (a11y) with live updates
* DX: coverage gate, stricter ESLint, pre-commit pnpm size, PR size-delta workflow, contract doc

Closes the polish-brainstorm spec.
2026-04-26 05:39:22 +03:00

33 lines
1.0 KiB
Python

"""WP_PromptAssembler — fills $var placeholders from a PipelineContext."""
from comfy_api.latest import io # pyright: ignore[reportMissingImports]
from engine.template import resolve_variables
from wp_nodes.types import PipelineContext
class WPPromptAssembler(io.ComfyNode):
"""Template-fills $var placeholders using the incoming PipelineContext."""
@classmethod
def define_schema(cls):
return io.Schema(
node_id="WP_PromptAssembler",
display_name="WP Prompt Assembler",
category="wildcard-pipeline",
inputs=[
PipelineContext.Input("context"),
io.String.Input(
"template",
multiline=True,
default="A $style portrait of $subject",
),
],
outputs=[io.String.Output("prompt")],
)
@classmethod
def execute(cls, context, template):
resolved = resolve_variables(template, context.context)
return io.NodeOutput(resolved)