mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-21 02:33:48 +00:00
Improved the assistants page with categories for assistant plugins (#1211)
This commit is contained in:
1 parent
ef059ffd15
commit
1db0f85898
74 files changed
+3392
-380
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Settings.DataModel;
|
||||
using AIStudio.Tools.PluginSystem;
|
||||
|
||||
namespace AIStudio.Tools;
|
||||
|
||||
@@ -43,6 +44,17 @@ public static class AssistantVisibilityExtensions
|
||||
return true;
|
||||
}
|
||||
|
||||
// Your organization may disable whole categories of assistants. Plugins bring their categories
|
||||
// along, so AssistantCategoryRules.IsAssistantPluginAvailable checks them instead:
|
||||
var category = component.Category;
|
||||
if (category is not PluginCategory.NONE && settingsManager.ConfigurationData.App.IsAssistantCategoryDisabled(new AssistantCategoryKey(category)))
|
||||
{
|
||||
if(withLogging)
|
||||
LOGGER.LogInformation("Assistant '{AssistantName}' is not visible because your organization disabled its category '{Category}'.", assistantName, category);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Dynamic assistants are controlled through plugin activation and their security state.
|
||||
// The Assistant Builder is controlled through its preview feature. Neither belongs to the
|
||||
// built-in assistant visibility list, so both are expected to be visible at this point.
|
||||
|
||||
Reference in new issue
Block a user