@@ -95,29 +95,27 @@ export class GetBlockOutputsClientTool extends BaseClientTool {
9595 let insideSubflowOutputs : string [ ] | undefined
9696 let outsideSubflowOutputs : string [ ] | undefined
9797
98- if ( block . type === 'loop' || block . type === 'parallel' ) {
99- const insidePaths = getSubflowInsidePaths ( block . type , blockId , loops , parallels )
100- insideSubflowOutputs = formatOutputsWithPrefix ( insidePaths , blockName )
101- outsideSubflowOutputs = formatOutputsWithPrefix ( [ 'results' ] , blockName )
102- }
103-
104- const outputPaths = computeBlockOutputPaths ( block , ctx )
105- const formattedOutputs = formatOutputsWithPrefix ( outputPaths , blockName )
106-
10798 const blockOutput : GetBlockOutputsResultType [ 'blocks' ] [ 0 ] = {
10899 blockId,
109100 blockName,
110101 blockType : block . type ,
111- outputs : formattedOutputs ,
102+ outputs : [ ] ,
112103 }
113104
114- if ( insideSubflowOutputs ) blockOutput . insideSubflowOutputs = insideSubflowOutputs
115- if ( outsideSubflowOutputs ) blockOutput . outsideSubflowOutputs = outsideSubflowOutputs
105+ if ( block . type === 'loop' || block . type === 'parallel' ) {
106+ const insidePaths = getSubflowInsidePaths ( block . type , blockId , loops , parallels )
107+ blockOutput . insideSubflowOutputs = formatOutputsWithPrefix ( insidePaths , blockName )
108+ blockOutput . outsideSubflowOutputs = formatOutputsWithPrefix ( [ 'results' ] , blockName )
109+ } else {
110+ const outputPaths = computeBlockOutputPaths ( block , ctx )
111+ blockOutput . outputs = formatOutputsWithPrefix ( outputPaths , blockName )
112+ }
116113
117114 blockOutputs . push ( blockOutput )
118115 }
119116
120- const variableOutputs = getWorkflowVariables ( activeWorkflowId )
117+ const includeVariables = ! args ?. blockIds || args . blockIds . length === 0
118+ const variableOutputs = includeVariables ? getWorkflowVariables ( activeWorkflowId ) : [ ]
121119
122120 const result = GetBlockOutputsResult . parse ( {
123121 blocks : blockOutputs ,
0 commit comments