mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 18:07:21 +00:00
Added a way to switch off tools you never need (#1115)
This commit is contained in:
1 parent
dcba62b45c
commit
04546c25ac
31 files changed
+638
-37
No files matched your search
@@ -188,8 +188,9 @@ public static class ConfigurationSnippetImport
|
||||
if (toolIds.Count == 0)
|
||||
return [];
|
||||
|
||||
// A tool the user switched off exists here all the same, and switching it on again makes the import use it:
|
||||
var availableToolIds = (await toolRegistry.GetCatalogAsync(component)).Select(item => item.Id).ToHashSet(StringComparer.Ordinal);
|
||||
return toolIds.Where(id => !availableToolIds.Contains(id)).Order(StringComparer.Ordinal).ToList();
|
||||
return toolIds.Where(id => !availableToolIds.Contains(id) && !toolRegistry.IsSwitchedOffByUser(id)).Order(StringComparer.Ordinal).ToList();
|
||||
}
|
||||
|
||||
private static T MakeLocal<T>(T configObject) where T : ConfigurationBaseObject => (T)((ConfigurationBaseObject)configObject with
|
||||
|
||||
Reference in new issue
Block a user