mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-06-27 15:36:26 +00:00
included a dropdown to select a broader assistant category
This commit is contained in:
parent
629d3243fa
commit
37271d65b1
@ -1,4 +1,5 @@
|
|||||||
@attribute [Route(Routes.ASSISTANT_META_ASSISTANT)]
|
@attribute [Route(Routes.ASSISTANT_META_ASSISTANT)]
|
||||||
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.NoSettingsPanel>
|
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.NoSettingsPanel>
|
||||||
|
|
||||||
|
<EnumSelection T="AssistantCategory" NameFunc="@(category => category.NameSelecting())" @bind-Value="@this.selectedCategory" ValidateSelection="@this.ValidatingCategory" Icon="@Icons.Material.Filled.Category" Label="@T("Assistant category")" AllowOther="@true" OtherValue="AssistantCategory.OTHER" @bind-OtherInput="@this.customCategory" ValidateOther="@this.ValidateCustomCategory" LabelOther="@T("Custom assistant category")" />
|
||||||
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||||
@ -17,7 +17,8 @@
|
|||||||
(Components.GRAMMAR_SPELLING_ASSISTANT, PreviewFeatures.NONE),
|
(Components.GRAMMAR_SPELLING_ASSISTANT, PreviewFeatures.NONE),
|
||||||
(Components.REWRITE_ASSISTANT, PreviewFeatures.NONE),
|
(Components.REWRITE_ASSISTANT, PreviewFeatures.NONE),
|
||||||
(Components.PROMPT_OPTIMIZER_ASSISTANT, PreviewFeatures.NONE),
|
(Components.PROMPT_OPTIMIZER_ASSISTANT, PreviewFeatures.NONE),
|
||||||
(Components.SYNONYMS_ASSISTANT, PreviewFeatures.NONE)
|
(Components.SYNONYMS_ASSISTANT, PreviewFeatures.NONE),
|
||||||
|
(Components.META_ASSISTANT, PreviewFeatures.NONE)
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
<MudText Typo="Typo.h4" Class="mb-2 mr-3">
|
<MudText Typo="Typo.h4" Class="mb-2 mr-3">
|
||||||
|
|||||||
15
app/MindWork AI Studio/Tools/AssistantCategory.cs
Normal file
15
app/MindWork AI Studio/Tools/AssistantCategory.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
namespace AIStudio.Tools;
|
||||||
|
|
||||||
|
public enum AssistantCategory
|
||||||
|
{
|
||||||
|
AS_IS,
|
||||||
|
|
||||||
|
GENERAL,
|
||||||
|
SCIENTIFIC,
|
||||||
|
PRODUCTIVITY,
|
||||||
|
BUSINESS,
|
||||||
|
LEARNING,
|
||||||
|
DEVELOPMENT,
|
||||||
|
AI_STUDIO,
|
||||||
|
OTHER,
|
||||||
|
}
|
||||||
31
app/MindWork AI Studio/Tools/AssistantCategoryExtensions.cs
Normal file
31
app/MindWork AI Studio/Tools/AssistantCategoryExtensions.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using AIStudio.Tools.PluginSystem;
|
||||||
|
|
||||||
|
namespace AIStudio.Tools;
|
||||||
|
|
||||||
|
public static class AssistantCategoryExtensions
|
||||||
|
{
|
||||||
|
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AssistantCategoryExtensions).Namespace, nameof(AssistantCategoryExtensions));
|
||||||
|
|
||||||
|
public static string Name(this AssistantCategory category) => category switch
|
||||||
|
{
|
||||||
|
AssistantCategory.AS_IS => TB("Please select the assistant category"),
|
||||||
|
AssistantCategory.GENERAL => TB("General"),
|
||||||
|
AssistantCategory.SCIENTIFIC => TB("Scientific"),
|
||||||
|
AssistantCategory.BUSINESS => TB("Business"),
|
||||||
|
AssistantCategory.PRODUCTIVITY => TB("Productivity"),
|
||||||
|
AssistantCategory.DEVELOPMENT => TB("Software Development"),
|
||||||
|
AssistantCategory.LEARNING => TB("Learning"),
|
||||||
|
AssistantCategory.AI_STUDIO => TB("AI Studio Development"),
|
||||||
|
AssistantCategory.OTHER => TB("Other"),
|
||||||
|
|
||||||
|
_ => string.Empty,
|
||||||
|
};
|
||||||
|
|
||||||
|
public static string NameSelecting(this AssistantCategory category)
|
||||||
|
{
|
||||||
|
if(category is AssistantCategory.AS_IS)
|
||||||
|
return TB("Please select the assistant category");
|
||||||
|
|
||||||
|
return category.Name();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user