Added a way to switch off tools you never need (#1115)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-27 08:48:52 +01:00
1 parent dcba62b45c
commit 04546c25ac
31 files changed
+638 -37

No files matched your search

@@ -18,7 +18,11 @@
@this.item.Description
</MudJustifiedText>
@if (!this.ToolRegistry.IsToolActive(this.item.Id))
@if (this.IsSwitchedOffByUser)
{
<MudAlert Severity="Severity.Info" Class="mb-4">@T("You switched off this tool. It appears in no tool selection, and the AI cannot use it. You can switch it on again in the tool settings.")</MudAlert>
}
else if (!this.ToolRegistry.IsToolActive(this.item.Id))
{
<MudAlert Severity="Severity.Warning" Class="mb-4">@T("This tool has been disabled by your organization.")</MudAlert>
}
@@ -45,6 +45,15 @@ public partial class ToolSettingsDialog : SettingsDialogBase
this.sections = loadedSections;
}
/// <summary>
/// Whether the user switched this tool off, and nothing but the user.
/// </summary>
/// <remarks>
/// When the organization switched it off as well, that is what the dialog says: switching it on
/// again would not help the user.
/// </remarks>
private bool IsSwitchedOffByUser => this.item?.SwitchOffReason is ToolOfferBlockReason.TOOL_SWITCHED_OFF_BY_USER;
/// <summary>
/// Whether each section is headed by the name of its tool.
/// </summary>