File tree 2 files changed +9
-4
lines changed
CS/ReportingApp/wwwroot/js
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -116,17 +116,23 @@ const createAssistantTab = (function() {
116
116
stylingMode : 'text' ,
117
117
onClick : ( ) => refreshAnswer ( data . component )
118
118
} ) ;
119
- buttonContainer . appendChild ( refreshBtnElement ) ;
120
- lastRefreshButton = refreshBtnElement ;
119
+ if ( data . component . option ( 'items' ) . at ( - 1 ) . author === assistant . name ) {
120
+ buttonContainer . appendChild ( refreshBtnElement ) ;
121
+ lastRefreshButton = refreshBtnElement ;
122
+ }
121
123
container . appendChild ( buttonContainer ) ;
122
124
} ,
123
125
onMessageEntered : async ( e ) => {
126
+ lastRefreshButton ?. remove ( ) ;
124
127
const instance = e . component ;
125
128
instance . option ( 'alerts' , [ ] ) ;
126
129
instance . renderMessage ( e . message ) ;
127
130
instance . option ( { typingUsers : [ assistant ] } ) ;
128
131
const userInput = e . message . text ;
129
- const response = await getAIResponse ( instance , userInput , assistant . id ?? model . chatId ) ;
132
+ if ( ! assistant . id && model . chatId ) {
133
+ assistant . id = model . chatId ;
134
+ }
135
+ const response = await getAIResponse ( instance , userInput , assistant . id ) ;
130
136
RenderAssistantMessage ( instance , response ) ;
131
137
}
132
138
} ;
Original file line number Diff line number Diff line change 1
1
<!-- default badges list -->
2
- ![ ] ( https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/853003889/24.2.6%2B )
3
2
[ ![ ] ( https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white )] ( https://supportcenter.devexpress.com/ticket/details/T1252182 )
4
3
[ ![ ] ( https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square )] ( https://docs.devexpress.com/GeneralInformation/403183 )
5
4
[ ![ ] ( https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square )] ( #does-this-example-address-your-development-requirementsobjectives )
You can’t perform that action at this time.
0 commit comments