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

@@ -2,11 +2,12 @@
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Build" HeaderText="@T("Tool Settings")">
<MudText Typo="Typo.body1" Class="mb-4">
@T("Configure global settings for each tool.")
@T("Configure global settings for each tool.") @T("Switch off the tools you never need: they then appear in no tool selection, and the AI cannot use them.")
</MudText>
<MudTable Items="@this.items" Hover="@true" Dense="@true">
<HeaderContent>
<MudTh>@T("Enabled")</MudTh>
<MudTh>@T("Icon")</MudTh>
<MudTh>@T("Name")</MudTh>
<MudTh>@T("Description")</MudTh>
@@ -15,6 +16,11 @@
<MudTh>@T("Settings")</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>
<MudTooltip Text="@this.GetSwitchTooltip(context)">
<MudSwitch T="bool" Value="@context.IsActive" ValueChanged="@(isOn => this.SwitchToolOnOrOff(context, isOn))" Disabled="@IsSwitchLocked(context)" Color="Color.Primary" />
</MudTooltip>
</MudTd>
<MudTd>
<MudIcon Icon="@context.Icon" Color="Color.Info" />
</MudTd>
@@ -35,7 +41,14 @@
</MudMenu>
</MudTd>
<MudTd>
@if (!context.IsActive)
@if (IsSwitchedOffByUser(context))
{
@* Whether its settings are complete does not matter while nobody can use the tool: *@
<MudTooltip Text="@T("You switched off this tool. It appears in no tool selection, and the AI cannot use it.")">
<MudIcon Icon="@Icons.Material.Filled.VisibilityOff" Color="Color.Default" />
</MudTooltip>
}
else if (!context.IsActive)
{
<MudTooltip Text="@T("This tool has been disabled by your organization.")">
<MudIcon Icon="@Icons.Material.Filled.Lock" Color="Color.Error" />