Files
AI-Studio/app/MindWork AI Studio/Tools/Services/ConfigurationPluginDeleteSummary.cs
T
Thorsten Sommer c4400c0ff6
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 / Verify (push) Waiting to run
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 / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (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 }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Added mailboxes as local data sources (#1022)
2026-10-04 12:26:26 +02:00

44 lines
1.6 KiB
C#

namespace AIStudio.Tools.Services;
/// <summary>
/// What deleting a local configuration plugin takes with it, besides the plugin directory itself.
/// </summary>
/// <remarks>
/// A configuration plugin owns everything it configured. Removing it therefore removes its providers,
/// data sources, chat templates, and profiles, and it resets the settings it had locked. Users cannot
/// see any of that on the plugins page, so we show it before they confirm the deletion.
/// </remarks>
public sealed record ConfigurationPluginDeleteSummary(
int LlmProviders,
int TranscriptionProviders,
int EmbeddingProviders,
int DataSources,
int ChatTemplates,
int Profiles,
int DocumentAnalysisPolicies,
int LockedSettings,
int MandatoryInfos,
int Introductions,
int MailboxProviders)
{
/// <summary>
/// An empty summary, used when the configuration plugin is not running and we cannot tell what it configured.
/// </summary>
public static readonly ConfigurationPluginDeleteSummary EMPTY = new(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
/// <summary>
/// True when the deletion affects anything beyond the plugin directory.
/// </summary>
public bool HasAnyConsequence =>
this.LlmProviders > 0 ||
this.TranscriptionProviders > 0 ||
this.EmbeddingProviders > 0 ||
this.DataSources > 0 ||
this.ChatTemplates > 0 ||
this.Profiles > 0 ||
this.DocumentAnalysisPolicies > 0 ||
this.LockedSettings > 0 ||
this.MandatoryInfos > 0 ||
this.Introductions > 0 ||
this.MailboxProviders > 0;
}