From 8b44ca92bf4e928eebfcaa468eefe6b667583635 Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Fri, 27 Feb 2026 22:40:38 -0500 Subject: [PATCH] feat: support typed wrapper format for widget values --- execution.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/execution.py b/execution.py index 75b021892..100cb3d9c 100644 --- a/execution.py +++ b/execution.py @@ -876,12 +876,17 @@ async def validate_inputs(prompt_id, prompt, item, validated): continue else: try: - # Unwraps values wrapped in __value__ key. This is used to pass - # list widget value to execution, as by default list value is - # reserved to represent the connection between nodes. - if isinstance(val, dict) and "__value__" in val: - val = val["__value__"] - inputs[x] = val + # Unwraps values wrapped in __value__ key or typed wrapper. + # This is used to pass list widget values to execution, + # as by default list value is reserved to represent the + # connection between nodes. + if isinstance(val, dict): + if "__value__" in val: + val = val["__value__"] + inputs[x] = val + elif "__type" in val and "value" in val: + val = val["value"] + inputs[x] = val if input_type == "INT": val = int(val)