File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ export type ExecutionId = string
1919export type ExecutableLGraphNode = Omit < ExecutableNodeDTO , "graph" | "node" | "subgraphNode" >
2020
2121type ResolvedInput = {
22+ /** DTO for the node that the link originates from. */
2223 node : ExecutableLGraphNode
23- origin_id : NodeId
24+ /** Full unique execution ID of the node that the link originates from. */
25+ origin_id : ExecutionId
26+ /** The slot index of the output on the node that the link originates from. */
2427 origin_slot : number
28+ /** Actual value (e.g. for widgets). */
29+ value ?: unknown
2530}
2631
2732/**
@@ -139,7 +144,18 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
139144
140145 // Nothing connected
141146 const linkId = subgraphNodeInput . link
142- if ( linkId == null ) return
147+ if ( linkId == null ) {
148+ const widget = subgraphNode . getWidgetFromSlot ( subgraphNodeInput )
149+ if ( ! widget ) return
150+
151+ // Special case: SubgraphNode widget.
152+ return {
153+ node : this ,
154+ origin_id : this . id ,
155+ origin_slot : slot ,
156+ value : widget . value ,
157+ }
158+ }
143159
144160 const outerLink = subgraphNode . graph . getLink ( linkId )
145161 if ( ! outerLink ) throw new InvalidLinkError ( `No outer link found for slot [${ link . origin_slot } ] ${ input . name } ` )
You can’t perform that action at this time.
0 commit comments