mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 14:41:37 +00:00
Allow individual provider & profile reset logic per assistant
This commit is contained in:
parent
8cdad359a9
commit
25fc742a6f
@ -232,6 +232,13 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
return chatId;
|
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<FileAttachment> attachments)
|
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List<FileAttachment> attachments)
|
||||||
{
|
{
|
||||||
var time = DateTimeOffset.Now;
|
var time = DateTimeOffset.Now;
|
||||||
@ -372,9 +379,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
|
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
|
||||||
|
|
||||||
this.ResetForm();
|
this.ResetForm();
|
||||||
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
this.ResetProviderAndProfileSelection();
|
||||||
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
|
||||||
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
|
|
||||||
|
|
||||||
this.inputIsValid = false;
|
this.inputIsValid = false;
|
||||||
this.inputIssues = [];
|
this.inputIssues = [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user