mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 10:13:48 +00:00
Merge branch 'main' into custom-tokenizer
This commit is contained in:
commit
e3cb7e9734
165 files changed
+4739
-1738
No files matched your search
@@ -16,6 +16,7 @@
|
||||
(Components.TRANSLATION_ASSISTANT, PreviewFeatures.NONE),
|
||||
(Components.GRAMMAR_SPELLING_ASSISTANT, PreviewFeatures.NONE),
|
||||
(Components.REWRITE_ASSISTANT, PreviewFeatures.NONE),
|
||||
(Components.PROMPT_OPTIMIZER_ASSISTANT, PreviewFeatures.NONE),
|
||||
(Components.SYNONYMS_ASSISTANT, PreviewFeatures.NONE)
|
||||
))
|
||||
{
|
||||
@@ -27,6 +28,7 @@
|
||||
<AssistantBlock TSettings="SettingsDialogTranslation" Component="Components.TRANSLATION_ASSISTANT" Name="@T("Translation")" Description="@T("Translate text into another language.")" Icon="@Icons.Material.Filled.Translate" Link="@Routes.ASSISTANT_TRANSLATION"/>
|
||||
<AssistantBlock TSettings="SettingsDialogGrammarSpelling" Component="Components.GRAMMAR_SPELLING_ASSISTANT" Name="@T("Grammar & Spelling")" Description="@T("Check grammar and spelling of a given text.")" Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_GRAMMAR_SPELLING"/>
|
||||
<AssistantBlock TSettings="SettingsDialogRewrite" Component="Components.REWRITE_ASSISTANT" Name="@T("Rewrite & Improve")" Description="@T("Rewrite and improve a given text for a chosen style.")" Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_REWRITE"/>
|
||||
<AssistantBlock TSettings="SettingsDialogPromptOptimizer" Component="Components.PROMPT_OPTIMIZER_ASSISTANT" Name="@T("Prompt Optimizer")" Description="@T("Optimize your prompt using a structured guideline.")" Icon="@Icons.Material.Filled.AutoFixHigh" Link="@Routes.ASSISTANT_PROMPT_OPTIMIZER"/>
|
||||
<AssistantBlock TSettings="SettingsDialogSynonyms" Component="Components.SYNONYMS_ASSISTANT" Name="@T("Synonyms")" Description="@T("Find synonyms for a given word or phrase.")" Icon="@Icons.Material.Filled.Spellcheck" Link="@Routes.ASSISTANT_SYNONYMS"/>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -222,6 +222,18 @@
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="@T("Changelog")">
|
||||
<Changelog/>
|
||||
</ExpansionPanel>
|
||||
|
||||
@foreach (var mandatoryInfoPanel in this.mandatoryInfoPanels)
|
||||
{
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Gavel" HeaderText="@mandatoryInfoPanel.HeaderText">
|
||||
<MudText Typo="Typo.body2" Class="mb-3">
|
||||
@string.Format(T("Provided by configuration plugin: {0}"), mandatoryInfoPanel.PluginName)
|
||||
</MudText>
|
||||
<MandatoryInfoDisplay Info="@mandatoryInfoPanel.Info"
|
||||
Acceptance="@mandatoryInfoPanel.Acceptance"
|
||||
ShowAcceptanceMetadata="@true"/>
|
||||
</ExpansionPanel>
|
||||
}
|
||||
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Book" HeaderText="@T("Logbook")">
|
||||
<MudText Typo="Typo.h4">
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Reflection;
|
||||
|
||||
using AIStudio.Components;
|
||||
using AIStudio.Dialogs;
|
||||
using AIStudio.Settings.DataModel;
|
||||
using AIStudio.Tools.Databases;
|
||||
using AIStudio.Tools.Metadata;
|
||||
using AIStudio.Tools.PluginSystem;
|
||||
@@ -77,9 +78,13 @@ public partial class Information : MSGComponentBase
|
||||
.ToList();
|
||||
|
||||
private List<EnterpriseEnvironment> enterpriseEnvironments = EnterpriseEnvironmentService.CURRENT_ENVIRONMENTS.ToList();
|
||||
|
||||
private List<MandatoryInfoPanelData> mandatoryInfoPanels = [];
|
||||
|
||||
private sealed record DatabaseDisplayInfo(string Label, string Value);
|
||||
|
||||
private sealed record MandatoryInfoPanelData(string HeaderText, string PluginName, DataMandatoryInfo Info, DataMandatoryInfoAcceptance? Acceptance);
|
||||
|
||||
private readonly List<DatabaseDisplayInfo> databaseDisplayInfo = new();
|
||||
|
||||
private bool HasAnyActiveEnvironment => this.enterpriseEnvironments.Any(e => e.IsActive);
|
||||
@@ -117,7 +122,7 @@ public partial class Information : MSGComponentBase
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.ApplyFilters([], [ Event.ENTERPRISE_ENVIRONMENTS_CHANGED ]);
|
||||
this.ApplyFilters([], [ Event.ENTERPRISE_ENVIRONMENTS_CHANGED, Event.CONFIGURATION_CHANGED ]);
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
this.RefreshEnterpriseConfigurationState();
|
||||
@@ -145,6 +150,7 @@ public partial class Information : MSGComponentBase
|
||||
{
|
||||
case Event.PLUGINS_RELOADED:
|
||||
case Event.ENTERPRISE_ENVIRONMENTS_CHANGED:
|
||||
case Event.CONFIGURATION_CHANGED:
|
||||
this.RefreshEnterpriseConfigurationState();
|
||||
await this.InvokeAsync(this.StateHasChanged);
|
||||
break;
|
||||
@@ -163,6 +169,16 @@ public partial class Information : MSGComponentBase
|
||||
.ToList();
|
||||
|
||||
this.enterpriseEnvironments = EnterpriseEnvironmentService.CURRENT_ENVIRONMENTS.ToList();
|
||||
this.mandatoryInfoPanels = PluginFactory.GetMandatoryInfos()
|
||||
.Select(info =>
|
||||
{
|
||||
var plugin = this.configPlugins.FirstOrDefault(item => item.Id == info.EnterpriseConfigurationPluginId);
|
||||
var pluginName = plugin?.Name ?? T("Unknown configuration plugin");
|
||||
var acceptance = this.SettingsManager.ConfigurationData.MandatoryInformation.FindAcceptance(info.Id);
|
||||
var headerText = $"{T("Consent:")} {info.Title}";
|
||||
return new MandatoryInfoPanelData(headerText, pluginName, info, acceptance);
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private async Task DeterminePandocVersion()
|
||||
|
||||
Reference in new issue
Block a user