diff --git a/app/MindWork AI Studio/Components/Pages/Settings.razor b/app/MindWork AI Studio/Components/Pages/Settings.razor index 7a8019fc..06673974 100644 --- a/app/MindWork AI Studio/Components/Pages/Settings.razor +++ b/app/MindWork AI Studio/Components/Pages/Settings.razor @@ -1,5 +1,6 @@ @page "/settings" @using AIStudio.Components.Pages.Coding +@using AIStudio.Components.Pages.TextSummarizer @using AIStudio.Provider @using AIStudio.Settings @using AIStudio.Tools @@ -112,5 +113,21 @@ } + + Text Summarizer Options + + + + @if (this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage is CommonLanguages.OTHER) + { + + } + + @if(this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity is Complexity.SCIENTIFIC_LANGUAGE_OTHER_EXPERTS) + { + + } + + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Pages/TextSummarizer/AssistantTextSummarizer.razor.cs b/app/MindWork AI Studio/Components/Pages/TextSummarizer/AssistantTextSummarizer.razor.cs index 1a15c90f..829206d1 100644 --- a/app/MindWork AI Studio/Components/Pages/TextSummarizer/AssistantTextSummarizer.razor.cs +++ b/app/MindWork AI Studio/Components/Pages/TextSummarizer/AssistantTextSummarizer.razor.cs @@ -29,6 +29,24 @@ public partial class AssistantTextSummarizer : AssistantBaseCore private Complexity selectedComplexity; private string expertInField = string.Empty; + #region Overrides of ComponentBase + + protected override async Task OnInitializedAsync() + { + if(this.SettingsManager.ConfigurationData.PreselectTextSummarizerOptions) + { + this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerTargetLanguage; + this.customTargetLanguage = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerOtherLanguage; + this.selectedComplexity = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerComplexity; + this.expertInField = this.SettingsManager.ConfigurationData.PreselectedTextSummarizerExpertInField; + this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.PreselectedTextSummarizerProvider); + } + + await base.OnInitializedAsync(); + } + + #endregion + private string? ValidatingText(string text) { if(string.IsNullOrWhiteSpace(text)) diff --git a/app/MindWork AI Studio/Settings/ConfigurationSelectData.cs b/app/MindWork AI Studio/Settings/ConfigurationSelectData.cs index 59cd91f5..95269f52 100644 --- a/app/MindWork AI Studio/Settings/ConfigurationSelectData.cs +++ b/app/MindWork AI Studio/Settings/ConfigurationSelectData.cs @@ -1,5 +1,6 @@ using AIStudio.Components.Pages.Coding; using AIStudio.Components.Pages.IconFinder; +using AIStudio.Components.Pages.TextSummarizer; using AIStudio.Settings.DataModel; using AIStudio.Tools; @@ -76,4 +77,10 @@ public static class ConfigurationSelectDataFactory foreach (var language in Enum.GetValues()) yield return new(language.Name(), language); } + + public static IEnumerable> GetComplexityData() + { + foreach (var complexity in Enum.GetValues()) + yield return new(complexity.Name(), complexity); + } } \ No newline at end of file diff --git a/app/MindWork AI Studio/Settings/DataModel/Data.cs b/app/MindWork AI Studio/Settings/DataModel/Data.cs index ed7914de..251011cd 100644 --- a/app/MindWork AI Studio/Settings/DataModel/Data.cs +++ b/app/MindWork AI Studio/Settings/DataModel/Data.cs @@ -1,5 +1,6 @@ using AIStudio.Components.Pages.Coding; using AIStudio.Components.Pages.IconFinder; +using AIStudio.Components.Pages.TextSummarizer; using AIStudio.Tools; namespace AIStudio.Settings.DataModel; @@ -154,4 +155,38 @@ public sealed class Data public string PreselectedCodingProvider { get; set; } = string.Empty; #endregion + + #region Assistant: Text Summarizer Settings + + /// + /// Preselect any text summarizer options? + /// + public bool PreselectTextSummarizerOptions { get; set; } + + /// + /// Preselect the target language? + /// + public CommonLanguages PreselectedTextSummarizerTargetLanguage { get; set; } + + /// + /// Preselect any other language? + /// + public string PreselectedTextSummarizerOtherLanguage { get; set; } = string.Empty; + + /// + /// Preselect the complexity? + /// + public Complexity PreselectedTextSummarizerComplexity { get; set; } + + /// + /// Preselect any expertise in a field? + /// + public string PreselectedTextSummarizerExpertInField { get; set; } = string.Empty; + + /// + /// Preselect a text summarizer provider? + /// + public string PreselectedTextSummarizerProvider { get; set; } = string.Empty; + + #endregion } \ No newline at end of file diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.8.5.md b/app/MindWork AI Studio/wwwroot/changelog/v0.8.5.md index ffdad557..f3bd37ec 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.8.5.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.8.5.md @@ -2,6 +2,7 @@ - Added the possibility to provide default options for the icon finder assistant - Added the possibility to provide default options for the translation assistant - Added the possibility to provide default options for the coding assistant +- Added the possibility to provide default options for the text summarizer assistant - Improved switch component for settings: when an option is enabled, the switch is using a different color - Fixed the applying of spellchecking settings to the single-line dialog - Restructured the layout of the settings page