@@ -285,7 +285,7 @@ function sendChatHandle(event: any) {
285285 if (! event .ctrlKey ) {
286286 // 如果没有按下组合键ctrl,则会阻止默认事件
287287 event .preventDefault ()
288- if (! isDisabledChart .value && ! loading .value && !event .isComposing ) {
288+ if (! isDisabledChart .value && ! loading .value && ! event .isComposing ) {
289289 chatMessage ()
290290 }
291291 } else {
@@ -418,7 +418,7 @@ const errorWrite = (chat: any, message?: string) => {
418418 ChatManagement .append (chat .id , message || ' 抱歉,当前正在维护,无法提供服务,请稍后再试!' )
419419 ChatManagement .close (chat .id )
420420}
421- function chatMessage(chat ? : any , problem ? : string ) {
421+ function chatMessage(chat ? : any , problem ? : string , re_chat ? : boolean ) {
422422 loading .value = true
423423 if (! chat ) {
424424 chat = reactive ({
@@ -443,9 +443,13 @@ function chatMessage(chat?: any, problem?: string) {
443443 errorWrite (chat )
444444 })
445445 } else {
446+ const obj = {
447+ message: chat .problem_text ,
448+ re_chat: re_chat || false
449+ }
446450 // 对话
447451 applicationApi
448- .postChatMessage (chartOpenId .value , chat . problem_text )
452+ .postChatMessage (chartOpenId .value , obj )
449453 .then ((response ) => {
450454 if (response .status === 401 ) {
451455 application
@@ -491,7 +495,7 @@ function chatMessage(chat?: any, problem?: string) {
491495
492496function regenerationChart(item : chatType ) {
493497 inputValue .value = item .problem_text
494- chatMessage ()
498+ chatMessage (null , ' ' , true )
495499}
496500
497501function getSourceDetail(row : any ) {
0 commit comments