From 99622cec48b076da85b413cb25943038a5f1fbcb Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 8 Mar 2025 14:23:24 +0100 Subject: [PATCH] Fixed the default data source selection when replacing the chat (#315) --- app/MindWork AI Studio/Components/ChatComponent.razor.cs | 3 +++ app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index 2e05c0f..d8dee12 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -275,6 +275,9 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable { var chatDefaultOptions = this.SettingsManager.ConfigurationData.Chat.PreselectedDataSourceOptions.CreateCopy(); this.earlyDataSourceOptions = chatDefaultOptions; + if(this.ChatThread is not null) + this.ChatThread.DataSourceOptions = chatDefaultOptions; + this.dataSourceSelectionComponent?.ChangeOptionWithoutSaving(chatDefaultOptions); } diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md index 007b7d7..7289da8 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md @@ -7,4 +7,5 @@ - Improved chat thread persistence after modifications through the RAG process. - Improved the augmentation and generation part of RAG by passing the augmented data into the system prompt. - Fixed the chat thread we use for the data retrieval by removing the last block, which is meant to be for the final AI answer. -- Fixed the data source name for ERI data sources when performing data retrieval. \ No newline at end of file +- Fixed the data source name for ERI data sources when performing data retrieval. +- Fixed the default data source selection when replacing the current chat with a new one. \ No newline at end of file