diff --git a/app/MindWork AI Studio/Assistants/AssistantBase.razor b/app/MindWork AI Studio/Assistants/AssistantBase.razor index bc4d01df..92ae6bff 100644 --- a/app/MindWork AI Studio/Assistants/AssistantBase.razor +++ b/app/MindWork AI Studio/Assistants/AssistantBase.razor @@ -6,10 +6,10 @@ - @(this.Title) + @this.Title - + @@ -26,13 +26,13 @@ - + @this.SubmitText @if (this.isProcessing && this.cancellationTokenSource is not null) { - + } @@ -80,7 +80,7 @@ @foreach (var assistant in Enum.GetValues().Where(n => n.AllowSendTo()).OrderBy(n => n.Name().Length)) { - + @assistant.Name() } @@ -94,14 +94,14 @@ { case ButtonData buttonData when !string.IsNullOrWhiteSpace(buttonData.Tooltip): - + @buttonData.Text break; case ButtonData buttonData: - + @buttonData.Text break; @@ -110,7 +110,7 @@ @foreach (var assistant in Enum.GetValues().Where(n => n.AllowSendTo()).OrderBy(n => n.Name().Length)) { - + @assistant.Name() } @@ -121,14 +121,14 @@ @if (this.ShowCopyResult) { - + @TB("Copy result") } @if (this.ShowReset) { - + @TB("Reset") } diff --git a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua index 83ed2620..942a744f 100644 --- a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua +++ b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua @@ -1450,6 +1450,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T3243388657"] = "Confiden -- Shows and hides the confidence card with information about the selected LLM provider. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T847071819"] = "Shows and hides the confidence card with information about the selected LLM provider." +-- This feature is managed by your organization and has therefore been disabled. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONBASE::T1416426626"] = "This feature is managed by your organization and has therefore been disabled." + -- Choose the minimum confidence level that all LLM providers must meet. This way, you can ensure that only trustworthy providers are used. You cannot use any provider that falls below this level. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMINCONFIDENCESELECTION::T2526727283"] = "Choose the minimum confidence level that all LLM providers must meet. This way, you can ensure that only trustworthy providers are used. You cannot use any provider that falls below this level." diff --git a/app/MindWork AI Studio/Components/ConfigurationBase.razor b/app/MindWork AI Studio/Components/ConfigurationBase.razor index 2233093a..875a08c7 100644 --- a/app/MindWork AI Studio/Components/ConfigurationBase.razor +++ b/app/MindWork AI Studio/Components/ConfigurationBase.razor @@ -1 +1,23 @@ -@inherits MSGComponentBase \ No newline at end of file +@inherits MSGComponentBase + +@if (this.Body is not null) +{ + @if (!this.Disabled() && this.IsLocked()) + { + + + @* MudTooltip.RootStyle is set as a workaround for issue -> https://github.com/MudBlazor/MudBlazor/issues/10882 *@ + + + + @this.Body + + + } + else + { + + @this.Body + + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationBase.razor.cs b/app/MindWork AI Studio/Components/ConfigurationBase.razor.cs index 10f4ae3f..59ef82b2 100644 --- a/app/MindWork AI Studio/Components/ConfigurationBase.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationBase.razor.cs @@ -5,7 +5,7 @@ namespace AIStudio.Components; /// /// A base class for configuration options. /// -public partial class ConfigurationBase : MSGComponentBase +public abstract partial class ConfigurationBase : MSGComponentBase { /// /// The description of the option, i.e., the name. Should be @@ -26,7 +26,42 @@ public partial class ConfigurationBase : MSGComponentBase [Parameter] public Func Disabled { get; set; } = () => false; - protected const string MARGIN_CLASS = "mb-6"; + /// + /// Is the option locked by a configuration plugin? + /// + [Parameter] + public Func IsLocked { get; set; } = () => false; + + /// + /// Should the option be stretched to fill the available space? + /// + protected abstract bool Stretch { get; } + + /// + /// The CSS class to apply to the component. + /// + protected virtual string GetClassForBase => string.Empty; + + /// + /// The visual variant of the option. + /// + protected virtual Variant Variant => Variant.Text; + + /// + /// The label to display for the option. + /// + protected virtual string Label => string.Empty; + + private StretchItems StretchItems => this.Stretch ? StretchItems.End : StretchItems.None; + + protected bool IsDisabled => this.Disabled() || this.IsLocked(); + + private string Classes => $"{this.GetClassForBase} {MARGIN_CLASS}"; + + private protected virtual RenderFragment? Body => null; + + private const string MARGIN_CLASS = "mb-6"; + protected static readonly Dictionary SPELLCHECK_ATTRIBUTES = new(); #region Overrides of ComponentBase @@ -39,7 +74,9 @@ public partial class ConfigurationBase : MSGComponentBase } #endregion - + + private string TB(string fallbackEN) => this.T(fallbackEN, typeof(ConfigurationBase).Namespace, nameof(ConfigurationBase)); + protected async Task InformAboutChange() => await this.MessageBus.SendMessage(this, Event.CONFIGURATION_CHANGED); #region Overrides of MSGComponentBase diff --git a/app/MindWork AI Studio/Components/ConfigurationBaseCore.cs b/app/MindWork AI Studio/Components/ConfigurationBaseCore.cs new file mode 100644 index 00000000..8fe80f6c --- /dev/null +++ b/app/MindWork AI Studio/Components/ConfigurationBaseCore.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Rendering; + +namespace AIStudio.Components; + +public abstract class ConfigurationBaseCore : ConfigurationBase +{ + private protected sealed override RenderFragment Body => this.BuildRenderTree; + + // Allow content to be provided by a .razor file but without + // overriding the content of the base class + protected new virtual void BuildRenderTree(RenderTreeBuilder builder) + { + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor b/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor index c3f21593..93a47e8b 100644 --- a/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor +++ b/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor @@ -1,3 +1,3 @@ @using AIStudio.Settings @inherits MSGComponentBase - \ No newline at end of file + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor.cs b/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor.cs index 858bbc01..b5d130c8 100644 --- a/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationMinConfidenceSelection.razor.cs @@ -18,17 +18,17 @@ public partial class ConfigurationMinConfidenceSelection : MSGComponentBase [Parameter] public Action SelectionUpdate { get; set; } = _ => { }; - /// - /// Is the selection component disabled? - /// - [Parameter] - public Func Disabled { get; set; } = () => false; - /// /// Boolean value indicating whether the selection is restricted to a global minimum confidence level. /// [Parameter] public bool RestrictToGlobalMinimumConfidence { get; set; } + + [Parameter] + public Func Disabled { get; set; } = () => false; + + [Parameter] + public Func IsLocked { get; set; } = () => false; private ConfidenceLevel FilteredSelectedValue() { diff --git a/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor b/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor index 9c974e02..6d9d7b89 100644 --- a/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor +++ b/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor @@ -1,4 +1,4 @@ -@inherits ConfigurationBase +@inherits ConfigurationBaseCore @typeparam TData @foreach (var data in this.Data) { diff --git a/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor.cs b/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor.cs index bdbe1063..f2e5ed51 100644 --- a/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationMultiSelect.razor.cs @@ -8,7 +8,7 @@ namespace AIStudio.Components; /// Configuration component for selecting many values from a list. /// /// The type of the value to select. -public partial class ConfigurationMultiSelect : ConfigurationBase +public partial class ConfigurationMultiSelect : ConfigurationBaseCore { /// /// The data to select from. @@ -28,6 +28,17 @@ public partial class ConfigurationMultiSelect : ConfigurationBase [Parameter] public Action> SelectionUpdate { get; set; } = _ => { }; + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => true; + + protected override Variant Variant => Variant.Outlined; + + protected override string Label => this.OptionDescription; + + #endregion + private async Task OptionChanged(IEnumerable? updatedValues) { if(updatedValues is null) @@ -39,8 +50,6 @@ public partial class ConfigurationMultiSelect : ConfigurationBase await this.InformAboutChange(); } - private static string GetClass => $"{MARGIN_CLASS} rounded-lg"; - private string GetMultiSelectionText(List? selectedValues) { if(selectedValues is null || selectedValues.Count == 0) diff --git a/app/MindWork AI Studio/Components/ConfigurationOption.razor b/app/MindWork AI Studio/Components/ConfigurationOption.razor index 73ffe235..a2ad673e 100644 --- a/app/MindWork AI Studio/Components/ConfigurationOption.razor +++ b/app/MindWork AI Studio/Components/ConfigurationOption.razor @@ -1,7 +1,5 @@ -@inherits ConfigurationBase +@inherits ConfigurationBaseCore - - - @(this.State() ? this.LabelOn : this.LabelOff) - - \ No newline at end of file + + @(this.State() ? this.LabelOn : this.LabelOff) + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs b/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs index b3bed551..bbd0da1a 100644 --- a/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs @@ -5,7 +5,7 @@ namespace AIStudio.Components; /// /// Configuration component for any boolean option. /// -public partial class ConfigurationOption : ConfigurationBase +public partial class ConfigurationOption : ConfigurationBaseCore { /// /// Text to display when the option is true. @@ -31,6 +31,19 @@ public partial class ConfigurationOption : ConfigurationBase [Parameter] public Action StateUpdate { get; set; } = _ => { }; + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => true; + + /// + protected override Variant Variant => Variant.Outlined; + + /// + protected override string Label => this.OptionDescription; + + #endregion + private async Task OptionChanged(bool updatedState) { this.StateUpdate(updatedState); diff --git a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor index 4653822f..be6a93cd 100644 --- a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor +++ b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor @@ -1,2 +1,2 @@ @inherits MSGComponentBase - \ No newline at end of file + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs index 28298f75..8eced0f2 100644 --- a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs @@ -20,27 +20,17 @@ public partial class ConfigurationProviderSelection : MSGComponentBase [Parameter] public IEnumerable> Data { get; set; } = new List>(); - /// - /// Is the selection component disabled? - /// - [Parameter] - public Func Disabled { get; set; } = () => false; - [Parameter] public Func HelpText { get; set; } = () => TB("Select a provider that is preselected."); [Parameter] public Tools.Components Component { get; set; } = Tools.Components.NONE; - - #region Overrides of ComponentBase - - protected override async Task OnParametersSetAsync() - { - this.ApplyFilters([], [ Event.CONFIGURATION_CHANGED ]); - await base.OnParametersSetAsync(); - } - - #endregion + + [Parameter] + public Func Disabled { get; set; } = () => false; + + [Parameter] + public Func IsLocked { get; set; } = () => false; [SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")] private IEnumerable> FilteredData() diff --git a/app/MindWork AI Studio/Components/ConfigurationSelect.razor b/app/MindWork AI Studio/Components/ConfigurationSelect.razor index 99120aa9..c3459101 100644 --- a/app/MindWork AI Studio/Components/ConfigurationSelect.razor +++ b/app/MindWork AI Studio/Components/ConfigurationSelect.razor @@ -1,7 +1,7 @@ -@inherits ConfigurationBase -@typeparam T +@inherits ConfigurationBaseCore +@typeparam TConfig - + @foreach (var data in this.Data) { diff --git a/app/MindWork AI Studio/Components/ConfigurationSelect.razor.cs b/app/MindWork AI Studio/Components/ConfigurationSelect.razor.cs index 8fb876c4..14c73eea 100644 --- a/app/MindWork AI Studio/Components/ConfigurationSelect.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationSelect.razor.cs @@ -7,33 +7,43 @@ namespace AIStudio.Components; /// /// Configuration component for selecting a value from a list. /// -/// The type of the value to select. -public partial class ConfigurationSelect : ConfigurationBase +/// The type of the value to select. +public partial class ConfigurationSelect : ConfigurationBaseCore { /// /// The data to select from. /// [Parameter] - public IEnumerable> Data { get; set; } = []; + public IEnumerable> Data { get; set; } = []; /// /// The selected value. /// [Parameter] - public Func SelectedValue { get; set; } = () => default!; + public Func SelectedValue { get; set; } = () => default!; /// /// An action that is called when the selection changes. /// [Parameter] - public Action SelectionUpdate { get; set; } = _ => { }; + public Action SelectionUpdate { get; set; } = _ => { }; - private async Task OptionChanged(T updatedValue) + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => true; + + /// + protected override string Label => this.OptionDescription; + + protected override Variant Variant => Variant.Outlined; + + #endregion + + private async Task OptionChanged(TConfig updatedValue) { this.SelectionUpdate(updatedValue); await this.SettingsManager.StoreSettings(); await this.InformAboutChange(); } - - private static string GetClass => $"{MARGIN_CLASS} rounded-lg"; } \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationSlider.razor b/app/MindWork AI Studio/Components/ConfigurationSlider.razor index b42f4a4d..b04b511d 100644 --- a/app/MindWork AI Studio/Components/ConfigurationSlider.razor +++ b/app/MindWork AI Studio/Components/ConfigurationSlider.razor @@ -1,8 +1,6 @@ @typeparam T -@inherits ConfigurationBase +@inherits ConfigurationBaseCore - - - @this.Value() @this.Unit - - \ No newline at end of file + + @this.Value() @this.Unit + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationSlider.razor.cs b/app/MindWork AI Studio/Components/ConfigurationSlider.razor.cs index 7d91cb8b..429119e1 100644 --- a/app/MindWork AI Studio/Components/ConfigurationSlider.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationSlider.razor.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Components; namespace AIStudio.Components; -public partial class ConfigurationSlider : ConfigurationBase where T : struct, INumber +public partial class ConfigurationSlider : ConfigurationBaseCore where T : struct, INumber { /// /// The minimum value for the slider. @@ -42,6 +42,18 @@ public partial class ConfigurationSlider : ConfigurationBase where T : struct [Parameter] public Action ValueUpdate { get; set; } = _ => { }; + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => true; + + /// + protected override Variant Variant => Variant.Outlined; + + protected override string Label => this.OptionDescription; + + #endregion + #region Overrides of ComponentBase protected override async Task OnInitializedAsync() diff --git a/app/MindWork AI Studio/Components/ConfigurationText.razor b/app/MindWork AI Studio/Components/ConfigurationText.razor index a3cc3233..80ec63ae 100644 --- a/app/MindWork AI Studio/Components/ConfigurationText.razor +++ b/app/MindWork AI Studio/Components/ConfigurationText.razor @@ -1,12 +1,10 @@ -@inherits ConfigurationBase +@inherits ConfigurationBaseCore \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationText.razor.cs b/app/MindWork AI Studio/Components/ConfigurationText.razor.cs index 4e6bb7f9..7bcce41e 100644 --- a/app/MindWork AI Studio/Components/ConfigurationText.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationText.razor.cs @@ -4,7 +4,7 @@ using Timer = System.Timers.Timer; namespace AIStudio.Components; -public partial class ConfigurationText : ConfigurationBase +public partial class ConfigurationText : ConfigurationBaseCore { /// /// The text used for the textfield. @@ -43,10 +43,21 @@ public partial class ConfigurationText : ConfigurationBase public int MaxLines { get; set; } = 12; private string internalText = string.Empty; - private Timer timer = new(TimeSpan.FromMilliseconds(500)) + private readonly Timer timer = new(TimeSpan.FromMilliseconds(500)) { AutoReset = false }; + + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => true; + + protected override Variant Variant => Variant.Outlined; + + protected override string Label => this.OptionDescription; + + #endregion #region Overrides of ConfigurationBase @@ -56,8 +67,6 @@ public partial class ConfigurationText : ConfigurationBase await base.OnInitializedAsync(); } - #region Overrides of ComponentBase - protected override async Task OnParametersSetAsync() { this.internalText = this.Text(); @@ -66,8 +75,6 @@ public partial class ConfigurationText : ConfigurationBase #endregion - #endregion - private bool AutoGrow => this.NumLines > 1; private int GetMaxLines => this.AutoGrow ? this.MaxLines : 1; diff --git a/app/MindWork AI Studio/Components/LockableButton.razor b/app/MindWork AI Studio/Components/LockableButton.razor new file mode 100644 index 00000000..825c5a62 --- /dev/null +++ b/app/MindWork AI Studio/Components/LockableButton.razor @@ -0,0 +1,5 @@ +@inherits ConfigurationBaseCore + + + @this.Text + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/LockableButton.razor.cs b/app/MindWork AI Studio/Components/LockableButton.razor.cs new file mode 100644 index 00000000..cbfbd910 --- /dev/null +++ b/app/MindWork AI Studio/Components/LockableButton.razor.cs @@ -0,0 +1,39 @@ +using Microsoft.AspNetCore.Components; + +namespace AIStudio.Components; + +public partial class LockableButton : ConfigurationBaseCore +{ + [Parameter] + public string Icon { get; set; } = Icons.Material.Filled.Info; + + [Parameter] + public Func OnClickAsync { get; set; } = () => Task.CompletedTask; + + [Parameter] + public Action OnClick { get; set; } = () => { }; + + [Parameter] + public string Text { get; set; } = string.Empty; + + [Parameter] + public string Class { get; set; } = string.Empty; + + #region Overrides of ConfigurationBase + + /// + protected override bool Stretch => false; + + protected override string GetClassForBase => this.Class; + + #endregion + + private async Task ClickAsync() + { + if (this.IsLocked() || this.Disabled()) + return; + + await this.OnClickAsync(); + this.OnClick(); + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor index 1ad60ba2..e220d41d 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor @@ -13,7 +13,7 @@ - + diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor index 1389425a..616149d0 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor @@ -74,10 +74,8 @@ @T("No providers configured yet.") } - - - @T("Add Provider") - + + @T("LLM Provider Confidence") diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index d80fc0d9..b81e8686 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -64,4 +64,8 @@ CONFIG["SETTINGS"] = {} -- Configure the update behavior: -- Allowed values are: NO_CHECK, ONCE_STARTUP, HOURLY, DAILY, WEEKLY --- CONFIG["SETTINGS"]["DataApp.UpdateBehavior"] = "NO_CHECK" \ No newline at end of file +-- CONFIG["SETTINGS"]["DataApp.UpdateBehavior"] = "NO_CHECK" + +-- Configure the user permission to add providers: +-- Allowed values are: true, false +-- CONFIG["SETTINGS"]["DataApp.AllowUserToAddProvider"] = false \ No newline at end of file diff --git a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua index 13dc2f12..042978b0 100644 --- a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua @@ -1452,6 +1452,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T3243388657"] = "Vertraue -- Shows and hides the confidence card with information about the selected LLM provider. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T847071819"] = "Zeigt oder verbirgt die Vertrauenskarte mit Informationen über den ausgewählten LLM-Anbieter." +-- This feature is managed by your organization and has therefore been disabled. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONBASE::T1416426626"] = "Diese Funktion wird von Ihrer Organisation verwaltet und wurde daher deaktiviert." + -- Choose the minimum confidence level that all LLM providers must meet. This way, you can ensure that only trustworthy providers are used. You cannot use any provider that falls below this level. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMINCONFIDENCESELECTION::T2526727283"] = "Wählen Sie das minimale Vertrauensniveau, das alle LLM-Anbieter erfüllen müssen. So stellen Sie sicher, dass nur vertrauenswürdige Anbieter verwendet werden. Anbieter, die dieses Niveau unterschreiten, können nicht verwendet werden." diff --git a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua index 99371d03..45aa0caa 100644 --- a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua @@ -1452,6 +1452,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T3243388657"] = "Confiden -- Shows and hides the confidence card with information about the selected LLM provider. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIDENCEINFO::T847071819"] = "Shows and hides the confidence card with information about the selected LLM provider." +-- This feature is managed by your organization and has therefore been disabled. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONBASE::T1416426626"] = "This feature is managed by your organization and has therefore been disabled." + -- Choose the minimum confidence level that all LLM providers must meet. This way, you can ensure that only trustworthy providers are used. You cannot use any provider that falls below this level. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMINCONFIDENCESELECTION::T2526727283"] = "Choose the minimum confidence level that all LLM providers must meet. This way, you can ensure that only trustworthy providers are used. You cannot use any provider that falls below this level." diff --git a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs index e189cbbd..022cd8c8 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs @@ -58,9 +58,13 @@ public sealed class DataApp /// public string PreselectedProfile { get; set; } = string.Empty; - /// /// Should we preselect a chat template for the entire app? /// public string PreselectedChatTemplate { get; set; } = string.Empty; + + /// + /// Should the user be allowed to add providers? + /// + public bool AllowUserToAddProvider { get; set; } = true; } \ No newline at end of file diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs index 6355fad1..1988e8de 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs @@ -53,6 +53,12 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT SETTINGS_LOCKER.Register(x => x.UpdateBehavior, this.Id); SETTINGS_MANAGER.ConfigurationData.App.UpdateBehavior = updateBehavior; } + + if (settingsTable.TryGetValue(SettingsManager.ToSettingName(x => x.AllowUserToAddProvider), out var dontAllowUserToAddProviderValue) && dontAllowUserToAddProviderValue.TryRead(out var dontAllowUserToAddProviderEntry)) + { + SETTINGS_LOCKER.Register(x => x.AllowUserToAddProvider, this.Id); + SETTINGS_MANAGER.ConfigurationData.App.AllowUserToAddProvider = dontAllowUserToAddProviderEntry; + } // // Configured providers diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.50.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.50.md index cf1aee39..61964810 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.50.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.50.md @@ -1,3 +1,4 @@ # v0.9.50, build 225 (2025-07-xx xx:xx UTC) - Added an option for chat templates to predefine a user input. -- Added the ability to create chat templates from existing chats. \ No newline at end of file +- Added the ability to create chat templates from existing chats. +- Added an enterprise IT configuration option to prevent manual addition of LLM providers in managed environments. \ No newline at end of file