From d86e61f4f4cc22d898382292f1521d7f3f8c3a30 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Tue, 25 Mar 2025 11:08:53 +0400 Subject: [PATCH 1/2] README auto update [skip ci] --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0d98671..e71f7ca 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/853003889/24.2.6%2B) [![](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) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) [![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives) From 5a57762eab227cf9e93afb02f7a6f548c019f2c7 Mon Sep 17 00:00:00 2001 From: Amirzhan Alimov Date: Tue, 25 Mar 2025 11:46:04 +0500 Subject: [PATCH 2/2] fix refresh button rendering --- CS/ReportingApp/wwwroot/js/aiIntegration.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CS/ReportingApp/wwwroot/js/aiIntegration.js b/CS/ReportingApp/wwwroot/js/aiIntegration.js index 1720642..ce2f8b6 100644 --- a/CS/ReportingApp/wwwroot/js/aiIntegration.js +++ b/CS/ReportingApp/wwwroot/js/aiIntegration.js @@ -85,16 +85,22 @@ stylingMode: 'text', onClick: () => refreshAnswer(data.component) }); - buttonContainer.appendChild(refreshBtnElement); + if(data.component.option('items').at(-1).author === assistant.name) { + buttonContainer.appendChild(refreshBtnElement); + lastRefreshButton = refreshBtnElement; + } container.appendChild(buttonContainer); }, onMessageEntered: async (e) => { + lastRefreshButton?.remove(); const instance = e.component; instance.renderMessage(e.message); instance.option({ typingUsers: [assistant] }); const userInput = e.message.text; - - var response = await getAIResponse(userInput, assistant.id); + if(!assistant.id && model.chatId) { + assistant.id = model.chatId; + } + const response = await getAIResponse(instance, userInput, assistant.id); RenderAssistantMessage(instance, response); } };