AI-Studio/app/MindWork AI Studio/Tools/Services/ConfigurationPluginImportSummary.cs
Thorsten Sommer 6e143aafaa
Some checks are pending
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (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
Improved local plugin handling (share, import, delete) (#900)
2026-08-09 19:01:58 +02:00

38 lines
1.8 KiB
C#

namespace AIStudio.Tools.Services;
/// <summary>
/// What a configuration plugin would set up, read from the archive before anything is installed.
/// </summary>
/// <remarks>
/// A configuration takes effect the moment it is installed, and it has no on/off switch. The import
/// dialog is therefore the only place where users can see what they are about to accept, which is
/// why this carries the destinations of providers and data sources and not just their number.
/// </remarks>
/// <param name="Destinations">The providers and data sources, together with where they send data to.</param>
/// <param name="ChatTemplates">How many chat templates the configuration adds.</param>
/// <param name="Profiles">How many profiles the configuration adds.</param>
/// <param name="DocumentAnalysisPolicies">How many document analysis policies the configuration adds.</param>
/// <param name="DeclaredSettings">How many settings the configuration takes over.</param>
/// <param name="MandatoryInfos">How many mandatory information texts users must accept.</param>
/// <param name="Introductions">How many introductions the configuration adds to the welcome page.</param>
public sealed record ConfigurationPluginImportSummary(
IReadOnlyList<ConfigurationPluginDestination> Destinations,
int ChatTemplates,
int Profiles,
int DocumentAnalysisPolicies,
int DeclaredSettings,
int MandatoryInfos,
int Introductions)
{
/// <summary>
/// True when the configuration sets up anything at all.
/// </summary>
public bool HasAnyContent =>
this.Destinations.Count > 0 ||
this.ChatTemplates > 0 ||
this.Profiles > 0 ||
this.DocumentAnalysisPolicies > 0 ||
this.DeclaredSettings > 0 ||
this.MandatoryInfos > 0 ||
this.Introductions > 0;
}