mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 04:51:36 +00:00
Renamed the settings of AI tasks (#1239)
This commit is contained in:
1 parent
d19d3d431b
commit
a117074972
109 files changed
+3929
-538
No files matched your search
@@ -9,20 +9,20 @@
|
||||
|
||||
@if (!this.SettingsManager.ConfigurationData.SWOTAnalysis.HideWebContentReader)
|
||||
{
|
||||
<ReadWebContent @bind-Content="@this.inputText" @bind-URL="@this.webContentURL" ProviderSettings="@this.ProviderSettings" @bind-AgentIsRunning="@this.isAgentRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleanerAgent="@this.useContentCleanerAgent"/>
|
||||
<ReadWebContent @bind-Content="@this.inputText" @bind-URL="@this.webContentURL" ProviderSettings="@this.ProviderSettings" @bind-CleanerIsRunning="@this.isCleanerRunning" @bind-Preselect="@this.showWebContentReader" @bind-PreselectContentCleaner="@this.useContentCleaner"/>
|
||||
}
|
||||
<MudText Typo="Typo.h5" Class="mb-3">
|
||||
@T("Input")
|
||||
</MudText>
|
||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Value="@this.inputText" Validation="@this.ValidatingText" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.INPUT_TEXT" Adornment="Adornment.Start" Label="@T("Subject of analysis")" 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.inputText" Validation="@this.ValidatingText" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.INPUT_TEXT" Adornment="Adornment.Start" Label="@T("Subject of analysis")" Variant="Variant.Outlined" Lines="6" Sizing="InputSizing.Auto" MaxLines="12" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
<ReadFileContent @bind-FileContent="@this.inputText" MediaImportTargetId="swot-analysis-subject" EnableDragDrop="true" CatchAllDocuments="true"/>
|
||||
|
||||
<MudText Typo="Typo.h5" Class="mb-3 mt-6">
|
||||
@T("Analysis Options")
|
||||
</MudText>
|
||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Value="@this.analysisGoal" Validation="@this.ValidatingAnalysisGoal" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.ANALYSIS_GOAL" Adornment="Adornment.Start" Label="@T("Analysis goal")" Variant="Variant.Outlined" Lines="4" Sizing="InputSizing.Auto" Class="mb-3"/>
|
||||
<MudTextField T="string" Disabled="@this.isCleanerRunning" @bind-Value="@this.analysisGoal" Validation="@this.ValidatingAnalysisGoal" DebounceInterval="@TextFieldDefaults.VALIDATION_DEBOUNCE_MILLISECONDS" AdornmentIcon="@AppIcons.ANALYSIS_GOAL" Adornment="Adornment.Start" Label="@T("Analysis goal")" Variant="Variant.Outlined" Lines="4" Sizing="InputSizing.Auto" Class="mb-3"/>
|
||||
<ReadFileContent @bind-FileContent="@this.analysisGoal" MediaImportTargetId="swot-analysis-goal" EnableDragDrop="true"/>
|
||||
<MudTextField T="string" Disabled="@this.isAgentRunning" @bind-Text="@this.importantAspects" AdornmentIcon="@AppIcons.IMPORTANT_ASPECTS" Adornment="Adornment.Start" Label="@T("(Optional) Analysis focus")" HelperText="@TA("Specify topics the SWOT analysis should pay particular attention to.")" Variant="Variant.Outlined" Lines="4" Sizing="InputSizing.Auto" Class="mb-3"/>
|
||||
<MudTextField T="string" Disabled="@this.isCleanerRunning" @bind-Text="@this.importantAspects" AdornmentIcon="@AppIcons.IMPORTANT_ASPECTS" Adornment="Adornment.Start" Label="@T("(Optional) Analysis focus")" HelperText="@TA("Specify topics the SWOT analysis should pay particular attention to.")" Variant="Variant.Outlined" Lines="4" Sizing="InputSizing.Auto" Class="mb-3"/>
|
||||
<ReadFileContent @bind-FileContent="@this.importantAspects" MediaImportTargetId="swot-analysis-focus" EnableDragDrop="true"/>
|
||||
|
||||
<MudText Typo="Typo.h5" Class="mb-3 mt-6">
|
||||
|
||||
@@ -34,7 +34,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
|
||||
protected override Func<Task> SubmitAction => this.AnalyzeText;
|
||||
|
||||
protected override bool SubmitDisabled => this.isAgentRunning;
|
||||
protected override bool SubmitDisabled => this.isCleanerRunning;
|
||||
|
||||
protected override string SendToChatVisibleUserPromptText => T("Create a SWOT analysis of my content");
|
||||
|
||||
@@ -53,7 +53,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
if (!this.MightPreselectValues())
|
||||
{
|
||||
this.showWebContentReader = false;
|
||||
this.useContentCleanerAgent = false;
|
||||
this.useContentCleaner = false;
|
||||
this.selectedTargetLanguage = CommonLanguages.AS_IS;
|
||||
this.customTargetLanguage = string.Empty;
|
||||
this.importantAspects = string.Empty;
|
||||
@@ -65,7 +65,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
if (this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectOptions)
|
||||
{
|
||||
this.showWebContentReader = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectWebContentReader;
|
||||
this.useContentCleanerAgent = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectContentCleanerAgent;
|
||||
this.useContentCleaner = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectContentCleaner;
|
||||
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectedTargetLanguage;
|
||||
this.customTargetLanguage = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectedOtherLanguage;
|
||||
this.importantAspects = this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectedImportantAspects;
|
||||
@@ -76,13 +76,13 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
}
|
||||
|
||||
private bool showWebContentReader;
|
||||
private bool useContentCleanerAgent;
|
||||
private bool useContentCleaner;
|
||||
private string webContentURL = string.Empty;
|
||||
private string inputText = string.Empty;
|
||||
private string analysisGoal = string.Empty;
|
||||
private string importantAspects = string.Empty;
|
||||
private HashSet<FileAttachment> contextMaterials = [];
|
||||
private bool isAgentRunning;
|
||||
private bool isCleanerRunning;
|
||||
private CommonLanguages selectedTargetLanguage = CommonLanguages.AS_IS;
|
||||
private string customTargetLanguage = string.Empty;
|
||||
private SwotAnalysisResult? analysisResult;
|
||||
@@ -103,13 +103,13 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
private Guid sharedResearchChatId;
|
||||
private string OutputLanguageInstruction => this.selectedTargetLanguage.PromptGeneralPurpose(this.customTargetLanguage);
|
||||
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> USE_CONTENT_CLEANER_STATE_KEY = new(nameof(useContentCleaner));
|
||||
private static readonly AssistantSessionStateKey<string> WEB_CONTENT_URL_STATE_KEY = new(nameof(webContentURL));
|
||||
private static readonly AssistantSessionStateKey<string> INPUT_TEXT_STATE_KEY = new(nameof(inputText));
|
||||
private static readonly AssistantSessionStateKey<string> ANALYSIS_GOAL_STATE_KEY = new(nameof(analysisGoal));
|
||||
private static readonly AssistantSessionStateKey<string> IMPORTANT_ASPECTS_STATE_KEY = new(nameof(importantAspects));
|
||||
private static readonly AssistantSessionStateKey<HashSet<FileAttachment>> CONTEXT_MATERIALS_STATE_KEY = new(nameof(contextMaterials));
|
||||
private static readonly AssistantSessionStateKey<bool> IS_AGENT_RUNNING_STATE_KEY = new(nameof(isAgentRunning));
|
||||
private static readonly AssistantSessionStateKey<bool> IS_CLEANER_RUNNING_STATE_KEY = new(nameof(isCleanerRunning));
|
||||
private static readonly AssistantSessionStateKey<CommonLanguages> SELECTED_TARGET_LANGUAGE_STATE_KEY = new(nameof(selectedTargetLanguage));
|
||||
private static readonly AssistantSessionStateKey<string> CUSTOM_TARGET_LANGUAGE_STATE_KEY = new(nameof(customTargetLanguage));
|
||||
private static readonly AssistantSessionStateKey<SwotAnalysisResult?> ANALYSIS_RESULT_STATE_KEY = new(nameof(analysisResult));
|
||||
@@ -123,13 +123,13 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
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(USE_CONTENT_CLEANER_STATE_KEY, this.useContentCleaner);
|
||||
state.Set(WEB_CONTENT_URL_STATE_KEY, this.webContentURL);
|
||||
state.Set(INPUT_TEXT_STATE_KEY, this.inputText);
|
||||
state.Set(ANALYSIS_GOAL_STATE_KEY, this.analysisGoal);
|
||||
state.Set(IMPORTANT_ASPECTS_STATE_KEY, this.importantAspects);
|
||||
state.SetHashSet(CONTEXT_MATERIALS_STATE_KEY, this.contextMaterials);
|
||||
state.Set(IS_AGENT_RUNNING_STATE_KEY, this.isAgentRunning);
|
||||
state.Set(IS_CLEANER_RUNNING_STATE_KEY, this.isCleanerRunning);
|
||||
state.Set(SELECTED_TARGET_LANGUAGE_STATE_KEY, this.selectedTargetLanguage);
|
||||
state.Set(CUSTOM_TARGET_LANGUAGE_STATE_KEY, this.customTargetLanguage);
|
||||
state.Set(ANALYSIS_RESULT_STATE_KEY, this.analysisResult);
|
||||
@@ -144,13 +144,13 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
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(USE_CONTENT_CLEANER_STATE_KEY, value => this.useContentCleaner = value);
|
||||
state.Restore(WEB_CONTENT_URL_STATE_KEY, value => this.webContentURL = value);
|
||||
state.Restore(INPUT_TEXT_STATE_KEY, value => this.inputText = value);
|
||||
state.Restore(ANALYSIS_GOAL_STATE_KEY, value => this.analysisGoal = value);
|
||||
state.Restore(IMPORTANT_ASPECTS_STATE_KEY, value => this.importantAspects = value);
|
||||
state.RestoreHashSet(CONTEXT_MATERIALS_STATE_KEY, this.contextMaterials);
|
||||
state.Restore(IS_AGENT_RUNNING_STATE_KEY, value => this.isAgentRunning = value);
|
||||
state.Restore(IS_CLEANER_RUNNING_STATE_KEY, value => this.isCleanerRunning = value);
|
||||
state.Restore(SELECTED_TARGET_LANGUAGE_STATE_KEY, value => this.selectedTargetLanguage = value);
|
||||
state.Restore(CUSTOM_TARGET_LANGUAGE_STATE_KEY, value => this.customTargetLanguage = value);
|
||||
state.Restore(ANALYSIS_RESULT_STATE_KEY, value => this.analysisResult = value);
|
||||
|
||||
Reference in new issue
Block a user