File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
apps/sim/executor/variables/resolvers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 type Resolver ,
1111} from '@/executor/variables/resolvers/reference'
1212import type { SerializedBlock , SerializedWorkflow } from '@/serializer/types'
13+ import { getTool } from '@/tools/utils'
1314
1415function isPathInOutputSchema (
1516 outputs : Record < string , any > | undefined ,
@@ -168,8 +169,11 @@ export class BlockResolver implements Resolver {
168169 }
169170 }
170171
171- const schemaFields = getSchemaFieldNames ( block ?. outputs )
172- if ( schemaFields . length > 0 && ! isPathInOutputSchema ( block ?. outputs , pathParts ) ) {
172+ const toolId = block ?. config ?. tool
173+ const toolConfig = toolId ? getTool ( toolId ) : undefined
174+ const outputSchema = toolConfig ?. outputs ?? block ?. outputs
175+ const schemaFields = getSchemaFieldNames ( outputSchema )
176+ if ( schemaFields . length > 0 && ! isPathInOutputSchema ( outputSchema , pathParts ) ) {
173177 throw new Error (
174178 `"${ pathParts . join ( '.' ) } " doesn't exist on block "${ blockName } ". ` +
175179 `Available fields: ${ schemaFields . join ( ', ' ) } `
You can’t perform that action at this time.
0 commit comments