File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
apps/sim/app/workspace/[workspaceId]/home/hooks Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -651,6 +651,18 @@ export function useChat(
651651 ) {
652652 clientExecutionStarted . add ( id )
653653 const args = data ?. arguments ?? data ?. input ?? { }
654+ const targetWorkflowId =
655+ typeof ( args as Record < string , unknown > ) . workflowId === 'string'
656+ ? ( ( args as Record < string , unknown > ) . workflowId as string )
657+ : useWorkflowRegistry . getState ( ) . activeWorkflowId
658+ if ( targetWorkflowId ) {
659+ const meta = useWorkflowRegistry . getState ( ) . workflows [ targetWorkflowId ]
660+ addResource ( {
661+ type : 'workflow' ,
662+ id : targetWorkflowId ,
663+ title : meta ?. name ?? 'Workflow' ,
664+ } )
665+ }
654666 executeRunToolOnClient ( id , name , args as Record < string , unknown > )
655667 }
656668 break
You can’t perform that action at this time.
0 commit comments