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 = [];