@@ -99,6 +99,39 @@ export function functionCallToMldev(
9999 return toObject ;
100100}
101101
102+ export function functionResponseToMldev (
103+ fromObject : types . FunctionResponse ,
104+ ) : Record < string , unknown > {
105+ const toObject : Record < string , unknown > = { } ;
106+
107+ const fromWillContinue = common . getValueByPath ( fromObject , [ 'willContinue' ] ) ;
108+ if ( fromWillContinue != null ) {
109+ common . setValueByPath ( toObject , [ 'willContinue' ] , fromWillContinue ) ;
110+ }
111+
112+ const fromScheduling = common . getValueByPath ( fromObject , [ 'scheduling' ] ) ;
113+ if ( fromScheduling != null ) {
114+ common . setValueByPath ( toObject , [ 'scheduling' ] , fromScheduling ) ;
115+ }
116+
117+ const fromId = common . getValueByPath ( fromObject , [ 'id' ] ) ;
118+ if ( fromId != null ) {
119+ common . setValueByPath ( toObject , [ 'id' ] , fromId ) ;
120+ }
121+
122+ const fromName = common . getValueByPath ( fromObject , [ 'name' ] ) ;
123+ if ( fromName != null ) {
124+ common . setValueByPath ( toObject , [ 'name' ] , fromName ) ;
125+ }
126+
127+ const fromResponse = common . getValueByPath ( fromObject , [ 'response' ] ) ;
128+ if ( fromResponse != null ) {
129+ common . setValueByPath ( toObject , [ 'response' ] , fromResponse ) ;
130+ }
131+
132+ return toObject ;
133+ }
134+
102135export function partToMldev ( fromObject : types . Part ) : Record < string , unknown > {
103136 const toObject : Record < string , unknown > = { } ;
104137
@@ -152,6 +185,17 @@ export function partToMldev(fromObject: types.Part): Record<string, unknown> {
152185 ) ;
153186 }
154187
188+ const fromFunctionResponse = common . getValueByPath ( fromObject , [
189+ 'functionResponse' ,
190+ ] ) ;
191+ if ( fromFunctionResponse != null ) {
192+ common . setValueByPath (
193+ toObject ,
194+ [ 'functionResponse' ] ,
195+ functionResponseToMldev ( fromFunctionResponse ) ,
196+ ) ;
197+ }
198+
155199 const fromCodeExecutionResult = common . getValueByPath ( fromObject , [
156200 'codeExecutionResult' ,
157201 ] ) ;
@@ -170,13 +214,6 @@ export function partToMldev(fromObject: types.Part): Record<string, unknown> {
170214 common . setValueByPath ( toObject , [ 'executableCode' ] , fromExecutableCode ) ;
171215 }
172216
173- const fromFunctionResponse = common . getValueByPath ( fromObject , [
174- 'functionResponse' ,
175- ] ) ;
176- if ( fromFunctionResponse != null ) {
177- common . setValueByPath ( toObject , [ 'functionResponse' ] , fromFunctionResponse ) ;
178- }
179-
180217 const fromText = common . getValueByPath ( fromObject , [ 'text' ] ) ;
181218 if ( fromText != null ) {
182219 common . setValueByPath ( toObject , [ 'text' ] , fromText ) ;
@@ -1746,6 +1783,39 @@ export function functionCallFromMldev(
17461783 return toObject ;
17471784}
17481785
1786+ export function functionResponseFromMldev (
1787+ fromObject : types . FunctionResponse ,
1788+ ) : Record < string , unknown > {
1789+ const toObject : Record < string , unknown > = { } ;
1790+
1791+ const fromWillContinue = common . getValueByPath ( fromObject , [ 'willContinue' ] ) ;
1792+ if ( fromWillContinue != null ) {
1793+ common . setValueByPath ( toObject , [ 'willContinue' ] , fromWillContinue ) ;
1794+ }
1795+
1796+ const fromScheduling = common . getValueByPath ( fromObject , [ 'scheduling' ] ) ;
1797+ if ( fromScheduling != null ) {
1798+ common . setValueByPath ( toObject , [ 'scheduling' ] , fromScheduling ) ;
1799+ }
1800+
1801+ const fromId = common . getValueByPath ( fromObject , [ 'id' ] ) ;
1802+ if ( fromId != null ) {
1803+ common . setValueByPath ( toObject , [ 'id' ] , fromId ) ;
1804+ }
1805+
1806+ const fromName = common . getValueByPath ( fromObject , [ 'name' ] ) ;
1807+ if ( fromName != null ) {
1808+ common . setValueByPath ( toObject , [ 'name' ] , fromName ) ;
1809+ }
1810+
1811+ const fromResponse = common . getValueByPath ( fromObject , [ 'response' ] ) ;
1812+ if ( fromResponse != null ) {
1813+ common . setValueByPath ( toObject , [ 'response' ] , fromResponse ) ;
1814+ }
1815+
1816+ return toObject ;
1817+ }
1818+
17491819export function partFromMldev ( fromObject : types . Part ) : Record < string , unknown > {
17501820 const toObject : Record < string , unknown > = { } ;
17511821
@@ -1799,6 +1869,17 @@ export function partFromMldev(fromObject: types.Part): Record<string, unknown> {
17991869 ) ;
18001870 }
18011871
1872+ const fromFunctionResponse = common . getValueByPath ( fromObject , [
1873+ 'functionResponse' ,
1874+ ] ) ;
1875+ if ( fromFunctionResponse != null ) {
1876+ common . setValueByPath (
1877+ toObject ,
1878+ [ 'functionResponse' ] ,
1879+ functionResponseFromMldev ( fromFunctionResponse ) ,
1880+ ) ;
1881+ }
1882+
18021883 const fromCodeExecutionResult = common . getValueByPath ( fromObject , [
18031884 'codeExecutionResult' ,
18041885 ] ) ;
@@ -1817,13 +1898,6 @@ export function partFromMldev(fromObject: types.Part): Record<string, unknown> {
18171898 common . setValueByPath ( toObject , [ 'executableCode' ] , fromExecutableCode ) ;
18181899 }
18191900
1820- const fromFunctionResponse = common . getValueByPath ( fromObject , [
1821- 'functionResponse' ,
1822- ] ) ;
1823- if ( fromFunctionResponse != null ) {
1824- common . setValueByPath ( toObject , [ 'functionResponse' ] , fromFunctionResponse ) ;
1825- }
1826-
18271901 const fromText = common . getValueByPath ( fromObject , [ 'text' ] ) ;
18281902 if ( fromText != null ) {
18291903 common . setValueByPath ( toObject , [ 'text' ] , fromText ) ;
0 commit comments