mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 07:01:37 +00:00
Code ordering
This commit is contained in:
parent
5dd1e4b830
commit
f668388192
@ -477,23 +477,6 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
await this.AutoSave();
|
await this.AutoSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string? ValidatePolicyName(string name)
|
|
||||||
{
|
|
||||||
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(name))
|
|
||||||
return T("Please provide a name for your policy. This name will be used to identify the policy in AI Studio.");
|
|
||||||
|
|
||||||
if(name.Length is > 60 or < 6)
|
|
||||||
return T("The name of your policy must be between 6 and 60 characters long.");
|
|
||||||
|
|
||||||
if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name))
|
|
||||||
return T("A policy with this name already exists. Please choose a different name.");
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Overrides of MSGComponentBase
|
#region Overrides of MSGComponentBase
|
||||||
|
|
||||||
protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
|
protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
|
||||||
@ -559,6 +542,23 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
|
|||||||
this.ClearInputIssues();
|
this.ClearInputIssues();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string? ValidatePolicyName(string name)
|
||||||
|
{
|
||||||
|
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if(string.IsNullOrWhiteSpace(name))
|
||||||
|
return T("Please provide a name for your policy. This name will be used to identify the policy in AI Studio.");
|
||||||
|
|
||||||
|
if(name.Length is > 60 or < 6)
|
||||||
|
return T("The name of your policy must be between 6 and 60 characters long.");
|
||||||
|
|
||||||
|
if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name))
|
||||||
|
return T("A policy with this name already exists. Please choose a different name.");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private string? ValidatePolicyDescription(string description)
|
private string? ValidatePolicyDescription(string description)
|
||||||
{
|
{
|
||||||
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
|
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user