File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,12 @@ export async function createStreamingResponse(
9696
9797 for ( const outputId of matchingOutputs ) {
9898 const path = extractPathFromOutputId ( outputId , blockId )
99- const outputValue = traverseObjectPath ( output , path )
99+
100+ // Response blocks have their data nested under 'response'
101+ let outputValue = traverseObjectPath ( output , path )
102+ if ( outputValue === undefined && output . response ) {
103+ outputValue = traverseObjectPath ( output . response , path )
104+ }
100105
101106 if ( outputValue !== undefined ) {
102107 const formattedOutput =
@@ -150,7 +155,11 @@ export async function createStreamingResponse(
150155 if ( result . logs ) {
151156 const blockLog = result . logs . find ( ( log : any ) => log . blockId === blockId )
152157 if ( blockLog ?. output ) {
153- const value = traverseObjectPath ( blockLog . output , path )
158+ // Response blocks have their data nested under 'response'
159+ let value = traverseObjectPath ( blockLog . output , path )
160+ if ( value === undefined && blockLog . output . response ) {
161+ value = traverseObjectPath ( blockLog . output . response , path )
162+ }
154163 if ( value !== undefined ) {
155164 // Store it in a structured way
156165 if ( ! minimalResult . output [ blockId ] ) {
You can’t perform that action at this time.
0 commit comments