mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 21:49:40 +00:00
Add default configuration for assistants (#52)
This commit is contained in:
1 parent
a1c4618796
commit
b3b8bf23dc
42 files changed
+729
-138
No files matched your search
@@ -0,0 +1,86 @@
|
||||
using AIStudio.Components.Pages.Coding;
|
||||
using AIStudio.Components.Pages.IconFinder;
|
||||
using AIStudio.Components.Pages.TextSummarizer;
|
||||
using AIStudio.Settings.DataModel;
|
||||
using AIStudio.Tools;
|
||||
|
||||
namespace AIStudio.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// A data structure to map a name to a value.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the value, to be displayed in the UI.</param>
|
||||
/// <param name="Value">The value to be stored.</param>
|
||||
/// <typeparam name="T">The type of the value to store.</typeparam>
|
||||
public readonly record struct ConfigurationSelectData<T>(string Name, T Value);
|
||||
|
||||
/// <summary>
|
||||
/// A static factory class to get the lists of selectable values.
|
||||
/// </summary>
|
||||
public static class ConfigurationSelectDataFactory
|
||||
{
|
||||
public static IEnumerable<ConfigurationSelectData<SendBehavior>> GetSendBehaviorData()
|
||||
{
|
||||
yield return new("No key is sending the input", SendBehavior.NO_KEY_IS_SENDING);
|
||||
yield return new("Modifier key + enter is sending the input", SendBehavior.MODIFER_ENTER_IS_SENDING);
|
||||
yield return new("Enter is sending the input", SendBehavior.ENTER_IS_SENDING);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateBehavior>> GetUpdateBehaviorData()
|
||||
{
|
||||
yield return new("No automatic update checks", UpdateBehavior.NO_CHECK);
|
||||
yield return new("Once at startup", UpdateBehavior.ONCE_STARTUP);
|
||||
yield return new("Check every hour", UpdateBehavior.HOURLY);
|
||||
yield return new("Check every day", UpdateBehavior.DAILY);
|
||||
yield return new ("Check every week", UpdateBehavior.WEEKLY);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<WorkspaceStorageBehavior>> GetWorkspaceStorageBehaviorData()
|
||||
{
|
||||
yield return new("Disable workspaces", WorkspaceStorageBehavior.DISABLE_WORKSPACES);
|
||||
yield return new("Store chats automatically", WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY);
|
||||
yield return new("Store chats manually", WorkspaceStorageBehavior.STORE_CHATS_MANUALLY);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<WorkspaceStorageTemporaryMaintenancePolicy>> GetWorkspaceStorageTemporaryMaintenancePolicyData()
|
||||
{
|
||||
yield return new("No automatic maintenance for temporary chats", WorkspaceStorageTemporaryMaintenancePolicy.NO_AUTOMATIC_MAINTENANCE);
|
||||
yield return new("Delete temporary chats older than 7 days", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_7_DAYS);
|
||||
yield return new("Delete temporary chats older than 30 days", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_30_DAYS);
|
||||
yield return new("Delete temporary chats older than 90 days", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_90_DAYS);
|
||||
yield return new("Delete temporary chats older than 180 days", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_180_DAYS);
|
||||
yield return new("Delete temporary chats older than 1 year", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_365_DAYS);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<NavBehavior>> GetNavBehaviorData()
|
||||
{
|
||||
yield return new("Navigation expands on mouse hover", NavBehavior.EXPAND_ON_HOVER);
|
||||
yield return new("Navigation never expands, but there are tooltips", NavBehavior.NEVER_EXPAND_USE_TOOLTIPS);
|
||||
yield return new("Navigation never expands, no tooltips", NavBehavior.NEVER_EXPAND_NO_TOOLTIPS);
|
||||
yield return new("Always expand navigation", NavBehavior.ALWAYS_EXPAND);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<IconSources>> GetIconSourcesData()
|
||||
{
|
||||
foreach (var source in Enum.GetValues<IconSources>())
|
||||
yield return new(source.Name(), source);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<CommonLanguages>> GetCommonLanguagesData()
|
||||
{
|
||||
foreach (var language in Enum.GetValues<CommonLanguages>())
|
||||
yield return new(language.Name(), language);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<CommonCodingLanguages>> GetCommonCodingLanguagesData()
|
||||
{
|
||||
foreach (var language in Enum.GetValues<CommonCodingLanguages>())
|
||||
yield return new(language.Name(), language);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<Complexity>> GetComplexityData()
|
||||
{
|
||||
foreach (var complexity in Enum.GetValues<Complexity>())
|
||||
yield return new(complexity.Name(), complexity);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user