File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
CS/ReportingApp/wwwroot/js Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 8585 stylingMode : 'text' ,
8686 onClick : ( ) => refreshAnswer ( data . component )
8787 } ) ;
88- buttonContainer . appendChild ( refreshBtnElement ) ;
88+ if ( data . component . option ( 'items' ) . at ( - 1 ) . author === assistant . name ) {
89+ buttonContainer . appendChild ( refreshBtnElement ) ;
90+ lastRefreshButton = refreshBtnElement ;
91+ }
8992 container . appendChild ( buttonContainer ) ;
9093 } ,
9194 onMessageEntered : async ( e ) => {
95+ lastRefreshButton ?. remove ( ) ;
9296 const instance = e . component ;
9397 instance . renderMessage ( e . message ) ;
9498 instance . option ( { typingUsers : [ assistant ] } ) ;
9599 const userInput = e . message . text ;
96-
97- var response = await getAIResponse ( userInput , assistant . id ) ;
100+ if ( ! assistant . id && model . chatId ) {
101+ assistant . id = model . chatId ;
102+ }
103+ const response = await getAIResponse ( instance , userInput , assistant . id ) ;
98104 RenderAssistantMessage ( instance , response ) ;
99105 }
100106 } ;
You can’t perform that action at this time.
0 commit comments