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

@@ -290,7 +290,8 @@ public sealed class AssistantPluginGenerationService(ToolRegistry toolRegistry,
/// </summary>
/// <remarks>
/// Tools an organization switched off are left out: an assistant naming one would run without
/// it, and neither the model nor the user could tell from the plugin why. Whether a tool is
/// it, and neither the model nor the user could tell from the plugin why. Tools the user switched
/// off do not even reach the catalog, since the user never needs them. Whether a tool is
/// fully configured is deliberately not part of this, because settings can be completed later
/// and the assistant then works as written.
/// </remarks>
@@ -194,7 +194,8 @@ public sealed class DataRestoreService(ILogger<DataRestoreService> logger, Setti
/// A setting the organization fixed comes from its configuration plugin, and one the tool does
/// not show for the saved settings means nothing for them. Which of the remaining ones held a
/// value nobody knows: a backup holds no secrets, so the dialog asks to enter them again if they
/// were used.
/// were used. A tool the user switched off is left out, since they never need it; should they
/// switch it on again, its settings say what is missing.
/// </remarks>
private List<DataRestoreToolSecret> FindToolSecrets()
{
@@ -204,6 +205,9 @@ public sealed class DataRestoreService(ILogger<DataRestoreService> logger, Setti
if (toolRegistry.GetImplementation(definition.ImplementationKey) is not { } implementation)
continue;
if (toolRegistry.IsSwitchedOffByUser(definition.Id))
continue;
if (!settingsManager.ConfigurationData.Tools.Settings.TryGetValue(definition.Id, out var storedValues))
continue;