File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
ui/src/components/ai-chat Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -221,20 +221,21 @@ const checkInputParam = () => {
221221}
222222
223223function sendMessage(val : string , other_params_data ? : any , chat ? : chatType ) {
224- if (! userFormRef .value ?. checkInputParam () ) {
225- if (isUserInput .value ) {
224+ if (isUserInput .value ) {
225+ if (! userFormRef .value ?. checkInputParam () ) {
226226 showUserInput .value = true
227+ return
228+ } else {
229+ let userFormData = JSON .parse (localStorage .getItem (` ${accessToken }userForm ` ) || ' {}' )
230+ const newData = Object .keys (form_data .value ).reduce ((result : any , key : string ) => {
231+ result [key ] = Object .prototype .hasOwnProperty .call (userFormData , key )
232+ ? userFormData [key ]
233+ : form_data .value [key ]
234+ return result
235+ }, {})
236+ localStorage .setItem (` ${accessToken }userForm ` , JSON .stringify (newData ))
237+ showUserInput .value = false
227238 }
228- return
229- } else {
230- let userFormData = JSON .parse (localStorage .getItem (` ${accessToken }userForm ` ) || ' {}' )
231- const newData = Object .keys (form_data .value ).reduce ((result : any , key : string ) => {
232- result [key ] = Object .prototype .hasOwnProperty .call (userFormData , key )
233- ? userFormData [key ]
234- : form_data .value [key ]
235- return result
236- }, {})
237- localStorage .setItem (` ${accessToken }userForm ` , JSON .stringify (newData ))
238239 }
239240 if (! loading .value && props .applicationDetails ?.name ) {
240241 handleDebounceClick (val , other_params_data , chat )
You can’t perform that action at this time.
0 commit comments