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

@@ -72,6 +72,23 @@ public sealed class ToolRegistryOfferTests : ToolRegistryTestBase
await this.AssertBothAgree(this.CreateRegistry(new TestTool(Definition())), ToolCapableProvider(), ToolOfferBlockReason.TOOL_SWITCHED_OFF, "The organization turned this one tool off.");
}
[Test]
public async Task AToolSwitchedOffByTheUser()
{
this.SettingsManager.ConfigurationData.Tools.UserDisabledToolIds.Add(TOOL_ID);
await this.AssertBothAgree(this.CreateRegistry(new TestTool(Definition())), ToolCapableProvider(), ToolOfferBlockReason.TOOL_SWITCHED_OFF_BY_USER, "The user never needs this tool and switched it off.");
}
[Test]
public async Task TheOrganizationComesBeforeTheUser()
{
this.SettingsManager.ConfigurationData.Tools.DisabledToolIds.Add(TOOL_ID);
this.SettingsManager.ConfigurationData.Tools.UserDisabledToolIds.Add(TOOL_ID);
await this.AssertBothAgree(this.CreateRegistry(new TestTool(Definition())), ToolCapableProvider(), ToolOfferBlockReason.TOOL_SWITCHED_OFF, "Switching the tool on again would not help the user, so the organization is the reason which counts.");
}
[Test]
public async Task AToolMissingASetting()
{