Added missing document analysis assistant features (#644)
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-02-01 14:50:19 +01:00
1 parent 0f6a8c3247
commit 3d9e8a6f48
51 files changed
+861 -353

No files matched your search

@@ -7,7 +7,7 @@ namespace AIStudio.Assistants.Agenda;
public partial class AssistantAgenda : AssistantBaseCore<SettingsDialogAgenda>
{
public override Tools.Components Component => Tools.Components.AGENDA_ASSISTANT;
protected override Tools.Components Component => Tools.Components.AGENDA_ASSISTANT;
protected override string Title => T("Agenda Planner");
@@ -9,7 +9,10 @@
@this.Title
</MudText>
<MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" OnClick="@(async () => await this.OpenSettingsDialog())"/>
@if (this.HasSettingsPanel)
{
<MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" OnClick="@(async () => await this.OpenSettingsDialog())"/>
}
</MudStack>
<InnerScrolling>
@@ -147,4 +150,4 @@
</MudStack>
</FooterContent>
</InnerScrolling>
</div>
</div>
@@ -1,6 +1,7 @@
using AIStudio.Chat;
using AIStudio.Provider;
using AIStudio.Settings;
using AIStudio.Dialogs.Settings;
using AIStudio.Tools.Services;
using Microsoft.AspNetCore.Components;
@@ -41,8 +42,8 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
protected abstract string Description { get; }
protected abstract string SystemPrompt { get; }
public abstract Tools.Components Component { get; }
protected abstract Tools.Components Component { get; }
protected virtual Func<string> Result2Copy => () => this.resultingContentBlock is null ? string.Empty : this.resultingContentBlock.Content switch
{
@@ -81,6 +82,8 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
protected virtual ChatThread ConvertToChatThread => this.chatThread ?? new();
protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
protected virtual bool HasSettingsPanel => typeof(TSettings) != typeof(NoSettingsPanel);
protected AIStudio.Settings.Provider providerSettings = Settings.Provider.NONE;
protected MudForm? form;
@@ -185,6 +188,16 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
this.inputIsValid = false;
this.StateHasChanged();
}
/// <summary>
/// Clear all input issues.
/// </summary>
protected void ClearInputIssues()
{
this.inputIssues = [];
this.inputIsValid = true;
this.StateHasChanged();
}
protected void CreateChatThread()
{
@@ -218,6 +231,13 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
return chatId;
}
protected virtual void ResetProviderAndProfileSelection()
{
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
}
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List<FileAttachment> attachments)
{
@@ -310,6 +330,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
protected async Task OpenSettingsDialog()
{
if (!this.HasSettingsPanel)
return;
var dialogParameters = new DialogParameters();
await this.DialogService.ShowAsync<TSettings>(null, dialogParameters, DialogOptions.FULLSCREEN);
}
@@ -356,9 +379,7 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
this.ResetForm();
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(this.Component);
this.ResetProviderAndProfileSelection();
this.inputIsValid = false;
this.inputIssues = [];
@@ -398,4 +419,4 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
}
#endregion
}
}
@@ -8,7 +8,7 @@ namespace AIStudio.Assistants.BiasDay;
public partial class BiasOfTheDayAssistant : AssistantBaseCore<SettingsDialogAssistantBias>
{
public override Tools.Components Component => Tools.Components.BIAS_DAY_ASSISTANT;
protected override Tools.Components Component => Tools.Components.BIAS_DAY_ASSISTANT;
protected override string Title => T("Bias of the Day");
@@ -6,7 +6,7 @@ namespace AIStudio.Assistants.Coding;
public partial class AssistantCoding : AssistantBaseCore<SettingsDialogCoding>
{
public override Tools.Components Component => Tools.Components.CODING_ASSISTANT;
protected override Tools.Components Component => Tools.Components.CODING_ASSISTANT;
protected override string Title => T("Coding Assistant");
@@ -1,6 +1,5 @@
@attribute [Route(Routes.ASSISTANT_DOCUMENT_ANALYSIS)]
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogDocumentAnalysis>
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.NoSettingsPanel>
@using AIStudio.Settings.DataModel
<PreviewPrototype ApplyInnerScrollingFix="true"/>
@@ -25,9 +24,21 @@ else
<MudList Color="Color.Primary" T="DataDocumentAnalysisPolicy" Class="mb-1" SelectedValue="@this.selectedPolicy" SelectedValueChanged="@this.SelectedPolicyChanged">
@foreach (var policy in this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies)
{
<MudListItem T="DataDocumentAnalysisPolicy" Icon="@Icons.Material.Filled.Policy" Value="@policy">
@policy.PolicyName
</MudListItem>
@if (policy.IsEnterpriseConfiguration)
{
<MudListItem T="DataDocumentAnalysisPolicy" Icon="@Icons.Material.Filled.Policy" Value="@policy">
@policy.PolicyName
<MudTooltip Text="@T("This policy is managed by your organization.")" Placement="Placement.Right">
<MudIcon Icon="@Icons.Material.Filled.Business" Size="Size.Small" Class="ml-2" Style="vertical-align: middle;" />
</MudTooltip>
</MudListItem>
}
else
{
<MudListItem T="DataDocumentAnalysisPolicy" Icon="@Icons.Material.Filled.Policy" Value="@policy">
@policy.PolicyName
</MudListItem>
}
}
</MudList>
}
@@ -36,85 +47,124 @@ else
<MudButton OnClick="@this.AddPolicy" Variant="Variant.Filled" Color="Color.Primary">
@T("Add policy")
</MudButton>
<MudButton OnClick="@this.RemovePolicy" Disabled="@(this.selectedPolicy?.IsProtected ?? true)" Variant="Variant.Filled" Color="Color.Error">
<MudButton OnClick="@this.RemovePolicy" Disabled="@((this.selectedPolicy?.IsProtected ?? true) || (this.selectedPolicy?.IsEnterpriseConfiguration ?? true))" Variant="Variant.Filled" Color="Color.Error">
@T("Delete this policy")
</MudButton>
</MudStack>
<MudExpansionPanels Class="mb-3 mt-6" MultiExpansion="@false">
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Policy" HeaderText="@(T("Policy definition") + $": {this.selectedPolicy?.PolicyName}")" IsExpanded="@this.policyDefinitionExpanded" ExpandedChanged="@this.PolicyDefinitionExpandedChanged">
@if (!this.policyDefinitionExpanded)
{
<MudJustifiedText Typo="Typo.body1" Class="mb-1">
@T("Expand this section to view and edit the policy definition.")
</MudJustifiedText>
}
else
{
<MudText Typo="Typo.h5" Class="mb-1">
@T("Common settings")
</MudText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyName" Validation="@this.ValidatePolicyName" Immediate="@true" Label="@T("Policy name")" HelperText="@T("Please give your policy a name that provides information about the intended purpose. The name will be displayed to users in AI Studio.")" Counter="60" MaxLength="60" Variant="Variant.Outlined" Margin="Margin.Normal" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3" OnKeyUp="@(() => this.PolicyNameWasChanged())"/>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyDescription" Validation="@this.ValidatePolicyDescription" Immediate="@true" Label="@T("Policy description")" HelperText="@T("Please provide a brief description of your policy. Describe or explain what your policy does. This description will be shown to users in AI Studio.")" Counter="512" MaxLength="512" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="6" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<MudTextSwitch Disabled="@(this.IsNoPolicySelected || (this.selectedPolicy?.IsManaged ?? true))" Label="@T("Would you like to protect this policy so that you cannot accidentally edit or delete it?")" Value="@this.policyIsProtected" ValueChanged="async state => await this.PolicyProtectionWasChanged(state)" LabelOn="@T("Yes, protect this policy")" LabelOff="@T("No, the policy can be edited")" />
<MudDivider Style="height: 0.25ch; margin: 1rem 0;" Class="mt-6" />
<MudText Typo="Typo.h5" Class="mt-6 mb-1">
@T("Analysis and output rules")
</MudText>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("Use the analysis and output rules to define how the AI evaluates your documents and formats the results.")
</MudJustifiedText>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("The analysis rules specify what the AI should pay particular attention to while reviewing the documents you provide, and which aspects it should highlight or save. For example, if you want to extract the potential of green hydrogen for agriculture from a variety of general publications, you can explicitly define this in the analysis rules.")
</MudJustifiedText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyAnalysisRules" Validation="@this.ValidateAnalysisRules" Immediate="@true" Label="@T("Analysis rules")" HelperText="@T("Please provide a description of your analysis rules. This rules will be used to instruct the AI on how to analyze the documents.")" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="5" AutoGrow="@true" MaxLines="26" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<ReadFileContent Text="@T("Load analysis rules from document")" @bind-FileContent="@this.policyAnalysisRules"/>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points.")
</MudJustifiedText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyOutputRules" Validation="@this.ValidateOutputRules" Immediate="@true" Label="@T("Output rules")" HelperText="@T("Please provide a description of your output rules. This rules will be used to instruct the AI on how to format the output of the analysis.")" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="5" AutoGrow="@true" MaxLines="26" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<ReadFileContent Text="@T("Load output rules from document")" @bind-FileContent="@this.policyOutputRules"/>
<MudText Typo="Typo.h5" Class="mt-6 mb-1">
@T("Preparation for enterprise distribution")
</MudText>
<MudTooltip Text="@T("Not implemented yet.")">
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Disabled="true" Variant="Variant.Filled" Color="Color.Primary" OnClick="@this.ExportPolicyAsConfiguration">
@T("Export policy as configuration section")
</MudButton>
</MudTooltip>
}
</ExpansionPanel>
<MudDivider Style="height: 0.25ch; margin: 1rem 0;" Class="mt-6" />
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.DocumentScanner" HeaderText="@(T("Document selection - Policy") + $": {this.selectedPolicy?.PolicyName}")" IsExpanded="@(this.selectedPolicy?.IsProtected ?? false)">
<MudText Typo="Typo.h5" Class="mb-1">
@if ((this.selectedPolicy?.HidePolicyDefinition ?? false) && (this.selectedPolicy?.IsEnterpriseConfiguration ?? false))
{
@* When HidePolicyDefinition is true AND the policy is an enterprise configuration, show only the document selection section without expansion panels *@
<div class="mb-3 mt-3">
<MudText Typo="Typo.h5" Class="mb-3">
@T("Document selection - Policy"): @this.selectedPolicy?.PolicyName
</MudText>
<MudText Typo="Typo.h6" Class="mb-1">
@T("Policy Description")
</MudText>
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
@this.selectedPolicy?.PolicyDescription
</MudJustifiedText>
<MudText Typo="Typo.h5" Class="mb-1 mt-6">
<MudText Typo="Typo.h6" Class="mb-1 mt-6">
@T("Documents for the analysis")
</MudText>
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.providerSettings"/>
</ExpansionPanel>
</MudExpansionPanels>
</div>
}
else
{
@* Standard view with expansion panels *@
<MudExpansionPanels Class="mb-3 mt-3" MultiExpansion="@false">
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Policy" HeaderText="@(T("Policy definition") + $": {this.selectedPolicy?.PolicyName}")" IsExpanded="@this.policyDefinitionExpanded" ExpandedChanged="@this.PolicyDefinitionExpandedChanged">
@if (!this.policyDefinitionExpanded)
{
<MudJustifiedText Typo="Typo.body1" Class="mb-1">
@T("Expand this section to view and edit the policy definition.")
</MudJustifiedText>
}
else
{
<MudText Typo="Typo.h5" Class="mb-1">
@T("Common settings")
</MudText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyName" Validation="@this.ValidatePolicyName" Immediate="@true" Label="@T("Policy name")" HelperText="@T("Please give your policy a name that provides information about the intended purpose. The name will be displayed to users in AI Studio.")" Counter="60" MaxLength="60" Variant="Variant.Outlined" Margin="Margin.Normal" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3" OnKeyUp="@(() => this.PolicyNameWasChanged())"/>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyDescription" Validation="@this.ValidatePolicyDescription" Immediate="@true" Label="@T("Policy description")" HelperText="@T("Please provide a brief description of your policy. Describe or explain what your policy does. This description will be shown to users in AI Studio.")" Counter="512" MaxLength="512" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="6" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<MudTextSwitch Disabled="@this.IsNoPolicySelectedOrProtected" Label="@T("Hide the policy definition when distributed via configuration plugin?")" Value="@this.policyHidePolicyDefinition" ValueChanged="async state => await this.PolicyHidePolicyDefinitionWasChanged(state)" LabelOn="@T("Yes, hide the policy definition")" LabelOff="@T("No, show the policy definition")" />
<MudJustifiedText Typo="Typo.body2" Class="mt-2 mb-3">
@T("Note: This setting only takes effect when this policy is exported and distributed via a configuration plugin to other users. When enabled, users will only see the document selection interface and cannot view or modify the policy details. This setting does NOT affect your local view - you will always see the full policy definition for policies you create.")
</MudJustifiedText>
<ConfigurationMinConfidenceSelection Disabled="@(() => this.IsNoPolicySelectedOrProtected)" RestrictToGlobalMinimumConfidence="true" SelectedValue="@(() => this.policyMinimumProviderConfidence)" SelectionUpdateAsync="@(async level => await this.PolicyMinimumConfidenceWasChangedAsync(level))" />
<ConfigurationProviderSelection Component="Components.DOCUMENT_ANALYSIS_ASSISTANT" Data="@this.availableLLMProviders" Disabled="@(() => this.IsNoPolicySelectedOrProtected)" SelectedValue="@(() => this.policyPreselectedProviderId)" SelectionUpdate="@(providerId => this.PolicyPreselectedProviderWasChanged(providerId))" ExplicitMinimumConfidence="@this.GetPolicyMinimumConfidenceLevel()"/>
<ProfileFormSelection Disabled="@this.IsNoPolicySelected" Profile="@this.currentProfile" ProfileChanged="@this.PolicyPreselectedProfileWasChangedAsync" />
<MudTextSwitch Disabled="@(this.IsNoPolicySelected || (this.selectedPolicy?.IsEnterpriseConfiguration ?? true))" Label="@T("Would you like to protect this policy so that you cannot accidentally edit or delete it?")" Value="@this.policyIsProtected" ValueChanged="async state => await this.PolicyProtectionWasChanged(state)" LabelOn="@T("Yes, protect this policy")" LabelOff="@T("No, the policy can be edited")" />
<MudText Typo="Typo.h5" Class="mt-6 mb-1">
@T("Analysis and output rules")
</MudText>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("Use the analysis and output rules to define how the AI evaluates your documents and formats the results.")
</MudJustifiedText>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("The analysis rules specify what the AI should pay particular attention to while reviewing the documents you provide, and which aspects it should highlight or save. For example, if you want to extract the potential of green hydrogen for agriculture from a variety of general publications, you can explicitly define this in the analysis rules.")
</MudJustifiedText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyAnalysisRules" Validation="@this.ValidateAnalysisRules" Immediate="@true" Label="@T("Analysis rules")" HelperText="@T("Please provide a description of your analysis rules. This rules will be used to instruct the AI on how to analyze the documents.")" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="5" AutoGrow="@true" MaxLines="26" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<ReadFileContent Text="@T("Load analysis rules from document")" @bind-FileContent="@this.policyAnalysisRules" Disabled="@this.IsNoPolicySelectedOrProtected"/>
<MudJustifiedText Typo="Typo.body1" Class="mt-3">
@T("After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points.")
</MudJustifiedText>
<MudTextField T="string" Disabled="@this.IsNoPolicySelectedOrProtected" @bind-Text="@this.policyOutputRules" Validation="@this.ValidateOutputRules" Immediate="@true" Label="@T("Output rules")" HelperText="@T("Please provide a description of your output rules. This rules will be used to instruct the AI on how to format the output of the analysis.")" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="5" AutoGrow="@true" MaxLines="26" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
<ReadFileContent Text="@T("Load output rules from document")" @bind-FileContent="@this.policyOutputRules" Disabled="@this.IsNoPolicySelectedOrProtected"/>
<MudText Typo="Typo.h5" Class="mt-6 mb-1">
@T("Preparation for enterprise distribution")
</MudText>
<MudButton StartIcon="@Icons.Material.Filled.ContentCopy" Disabled="@(this.IsNoPolicySelected || (this.selectedPolicy?.IsEnterpriseConfiguration ?? false))" Variant="Variant.Filled" Color="Color.Default" OnClick="@this.ExportPolicyAsConfiguration">
@T("Export policy as configuration section")
</MudButton>
}
</ExpansionPanel>
<MudDivider Style="height: 0.25ch; margin: 1rem 0;" Class="mt-6" />
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.DocumentScanner" HeaderText="@(T("Document selection - Policy") + $": {this.selectedPolicy?.PolicyName}")" IsExpanded="@(this.selectedPolicy?.IsProtected ?? false)">
<MudText Typo="Typo.h5" Class="mb-1">
@T("Policy Description")
</MudText>
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
@this.selectedPolicy?.PolicyDescription
</MudJustifiedText>
<MudText Typo="Typo.h5" Class="mb-1 mt-6">
@T("Documents for the analysis")
</MudText>
<AttachDocuments Name="Document Analysis Files" Layer="@DropLayers.ASSISTANTS" @bind-DocumentPaths="@this.loadedDocumentPaths" CatchAllDocuments="true" UseSmallForm="false" Provider="@this.providerSettings"/>
</ExpansionPanel>
</MudExpansionPanels>
}
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider" ExplicitMinimumConfidence="@this.GetPolicyMinimumConfidenceLevel()"/>
@@ -1,8 +1,11 @@
using System.Text;
using System.Diagnostics.CodeAnalysis;
using AIStudio.Chat;
using AIStudio.Dialogs;
using AIStudio.Dialogs.Settings;
using AIStudio.Provider;
using AIStudio.Settings;
using AIStudio.Settings.DataModel;
using Microsoft.AspNetCore.Components;
@@ -11,12 +14,12 @@ using DialogOptions = AIStudio.Dialogs.DialogOptions;
namespace AIStudio.Assistants.DocumentAnalysis;
public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialogDocumentAnalysis>
public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPanel>
{
[Inject]
private IDialogService DialogService { get; init; } = null!;
public override Tools.Components Component => Tools.Components.DOCUMENT_ANALYSIS_ASSISTANT;
protected override Tools.Components Component => Tools.Components.DOCUMENT_ANALYSIS_ASSISTANT;
protected override string Title => T("Document Analysis Assistant");
@@ -116,7 +119,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
protected override Func<Task> SubmitAction => this.Analyze;
protected override bool SubmitDisabled => (this.IsNoPolicySelected || this.loadedDocumentPaths.Count==0);
protected override bool SubmitDisabled => this.IsNoPolicySelected || this.loadedDocumentPaths.Count == 0;
protected override ChatThread ConvertToChatThread
{
@@ -162,15 +165,31 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
protected override void ResetForm()
{
this.loadedDocumentPaths.Clear();
if (!this.MightPreselectValues())
{
this.policyName = string.Empty;
this.policyDescription = string.Empty;
this.policyIsProtected = false;
this.policyHidePolicyDefinition = false;
this.policyAnalysisRules = string.Empty;
this.policyOutputRules = string.Empty;
this.policyMinimumProviderConfidence = ConfidenceLevel.NONE;
this.policyPreselectedProviderId = string.Empty;
this.policyPreselectedProfileId = Profile.NO_PROFILE.Id;
}
}
protected override void ResetProviderAndProfileSelection()
{
if (this.selectedPolicy is null)
{
base.ResetProviderAndProfileSelection();
return;
}
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
}
protected override bool MightPreselectValues()
{
@@ -179,12 +198,16 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
this.policyName = this.selectedPolicy.PolicyName;
this.policyDescription = this.selectedPolicy.PolicyDescription;
this.policyIsProtected = this.selectedPolicy.IsProtected;
this.policyHidePolicyDefinition = this.selectedPolicy.HidePolicyDefinition;
this.policyAnalysisRules = this.selectedPolicy.AnalysisRules;
this.policyOutputRules = this.selectedPolicy.OutputRules;
this.policyMinimumProviderConfidence = this.selectedPolicy.MinimumProviderConfidence;
this.policyPreselectedProviderId = this.selectedPolicy.PreselectedProvider;
this.policyPreselectedProfileId = string.IsNullOrWhiteSpace(this.selectedPolicy.PreselectedProfile) ? Profile.NO_PROFILE.Id : this.selectedPolicy.PreselectedProfile;
return true;
}
return false;
}
@@ -205,12 +228,10 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
}
this.policyDefinitionExpanded = !this.selectedPolicy?.IsProtected ?? true;
var receivedDeferredContent = MessageBus.INSTANCE.CheckDeferredMessages<string>(Event.SEND_TO_DOCUMENT_ANALYSIS_ASSISTANT).FirstOrDefault();
if (receivedDeferredContent is not null)
this.deferredContent = receivedDeferredContent;
await base.OnInitializedAsync();
this.ApplyFilters([], [ Event.CONFIGURATION_CHANGED, Event.PLUGINS_RELOADED ]);
this.UpdateProviders();
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
}
#endregion
@@ -219,34 +240,43 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
{
if(this.selectedPolicy is null)
return;
if(!force && this.selectedPolicy.IsProtected)
return;
if(!force && this.policyIsProtected)
return;
this.selectedPolicy.PreselectedProvider = this.providerSettings.Id;
this.selectedPolicy.PolicyName = this.policyName;
this.selectedPolicy.PolicyDescription = this.policyDescription;
this.selectedPolicy.IsProtected = this.policyIsProtected;
this.selectedPolicy.AnalysisRules = this.policyAnalysisRules;
this.selectedPolicy.OutputRules = this.policyOutputRules;
// The preselected profile is always user-adjustable, even for protected policies and enterprise configurations:
this.selectedPolicy.PreselectedProfile = this.policyPreselectedProfileId;
// Enterprise configurations cannot be modified at all:
if(this.selectedPolicy.IsEnterpriseConfiguration)
return;
var canEditProtectedFields = force || (!this.selectedPolicy.IsProtected && !this.policyIsProtected);
if (canEditProtectedFields)
{
this.selectedPolicy.PreselectedProvider = this.policyPreselectedProviderId;
this.selectedPolicy.PolicyName = this.policyName;
this.selectedPolicy.PolicyDescription = this.policyDescription;
this.selectedPolicy.IsProtected = this.policyIsProtected;
this.selectedPolicy.HidePolicyDefinition = this.policyHidePolicyDefinition;
this.selectedPolicy.AnalysisRules = this.policyAnalysisRules;
this.selectedPolicy.OutputRules = this.policyOutputRules;
this.selectedPolicy.MinimumProviderConfidence = this.policyMinimumProviderConfidence;
}
await this.SettingsManager.StoreSettings();
}
private DataDocumentAnalysisPolicy? selectedPolicy;
private bool policyIsProtected;
private bool policyHidePolicyDefinition;
private bool policyDefinitionExpanded;
private string policyName = string.Empty;
private string policyDescription = string.Empty;
private string policyAnalysisRules = string.Empty;
private string policyOutputRules = string.Empty;
#warning Use deferred content for document analysis
private string deferredContent = string.Empty;
private ConfidenceLevel policyMinimumProviderConfidence = ConfidenceLevel.NONE;
private string policyPreselectedProviderId = string.Empty;
private string policyPreselectedProfileId = Profile.NO_PROFILE.Id;
private HashSet<FileAttachment> loadedDocumentPaths = [];
private readonly List<ConfigurationSelectData<string>> availableLLMProviders = new();
private bool IsNoPolicySelectedOrProtected => this.selectedPolicy is null || this.selectedPolicy.IsProtected;
@@ -257,6 +287,10 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
this.selectedPolicy = policy;
this.ResetForm();
this.policyDefinitionExpanded = !this.selectedPolicy?.IsProtected ?? true;
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
this.form?.ResetValidation();
this.ClearInputIssues();
}
private Task PolicyDefinitionExpandedChanged(bool isExpanded)
@@ -269,12 +303,22 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
{
this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Add(new ()
{
Id = Guid.NewGuid().ToString(),
Num = this.SettingsManager.ConfigurationData.NextDocumentAnalysisPolicyNum++,
PolicyName = string.Format(T("Policy {0}"), DateTimeOffset.UtcNow),
});
await this.SettingsManager.StoreSettings();
}
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")]
private void UpdateProviders()
{
this.availableLLMProviders.Clear();
foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
this.availableLLMProviders.Add(new ConfigurationSelectData<string>(provider.InstanceName, provider.Id));
}
private async Task RemovePolicy()
{
if(this.selectedPolicy is null)
@@ -283,6 +327,9 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
if(this.selectedPolicy.IsProtected)
return;
if(this.selectedPolicy.IsEnterpriseConfiguration)
return;
var dialogParameters = new DialogParameters<ConfirmDialog>
{
{ x => x.Message, string.Format(T("Are you sure you want to delete the document analysis policy '{0}'?"), this.selectedPolicy.PolicyName) },
@@ -316,6 +363,9 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
if(this.selectedPolicy.IsProtected)
return;
if(this.selectedPolicy.IsEnterpriseConfiguration)
return;
this.selectedPolicy.PolicyName = this.policyName;
}
@@ -323,15 +373,192 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
{
if(this.selectedPolicy is null)
return;
if(this.selectedPolicy.IsEnterpriseConfiguration)
return;
this.policyIsProtected = state;
this.selectedPolicy.IsProtected = state;
this.policyDefinitionExpanded = !state;
await this.AutoSave(true);
}
private async Task PolicyHidePolicyDefinitionWasChanged(bool state)
{
if(this.selectedPolicy is null)
return;
if(this.selectedPolicy.IsEnterpriseConfiguration)
return;
this.policyHidePolicyDefinition = state;
this.selectedPolicy.HidePolicyDefinition = state;
await this.AutoSave(true);
}
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed", Justification = "Policy-specific preselection needs to probe providers by id before falling back to SettingsManager APIs.")]
private void ApplyPolicyPreselection(bool preferPolicyPreselection = false)
{
if (this.selectedPolicy is null)
return;
this.policyPreselectedProviderId = this.selectedPolicy.PreselectedProvider;
var minimumLevel = this.GetPolicyMinimumConfidenceLevel();
if (!preferPolicyPreselection)
{
// Keep the current provider if it still satisfies the minimum confidence:
if (this.providerSettings != Settings.Provider.NONE &&
this.providerSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
{
this.currentProfile = this.ResolveProfileSelection();
return;
}
}
// Try to apply the policy preselection:
var policyProvider = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.selectedPolicy.PreselectedProvider);
if (policyProvider is not null && policyProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level >= minimumLevel)
{
this.providerSettings = policyProvider;
this.currentProfile = this.ResolveProfileSelection();
return;
}
var fallbackProvider = this.SettingsManager.GetPreselectedProvider(this.Component, this.providerSettings.Id);
if (fallbackProvider != Settings.Provider.NONE &&
fallbackProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level < minimumLevel)
fallbackProvider = Settings.Provider.NONE;
this.providerSettings = fallbackProvider;
this.currentProfile = this.ResolveProfileSelection();
}
private ConfidenceLevel GetPolicyMinimumConfidenceLevel()
{
var minimumLevel = ConfidenceLevel.NONE;
var llmSettings = this.SettingsManager.ConfigurationData.LLMProviders;
var enforceGlobalMinimumConfidence = llmSettings is { EnforceGlobalMinimumConfidence: true, GlobalMinimumConfidence: not ConfidenceLevel.NONE and not ConfidenceLevel.UNKNOWN };
if (enforceGlobalMinimumConfidence)
minimumLevel = llmSettings.GlobalMinimumConfidence;
if (this.selectedPolicy is not null && this.selectedPolicy.MinimumProviderConfidence > minimumLevel)
minimumLevel = this.selectedPolicy.MinimumProviderConfidence;
return minimumLevel;
}
private Profile ResolveProfileSelection()
{
if (this.selectedPolicy is not null && !string.IsNullOrWhiteSpace(this.selectedPolicy.PreselectedProfile))
{
var policyProfile = this.SettingsManager.ConfigurationData.Profiles.FirstOrDefault(x => x.Id == this.selectedPolicy.PreselectedProfile);
if (policyProfile is not null)
return policyProfile;
}
return this.SettingsManager.GetPreselectedProfile(this.Component);
}
private async Task PolicyMinimumConfidenceWasChangedAsync(ConfidenceLevel level)
{
this.policyMinimumProviderConfidence = level;
await this.AutoSave();
this.ApplyPolicyPreselection();
}
private void PolicyPreselectedProviderWasChanged(string providerId)
{
if (this.selectedPolicy is null)
return;
this.policyPreselectedProviderId = providerId;
this.selectedPolicy.PreselectedProvider = providerId;
this.providerSettings = Settings.Provider.NONE;
this.ApplyPolicyPreselection();
}
private async Task PolicyPreselectedProfileWasChangedAsync(Profile profile)
{
this.policyPreselectedProfileId = profile.Id;
if (this.selectedPolicy is not null)
this.selectedPolicy.PreselectedProfile = this.policyPreselectedProfileId;
this.currentProfile = this.ResolveProfileSelection();
await this.AutoSave();
}
#region Overrides of MSGComponentBase
protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
{
switch (triggeredEvent)
{
case Event.CONFIGURATION_CHANGED:
this.UpdateProviders();
this.StateHasChanged();
break;
case Event.PLUGINS_RELOADED:
this.HandlePluginsReloaded();
this.StateHasChanged();
break;
}
return Task.CompletedTask;
}
#endregion
private void HandlePluginsReloaded()
{
// Check if the currently selected policy still exists after plugin reload:
if (this.selectedPolicy is not null)
{
var stillExists = this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies
.Any(p => p.Id == this.selectedPolicy.Id);
if (!stillExists)
{
// Policy was removed, select a new one:
this.selectedPolicy = this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.FirstOrDefault();
}
else
{
// Policy still exists, update the reference to the potentially updated version:
this.selectedPolicy = this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies
.First(p => p.Id == this.selectedPolicy.Id);
}
}
else
{
// No policy was selected, select the first one if available:
this.selectedPolicy = this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.FirstOrDefault();
}
// Update form values to reflect the current policy:
this.ResetForm();
// Update the expansion state based on the policy protection:
this.policyDefinitionExpanded = !this.selectedPolicy?.IsProtected ?? true;
// Update available providers:
this.UpdateProviders();
// Apply policy preselection:
this.ApplyPolicyPreselection(preferPolicyPreselection: true);
// Reset validation state:
this.form?.ResetValidation();
this.ClearInputIssues();
}
private string? ValidatePolicyName(string name)
{
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
return null;
if(string.IsNullOrWhiteSpace(name))
return T("Please provide a name for your policy. This name will be used to identify the policy in AI Studio.");
@@ -346,6 +573,9 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
private string? ValidatePolicyDescription(string description)
{
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
return null;
if(string.IsNullOrWhiteSpace(description))
return T("Please provide a description for your policy. This description will be used to inform users about the purpose of your document analysis policy.");
@@ -480,15 +710,63 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
private async Task ExportPolicyAsConfiguration()
{
return;
# warning Implement the export function
// do not allow the export of a protected policy
if (this.IsNoPolicySelectedOrProtected)
if (this.IsNoPolicySelected)
{
await this.MessageBus.SendError(new (Icons.Material.Filled.Policy, this.T("No policy is selected. Please select a policy to export.")));
return;
}
await this.AutoSave();
await this.form!.Validate();
if (!this.inputIsValid)
{
await this.MessageBus.SendError(new (Icons.Material.Filled.Policy, this.T("The selected policy contains invalid data. Please fix the issues before exporting the policy.")));
return;
}
var luaCode = this.GenerateLuaPolicyExport();
await this.RustService.CopyText2Clipboard(this.Snackbar, luaCode);
}
private string GenerateLuaPolicyExport()
{
if(this.selectedPolicy is null)
return string.Empty;
var preselectedProvider = string.IsNullOrWhiteSpace(this.selectedPolicy.PreselectedProvider) ? string.Empty : this.selectedPolicy.PreselectedProvider;
var preselectedProfile = string.IsNullOrWhiteSpace(this.selectedPolicy.PreselectedProfile) ? Profile.NO_PROFILE.Id : this.selectedPolicy.PreselectedProfile;
var id = string.IsNullOrWhiteSpace(this.selectedPolicy.Id) ? Guid.NewGuid().ToString() : this.selectedPolicy.Id;
return $$"""
CONFIG["DOCUMENT_ANALYSIS_POLICIES"][#CONFIG["DOCUMENT_ANALYSIS_POLICIES"]+1] = {
["Id"] = "{{id}}",
["PolicyName"] = "{{this.selectedPolicy.PolicyName.Trim()}}",
["PolicyDescription"] = "{{this.selectedPolicy.PolicyDescription.Trim()}}",
["AnalysisRules"] = [===[
{{this.selectedPolicy.AnalysisRules.Trim()}}
]===],
["OutputRules"] = [===[
{{this.selectedPolicy.OutputRules.Trim()}}
]===],
-- Optional: minimum provider confidence required for this policy.
-- Allowed values are: NONE, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH
["MinimumProviderConfidence"] = "{{this.selectedPolicy.MinimumProviderConfidence}}",
-- Optional: preselect a provider or profile by ID.
-- The IDs must exist in CONFIG["LLM_PROVIDERS"] or CONFIG["PROFILES"].
["PreselectedProvider"] = "{{preselectedProvider}}",
["PreselectedProfile"] = "{{preselectedProfile}}",
-- Optional: hide the policy definition section in the UI.
-- When set to true, users will only see the document selection interface
-- and cannot view or modify the policy settings.
-- This is useful for enterprise configurations where policy details should remain hidden.
-- Allowed values are: true, false (default: false)
["HidePolicyDefinition"] = {{this.selectedPolicy.HidePolicyDefinition.ToString().ToLowerInvariant()}},
}
""";
}
}
@@ -7,7 +7,7 @@ namespace AIStudio.Assistants.EMail;
public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMails>
{
public override Tools.Components Component => Tools.Components.EMAIL_ASSISTANT;
protected override Tools.Components Component => Tools.Components.EMAIL_ASSISTANT;
protected override string Title => T("E-Mail");
@@ -19,8 +19,8 @@ public partial class AssistantERI : AssistantBaseCore<SettingsDialogERIServer>
[Inject]
private IDialogService DialogService { get; init; } = null!;
public override Tools.Components Component => Tools.Components.ERI_ASSISTANT;
protected override Tools.Components Component => Tools.Components.ERI_ASSISTANT;
protected override string Title => T("ERI Server");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.GrammarSpelling;
public partial class AssistantGrammarSpelling : AssistantBaseCore<SettingsDialogGrammarSpelling>
{
public override Tools.Components Component => Tools.Components.GRAMMAR_SPELLING_ASSISTANT;
protected override Tools.Components Component => Tools.Components.GRAMMAR_SPELLING_ASSISTANT;
protected override string Title => T("Grammar & Spelling Checker");
@@ -16,7 +16,7 @@ namespace AIStudio.Assistants.I18N;
public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
{
public override Tools.Components Component => Tools.Components.I18N_ASSISTANT;
protected override Tools.Components Component => Tools.Components.I18N_ASSISTANT;
protected override string Title => T("Localization");
@@ -397,9 +397,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Please provide a description of your analysis rules. This rules will be used to instruct the AI on how to analyze the documents.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1291179736"] = "Please provide a description of your analysis rules. This rules will be used to instruct the AI on how to analyze the documents."
-- Not implemented yet.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1568777658"] = "Not implemented yet."
-- Yes, protect this policy
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1762380857"] = "Yes, protect this policy"
@@ -409,9 +406,18 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Please provide a description for your policy. This description will be used to inform users about the purpose of your document analysis policy.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1837166236"] = "Please provide a description for your policy. This description will be used to inform users about the purpose of your document analysis policy."
-- Hide the policy definition when distributed via configuration plugin?
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1875622568"] = "Hide the policy definition when distributed via configuration plugin?"
-- Common settings
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1963959073"] = "Common settings"
-- Note: This setting only takes effect when this policy is exported and distributed via a configuration plugin to other users. When enabled, users will only see the document selection interface and cannot view or modify the policy details. This setting does NOT affect your local view - you will always see the full policy definition for policies you create.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T1984494439"] = "Note: This setting only takes effect when this policy is exported and distributed via a configuration plugin to other users. When enabled, users will only see the document selection interface and cannot view or modify the policy details. This setting does NOT affect your local view - you will always see the full policy definition for policies you create."
-- This policy is managed by your organization.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T2035084381"] = "This policy is managed by your organization."
-- The document analysis assistant helps you to analyze and extract information from documents based on predefined policies. You can create, edit, and manage document analysis policies that define how documents should be processed and what information should be extracted. Some policies might be protected by your organization and cannot be modified or deleted.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T206207667"] = "The document analysis assistant helps you to analyze and extract information from documents based on predefined policies. You can create, edit, and manage document analysis policies that define how documents should be processed and what information should be extracted. Some policies might be protected by your organization and cannot be modified or deleted."
@@ -451,6 +457,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Policy name
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T2879019438"] = "Policy name"
-- No policy is selected. Please select a policy to export.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T2929693091"] = "No policy is selected. Please select a policy to export."
-- Policy Description
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T3023558273"] = "Policy Description"
@@ -466,6 +475,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Policy {0}
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T3157740273"] = "Policy {0}"
-- No, show the policy definition
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T3166091879"] = "No, show the policy definition"
-- The description of your policy must be between 32 and 512 characters long.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T3285636934"] = "The description of your policy must be between 32 and 512 characters long."
@@ -508,6 +520,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T726434276"] = "After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points."
-- The selected policy contains invalid data. Please fix the issues before exporting the policy.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T736334861"] = "The selected policy contains invalid data. Please fix the issues before exporting the policy."
-- Policy description
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T748735777"] = "Policy description"
@@ -517,6 +532,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Here you have the option to save different policies for various document analysis assistants and switch between them.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T848153710"] = "Here you have the option to save different policies for various document analysis assistants and switch between them."
-- Yes, hide the policy definition
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Yes, hide the policy definition"
-- Provide a list of bullet points and some basic information for an e-mail. The assistant will generate an e-mail based on that input.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::EMAIL::ASSISTANTEMAIL::T1143222914"] = "Provide a list of bullet points and some basic information for an e-mail. The assistant will generate an e-mail based on that input."
@@ -4027,33 +4045,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDATASOURCES::T774473
-- Local Directory
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDATASOURCES::T926703547"] = "Local Directory"
-- Assistant: Document Analysis
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T1372406750"] = "Assistant: Document Analysis"
-- Most document analysis options can be customized and saved directly in the assistant. For this, the assistant has an auto-save function.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T1870328357"] = "Most document analysis options can be customized and saved directly in the assistant. For this, the assistant has an auto-save function."
-- Would you like to preselect one of your profiles?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T2221665527"] = "Would you like to preselect one of your profiles?"
-- Preselect document analysis options?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T2230062650"] = "Preselect document analysis options?"
-- When enabled, you can preselect some document analysis options.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T2301091111"] = "When enabled, you can preselect some document analysis options."
-- No document analysis options are preselected
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T3317802895"] = "No document analysis options are preselected"
-- Close
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T3448155331"] = "Close"
-- Document analysis options are preselected
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T3945756386"] = "Document analysis options are preselected"
-- Preselect one of your profiles?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGDOCUMENTANALYSIS::T4004501229"] = "Preselect one of your profiles?"
-- When enabled, you can preselect some ERI server options.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGERISERVER::T1280666275"] = "When enabled, you can preselect some ERI server options."
@@ -4,7 +4,7 @@ namespace AIStudio.Assistants.IconFinder;
public partial class AssistantIconFinder : AssistantBaseCore<SettingsDialogIconFinder>
{
public override Tools.Components Component => Tools.Components.ICON_FINDER_ASSISTANT;
protected override Tools.Components Component => Tools.Components.ICON_FINDER_ASSISTANT;
protected override string Title => T("Icon Finder");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.JobPosting;
public partial class AssistantJobPostings : AssistantBaseCore<SettingsDialogJobPostings>
{
public override Tools.Components Component => Tools.Components.JOB_POSTING_ASSISTANT;
protected override Tools.Components Component => Tools.Components.JOB_POSTING_ASSISTANT;
protected override string Title => T("Job Posting");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.LegalCheck;
public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegalCheck>
{
public override Tools.Components Component => Tools.Components.LEGAL_CHECK_ASSISTANT;
protected override Tools.Components Component => Tools.Components.LEGAL_CHECK_ASSISTANT;
protected override string Title => T("Legal Check");
@@ -6,7 +6,7 @@ namespace AIStudio.Assistants.MyTasks;
public partial class AssistantMyTasks : AssistantBaseCore<SettingsDialogMyTasks>
{
public override Tools.Components Component => Tools.Components.MY_TASKS_ASSISTANT;
protected override Tools.Components Component => Tools.Components.MY_TASKS_ASSISTANT;
protected override string Title => T("My Tasks");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.RewriteImprove;
public partial class AssistantRewriteImprove : AssistantBaseCore<SettingsDialogRewrite>
{
public override Tools.Components Component => Tools.Components.REWRITE_ASSISTANT;
protected override Tools.Components Component => Tools.Components.REWRITE_ASSISTANT;
protected override string Title => T("Rewrite & Improve Text");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.Synonym;
public partial class AssistantSynonyms : AssistantBaseCore<SettingsDialogSynonyms>
{
public override Tools.Components Component => Tools.Components.SYNONYMS_ASSISTANT;
protected override Tools.Components Component => Tools.Components.SYNONYMS_ASSISTANT;
protected override string Title => T("Synonyms");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.TextSummarizer;
public partial class AssistantTextSummarizer : AssistantBaseCore<SettingsDialogTextSummarizer>
{
public override Tools.Components Component => Tools.Components.TEXT_SUMMARIZER_ASSISTANT;
protected override Tools.Components Component => Tools.Components.TEXT_SUMMARIZER_ASSISTANT;
protected override string Title => T("Text Summarizer");
@@ -5,7 +5,7 @@ namespace AIStudio.Assistants.Translation;
public partial class AssistantTranslation : AssistantBaseCore<SettingsDialogTranslation>
{
public override Tools.Components Component => Tools.Components.TRANSLATION_ASSISTANT;
protected override Tools.Components Component => Tools.Components.TRANSLATION_ASSISTANT;
protected override string Title => T("Translation");