@@ -55,10 +55,12 @@ export function constructLGCRemoteAction({
5555 } ) ;
5656
5757 let state = { } ;
58+ let configurable = { } ;
5859 if ( agentStates ) {
59- const jsonState = agentStates . find ( ( state ) => state . agentName === name ) ?. state ;
60+ const jsonState = agentStates . find ( ( state ) => state . agentName === name ) ;
6061 if ( jsonState ) {
61- state = JSON . parse ( jsonState ) ;
62+ state = JSON . parse ( jsonState . state ) ;
63+ configurable = JSON . parse ( jsonState . configurable ) ;
6264 }
6365 }
6466
@@ -72,6 +74,7 @@ export function constructLGCRemoteAction({
7274 nodeName,
7375 messages : [ ...messages , ...additionalMessages ] ,
7476 state,
77+ configurable,
7578 properties : graphqlContext . properties ,
7679 actions : actionInputsWithoutAgents . map ( ( action ) => ( {
7780 name : action . name ,
@@ -196,10 +199,12 @@ export function constructRemoteActions({
196199 } ) ;
197200
198201 let state = { } ;
202+ let configurable = { } ;
199203 if ( agentStates ) {
200- const jsonState = agentStates . find ( ( state ) => state . agentName === name ) ?. state ;
204+ const jsonState = agentStates . find ( ( state ) => state . agentName === name ) ;
201205 if ( jsonState ) {
202- state = JSON . parse ( jsonState ) ;
206+ state = JSON . parse ( jsonState . state ) ;
207+ configurable = JSON . parse ( jsonState . configurable ) ;
203208 }
204209 }
205210
@@ -214,6 +219,7 @@ export function constructRemoteActions({
214219 nodeName,
215220 messages : [ ...messages , ...additionalMessages ] ,
216221 state,
222+ configurable,
217223 properties : graphqlContext . properties ,
218224 actions : actionInputsWithoutAgents . map ( ( action ) => ( {
219225 name : action . name ,
0 commit comments