From 25fc742a6f4ff29dfaecfded69b048287addd2c5 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 1 Feb 2026 14:43:25 +0100 Subject: [PATCH] Allow individual provider & profile reset logic per assistant --- .../Assistants/AssistantBase.razor.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/MindWork AI Studio/Assistants/AssistantBase.razor.cs b/app/MindWork AI Studio/Assistants/AssistantBase.razor.cs index b9d4dd3f..a91f2b57 100644 --- a/app/MindWork AI Studio/Assistants/AssistantBase.razor.cs +++ b/app/MindWork AI Studio/Assistants/AssistantBase.razor.cs @@ -231,6 +231,13 @@ public abstract partial class AssistantBase : AssistantLowerBase wher return chatId; } + + protected virtual void ResetProviderAndProfileSelection() + { + this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component); + this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component); + this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component); + } protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List attachments) { @@ -372,9 +379,7 @@ public abstract partial class AssistantBase : AssistantLowerBase wher await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID); this.ResetForm(); - this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component); - this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component); - this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component); + this.ResetProviderAndProfileSelection(); this.inputIsValid = false; this.inputIssues = [];