mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 20:27:21 +00:00
Improved the dialogs for local data sources and the Batch Processing assistant (#1096)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
149395c1a0
commit
f7e6ceb915
45 files changed
+2514
-361
No files matched your search
@@ -10,12 +10,15 @@
|
||||
<MudForm @ref="@this.form" @bind-IsValid="@this.dataIsValid" @bind-Errors="@this.dataIssues" FieldChanged="@this.RevalidateAfterFieldChange">
|
||||
<DataSourceMissingEmbeddingWarning IsInDataSourceDialog="@true" EmbeddingProviderAdded="@this.SelectAddedEmbeddingProvider"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3">
|
||||
@T("Data source")
|
||||
</MudText>
|
||||
@* ReSharper disable once CSharpWarnings::CS8974 *@
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataName"
|
||||
Label="@T("Data Source Name")"
|
||||
Class="mb-6"
|
||||
Class="mb-3"
|
||||
MaxLength="@DataSourceValidation.MAX_NAME_LENGTH"
|
||||
Counter="@DataSourceValidation.MAX_NAME_LENGTH"
|
||||
Immediate="@true"
|
||||
@@ -31,7 +34,7 @@
|
||||
T="string"
|
||||
@bind-Text="@this.dataDescription"
|
||||
Label="@T("Description")"
|
||||
Class="mb-6"
|
||||
Class="mb-0"
|
||||
MaxLength="200"
|
||||
Counter="200"
|
||||
Immediate="@true"
|
||||
@@ -44,7 +47,10 @@
|
||||
Lines="3"
|
||||
/>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Folder")
|
||||
</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Select a root directory for this data source.")
|
||||
</MudJustifiedText>
|
||||
<SelectDirectory @bind-Directory="@this.dataPath" Label="@T("Selected base directory for this data source")" DirectoryDialogTitle="@T("Select the base directory")" Validation="@this.dataSourceValidation.ValidatePath" EnableDragDrop="true" CatchAllDocuments="true" />
|
||||
@@ -57,28 +63,42 @@
|
||||
LabelOff="@T("No, only index files in the selected folder")"
|
||||
/>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@T("Select the file patterns this data source should index.")
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Files to include")
|
||||
</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Select the file patterns this data source should index. Audio and video files, e.g., *.mp3 or *.mp4, are transcribed by your transcription provider.")
|
||||
</MudJustifiedText>
|
||||
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataFilePatterns"
|
||||
Label="@T("File patterns")"
|
||||
Class="mb-3"
|
||||
Immediate="@true"
|
||||
Validation="@this.dataSourceValidation.ValidateFilePatterns"
|
||||
HelperText="@T("Which files should be indexed? Separate multiple patterns with a semicolon, e.g., *.txt;*.pdf;*.docx;.gitignore. Use :documents: for every document and readable text file, :text: for readable text files only, or * for every file. Audio and video files, e.g., *.mp3 or *.mp4, are transcribed by your transcription provider.")"
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.FilterAlt"
|
||||
AdornmentColor="Color.Info"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
/>
|
||||
<FilePatternSelection>
|
||||
<AllowedContent>
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataFilePatterns"
|
||||
Label="@T("Files to include")"
|
||||
Immediate="@true"
|
||||
Validation="@this.dataSourceValidation.ValidateFilePatterns"
|
||||
Adornment="Adornment.End"
|
||||
AdornmentIcon="@Icons.Material.Filled.Restore"
|
||||
OnAdornmentClick="@this.RestoreDefaultFilePatterns"
|
||||
AdornmentAriaLabel="@T("Restore default patterns")"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense"
|
||||
Lines="1"
|
||||
AutoGrow="@true"
|
||||
MaxLines="@FilePatternSelection.MAX_FIELD_LINES"
|
||||
Class="pattern-text-field"
|
||||
/>
|
||||
</AllowedContent>
|
||||
</FilePatternSelection>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@T("In order for the AI to be able to determine the appropriate data at any time, you must choose an embedding provider.")
|
||||
</MudJustifiedText>
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Embedding")
|
||||
</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Choose an embedding provider to make this data source searchable.")
|
||||
</MudText>
|
||||
<MudSelect @ref="@this.embeddingSelect" @bind-Value="@this.dataEmbeddingId" Label="@T("Embedding")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateEmbeddingProviderAccess">
|
||||
@foreach (var provider in this.SettingsManager.GetAllEmbeddingProviders())
|
||||
{
|
||||
@@ -94,14 +114,17 @@
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||
{
|
||||
<MudJustifiedText Typo="Typo.body1" Color="Color.Tertiary" Class="mb-3">
|
||||
<MudJustifiedText Typo="Typo.body2" Color="Color.Tertiary" Class="mb-3">
|
||||
@T("The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.")
|
||||
</MudJustifiedText>
|
||||
}
|
||||
|
||||
<ManagePandocDependency IntroText="@T("For some data types, such as Office files, MindWork AI Studio requires the open-source application Pandoc.")"/>
|
||||
<ManagePandocDependency IntroText="@T("MindWork AI Studio uses Pandoc to read HTML files.")"/>
|
||||
|
||||
<MudSelect @ref="@this.confidenceLevelSelect" @bind-Value="@this.dataConfidenceLevel" Text="@this.dataConfidenceLevel.GetName()" Label="@T("Required provider confidence level")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateDataSourceConfidenceLevel">
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Data sharing")
|
||||
</MudText>
|
||||
<MudSelect @ref="@this.confidenceLevelSelect" @bind-Value="@this.dataConfidenceLevel" Text="@this.dataConfidenceLevel.GetName()" Label="@T("Required provider confidence level")" HelperText="@T("Only providers with this confidence level or higher may receive and process data from this data source.")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateDataSourceConfidenceLevel">
|
||||
@foreach (var level in this.ConfidenceLevels)
|
||||
{
|
||||
<MudSelectItem Value="@level.Value">
|
||||
@@ -125,6 +148,7 @@
|
||||
</MudButton>
|
||||
<MudDivider/>
|
||||
<MudCollapse Expanded="@this.showExpertSettings" Class="@this.GetExpertStyles">
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2">@T("Hidden files and folders")</MudText>
|
||||
<MudTextSwitch
|
||||
Label="@T("Include hidden files and folders?")"
|
||||
Value="@this.dataIncludeHiddenFilesAndFolders"
|
||||
@@ -135,21 +159,10 @@
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Hidden are files and folders whose names start with a dot, such as .git or .env, and those hidden by the operating system. A file pattern which starts with a dot, such as .gitignore, selects such files anyway.")
|
||||
</MudJustifiedText>
|
||||
@* Without an icon: in a field of several lines, it floats in the middle of the text. *@
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataExcludePatterns"
|
||||
Label="@T("Excluded files and folders")"
|
||||
Lines="@FileExclusions.DEFAULT_LINE_COUNT"
|
||||
AutoGrow="@true"
|
||||
MaxLines="@FileExclusions.MAX_LINE_COUNT"
|
||||
Immediate="@true"
|
||||
Validation="@this.dataSourceValidation.ValidateExcludePatterns"
|
||||
HelperText="@T("These files and folders are left out, even when a file pattern selects them. Separate entries with a semicolon or a line break. End an entry with a slash to exclude every folder of that name, e.g., node_modules/. Other entries name files, e.g., *.min.js.")"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Variant="Variant.Outlined"
|
||||
/>
|
||||
<RestoreDefaultButton Text="@T("Restore default")" OnClick="@this.RestoreDefaultExcludePatterns" Class="mb-3"/>
|
||||
<div class="mt-4">
|
||||
<FileExclusionEditor @bind-Text="@this.dataExcludePatterns" Label="@T("Excluded files and folders")" ResetButtonText="@T("Restore default")"/>
|
||||
</div>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("File size limit")</MudText>
|
||||
<MudNumericField
|
||||
T="int"
|
||||
@bind-Value="@this.dataMaxFileSizeMegabytes"
|
||||
@@ -161,6 +174,10 @@
|
||||
Variant="Variant.Outlined"
|
||||
Adornment="Adornment.End"
|
||||
AdornmentText="MB"/>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("Text chunking")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Optional expert settings for how this data source is split before embedding.")
|
||||
</MudJustifiedText>
|
||||
@if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||
{
|
||||
<MudTextField
|
||||
@@ -174,9 +191,6 @@
|
||||
AdornmentIcon="@Icons.Material.Filled.TextFields"
|
||||
AdornmentColor="Color.Info"/>
|
||||
}
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@T("Optional expert settings for how this data source is split before embedding.")
|
||||
</MudJustifiedText>
|
||||
<MudNumericField
|
||||
@ref="@this.maxChunkTokenLengthField"
|
||||
T="int"
|
||||
@@ -204,6 +218,7 @@
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
||||
AdornmentColor="Color.Info"/>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("Search results")</MudText>
|
||||
<MudNumericField
|
||||
T="ushort"
|
||||
Min="10"
|
||||
|
||||
@@ -253,7 +253,7 @@ public partial class DataSourceLocalDirectoryDialog : MSGComponentBase
|
||||
Path = this.dataPath,
|
||||
FilePatterns = this.NormalizeFilePatterns(),
|
||||
|
||||
// Kept as typed, since the line breaks group the entries for the eye:
|
||||
// Unlike the file patterns, no normalizing, since the exclusion editor passes on valid lists only:
|
||||
ExcludePatterns = this.dataExcludePatterns,
|
||||
MaxFileSizeMegabytes = this.dataMaxFileSizeMegabytes,
|
||||
IncludeSubdirectories = this.dataIncludeSubdirectories,
|
||||
@@ -301,7 +301,7 @@ public partial class DataSourceLocalDirectoryDialog : MSGComponentBase
|
||||
|
||||
private string NormalizeFilePatterns() => FileNamePatterns.Normalize(this.dataFilePatterns);
|
||||
|
||||
private void RestoreDefaultExcludePatterns() => this.dataExcludePatterns = FileExclusions.DEFAULT_PATTERNS;
|
||||
private void RestoreDefaultFilePatterns() => this.dataFilePatterns = DataSourceLocalDirectory.DEFAULT_FILE_PATTERNS;
|
||||
|
||||
/// <summary>
|
||||
/// Gives the fields which are checked against each other a fresh verdict: the embedding provider
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("Path")" Value="@this.DataSource.Path" ClipboardTooltipSubject="@T("this path")"/>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.AccountTree" Label="@T("Include subfolders")" Value="@(this.DataSource.IncludeSubdirectories ? T("Yes") : T("No"))" ClipboardTooltipSubject="@T("whether subfolders are included")"/>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.VisibilityOff" Label="@T("Include hidden files and folders")" Value="@(this.DataSource.IncludeHiddenFilesAndFolders ? T("Yes") : T("No"))" ClipboardTooltipSubject="@T("whether hidden files and folders are included")"/>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FilterAlt" Label="@T("File patterns")" Value="@this.DataSource.EffectiveFilePatterns" ClipboardTooltipSubject="@T("the file patterns")"/>
|
||||
<TextInfoLines Label="@T("Excluded files and folders")" Value="@this.DataSource.EffectiveExcludePatterns" ClipboardTooltipSubject="@T("the excluded files and folders")"/>
|
||||
<TextInfoLines Icon="@Icons.Material.Filled.FilterAlt" Label="@T("Files to include")" Value="@this.DataSource.EffectiveFilePatterns" Lines="1" MaxLines="@FilePatternSelection.MAX_FIELD_LINES" ClipboardTooltipSubject="@T("the file patterns")"/>
|
||||
<TextInfoLines Icon="@Icons.Material.Filled.FolderOff" Label="@T("Excluded folders")" Value="@this.Exclusions.Folders" Lines="1" MaxLines="@FilePatternSelection.MAX_FIELD_LINES" ClipboardTooltipSubject="@T("the excluded folders")"/>
|
||||
<TextInfoLines Icon="@Icons.Material.Filled.FilterAltOff" Label="@T("Excluded files")" Value="@this.Exclusions.Files" Lines="1" MaxLines="@FilePatternSelection.MAX_FIELD_LINES" ClipboardTooltipSubject="@T("the excluded files")"/>
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.Straighten" Label="@T("Ignore files larger than")" Value="@FolderFileSelection.MegabytesToBytes(this.DataSource.EffectiveMaxFileSizeMegabytes).FileSize()" ClipboardTooltipSubject="@T("the size limit for files")"/>
|
||||
@if (!this.IsDirectoryAvailable)
|
||||
{
|
||||
@@ -66,4 +67,4 @@
|
||||
@T("Close")
|
||||
</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
||||
</MudDialog>
|
||||
@@ -60,6 +60,8 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase
|
||||
|
||||
private bool IsDirectoryAvailable => this.directoryInfo.Exists;
|
||||
|
||||
private FileExclusionGroups Exclusions => FileExclusions.Group(this.DataSource.EffectiveExcludePatterns);
|
||||
|
||||
/// <summary>
|
||||
/// The level which applies, including what the organization demands.
|
||||
/// </summary>
|
||||
|
||||
@@ -10,12 +10,15 @@
|
||||
<MudForm @ref="@this.form" @bind-IsValid="@this.dataIsValid" @bind-Errors="@this.dataIssues" FieldChanged="@this.RevalidateAfterFieldChange">
|
||||
<DataSourceMissingEmbeddingWarning IsInDataSourceDialog="@true" EmbeddingProviderAdded="@this.SelectAddedEmbeddingProvider"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3">
|
||||
@T("Data source")
|
||||
</MudText>
|
||||
@* ReSharper disable once CSharpWarnings::CS8974 *@
|
||||
<MudTextField
|
||||
T="string"
|
||||
@bind-Text="@this.dataName"
|
||||
Label="@T("Data Source Name")"
|
||||
Class="mb-6"
|
||||
Class="mb-3"
|
||||
MaxLength="@DataSourceValidation.MAX_NAME_LENGTH"
|
||||
Counter="@DataSourceValidation.MAX_NAME_LENGTH"
|
||||
Immediate="@true"
|
||||
@@ -31,7 +34,7 @@
|
||||
T="string"
|
||||
@bind-Text="@this.dataDescription"
|
||||
Label="@T("Description")"
|
||||
Class="mb-6"
|
||||
Class="mb-0"
|
||||
MaxLength="200"
|
||||
Counter="200"
|
||||
Immediate="@true"
|
||||
@@ -44,14 +47,20 @@
|
||||
Lines="3"
|
||||
/>
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("File")
|
||||
</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Select a file for this data source. The content of this file will be processed for the data source. An audio or video file is transcribed by your transcription provider first.")
|
||||
</MudJustifiedText>
|
||||
<SelectFile @bind-File="@this.dataFilePath" Label="@T("Selected file path for this data source")" FileDialogTitle="@T("Select the file")" Validation="@this.dataSourceValidation.ValidateFilePath" EnableDragDrop="true" CatchAllDocuments="true" />
|
||||
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@T("In order for the AI to be able to determine the appropriate data at any time, you must choose an embedding provider.")
|
||||
</MudJustifiedText>
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Embedding")
|
||||
</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Choose an embedding provider to make this data source searchable.")
|
||||
</MudText>
|
||||
<MudSelect @ref="@this.embeddingSelect" @bind-Value="@this.dataEmbeddingId" Label="@T("Embedding")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateEmbeddingProviderAccess">
|
||||
@foreach (var provider in this.SettingsManager.GetAllEmbeddingProviders())
|
||||
{
|
||||
@@ -67,14 +76,17 @@
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||
{
|
||||
<MudJustifiedText Typo="Typo.body1" Color="Color.Tertiary" Class="mb-3">
|
||||
<MudJustifiedText Typo="Typo.body2" Color="Color.Tertiary" Class="mb-3">
|
||||
@T("The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.")
|
||||
</MudJustifiedText>
|
||||
}
|
||||
|
||||
<ManagePandocDependency IntroText="@T("For some data types, such as Office files, MindWork AI Studio requires the open-source application Pandoc.")"/>
|
||||
<ManagePandocDependency IntroText="@T("MindWork AI Studio uses Pandoc to read HTML files.")"/>
|
||||
|
||||
<MudSelect @ref="@this.confidenceLevelSelect" @bind-Value="@this.dataConfidenceLevel" Text="@this.dataConfidenceLevel.GetName()" Label="@T("Required provider confidence level")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateDataSourceConfidenceLevel">
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||
@T("Data sharing")
|
||||
</MudText>
|
||||
<MudSelect @ref="@this.confidenceLevelSelect" @bind-Value="@this.dataConfidenceLevel" Text="@this.dataConfidenceLevel.GetName()" Label="@T("Required provider confidence level")" HelperText="@T("Only providers with this confidence level or higher may receive and process data from this data source.")" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateDataSourceConfidenceLevel">
|
||||
@foreach (var level in this.ConfidenceLevels)
|
||||
{
|
||||
<MudSelectItem Value="@level.Value">
|
||||
@@ -98,6 +110,10 @@
|
||||
</MudButton>
|
||||
<MudDivider/>
|
||||
<MudCollapse Expanded="@this.showExpertSettings" Class="@this.GetExpertStyles">
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2">@T("Text chunking")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@T("Optional expert settings for how this data source is split before embedding.")
|
||||
</MudJustifiedText>
|
||||
@if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||
{
|
||||
<MudTextField
|
||||
@@ -111,9 +127,6 @@
|
||||
AdornmentIcon="@Icons.Material.Filled.TextFields"
|
||||
AdornmentColor="Color.Info"/>
|
||||
}
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@T("Optional expert settings for how this data source is split before embedding.")
|
||||
</MudJustifiedText>
|
||||
<MudNumericField
|
||||
@ref="@this.maxChunkTokenLengthField"
|
||||
T="int"
|
||||
@@ -141,6 +154,7 @@
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
||||
AdornmentColor="Color.Info"/>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("Search results")</MudText>
|
||||
<MudNumericField
|
||||
T="ushort"
|
||||
Min="10"
|
||||
|
||||
@@ -20,9 +20,18 @@
|
||||
<MudText Typo="Typo.h6" Class="mb-3">@T("Input")</MudText>
|
||||
<ConfigurationDirectory OptionDescription="@T("Default input folder")" Disabled="@this.DefaultsDisabled" DirectoryDialogTitle="@T("Select the default input folder")" Text="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.InputDirectory)" TextUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.InputDirectory = value)" OptionHelp="@T("Leave empty when an input folder should be selected for every batch run.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.InputDirectory, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationOption OptionDescription="@T("Include subfolders by default?")" Disabled="@this.DefaultsDisabled" LabelOn="@T("Subfolders are included")" LabelOff="@T("Only the selected folder is processed")" State="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.IncludeSubdirectories)" StateUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.IncludeSubdirectories = value)" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.IncludeSubdirectories, out var meta) && meta.IsLocked"/>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("Hidden files and folders")</MudText>
|
||||
<ConfigurationOption OptionDescription="@T("Include hidden files and folders by default?")" Disabled="@this.DefaultsDisabled" LabelOn="@T("Hidden files and folders are included")" LabelOff="@T("Hidden files and folders are ignored")" State="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.IncludeHiddenFilesAndFolders)" StateUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.IncludeHiddenFilesAndFolders = value)" OptionHelp="@T("Hidden are files and folders whose names start with a dot, such as .git or .env, and those hidden by the operating system. A file pattern which starts with a dot, such as .gitignore, selects such files anyway.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.IncludeHiddenFilesAndFolders, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationText OptionDescription="@T("Default file patterns")" Disabled="@this.DefaultsDisabled" Icon="@Icons.Material.Filled.FilterAlt" Text="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.FilePatterns)" TextUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.FilePatterns = value)" ResetValue="@(() => DataBatchProcessing.DEFAULT_FILE_PATTERNS)" ResetButtonText="@T("Restore default patterns")" OptionHelp="@T("Separate multiple file patterns with a semicolon, e.g., *.pdf;*.docx. The standard patterns include all supported audio and video formats as well as images in JPG, PNG, WebP, GIF, BMP, and TIFF format.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.FilePatterns, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationText OptionDescription="@T("Default excluded files and folders")" Disabled="@this.DefaultsDisabled" Icon="@Icons.Material.Filled.FilterAltOff" Text="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.ExcludePatterns)" TextUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.ExcludePatterns = value)" NumLines="@FileExclusions.DEFAULT_LINE_COUNT" MaxLines="@FileExclusions.MAX_LINE_COUNT" ResetValue="@(() => FileExclusions.DEFAULT_PATTERNS)" ResetButtonText="@T("Restore default")" OptionHelp="@T("These files and folders are left out, even when a file pattern selects them. Separate entries with a semicolon or a line break. End an entry with a slash to exclude every folder of that name, e.g., node_modules/. Other entries name files, e.g., *.min.js.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.ExcludePatterns, out var meta) && meta.IsLocked"/>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("Files to include")</MudText>
|
||||
<FilePatternSelection>
|
||||
<AllowedContent>
|
||||
<ConfigurationText Compact="@true" ExpandToContent="@true" OptionDescription="@T("Files to include")" Disabled="@this.DefaultsDisabled" Icon="@Icons.Material.Filled.FilterAlt" Text="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.FilePatterns)" TextUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.FilePatterns = value)" ResetValue="@(() => DataBatchProcessing.DEFAULT_FILE_PATTERNS)" ResetButtonText="@T("Restore default patterns")" ResetButtonIconOnly="@true" OptionHelp="@T("Separate multiple file patterns with a semicolon, e.g., *.pdf;*.docx. The standard patterns include all supported audio and video formats as well as images in JPG, PNG, WebP, GIF, BMP, and TIFF format.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.FilePatterns, out var meta) && meta.IsLocked"/>
|
||||
</AllowedContent>
|
||||
<ExcludedContent>
|
||||
<ConfigurationFileExclusions Compact="@true" ShowHelp="@false" OptionDescription="@T("Default excluded files and folders")" Disabled="@this.DefaultsDisabled" Text="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.ExcludePatterns)" TextUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.ExcludePatterns = value)" Validation="@FileExclusions.Validate" ResetValue="@(() => FileExclusions.DEFAULT_PATTERNS)" ResetButtonText="@T("Restore default")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.ExcludePatterns, out var meta) && meta.IsLocked"/>
|
||||
</ExcludedContent>
|
||||
</FilePatternSelection>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2 mt-4">@T("File size limit")</MudText>
|
||||
<ConfigurationNumber T="int" OptionDescription="@T("Ignore files larger than")" Min="@FolderFileSelection.SMALLEST_MAX_FILE_SIZE_MEGABYTES" Unit="MB" Disabled="@this.DefaultsDisabled" Value="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.MaxFileSizeMegabytes)" ValueUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.MaxFileSizeMegabytes = value)" OptionHelp="@T("Matching files above this size are left out of a batch run, e.g., images of virtual machines.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MaxFileSizeMegabytes, out var meta) && meta.IsLocked"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("Instructions")</MudText>
|
||||
|
||||
Reference in new issue
Block a user