File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,6 @@ let AIChatCustomItem = (function() {
180180
181181 const buttonContainer = document . createElement ( 'div' ) ;
182182 buttonContainer . classList . add ( 'dx-bubble-button-container' ) ;
183- this . lastRefreshButton ?. remove ( ) ;
184183 const copyBtnElement = document . createElement ( 'div' ) ;
185184 new DevExpress . ui . dxButton ( copyBtnElement , {
186185 icon : 'copy' ,
@@ -194,12 +193,15 @@ let AIChatCustomItem = (function() {
194193 stylingMode : 'text' ,
195194 onClick : ( ) => this . refreshAnswer ( data . component )
196195 } ) ;
197- buttonContainer . appendChild ( refreshBtnElement ) ;
198- this . lastRefreshButton = refreshBtnElement ;
196+ if ( data . component . option ( 'items' ) . at ( - 1 ) . author === assistant . name ) {
197+ buttonContainer . appendChild ( refreshBtnElement ) ;
198+ this . lastRefreshButton = refreshBtnElement ;
199+ }
199200 container . appendChild ( buttonContainer ) ;
200201 }
201202
202203 async onMessageEntered ( e ) {
204+ this . lastRefreshButton ?. remove ( ) ;
203205 const instance = e . component ;
204206 this . component . option ( 'alerts' , [ ] ) ;
205207 instance . renderMessage ( e . message ) ;
Original file line number Diff line number Diff line change 11<!-- default badges list -->
2- ![ ] ( https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/938296554/24.2.6%2B )
32[ ![ ] ( https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white )] ( https://supportcenter.devexpress.com/ticket/details/T1279614 )
43[ ![ ] ( https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square )] ( https://docs.devexpress.com/GeneralInformation/403183 )
54[ ![ ] ( 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