@@ -475,8 +475,9 @@ class OutputFieldJSONSchemaExtra(BaseModel):
475
475
"""
476
476
477
477
field_kind : FieldKind
478
- ui_hidden : bool
479
- ui_order : Optional [int ]
478
+ ui_hidden : bool = False
479
+ ui_order : Optional [int ] = None
480
+ ui_type : Optional [UIType ] = None
480
481
481
482
model_config = ConfigDict (
482
483
validate_assignment = True ,
@@ -794,17 +795,16 @@ def OutputField(
794
795
that adds a few extra parameters to support graph execution and the node editor UI.
795
796
796
797
Args:
797
- ui_type: **DEPRECATED** Optionally provides an extra type hint for the UI. This parameter is no longer used.
798
+ ui_type: Optionally provides an extra type hint for the UI. In some situations, the field's type is not enough
799
+ to infer the correct UI type. For example, Scheduler fields are enums, but we want to render a special scheduler
800
+ dropdown in the UI. Use `UIType.Scheduler` to indicate this.
798
801
799
802
ui_hidden: Specifies whether or not this field should be hidden in the UI.
800
803
801
804
ui_order: Specifies the order in which this field should be rendered in the UI. If omitted, the field will be
802
805
rendered after all fields with an explicit order, in the order they are defined in the Invocation class.
803
806
"""
804
807
805
- if ui_type is not None :
806
- logger .warning ("OutputField: 'ui_type' is deprecated." )
807
-
808
808
return Field (
809
809
default = default ,
810
810
title = title ,
@@ -824,6 +824,7 @@ def OutputField(
824
824
json_schema_extra = OutputFieldJSONSchemaExtra (
825
825
ui_hidden = ui_hidden ,
826
826
ui_order = ui_order ,
827
+ ui_type = ui_type ,
827
828
field_kind = FieldKind .Output ,
828
829
).model_dump (exclude_none = True ),
829
830
)
0 commit comments