@@ -61,7 +61,7 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
6161    appId, 
6262    chatId, 
6363    responseChatItemId, 
64-     variables, 
64+     ... variables , 
6565    histories : histories . slice ( 0 ,  10 ) , 
6666    ...body 
6767  } ; 
@@ -71,22 +71,20 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
7171    try  { 
7272      if  ( ! httpHeader  ||  httpHeader . length  ===  0 )  return  { } ; 
7373      // array 
74-       return  httpHeader . reduce ( ( acc ,  item )  =>  { 
75-         item . key  =  replaceVariable ( item . key ,  concatVariables ) ; 
76-         item . value  =  replaceVariable ( item . value ,  concatVariables ) ; 
77-         // @ts -ignore 
78-         acc [ item . key ]  =  valueTypeFormat ( item . value ,  'string' ) ; 
74+       return  httpHeader . reduce ( ( acc : Record < string ,  string > ,  item )  =>  { 
75+         const  key  =  replaceVariable ( item . key ,  concatVariables ) ; 
76+         const  value  =  replaceVariable ( item . value ,  concatVariables ) ; 
77+         acc [ key ]  =  valueTypeFormat ( value ,  'string' ) ; 
7978        return  acc ; 
8079      } ,  { } ) ; 
8180    }  catch  ( error )  { 
8281      return  Promise . reject ( 'Header 为非法 JSON 格式' ) ; 
8382    } 
8483  } ) ( ) ; 
85-   const  params  =  httpParams . reduce ( ( acc ,  item )  =>  { 
86-     item . key  =  replaceVariable ( item . key ,  concatVariables ) ; 
87-     item . value  =  replaceVariable ( item . value ,  concatVariables ) ; 
88-     // @ts -ignore 
89-     acc [ item . key ]  =  valueTypeFormat ( item . value ,  'string' ) ; 
84+   const  params  =  httpParams . reduce ( ( acc : Record < string ,  string > ,  item )  =>  { 
85+     const  key  =  replaceVariable ( item . key ,  concatVariables ) ; 
86+     const  value  =  replaceVariable ( item . value ,  concatVariables ) ; 
87+     acc [ key ]  =  valueTypeFormat ( value ,  'string' ) ; 
9088    return  acc ; 
9189  } ,  { } ) ; 
9290  const  requestBody  =  await  ( ( )  =>  { 
@@ -101,7 +99,7 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
10199      return  Promise . reject ( `Invalid JSON body: ${ httpJsonBody }  ) ; 
102100    } 
103101  } ) ( ) ; 
104-   // console.log(params, requestBody, headers); 
102+   // console.log(params, requestBody, headers, concatVariables ); 
105103
106104  try  { 
107105    const  {  formatResponse,  rawResponse }  =  await  fetchData ( { 
0 commit comments