Renamed the settings of AI tasks (#1239)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-27 12:08:00 +01:00
1 parent d19d3d431b
commit a117074972
109 files changed
+3929 -538

No files matched your search

@@ -3,13 +3,13 @@
@if (!this.SettingsManager.ConfigurationData.LegalCheck.HideWebContentReader)
{
<ReadWebContent @bind-Content="@this.inputLegalDocument" @bind-URL="@this.webContentURL" ProviderSettings="@this.ProviderSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
<ReadWebContent @bind-Content="@this.inputLegalDocument" @bind-URL="@this.webContentURL" ProviderSettings="@this.ProviderSettings" @bind-CleanerIsRunning="@this.isCleanerRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleaner="@this.useContentCleaner"/>
}
@* Two zones, so no default target: the user has to aim at the one they mean. *@
<ReadFileContent Text="@T("Load the legal document from file")" @bind-FileContent="@this.inputLegalDocument" EnableDragDrop="true"/>
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Value="@this.inputLegalDocument" Validation="@this.ValidatingLegalDocument" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.INPUT_TEXT" Adornment="Adornment.Start" Label="@T("Legal document")" Variant="Variant.Outlined" Lines="12" Sizing="InputSizing.Auto" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<MudTextField T="string" Disabled="@this.isCleanerRunning" @bind-Value="@this.inputLegalDocument" Validation="@this.ValidatingLegalDocument" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.INPUT_TEXT" Adornment="Adornment.Start" Label="@T("Legal document")" Variant="Variant.Outlined" Lines="12" Sizing="InputSizing.Auto" MaxLines="24" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<ReadFileContent Text="@TA("Load your questions from file")" @bind-FileContent="@this.inputQuestions" EnableDragDrop="true"/>
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Value="@this.inputQuestions" Validation="@this.ValidatingQuestions" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.QUESTIONS" Adornment="Adornment.Start" Label="@TA("Your questions")" Variant="Variant.Outlined" Lines="6" Sizing="InputSizing.Auto" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<MudTextField T="string" Disabled="@this.isCleanerRunning" @bind-Value="@this.inputQuestions" Validation="@this.ValidatingQuestions" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.QUESTIONS" Adornment="Adornment.Start" Label="@TA("Your questions")" Variant="Variant.Outlined" Lines="6" Sizing="InputSizing.Auto" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<ProviderSelection @bind-ProviderSettings="@this.ProviderSettings" ValidateProvider="@this.ValidatingProvider"/>
@@ -30,7 +30,7 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
protected override Func<Task> SubmitAction => this.AskQuestions;
protected override bool SubmitDisabled => this.isAgentRunning;
protected override bool SubmitDisabled => this.isCleanerRunning;
protected override string SendToChatVisibleUserPromptPrefix => T("Answer the following questions about a legal document:");
@@ -44,7 +44,7 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
if (!this.MightPreselectValues())
{
this.showWebContentReader = false;
this.useContentCleanerAgent = false;
this.useContentCleaner = false;
}
}
@@ -53,7 +53,7 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
if (this.SettingsManager.ConfigurationData.LegalCheck.PreselectOptions)
{
this.showWebContentReader = this.SettingsManager.ConfigurationData.LegalCheck.PreselectWebContentReader;
this.useContentCleanerAgent = this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleanerAgent;
this.useContentCleaner = this.SettingsManager.ConfigurationData.LegalCheck.PreselectContentCleaner;
return true;
}
@@ -61,14 +61,14 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
}
private bool showWebContentReader;
private bool useContentCleanerAgent;
private bool isAgentRunning;
private bool useContentCleaner;
private bool isCleanerRunning;
private string webContentURL = string.Empty;
private string inputLegalDocument = string.Empty;
private string inputQuestions = string.Empty;
private static readonly AssistantSessionStateKey<bool> SHOW_WEB_CONTENT_READER_STATE_KEY = new(nameof(showWebContentReader));
private static readonly AssistantSessionStateKey<bool> USE_CONTENT_CLEANER_AGENT_STATE_KEY = new(nameof(useContentCleanerAgent));
private static readonly AssistantSessionStateKey<bool> IS_AGENT_RUNNING_STATE_KEY = new(nameof(isAgentRunning));
private static readonly AssistantSessionStateKey<bool> USE_CONTENT_CLEANER_STATE_KEY = new(nameof(useContentCleaner));
private static readonly AssistantSessionStateKey<bool> IS_CLEANER_RUNNING_STATE_KEY = new(nameof(isCleanerRunning));
private static readonly AssistantSessionStateKey<string> WEB_CONTENT_URL_STATE_KEY = new(nameof(webContentURL));
private static readonly AssistantSessionStateKey<string> INPUT_LEGAL_DOCUMENT_STATE_KEY = new(nameof(inputLegalDocument));
private static readonly AssistantSessionStateKey<string> INPUT_QUESTIONS_STATE_KEY = new(nameof(inputQuestions));
@@ -77,8 +77,8 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
protected override void CaptureCustomAssistantSessionState(AssistantSessionStateWriter state)
{
state.Set(SHOW_WEB_CONTENT_READER_STATE_KEY, this.showWebContentReader);
state.Set(USE_CONTENT_CLEANER_AGENT_STATE_KEY, this.useContentCleanerAgent);
state.Set(IS_AGENT_RUNNING_STATE_KEY, this.isAgentRunning);
state.Set(USE_CONTENT_CLEANER_STATE_KEY, this.useContentCleaner);
state.Set(IS_CLEANER_RUNNING_STATE_KEY, this.isCleanerRunning);
state.Set(WEB_CONTENT_URL_STATE_KEY, this.webContentURL);
state.Set(INPUT_LEGAL_DOCUMENT_STATE_KEY, this.inputLegalDocument);
state.Set(INPUT_QUESTIONS_STATE_KEY, this.inputQuestions);
@@ -88,8 +88,8 @@ public partial class AssistantLegalCheck : AssistantBaseCore<SettingsDialogLegal
protected override void RestoreCustomAssistantSessionState(AssistantSessionStateReader state)
{
state.Restore(SHOW_WEB_CONTENT_READER_STATE_KEY, value => this.showWebContentReader = value);
state.Restore(USE_CONTENT_CLEANER_AGENT_STATE_KEY, value => this.useContentCleanerAgent = value);
state.Restore(IS_AGENT_RUNNING_STATE_KEY, value => this.isAgentRunning = value);
state.Restore(USE_CONTENT_CLEANER_STATE_KEY, value => this.useContentCleaner = value);
state.Restore(IS_CLEANER_RUNNING_STATE_KEY, value => this.isCleanerRunning = value);
state.Restore(WEB_CONTENT_URL_STATE_KEY, value => this.webContentURL = value);
state.Restore(INPUT_LEGAL_DOCUMENT_STATE_KEY, value => this.inputLegalDocument = value);
state.Restore(INPUT_QUESTIONS_STATE_KEY, value => this.inputQuestions = value);