mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 03:47:21 +00:00
Turned getter-like extension methods into extension properties (#1157)
This commit is contained in:
1 parent
0375318b1b
commit
f649febf88
286 files changed
+1379
-1109
No files matched your search
@@ -64,13 +64,13 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
|
||||
private string ProviderLabel => this.EffectiveProvider == AIStudio.Settings.Provider.NONE
|
||||
? T("No model configured")
|
||||
: $"{this.EffectiveProvider.InstanceName} ({this.EffectiveProvider.UsedLLMProvider.ToName()})";
|
||||
: $"{this.EffectiveProvider.InstanceName} ({this.EffectiveProvider.UsedLLMProvider.Name})";
|
||||
|
||||
private DataAssistantPluginAudit AuditSettings => this.SettingsManager.ConfigurationData.AssistantPluginAudit;
|
||||
|
||||
private AssistantAuditLevel MinimumLevel => this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel;
|
||||
|
||||
private string MinimumLevelLabel => this.MinimumLevel.GetName();
|
||||
private string MinimumLevelLabel => this.MinimumLevel.Name;
|
||||
|
||||
private bool CanRunAudit => this.plugin is not null && this.EffectiveProvider != AIStudio.Settings.Provider.NONE && !this.isAuditing && !this.securityState.IsEnterpriseApproved;
|
||||
|
||||
@@ -200,7 +200,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
string.Format(
|
||||
T("The assistant plugin '{0}' was audited with the level '{1}', which is below the required safety level '{2}'. Your current settings still allow activation, but this may be unsafe. Do you really want to enable this plugin?"),
|
||||
this.plugin?.Name ?? T("Unknown plugin"),
|
||||
this.audit?.Level.GetName() ?? T("Unknown"),
|
||||
this.audit?.Level.Name ?? T("Unknown"),
|
||||
this.MinimumLevelLabel)
|
||||
},
|
||||
};
|
||||
@@ -254,7 +254,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
{
|
||||
Text = this.GetComponentTreeItemText(component),
|
||||
Caption = this.GetComponentTreeItemCaption(component, index),
|
||||
Icon = component.Type.GetIcon(),
|
||||
Icon = component.Type.Icon,
|
||||
Expandable = children.Count > 0,
|
||||
},
|
||||
Children = children,
|
||||
@@ -460,7 +460,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
|
||||
private string GetComponentTreeItemText(IAssistantComponent component)
|
||||
{
|
||||
var type = component.Type.GetDisplayName();
|
||||
var type = component.Type.DisplayName;
|
||||
if (component is INamedAssistantComponent named && !string.IsNullOrWhiteSpace(named.Name))
|
||||
return $"{type}: {named.Name}";
|
||||
|
||||
|
||||
Reference in new issue
Block a user