mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 10:13:48 +00:00
Added support for organization-approved assistant plugins (#821)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
1 parent
972ed73fe8
commit
13cc2f837a
35 files changed
+954
-62
No files matched your search
@@ -12,9 +12,18 @@
|
||||
else
|
||||
{
|
||||
<MudStack Spacing="2">
|
||||
<MudAlert Severity="Severity.Info" Dense="true">
|
||||
@T("This security check uses a sample prompt preview. Empty or placeholder values in the preview are expected.")
|
||||
</MudAlert>
|
||||
@if (this.securityState.IsEnterpriseApproved)
|
||||
{
|
||||
<MudAlert Severity="Severity.Success" Dense="true">
|
||||
@T("This assistant plugin is approved by your organization. A manual security audit is not required.")
|
||||
</MudAlert>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Dense="true">
|
||||
@T("This security check uses a sample prompt preview. Empty or placeholder values in the preview are expected.")
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
<MudPaper Class="pa-3 border-dashed border rounded-lg">
|
||||
<MudText Typo="Typo.h6">@this.plugin.Name</MudText>
|
||||
@@ -298,9 +307,12 @@
|
||||
<MudButton OnClick="@this.CloseWithoutActivation" Variant="Variant.Filled">
|
||||
@(this.audit is null ? T("Cancel") : T("Close"))
|
||||
</MudButton>
|
||||
<MudButton OnClick="@this.RunAudit" Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!this.CanRunAudit || this.justAudited)">
|
||||
@T("Start Security Check")
|
||||
</MudButton>
|
||||
@if (!this.securityState.IsEnterpriseApproved)
|
||||
{
|
||||
<MudButton OnClick="@this.RunAudit" Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!this.CanRunAudit || this.justAudited)">
|
||||
@T("Start Security Check")
|
||||
</MudButton>
|
||||
}
|
||||
@if (this.CanEnablePlugin)
|
||||
{
|
||||
<MudButton OnClick="@this.EnablePlugin" Variant="Variant.Filled" Color="@this.EnableButtonColor">
|
||||
|
||||
@@ -37,6 +37,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
private IReadOnlyCollection<TreeItemData<ITreeItem>> fileSystemTreeItems = [];
|
||||
private CultureInfo currentCultureInfo = CultureInfo.InvariantCulture;
|
||||
private bool isAuditing;
|
||||
private PluginAssistantSecurityState securityState = new();
|
||||
|
||||
private AIStudio.Settings.Provider CurrentProvider => this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true);
|
||||
|
||||
@@ -50,7 +51,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
|
||||
private string MinimumLevelLabel => this.MinimumLevel.GetName();
|
||||
|
||||
private bool CanRunAudit => this.plugin is not null && this.CurrentProvider != AIStudio.Settings.Provider.NONE && !this.isAuditing;
|
||||
private bool CanRunAudit => this.plugin is not null && this.CurrentProvider != AIStudio.Settings.Provider.NONE && !this.isAuditing && !this.securityState.IsEnterpriseApproved;
|
||||
|
||||
private bool IsAuditBelowMinimum => this.audit is not null && this.audit.Level < this.MinimumLevel;
|
||||
|
||||
@@ -74,6 +75,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
.FirstOrDefault(x => x.Id == this.PluginId);
|
||||
if (this.plugin is not null)
|
||||
{
|
||||
this.securityState = PluginAssistantSecurityResolver.Resolve(this.SettingsManager, this.plugin);
|
||||
this.promptPreview = await this.plugin.BuildAuditPromptPreviewAsync();
|
||||
this.promptFallbackPreview = this.plugin.BuildAuditPromptFallbackPreview();
|
||||
this.plugin.CreateAuditComponentSummary();
|
||||
@@ -96,6 +98,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase
|
||||
try
|
||||
{
|
||||
this.audit = await this.AssistantPluginAuditService.RunAuditAsync(this.plugin);
|
||||
this.securityState = PluginAssistantSecurityResolver.Resolve(this.SettingsManager, this.plugin);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user