diff --git a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor
index b8e781ef8..3075db2b9 100644
--- a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor
+++ b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor
@@ -200,18 +200,9 @@ else
@T("Processing pace")
-@if (MinimumDelayIsManaged)
-{
-
- @(string.Format(TA("Your organization requires a pause of at least {0} seconds between files."), this.ManagedMinimumDelaySeconds))
-
-}
-else
-{
-
-}
-
-
+
@T("Before the next file starts, AI Studio waits for a random number of whole seconds from this interval. The minimum is always 6 seconds and the maximum is 300 seconds (5 minutes). Restored files and the end of a run do not add another pause.")
diff --git a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Delay.cs b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Delay.cs
index 0b1b88769..de1f00de4 100644
--- a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Delay.cs
+++ b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Delay.cs
@@ -1,5 +1,5 @@
-using AIStudio.Settings;
using AIStudio.Settings.DataModel;
+using AIStudio.Tools.Pauses;
using Microsoft.AspNetCore.Components;
@@ -10,27 +10,40 @@ public partial class AssistantBatchProcessing
[Inject]
private ThreadSafeRandom Rng { get; init; } = null!;
- private static bool MinimumDelayIsManaged => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MinimumDelaySeconds, out var meta)
- && meta.ManagedMode is not null;
+ ///
+ /// The lower bound of the pause between two files as it stands.
+ ///
+ ///
+ /// A bound which a configuration plugin locks belongs to the organization, so it comes from the
+ /// settings, whatever this assistant held before, e.g., in a session from before the lock.
+ ///
+ private int MinimumDelaySeconds => DataBatchProcessing.IsMinimumPauseLocked
+ ? this.SettingsManager.ConfigurationData.BatchProcessing.MinimumDelaySeconds
+ : this.minimumDelaySeconds;
- private int ManagedMinimumDelaySeconds => Math.Clamp(this.SettingsManager.ConfigurationData.BatchProcessing.MinimumDelaySeconds,
- DataBatchProcessing.MIN_DELAY_SECONDS,
- DataBatchProcessing.MAX_DELAY_SECONDS);
+ ///
+ /// The upper bound of the pause between two files as it stands, cf. MinimumDelaySeconds.
+ ///
+ private int MaximumDelaySeconds => DataBatchProcessing.IsMaximumPauseLocked
+ ? this.SettingsManager.ConfigurationData.BatchProcessing.MaximumDelaySeconds
+ : this.maximumDelaySeconds;
- private int EffectiveMinimumDelaySeconds => MinimumDelayIsManaged ? this.ManagedMinimumDelaySeconds
- : Math.Clamp(this.minimumDelaySeconds, DataBatchProcessing.MIN_DELAY_SECONDS, DataBatchProcessing.MAX_DELAY_SECONDS);
-
- private (int Minimum, int Maximum) GetEffectiveDelayRange()
- {
- var minimum = this.EffectiveMinimumDelaySeconds;
- var maximum = Math.Clamp(this.maximumDelaySeconds, minimum, DataBatchProcessing.MAX_DELAY_SECONDS);
- return (minimum, maximum);
- }
+ ///
+ /// The bounds of the pause between two files which apply to a run, cf. PauseRange.GetEffective.
+ ///
+ private PauseRange EffectivePauseRange => PauseRange.GetEffective(
+ DataBatchProcessing.PAUSE_LIMITS,
+ this.MinimumDelaySeconds,
+ () => DataBatchProcessing.IsMinimumPauseLocked,
+ this.MaximumDelaySeconds,
+ () => DataBatchProcessing.IsMaximumPauseLocked);
///
/// Waits for a random, inclusive duration before the next file starts.
///
- private async Task WaitBeforeNextFileAsync(int minimumSeconds, int maximumSeconds, CancellationToken token)
+ /// The bounds of the pause, as they apply to the run.
+ /// Ends the wait when the user stops the run.
+ private async Task WaitBeforeNextFileAsync(PauseRange range, CancellationToken token)
{
if (token.IsCancellationRequested)
return;
@@ -38,12 +51,12 @@ public partial class AssistantBatchProcessing
// ThreadSafeRandom is the application-wide singleton. Batch runs must
// not create private Random instances because several runs may execute
// concurrently in different assistant sessions.
- this.pauseBeforeNextFileSeconds = this.Rng.Next(minimumSeconds, maximumSeconds + 1);
+ this.pauseBeforeNextFileSeconds = this.Rng.Next(range.MinimumSeconds, range.MaximumSeconds + 1);
this.Logger.LogInformation("Batch processing waits {DelaySeconds} seconds before starting the next file.", this.pauseBeforeNextFileSeconds);
await this.CheckpointAssistantSession();
await this.RefreshAssistantUIAsync();
-
+
try
{
await Task.Delay(TimeSpan.FromSeconds(this.pauseBeforeNextFileSeconds), token);
diff --git a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Run.cs b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Run.cs
index 84ee299c5..833074b2f 100644
--- a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Run.cs
+++ b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.Run.cs
@@ -119,7 +119,7 @@ public partial class AssistantBatchProcessing
{
this.isProcessingBatch = true;
var stopwatch = Stopwatch.StartNew();
- var delayRange = this.GetEffectiveDelayRange();
+ var pauseRange = this.EffectivePauseRange;
this.Logger.LogInformation(
"Batch processing started. InputDirectory='{InputDirectory}', OutputDirectory='{OutputDirectory}', TotalFiles={TotalFiles}, RestoredFiles={RestoredFiles}, Model='{Model}', MinimumDelaySeconds={MinimumDelaySeconds}, MaximumDelaySeconds={MaximumDelaySeconds}.",
this.inputDirectory,
@@ -127,8 +127,8 @@ public partial class AssistantBatchProcessing
this.fileResults.Count,
this.fileResults.Count(fileResult => fileResult.Status is BatchProcessingFileStatus.DONE),
this.ProviderSettings.Model,
- delayRange.Minimum,
- delayRange.Maximum);
+ pauseRange.MinimumSeconds,
+ pauseRange.MaximumSeconds);
// We use the cancellation token of the assistant base class, which
// creates it before it calls us and disposes it after we returned.
@@ -166,7 +166,7 @@ public partial class AssistantBatchProcessing
var anotherFileIsWaiting = this.fileResults.Skip(index + 1).Any(nextFile => nextFile.Status is not BatchProcessingFileStatus.DONE);
if (anotherFileIsWaiting)
- await this.WaitBeforeNextFileAsync(delayRange.Minimum, delayRange.Maximum, token);
+ await this.WaitBeforeNextFileAsync(pauseRange, token);
}
}
finally
diff --git a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.cs b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.cs
index 52f9db665..1b4141921 100644
--- a/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.cs
+++ b/app/MindWork AI Studio/Assistants/BatchProcessing/AssistantBatchProcessing.razor.cs
@@ -213,8 +213,8 @@ public partial class AssistantBatchProcessing : AssistantBaseCore
+ @this.GetRangeText(range)
+
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Components/ConfigurationPauseRange.razor.cs b/app/MindWork AI Studio/Components/ConfigurationPauseRange.razor.cs
new file mode 100644
index 000000000..8e5e15fd0
--- /dev/null
+++ b/app/MindWork AI Studio/Components/ConfigurationPauseRange.razor.cs
@@ -0,0 +1,194 @@
+using AIStudio.Tools.Pauses;
+
+using Microsoft.AspNetCore.Components;
+
+using Timer = System.Timers.Timer;
+
+namespace AIStudio.Components;
+
+///
+/// One slider with two handles for a random pause, e.g., between two indexing steps: the shortest and the longest pause.
+///
+///
+/// The slider shows the bounds which apply, as PauseRange.GetEffective works them out, and stores
+/// them that way: pushing the lower handle past the upper one takes the upper one along. A bound
+/// which a configuration plugin locks keeps its value, its handle cannot move, and the option shows
+/// a lock. The handles move in steps of five seconds; a bound off these steps, e.g., one which a
+/// configuration plugin sets, applies as it is, and only its handle shows the nearest step.
+///
+public partial class ConfigurationPauseRange : ConfigurationBaseCore
+{
+ ///
+ /// The seconds between two tick marks, and the step of the handles.
+ ///
+ private const int STEP_SECONDS = 5;
+
+ ///
+ /// Initializes the component, which shows the lock of the option while either bound is locked.
+ ///
+ public ConfigurationPauseRange()
+ {
+ this.IsLocked = () => this.IsMinimumLocked() || this.IsMaximumLocked();
+ }
+
+ ///
+ /// The shortest and the longest pause the feature allows.
+ ///
+ [Parameter, EditorRequired]
+ public PauseLimits Limits { get; set; } = null!;
+
+ ///
+ /// The lower bound as set.
+ ///
+ [Parameter]
+ public Func Minimum { get; set; } = () => 0;
+
+ ///
+ /// Sets the lower bound.
+ ///
+ [Parameter]
+ public Action MinimumUpdate { get; set; } = _ => { };
+
+ ///
+ /// Whether a configuration plugin locks the lower bound.
+ ///
+ [Parameter]
+ public Func IsMinimumLocked { get; set; } = () => false;
+
+ ///
+ /// The upper bound as set.
+ ///
+ [Parameter]
+ public Func Maximum { get; set; } = () => 0;
+
+ ///
+ /// Sets the upper bound.
+ ///
+ [Parameter]
+ public Action MaximumUpdate { get; set; } = _ => { };
+
+ ///
+ /// Whether a configuration plugin locks the upper bound.
+ ///
+ [Parameter]
+ public Func IsMaximumLocked { get; set; } = () => false;
+
+ ///
+ /// Whether the bounds are settings, which a change stores and announces to the other options.
+ ///
+ ///
+ /// Defaults to true. False for bounds which live elsewhere, e.g., in the session of an assistant.
+ ///
+ [Parameter]
+ public bool IsSetting { get; set; } = true;
+
+ ///
+ /// Stores the settings once the user stopped moving a handle: storing them with every step
+ /// would make the slider stutter, since the store runs a while.
+ ///
+ private readonly Timer storeTimer = new(TimeSpan.FromMilliseconds(500))
+ {
+ AutoReset = false
+ };
+
+ ///
+ /// Whether a change waits for storeTimer.
+ ///
+ private bool isStorePending;
+
+ private PauseRange EffectiveRange => PauseRange.GetEffective(this.Limits, this.Minimum(), this.IsMinimumLocked, this.Maximum(), this.IsMaximumLocked);
+
+ ///
+ /// The start of the track: the shortest pause, or the step right below it.
+ ///
+ private int TrackMin => this.Limits.ShortestSeconds / STEP_SECONDS * STEP_SECONDS;
+
+ ///
+ /// The end of the track: the longest pause, or the step right above it.
+ ///
+ private int TrackMax => (this.Limits.LongestSeconds + STEP_SECONDS - 1) / STEP_SECONDS * STEP_SECONDS;
+
+ #region Overrides of ConfigurationBase
+
+ ///
+ protected override bool Stretch => true;
+
+ ///
+ protected override Variant Variant => Variant.Outlined;
+
+ protected override string Label => this.OptionDescription;
+
+ #endregion
+
+ #region Overrides of ComponentBase
+
+ protected override async Task OnInitializedAsync()
+ {
+ // Off the renderer, which stays free while the settings are stored:
+ this.storeTimer.Elapsed += (_, _) => this.StoreAsync().Observe($"{nameof(ConfigurationPauseRange)}: storing the changed pause");
+ await base.OnInitializedAsync();
+ }
+
+ #endregion
+
+ #region Overrides of MSGComponentBase
+
+ protected override void DisposeResources()
+ {
+ this.storeTimer.Stop();
+ this.storeTimer.Dispose();
+
+ // A change made right before closing still reaches the disk:
+ if (this.isStorePending)
+ this.StoreAsync().Observe($"{nameof(ConfigurationPauseRange)}: storing the changed pause while closing");
+
+ base.DisposeResources();
+ }
+
+ #endregion
+
+ private string GetRangeText(PauseRange range)
+ {
+ if (range.IsNone)
+ return T("No pause");
+
+ return range.MinimumSeconds == range.MaximumSeconds
+ ? string.Format(T("{0} seconds"), range.MinimumSeconds)
+ : string.Format(T("{0} to {1} seconds"), range.MinimumSeconds, range.MaximumSeconds);
+ }
+
+ private void UpdateMinimum(int seconds) => this.ApplyBounds(seconds, this.Maximum());
+
+ private void UpdateMaximum(int seconds) => this.ApplyBounds(this.Minimum(), seconds);
+
+ ///
+ /// Sets both bounds as they apply, so that the handles show what is stored.
+ ///
+ ///
+ /// A locked bound keeps its value, even when the slider reports another one, e.g., while it
+ /// puts its handles in order.
+ ///
+ private void ApplyBounds(int minimumSeconds, int maximumSeconds)
+ {
+ var range = PauseRange.GetEffective(this.Limits, minimumSeconds, this.IsMinimumLocked, maximumSeconds, this.IsMaximumLocked);
+ if (!this.IsMinimumLocked())
+ this.MinimumUpdate(range.MinimumSeconds);
+
+ if (!this.IsMaximumLocked())
+ this.MaximumUpdate(range.MaximumSeconds);
+
+ if (!this.IsSetting)
+ return;
+
+ this.isStorePending = true;
+ this.storeTimer.Stop();
+ this.storeTimer.Start();
+ }
+
+ private async Task StoreAsync()
+ {
+ this.isStorePending = false;
+ await this.SettingsManager.StoreSettings();
+ await this.InformAboutChange();
+ }
+}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Components/DataSourceManagement.razor b/app/MindWork AI Studio/Components/DataSourceManagement.razor
index 9e2d6bf45..2e1b85bc9 100644
--- a/app/MindWork AI Studio/Components/DataSourceManagement.razor
+++ b/app/MindWork AI Studio/Components/DataSourceManagement.razor
@@ -22,10 +22,9 @@
-
-
-
-
+
@{ var embeddingStatuses = this.DataSourceEmbeddingService.GetStatuses().ToDictionary(status => status.DataSourceId, StringComparer.OrdinalIgnoreCase); }
diff --git a/app/MindWork AI Studio/Components/DataSourceManagement.razor.cs b/app/MindWork AI Studio/Components/DataSourceManagement.razor.cs
index 63980097b..69576c969 100644
--- a/app/MindWork AI Studio/Components/DataSourceManagement.razor.cs
+++ b/app/MindWork AI Studio/Components/DataSourceManagement.razor.cs
@@ -5,7 +5,6 @@ using AIStudio.Tools.Databases;
using AIStudio.Tools.ERIClient.DataModel;
using AIStudio.Tools.PluginSystem;
using AIStudio.Tools.Services;
-using AIStudio.Tools.Services.Indexing;
using Microsoft.AspNetCore.Components;
@@ -40,27 +39,6 @@ public partial class DataSourceManagement : MSGComponentBase
private bool AreMailboxesEnabled => PreviewFeatures.PRE_MAILBOXES_2026.IsEnabled(this.SettingsManager);
- private static bool IsMinimumPauseLocked => ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MinimumPauseBetweenStepsSeconds, out var meta) && meta.IsLocked;
-
- private static bool IsMaximumPauseLocked => ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MaximumPauseBetweenStepsSeconds, out var meta) && meta.IsLocked;
-
- ///
- /// A slider moves a value which falls out of its range into it. A locked slider therefore keeps
- /// the whole range, since its value belongs to the organization. A free one ends at the locked
- /// upper bound, and the free value adjusts to it, cf. PauseRange.GetEffective.
- ///
- private int MinimumPauseSliderMax => IsMaximumPauseLocked && !IsMinimumPauseLocked
- ? PauseRange.FromSettings(this.SettingsManager.ConfigurationData.App.DataSourceIndexing).MaximumSeconds
- : DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS;
-
- ///
- /// The upper bound starts where the lower bound is, so raising the lower one above it raises the
- /// upper one along with it. A locked slider keeps the whole range, cf. MinimumPauseSliderMax.
- ///
- private int MaximumPauseSliderMin => IsMaximumPauseLocked
- ? 0
- : PauseRange.FromSettings(this.SettingsManager.ConfigurationData.App.DataSourceIndexing).MinimumSeconds;
-
#region Overrides of ComponentBase
protected override async Task OnInitializedAsync()
diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor
index 50593e9e2..e57ceacf9 100644
--- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor
+++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor
@@ -86,15 +86,9 @@
@T("Processing pace")
- @if (this.MinimumDelayIsManaged)
- {
- @(string.Format(TA("Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit."), this.ManagedMinimumDelaySeconds))
- }
- else
- {
-
- }
-
+
@T("AI selection")
diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor.cs b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor.cs
index c5ce34772..476102567 100644
--- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor.cs
+++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogBatchProcessing.razor.cs
@@ -1,6 +1,5 @@
using AIStudio.Assistants.BatchProcessing;
using AIStudio.Settings;
-using AIStudio.Settings.DataModel;
namespace AIStudio.Dialogs.Settings;
@@ -8,21 +7,6 @@ public partial class SettingsDialogBatchProcessing : SettingsDialogBase
{
private bool DefaultsDisabled() => !this.SettingsManager.ConfigurationData.BatchProcessing.PreselectOptions;
- private bool MinimumDelayIsManaged => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MinimumDelaySeconds, out var meta)
- && meta.ManagedMode is not null;
-
- private int ManagedMinimumDelaySeconds => Math.Clamp(
- this.SettingsManager.ConfigurationData.BatchProcessing.MinimumDelaySeconds,
- DataBatchProcessing.MIN_DELAY_SECONDS,
- DataBatchProcessing.MAX_DELAY_SECONDS);
-
- private int EffectiveMinimumDelaySeconds => this.MinimumDelayIsManaged
- ? this.ManagedMinimumDelaySeconds
- : Math.Clamp(
- this.SettingsManager.ConfigurationData.BatchProcessing.MinimumDelaySeconds,
- DataBatchProcessing.MIN_DELAY_SECONDS,
- DataBatchProcessing.MAX_DELAY_SECONDS);
-
private bool FreePromptImportDisabled() => this.DefaultsDisabled()
|| ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.FreePrompt, out var meta) && meta.IsLocked;
diff --git a/app/MindWork AI Studio/Pages/Embeddings.razor.cs b/app/MindWork AI Studio/Pages/Embeddings.razor.cs
index 1790b712e..95d9c42f6 100644
--- a/app/MindWork AI Studio/Pages/Embeddings.razor.cs
+++ b/app/MindWork AI Studio/Pages/Embeddings.razor.cs
@@ -6,7 +6,6 @@ using AIStudio.Provider;
using AIStudio.Settings.DataModel;
using AIStudio.Tools.Rust;
using AIStudio.Tools.Services;
-using AIStudio.Tools.Services.Indexing;
using Microsoft.AspNetCore.Components;
@@ -66,7 +65,7 @@ public partial class Embeddings : MSGComponentBase
{
get
{
- var pause = PauseRange.FromSettings(this.SettingsManager.ConfigurationData.App.DataSourceIndexing);
+ var pause = this.SettingsManager.ConfigurationData.App.DataSourceIndexing.EffectivePauseRange;
if (pause.IsNone)
return string.Empty;
diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua
index 7e6142e5d..73bcda431 100644
--- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua
+++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua
@@ -869,10 +869,14 @@ CONFIG["SETTINGS"] = {}
-- CONFIG["SETTINGS"]["DataBatchProcessing.CsvSeparator"] = "SEMICOLON"
-- CONFIG["SETTINGS"]["DataBatchProcessing.CustomCsvSeparator"] = "^"
--
--- Enforce the lower end of the random pause between files for the organization.
--- The value must be between 6 and 300 seconds. Users can configure only the upper
--- end of the interval while this setting is managed by a configuration plugin.
+-- Configure the random pause between two files. Before the next file starts, AI Studio waits
+-- for a random number of whole seconds between the lower and the upper bound, both included.
+-- This spares your AI servers. Both values must be between 6 and 300 seconds; the defaults are
+-- 6 and 10 seconds. You may set one bound or both. A bound you set wins, and AI Studio adjusts
+-- the other one to it. Should the upper bound be below the lower bound, the lower bound wins.
+-- The upper bound requires AI Studio v26.11.2 or newer; older versions ignore it.
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumDelaySeconds"] = 12
+-- CONFIG["SETTINGS"]["DataBatchProcessing.MaximumDelaySeconds"] = 30
--
-- Configure the minimum provider confidence and the default provider.
-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH
@@ -899,6 +903,8 @@ CONFIG["SETTINGS"] = {}
-- CONFIG["SETTINGS"]["DataBatchProcessing.ResultColumnHeader.AllowUserOverride"] = true
-- CONFIG["SETTINGS"]["DataBatchProcessing.CsvSeparator.AllowUserOverride"] = true
-- CONFIG["SETTINGS"]["DataBatchProcessing.CustomCsvSeparator.AllowUserOverride"] = true
+-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumDelaySeconds.AllowUserOverride"] = true
+-- CONFIG["SETTINGS"]["DataBatchProcessing.MaximumDelaySeconds.AllowUserOverride"] = true
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumProviderConfidence.AllowUserOverride"] = true
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProvider.AllowUserOverride"] = true
diff --git a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua
index 7f10fd9cb..0a89aefb0 100644
--- a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua
+++ b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua
@@ -423,12 +423,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- These tools are part of the selected policy and cannot be changed here. Every tool has to meet the confidence requirements of the selected provider, so a tool may stay unavailable even when the policy permits it.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1133257227"] = "Diese Werkzeuge sind Teil des ausgewählten Regelwerks und können hier nicht geändert werden. Jedes Werkzeug muss die Vertrauensanforderungen des ausgewählten Anbieters erfüllen. Daher kann ein Werkzeug weiterhin nicht verfügbar sein, selbst wenn das Regelwerk es zulässt."
--- Your organization requires a pause of at least {0} seconds between files.
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1155517317"] = "Ihre Organisation verlangt eine Pause von mindestens {0} Sekunden zwischen den Dateien."
-
--- Your organization requires a pause of at least {0} seconds between files.
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1155517317::INFORMAL"] = "Deine Organisation verlangt eine Pause von mindestens {0} Sekunden zwischen den Dateien."
-
-- The results table contains one row per document, starting with the file name. Here you can name the column that holds the AI answer, e.g., Summary. When left empty, we use 'Result'.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1164512104"] = "Die Ergebnistabelle enthält eine Zeile pro Dokument, beginnend mit dem Dateinamen. Hier können Sie die Spalte benennen, welche die Antwort der KI enthält, z. B. Zusammenfassung. Wenn Sie das Feld leer lassen, verwenden wir „Ergebnis“."
@@ -510,18 +504,12 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- Waiting {0} seconds before starting the next file.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1708373046"] = "Die nächste Datei startet in {0} Sekunden."
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1723256298"] = "Sekunden"
-
-- The selected folder does not exist.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T17705912"] = "Der ausgewählte Ordner existiert nicht."
-- The image was no longer available while the model was asked about it.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1805791865"] = "Das Bild war nicht mehr verfügbar, während das Modell dazu befragt wurde."
--- Minimum pause between files
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1829787634"] = "Mindestpause zwischen Dateien"
-
-- Was not able to read the input folder: {0}
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1871021621"] = "Der Eingabeordner konnte nicht gelesen werden: {0}"
@@ -669,9 +657,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- The selected model cannot read images, so the {0} images among the selected files will fail. All other files are processed as usual.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T324865195"] = "Das ausgewählte Modell kann keine Bilder lesen, daher schlägt die Verarbeitung der {0} Bilder unter den ausgewählten Dateien fehl. Alle anderen Dateien werden wie gewohnt verarbeitet."
--- Maximum pause between files
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T3250003796"] = "Maximale Pause zwischen Dateien"
-
-- Please select the folder that contains the documents you want to process.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T33077198"] = "Bitte wählen Sie den Ordner aus, der die zu verarbeitenden Dokumente enthält."
@@ -843,6 +828,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- The selected model cannot read images, so the image among the selected files will fail. All other files are processed as usual.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T9738678"] = "Das ausgewählte Modell kann keine Bilder lesen, daher schlägt die Verarbeitung des Bildes unter den ausgewählten Dateien fehl. Alle anderen Dateien werden wie gewohnt verarbeitet."
+-- Pause between files
+UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T976137570"] = "Pause zwischen Dateien"
+
-- Comma (,)
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::BATCHPROCESSINGCSVSEPARATOREXTENSIONS::T1676507543"] = "Komma (,)"
@@ -8754,6 +8742,15 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMULTISELECT::T95098799"] = "
-- You have selected 1 item.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMULTISELECT::T95098799::INFORMAL"] = "Du hast 1 Element ausgewählt."
+-- No pause
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T1202649384"] = "Keine Pause"
+
+-- {0} seconds
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T2586010064"] = "{0} Sekunden"
+
+-- {0} to {1} seconds
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T4176272400"] = "{0} bis {1} Sekunden"
+
-- Preselected provider
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPROVIDERSELECTION::T1469984996"] = "Vorausgewählter Anbieter"
@@ -9237,9 +9234,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1084943026::INFORM
-- Automatic local data source refresh
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1208397349"] = "Automatische Aktualisierung lokaler Datenquellen"
--- Shortest pause between indexing steps
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1308136668"] = "Kürzeste Pause zwischen den Etappen der Indexierung"
-
-- Refresh
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T135637716"] = "Aktualisieren"
@@ -9261,12 +9255,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1592527757"] = "Di
-- External (ERI)
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1652430727"] = "Extern (ERI)"
--- Longest pause between indexing steps
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1654263778"] = "Längste Pause zwischen den Etappen der Indexierung"
-
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1723256298"] = "Sekunden"
-
-- Delete Data Source
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1849107431"] = "Datenquelle löschen"
@@ -9276,15 +9264,15 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2067030738"] = "M
-- Are you sure you want to delete the mailbox '{0}'? Your mails stay on the server as they are. AI Studio only deletes its index of them and the stored password.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2067030738::INFORMAL"] = "Möchtest du das Postfach „{0}“ wirklich löschen? Deine E-Mails bleiben unverändert auf dem Server. AI Studio löscht lediglich den dazugehörigen Index und das gespeicherte Passwort."
+-- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause.
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2111903307"] = "AI Studio indexiert große Datenquellen in Etappen von wenigen Minuten. Zwischen zwei Etappen wartet AI Studio eine zufällige Zeit innerhalb dieses Bereichs, höchstens 300 Sekunden (5 Minuten). Das entlastet einen Einbettungsserver, den sich viele Nutzer teilen, zum Beispiel in Ihrer Organisation. Stellen Sie beide Werte auf 0 Sekunden, wenn keine Pause eingelegt werden soll."
+
+-- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause.
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2111903307::INFORMAL"] = "AI Studio indexiert große Datenquellen in Etappen von wenigen Minuten. Zwischen zwei Etappen wartet AI Studio eine zufällige Zeit innerhalb dieses Bereichs, höchstens 300 Sekunden (5 Minuten). Das entlastet einen Einbettungsserver, den sich viele Nutzer teilen, zum Beispiel in deiner Organisation. Stell beide Werte auf 0 Sekunden, wenn keine Pause eingelegt werden soll."
+
-- Local Directory Data Source Information
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2146756020"] = "Informationen zur lokalen Ordner-Datenquelle"
--- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause.
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2352821039"] = "AI Studio indexiert große Datenquellen in Etappen von wenigen Minuten. Zwischen zwei Etappen wartet AI Studio eine zufällige Zeit, die zwischen der kürzesten und der längsten Pause liegt. Das entlastet einen Einbettungsserver, den sich viele Nutzer teilen, zum Beispiel in Ihrer Organisation. Lassen Sie beide Werte auf 0 Sekunden, wenn keine Pause eingelegt werden soll."
-
--- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause.
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2352821039::INFORMAL"] = "AI Studio indexiert große Datenquellen in Etappen von wenigen Minuten. Zwischen zwei Etappen wartet AI Studio eine zufällige Zeit, die zwischen der kürzesten und der längsten Pause liegt. Das entlastet einen Einbettungsserver, den sich viele Nutzer teilen, zum Beispiel in deiner Organisation. Lass beide Werte auf 0 Sekunden, wenn keine Pause eingelegt werden soll."
-
-- Local data sources refresh when files change, mailboxes every 16 minutes.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2511157475"] = "Lokale Datenquellen werden aktualisiert, wenn sich Dateien ändern, Postfächer alle 16 Minuten."
@@ -9339,9 +9327,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3337072977"] = "M
-- Are you sure you want to delete the data source '{0}' of type '{1}'?
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3337072977::INFORMAL"] = "Möchtest du die Datenquelle „{0}“ vom Typ „{1}“ wirklich löschen?"
--- The upper end of the random pause between two indexing steps. AI Studio allows up to 300 seconds (5 minutes).
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3401303590"] = "Das obere Ende der zufälligen Pause zwischen zwei Etappen der Indexierung. AI Studio erlaubt bis zu 300 Sekunden (5 Minuten)."
-
-- Unknown
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3424652889"] = "Unbekannt"
@@ -9384,6 +9369,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4108252513"] = "Wa
-- Information
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4256323669"] = "Information"
+-- Pause between indexing steps
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4289321676"] = "Pause zwischen den Etappen der Indexierung"
+
-- Cannot export this ERI data source because no enterprise encryption secret is configured.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T750361472"] = "Diese ERI-Datenquelle kann nicht exportiert werden, da kein Geheimnis für die Verschlüsselung des Unternehmens konfiguriert ist."
@@ -15951,12 +15939,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGASSISTANTSPAGE::T786
-- Collapsing a category keeps the assistants page tidy. Choose whether AI Studio keeps offering its assistants elsewhere, e.g., in the "Send to ..." menu.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGASSISTANTSPAGE::T786145170::INFORMAL"] = "Durch das Einklappen einer Kategorie bleibt die Assistentenseite übersichtlich. Leg fest, ob AI Studio ihre Assistenten weiterhin an anderer Stelle anbietet, z. B. im Menü „Senden an …“."
--- Default minimum pause between files
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1008440099"] = "Standardmäßige Mindestpause zwischen Dateien"
-
-- Instructions
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1221801316"] = "Anweisungen"
+-- Default pause between files
+UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1294143443"] = "Standardmäßige Pause zwischen Dateien"
+
-- Include hidden files and folders by default?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1450016875"] = "Versteckte Dateien und Ordner standardmäßig einbeziehen?"
@@ -15969,9 +15957,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T15
-- 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.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1624717965"] = "Als versteckt gelten Dateien und Ordner, deren Namen mit einem Punkt beginnen, z. B. .git oder .env, sowie solche, die das Betriebssystem als versteckt kennzeichnet. Ein Dateimuster, das mit einem Punkt beginnt, z. B. .gitignore, wählt solche Dateien trotzdem aus."
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1723256298"] = "Sekunden"
-
-- Default prompt
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1750564968"] = "Standard-Prompt"
@@ -16008,9 +15993,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T23
-- 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.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T232588799::INFORMAL"] = "Trenne mehrere Dateimuster durch ein Semikolon, z. B. *.pdf;*.docx. Die Standardmuster umfassen alle unterstützten Audio- und Videoformate sowie Bilder im JPG-, PNG-, WebP-, GIF-, BMP- und TIFF-Format."
--- The lower end of the random pause interval. AI Studio never allows less than 6 seconds.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T237774509"] = "Das untere Ende des Intervalls für die zufällige Pause. AI Studio erlaubt niemals weniger als 6 Sekunden."
-
-- A policy brings its own tools, so there is nothing to preselect here. You configure them with the policy in the Document Analysis Assistant.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T2391906382"] = "Ein Regelwerk bringt seine eigenen Werkzeuge mit, daher gibt es hier nichts vorauszuwählen. Sie konfigurieren die Werkzeuge zusammen mit dem Regelwerk im Assistenten für die Dokumentenanalyse."
@@ -16053,9 +16035,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T29
-- Only the selected folder is processed
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T2958253681"] = "Nur der ausgewählte Ordner wird verarbeitet"
--- Default maximum pause between files
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3011459001"] = "Standardmäßige maximale Pause zwischen Dateien"
-
-- Include subfolders by default?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3106330739"] = "Unterordner standardmäßig einbeziehen?"
@@ -16080,21 +16059,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T34
-- Processing pace
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3428873429"] = "Verarbeitungsgeschwindigkeit"
--- The upper end of the random pause interval. The app-wide maximum is 300 seconds (5 minutes).
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3434290122"] = "Das obere Ende des zufälligen Pausenintervalls. Der appweite Höchstwert beträgt 300 Sekunden (5 Minuten)."
-
-- Close
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3448155331"] = "Schließen"
-- The current content of this Markdown file is loaded whenever the defaults are applied.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3468539567"] = "Der aktuelle Inhalt dieser Markdown-Datei wird geladen, wenn die Standardwerte angewendet werden."
--- Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3663516199"] = "Ihre Organisation verlangt eine Pause von mindestens {0} Sekunden zwischen Dateien. Benutzer können nur die Obergrenze festlegen."
-
--- Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3663516199::INFORMAL"] = "Deine Organisation verlangt eine Pause von mindestens {0} Sekunden zwischen Dateien. Benutzer können nur die Obergrenze festlegen."
-
-- Load default prompt from file
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3763644960"] = "Standard-Prompt aus Datei laden"
@@ -16149,6 +16119,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T70
-- Restore default patterns
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T7425959"] = "Standardmuster wiederherstellen"
+-- Before the next file starts, AI Studio waits for a random time within this range, at least 6 seconds and at most 300 seconds (5 minutes).
+UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T754486332"] = "Bevor die nächste Datei gestartet wird, wartet AI Studio eine zufällige Zeit innerhalb dieses Bereichs, mindestens 6 Sekunden und höchstens 300 Sekunden (5 Minuten)."
+
-- Leave empty when an input folder should be selected for every batch run.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T762890100"] = "Leer lassen, wenn für jeden Stapellauf ein Eingabeordner ausgewählt werden soll."
diff --git a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua
index 73b82fa55..0f4da5c70 100644
--- a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua
+++ b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua
@@ -423,12 +423,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- These tools are part of the selected policy and cannot be changed here. Every tool has to meet the confidence requirements of the selected provider, so a tool may stay unavailable even when the policy permits it.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1133257227"] = "These tools are part of the selected policy and cannot be changed here. Every tool has to meet the confidence requirements of the selected provider, so a tool may stay unavailable even when the policy permits it."
--- Your organization requires a pause of at least {0} seconds between files.
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1155517317"] = "Your organization requires a pause of at least {0} seconds between files."
-
--- Your organization requires a pause of at least {0} seconds between files.
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1155517317::INFORMAL"] = "Your organization requires a pause of at least {0} seconds between files."
-
-- The results table contains one row per document, starting with the file name. Here you can name the column that holds the AI answer, e.g., Summary. When left empty, we use 'Result'.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1164512104"] = "The results table contains one row per document, starting with the file name. Here you can name the column that holds the AI answer, e.g., Summary. When left empty, we use 'Result'."
@@ -510,18 +504,12 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- Waiting {0} seconds before starting the next file.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1708373046"] = "Waiting {0} seconds before starting the next file."
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1723256298"] = "seconds"
-
-- The selected folder does not exist.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T17705912"] = "The selected folder does not exist."
-- The image was no longer available while the model was asked about it.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1805791865"] = "The image was no longer available while the model was asked about it."
--- Minimum pause between files
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1829787634"] = "Minimum pause between files"
-
-- Was not able to read the input folder: {0}
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T1871021621"] = "Was not able to read the input folder: {0}"
@@ -669,9 +657,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- The selected model cannot read images, so the {0} images among the selected files will fail. All other files are processed as usual.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T324865195"] = "The selected model cannot read images, so the {0} images among the selected files will fail. All other files are processed as usual."
--- Maximum pause between files
-UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T3250003796"] = "Maximum pause between files"
-
-- Please select the folder that contains the documents you want to process.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T33077198"] = "Please select the folder that contains the documents you want to process."
@@ -843,6 +828,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING
-- The selected model cannot read images, so the image among the selected files will fail. All other files are processed as usual.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T9738678"] = "The selected model cannot read images, so the image among the selected files will fail. All other files are processed as usual."
+-- Pause between files
+UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::ASSISTANTBATCHPROCESSING::T976137570"] = "Pause between files"
+
-- Comma (,)
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BATCHPROCESSING::BATCHPROCESSINGCSVSEPARATOREXTENSIONS::T1676507543"] = "Comma (,)"
@@ -8754,6 +8742,15 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMULTISELECT::T95098799"] = "
-- You have selected 1 item.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONMULTISELECT::T95098799::INFORMAL"] = "You have selected 1 item."
+-- No pause
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T1202649384"] = "No pause"
+
+-- {0} seconds
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T2586010064"] = "{0} seconds"
+
+-- {0} to {1} seconds
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPAUSERANGE::T4176272400"] = "{0} to {1} seconds"
+
-- Preselected provider
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::CONFIGURATIONPROVIDERSELECTION::T1469984996"] = "Preselected provider"
@@ -9237,9 +9234,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1084943026::INFORM
-- Automatic local data source refresh
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1208397349"] = "Automatic local data source refresh"
--- Shortest pause between indexing steps
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1308136668"] = "Shortest pause between indexing steps"
-
-- Refresh
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T135637716"] = "Refresh"
@@ -9261,12 +9255,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1592527757"] = "Ca
-- External (ERI)
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1652430727"] = "External (ERI)"
--- Longest pause between indexing steps
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1654263778"] = "Longest pause between indexing steps"
-
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1723256298"] = "seconds"
-
-- Delete Data Source
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T1849107431"] = "Delete Data Source"
@@ -9276,15 +9264,15 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2067030738"] = "Ar
-- Are you sure you want to delete the mailbox '{0}'? Your mails stay on the server as they are. AI Studio only deletes its index of them and the stored password.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2067030738::INFORMAL"] = "Are you sure you want to delete the mailbox '{0}'? Your mails stay on the server as they are. AI Studio only deletes its index of them and the stored password."
+-- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause.
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2111903307"] = "AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause."
+
+-- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause.
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2111903307::INFORMAL"] = "AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time within this range, at most 300 seconds (5 minutes). This spares an embedding server which many people share, for example in your organization. Move both ends to 0 seconds for no pause."
+
-- Local Directory Data Source Information
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2146756020"] = "Local Directory Data Source Information"
--- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause.
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2352821039"] = "AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause."
-
--- AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause.
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2352821039::INFORMAL"] = "AI Studio indexes large data sources in steps of a few minutes. Between two steps, it waits for a random time between the shortest and the longest pause. This spares an embedding server which many people share, for example in your organization. Leave both at 0 seconds for no pause."
-
-- Local data sources refresh when files change, mailboxes every 16 minutes.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T2511157475"] = "Local data sources refresh when files change, mailboxes every 16 minutes."
@@ -9339,9 +9327,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3337072977"] = "Ar
-- Are you sure you want to delete the data source '{0}' of type '{1}'?
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3337072977::INFORMAL"] = "Are you sure you want to delete the data source '{0}' of type '{1}'?"
--- The upper end of the random pause between two indexing steps. AI Studio allows up to 300 seconds (5 minutes).
-UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3401303590"] = "The upper end of the random pause between two indexing steps. AI Studio allows up to 300 seconds (5 minutes)."
-
-- Unknown
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T3424652889"] = "Unknown"
@@ -9384,6 +9369,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4108252513"] = "Wa
-- Information
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4256323669"] = "Information"
+-- Pause between indexing steps
+UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T4289321676"] = "Pause between indexing steps"
+
-- Cannot export this ERI data source because no enterprise encryption secret is configured.
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCEMANAGEMENT::T750361472"] = "Cannot export this ERI data source because no enterprise encryption secret is configured."
@@ -15951,12 +15939,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGASSISTANTSPAGE::T786
-- Collapsing a category keeps the assistants page tidy. Choose whether AI Studio keeps offering its assistants elsewhere, e.g., in the "Send to ..." menu.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGASSISTANTSPAGE::T786145170::INFORMAL"] = "Collapsing a category keeps the assistants page tidy. Choose whether AI Studio keeps offering its assistants elsewhere, e.g., in the \"Send to ...\" menu."
--- Default minimum pause between files
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1008440099"] = "Default minimum pause between files"
-
-- Instructions
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1221801316"] = "Instructions"
+-- Default pause between files
+UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1294143443"] = "Default pause between files"
+
-- Include hidden files and folders by default?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1450016875"] = "Include hidden files and folders by default?"
@@ -15969,9 +15957,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T15
-- 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.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1624717965"] = "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."
--- seconds
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1723256298"] = "seconds"
-
-- Default prompt
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T1750564968"] = "Default prompt"
@@ -16008,9 +15993,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T23
-- 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.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T232588799::INFORMAL"] = "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."
--- The lower end of the random pause interval. AI Studio never allows less than 6 seconds.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T237774509"] = "The lower end of the random pause interval. AI Studio never allows less than 6 seconds."
-
-- A policy brings its own tools, so there is nothing to preselect here. You configure them with the policy in the Document Analysis Assistant.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T2391906382"] = "A policy brings its own tools, so there is nothing to preselect here. You configure them with the policy in the Document Analysis Assistant."
@@ -16053,9 +16035,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T29
-- Only the selected folder is processed
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T2958253681"] = "Only the selected folder is processed"
--- Default maximum pause between files
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3011459001"] = "Default maximum pause between files"
-
-- Include subfolders by default?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3106330739"] = "Include subfolders by default?"
@@ -16080,21 +16059,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T34
-- Processing pace
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3428873429"] = "Processing pace"
--- The upper end of the random pause interval. The app-wide maximum is 300 seconds (5 minutes).
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3434290122"] = "The upper end of the random pause interval. The app-wide maximum is 300 seconds (5 minutes)."
-
-- Close
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3448155331"] = "Close"
-- The current content of this Markdown file is loaded whenever the defaults are applied.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3468539567"] = "The current content of this Markdown file is loaded whenever the defaults are applied."
--- Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3663516199"] = "Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit."
-
--- Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit.
-UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3663516199::INFORMAL"] = "Your organization requires a pause of at least {0} seconds between files. Users can configure only the upper limit."
-
-- Load default prompt from file
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T3763644960"] = "Load default prompt from file"
@@ -16149,6 +16119,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T70
-- Restore default patterns
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T7425959"] = "Restore default patterns"
+-- Before the next file starts, AI Studio waits for a random time within this range, at least 6 seconds and at most 300 seconds (5 minutes).
+UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T754486332"] = "Before the next file starts, AI Studio waits for a random time within this range, at least 6 seconds and at most 300 seconds (5 minutes)."
+
-- Leave empty when an input folder should be selected for every batch run.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGBATCHPROCESSING::T762890100"] = "Leave empty when an input folder should be selected for every batch run."
diff --git a/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessing.cs b/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessing.cs
index 2dcb7b2ad..7613baeb8 100644
--- a/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessing.cs
+++ b/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessing.cs
@@ -2,6 +2,7 @@ using System.Linq.Expressions;
using AIStudio.Assistants.BatchProcessing;
using AIStudio.Provider;
+using AIStudio.Tools.Pauses;
namespace AIStudio.Settings.DataModel;
@@ -12,8 +13,12 @@ namespace AIStudio.Settings.DataModel;
public sealed class DataBatchProcessing(Expression>? configSelection = null)
{
public const string DEFAULT_FILE_PATTERNS = "*.pdf;*.docx;*.pptx;*.xlsx;*.md;*.txt;*.jpg;*.jpeg;*.png;*.webp;*.gif;*.bmp;*.tif;*.tiff;*.mp3;*.wav;*.wave;*.aac;*.flac;*.ogg;*.opus;*.m4a;*.m4b;*.wma;*.alac;*.aif;*.aiff;*.caf;*.mp4;*.m4v;*.avi;*.mkv;*.mov;*.wmv;*.flv;*.webm";
- public const int MIN_DELAY_SECONDS = 6;
- public const int MAX_DELAY_SECONDS = 300;
+
+ ///
+ /// The pauses between two files either bound may ask for: at least 6 seconds, at most 300 seconds.
+ ///
+ public static readonly PauseLimits PAUSE_LIMITS = new(6, 300);
+
public const int DEFAULT_MIN_DELAY_SECONDS = 6;
public const int DEFAULT_MAX_DELAY_SECONDS = 10;
public const bool DEFAULT_INCLUDE_SUBDIRECTORIES = false;
@@ -82,7 +87,7 @@ public sealed class DataBatchProcessing(Expression value.MinimumDelaySeconds, DEFAULT_MIN_DELAY_SECONDS);
- public int MaximumDelaySeconds { get; set; } = DEFAULT_MAX_DELAY_SECONDS;
+ public int MaximumDelaySeconds { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MaximumDelaySeconds, DEFAULT_MAX_DELAY_SECONDS);
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, ConfidenceLevel.NONE);
diff --git a/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessingExtensions.cs b/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessingExtensions.cs
new file mode 100644
index 000000000..b59cf858d
--- /dev/null
+++ b/app/MindWork AI Studio/Settings/DataModel/DataBatchProcessingExtensions.cs
@@ -0,0 +1,18 @@
+namespace AIStudio.Settings.DataModel;
+
+public static class DataBatchProcessingExtensions
+{
+ /// The settings of the Batch Processing Assistant.
+ extension(DataBatchProcessing settings)
+ {
+ ///
+ /// Whether a configuration plugin locks the lower bound of the pause between two files.
+ ///
+ public static bool IsMinimumPauseLocked => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MinimumDelaySeconds, out var meta) && meta.IsLocked;
+
+ ///
+ /// Whether a configuration plugin locks the upper bound of the pause between two files.
+ ///
+ public static bool IsMaximumPauseLocked => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MaximumDelaySeconds, out var meta) && meta.IsLocked;
+ }
+}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexing.cs b/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexing.cs
index 85b16b3dd..a04b08e27 100644
--- a/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexing.cs
+++ b/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexing.cs
@@ -1,5 +1,7 @@
using System.Linq.Expressions;
+using AIStudio.Tools.Pauses;
+
namespace AIStudio.Settings.DataModel;
///
@@ -9,9 +11,9 @@ namespace AIStudio.Settings.DataModel;
public sealed class DataDataSourceIndexing(Expression>? configSelection = null)
{
///
- /// The longest pause between two indexing steps either bound may ask for.
+ /// The pauses between two indexing steps either bound may ask for: none at all, up to 300 seconds.
///
- public const int MAX_PAUSE_BETWEEN_STEPS_SECONDS = 300;
+ public static readonly PauseLimits PAUSE_LIMITS = new(0, 300);
///
/// Initializes an unmanaged instance, e.g., for the JSON deserializer.
diff --git a/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexingExtensions.cs b/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexingExtensions.cs
new file mode 100644
index 000000000..205878e89
--- /dev/null
+++ b/app/MindWork AI Studio/Settings/DataModel/DataDataSourceIndexingExtensions.cs
@@ -0,0 +1,31 @@
+using AIStudio.Tools.Pauses;
+
+namespace AIStudio.Settings.DataModel;
+
+public static class DataDataSourceIndexingExtensions
+{
+ /// The settings of the indexing.
+ extension(DataDataSourceIndexing settings)
+ {
+ ///
+ /// Whether a configuration plugin locks the lower bound of the pause between two indexing steps.
+ ///
+ public static bool IsMinimumPauseLocked => ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MinimumPauseBetweenStepsSeconds, out var meta) && meta.IsLocked;
+
+ ///
+ /// Whether a configuration plugin locks the upper bound of the pause between two indexing steps.
+ ///
+ public static bool IsMaximumPauseLocked => ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MaximumPauseBetweenStepsSeconds, out var meta) && meta.IsLocked;
+
+ ///
+ /// The bounds of the pause between two indexing steps which apply now, as the user set them
+ /// and as configuration plugins lock them, cf. PauseRange.GetEffective.
+ ///
+ public PauseRange EffectivePauseRange => PauseRange.GetEffective(
+ DataDataSourceIndexing.PAUSE_LIMITS,
+ settings.MinimumPauseBetweenStepsSeconds,
+ () => DataDataSourceIndexing.IsMinimumPauseLocked,
+ settings.MaximumPauseBetweenStepsSeconds,
+ () => DataDataSourceIndexing.IsMaximumPauseLocked);
+ }
+}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Tools/Services/Indexing/PauseBeforeStep.cs b/app/MindWork AI Studio/Tools/Pauses/PauseBeforeStep.cs
similarity index 74%
rename from app/MindWork AI Studio/Tools/Services/Indexing/PauseBeforeStep.cs
rename to app/MindWork AI Studio/Tools/Pauses/PauseBeforeStep.cs
index 81eaade35..f3d513e6f 100644
--- a/app/MindWork AI Studio/Tools/Services/Indexing/PauseBeforeStep.cs
+++ b/app/MindWork AI Studio/Tools/Pauses/PauseBeforeStep.cs
@@ -1,7 +1,7 @@
-namespace AIStudio.Tools.Services.Indexing;
+namespace AIStudio.Tools.Pauses;
///
-/// How long the indexing step which is about to start waits, cf. PauseBetweenSteps.GetPauseBeforeNextStep.
+/// How long the step which is about to start waits, cf. PauseBetweenSteps.GetPauseBeforeNextStep.
///
/// The pause drawn for the gap since the last step.
/// What is left of the pause now. More than zero, unless this is NONE.
diff --git a/app/MindWork AI Studio/Tools/Services/Indexing/PauseBetweenSteps.cs b/app/MindWork AI Studio/Tools/Pauses/PauseBetweenSteps.cs
similarity index 77%
rename from app/MindWork AI Studio/Tools/Services/Indexing/PauseBetweenSteps.cs
rename to app/MindWork AI Studio/Tools/Pauses/PauseBetweenSteps.cs
index c52c6d10a..50f827a4e 100644
--- a/app/MindWork AI Studio/Tools/Services/Indexing/PauseBetweenSteps.cs
+++ b/app/MindWork AI Studio/Tools/Pauses/PauseBetweenSteps.cs
@@ -1,24 +1,24 @@
-namespace AIStudio.Tools.Services.Indexing;
+namespace AIStudio.Tools.Pauses;
///
-/// The pause between two indexing steps, which spares an embedding server that many people share.
+/// The pause between two steps, e.g., two indexing steps, which spares a server that many people share.
///
///
/// Not to be confused with the pauses of the indexing as a whole, e.g., while a backup copies the
/// indexes, cf. IndexingPauses.
///
-/// The pause is a gap between the end of one step and the start of the next, whichever data source
-/// either of them belongs to: it is about the load on the embedding server, not about the order of
-/// the data sources. Only a step which worked on documents opens a gap. Its pause is drawn once the
-/// next step is about to start, from the bounds which apply then, and the time which passed in the
-/// meantime counts toward it. When no step comes, nothing is drawn.
+/// The pause is a gap between the end of one step and the start of the next, whatever either of
+/// them works on: it is about the load on the server, not about the order of the work, e.g., of the
+/// data sources of the indexing. Only a step which caused load opens a gap. Its pause is drawn once
+/// the next step is about to start, from the bounds which apply then, and the time which passed in
+/// the meantime counts toward it. When no step comes, nothing is drawn.
///
internal sealed class PauseBetweenSteps
{
private readonly Lock stateLock = new();
///
- /// When the last step which worked on documents ended. Null before the first one.
+ /// When the last step which caused load ended. Null before the first one.
///
private DateTimeOffset? lastStepEndedUtc;
@@ -28,7 +28,7 @@ internal sealed class PauseBetweenSteps
private TimeSpan? drawnPause;
///
- /// Notes that a step which worked on documents ended, which opens a new gap.
+ /// Notes that a step which caused load ended, e.g., one which worked on documents, which opens a new gap.
///
/// The current time, passed in so the pause can be tested.
public void RecordStepEnded(DateTimeOffset nowUtc)
diff --git a/app/MindWork AI Studio/Tools/Pauses/PauseLimits.cs b/app/MindWork AI Studio/Tools/Pauses/PauseLimits.cs
new file mode 100644
index 000000000..94bfe64ab
--- /dev/null
+++ b/app/MindWork AI Studio/Tools/Pauses/PauseLimits.cs
@@ -0,0 +1,27 @@
+namespace AIStudio.Tools.Pauses;
+
+///
+/// The shortest and the longest pause a feature allows for either bound of its random pause, cf. PauseRange.
+///
+///
+/// Each feature sets its own limits next to its settings: the indexing allows no pause at all, for
+/// example, while the batch processing always pauses for a few seconds.
+///
+/// The shortest pause either bound may ask for.
+/// The longest pause either bound may ask for.
+public sealed record PauseLimits(int ShortestSeconds, int LongestSeconds)
+{
+ ///
+ /// Whether a bound lies within the limits, e.g., one which a configuration plugin sets.
+ ///
+ /// The bound.
+ /// True when the feature allows the bound.
+ public bool Allows(int seconds) => seconds >= this.ShortestSeconds && seconds <= this.LongestSeconds;
+
+ ///
+ /// Moves a bound into the limits.
+ ///
+ /// The bound.
+ /// The bound, or the limit it went beyond.
+ public int Clamp(int seconds) => Math.Clamp(seconds, this.ShortestSeconds, this.LongestSeconds);
+}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Tools/Pauses/PauseRange.cs b/app/MindWork AI Studio/Tools/Pauses/PauseRange.cs
new file mode 100644
index 000000000..1ccf1a11e
--- /dev/null
+++ b/app/MindWork AI Studio/Tools/Pauses/PauseRange.cs
@@ -0,0 +1,50 @@
+namespace AIStudio.Tools.Pauses;
+
+///
+/// The bounds of a random pause, e.g., between two indexing steps, cf. PauseBetweenSteps.
+///
+/// The shortest pause. Between the shortest limit of the feature and MaximumSeconds.
+/// The longest pause, which may be drawn as well. At most the longest limit of the feature.
+public sealed record PauseRange(int MinimumSeconds, int MaximumSeconds)
+{
+ ///
+ /// No pause at all, which is the default of the indexing.
+ ///
+ public static readonly PauseRange NONE = new(0, 0);
+
+ ///
+ /// Whether the next step starts right away.
+ ///
+ public bool IsNone => this.MaximumSeconds is 0;
+
+ ///
+ /// Works out the bounds which apply, so that the lower one never exceeds the upper one.
+ ///
+ ///
+ /// Both bounds are moved into the limits of the feature first. A bound which a configuration plugin
+ /// locks wins, and the other one adjusts to it. A bound the plugin only presets counts like one the
+ /// user set. Otherwise, the lower bound wins, i.e., the longer pause: it spares the server, which
+ /// is what the pause is for. That holds as well when a plugin locks both bounds the wrong way round.
+ ///
+ /// Which bound is locked matters only while the bounds are the wrong way round. Asking reads the
+ /// managed state of the whole app, which bounds in order do without, so the locks are asked only then.
+ ///
+ /// The shortest and the longest pause the feature allows.
+ /// The lower bound as set.
+ /// Whether a configuration plugin locks the lower bound.
+ /// The upper bound as set.
+ /// Whether a configuration plugin locks the upper bound.
+ /// The bounds which apply.
+ public static PauseRange GetEffective(PauseLimits limits, int minimumSeconds, Func isMinimumLocked, int maximumSeconds, Func isMaximumLocked)
+ {
+ var minimum = limits.Clamp(minimumSeconds);
+ var maximum = limits.Clamp(maximumSeconds);
+ if (minimum <= maximum)
+ return new(minimum, maximum);
+
+ if (isMaximumLocked() && !isMinimumLocked())
+ return new(maximum, maximum);
+
+ return new(minimum, minimum);
+ }
+}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs
index 36bff77cd..1d7bcd619 100644
--- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs
+++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs
@@ -398,13 +398,13 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
ManagedConfiguration.TryProcessConfiguration(x => x.MailboxSettings, x => x.AllowOnlyOrganizationMailServers, this.Id, settingsTable, dryRun);
// Config: the random pause between two indexing steps of local data sources
- var minimumPauseIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.App.DataSourceIndexing, x => x.MinimumPauseBetweenStepsSeconds, this.Id, settingsTable, dryRun, validator: value => value is >= 0 and <= DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
+ var minimumPauseIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.App.DataSourceIndexing, x => x.MinimumPauseBetweenStepsSeconds, this.Id, settingsTable, dryRun, validator: DataDataSourceIndexing.PAUSE_LIMITS.Allows);
if (!minimumPauseIsValid && settingsTable.TryGetValue("DataDataSourceIndexing.MinimumPauseBetweenStepsSeconds", out _))
- LOG.LogWarning("The lower bound of the pause between indexing steps configured by plugin {ConfigPluginId} must be between 0 and {MaximumPauseSeconds} seconds.", this.Id, DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
+ LOG.LogWarning("The lower bound of the pause between indexing steps configured by plugin {ConfigPluginId} must be between {ShortestPauseSeconds} and {LongestPauseSeconds} seconds.", this.Id, DataDataSourceIndexing.PAUSE_LIMITS.ShortestSeconds, DataDataSourceIndexing.PAUSE_LIMITS.LongestSeconds);
- var maximumPauseIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.App.DataSourceIndexing, x => x.MaximumPauseBetweenStepsSeconds, this.Id, settingsTable, dryRun, validator: value => value is >= 0 and <= DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
+ var maximumPauseIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.App.DataSourceIndexing, x => x.MaximumPauseBetweenStepsSeconds, this.Id, settingsTable, dryRun, validator: DataDataSourceIndexing.PAUSE_LIMITS.Allows);
if (!maximumPauseIsValid && settingsTable.TryGetValue("DataDataSourceIndexing.MaximumPauseBetweenStepsSeconds", out _))
- LOG.LogWarning("The upper bound of the pause between indexing steps configured by plugin {ConfigPluginId} must be between 0 and {MaximumPauseSeconds} seconds.", this.Id, DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
+ LOG.LogWarning("The upper bound of the pause between indexing steps configured by plugin {ConfigPluginId} must be between {ShortestPauseSeconds} and {LongestPauseSeconds} seconds.", this.Id, DataDataSourceIndexing.PAUSE_LIMITS.ShortestSeconds, DataDataSourceIndexing.PAUSE_LIMITS.LongestSeconds);
if (minimumPauseIsValid && maximumPauseIsValid
&& settingsTable.TryGetValue("DataDataSourceIndexing.MinimumPauseBetweenStepsSeconds", out var minimumPauseValue) && minimumPauseValue.TryRead(out var minimumPauseSeconds)
@@ -519,9 +519,20 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.CsvSeparator, this.Id, settingsTable, dryRun);
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.CustomCsvSeparator, this.Id, settingsTable, dryRun);
- var minimumDelayIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MinimumDelaySeconds, this.Id, settingsTable, dryRun, validator: value => value is >= DataBatchProcessing.MIN_DELAY_SECONDS and <= DataBatchProcessing.MAX_DELAY_SECONDS);
+ // Config: the random pause between two files of the Batch Processing Assistant
+ var minimumDelayIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MinimumDelaySeconds, this.Id, settingsTable, dryRun, validator: DataBatchProcessing.PAUSE_LIMITS.Allows);
if (!minimumDelayIsValid && settingsTable.TryGetValue("DataBatchProcessing.MinimumDelaySeconds", out _))
- LOG.LogWarning("The Batch Processing minimum delay configured by plugin {ConfigPluginId} must be between {MinimumDelaySeconds} and {MaximumDelaySeconds} seconds.", this.Id, DataBatchProcessing.MIN_DELAY_SECONDS, DataBatchProcessing.MAX_DELAY_SECONDS);
+ LOG.LogWarning("The Batch Processing minimum delay configured by plugin {ConfigPluginId} must be between {MinimumDelaySeconds} and {MaximumDelaySeconds} seconds.", this.Id, DataBatchProcessing.PAUSE_LIMITS.ShortestSeconds, DataBatchProcessing.PAUSE_LIMITS.LongestSeconds);
+
+ var maximumDelayIsValid = ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MaximumDelaySeconds, this.Id, settingsTable, dryRun, validator: DataBatchProcessing.PAUSE_LIMITS.Allows);
+ if (!maximumDelayIsValid && settingsTable.TryGetValue("DataBatchProcessing.MaximumDelaySeconds", out _))
+ LOG.LogWarning("The Batch Processing maximum delay configured by plugin {ConfigPluginId} must be between {MinimumDelaySeconds} and {MaximumDelaySeconds} seconds.", this.Id, DataBatchProcessing.PAUSE_LIMITS.ShortestSeconds, DataBatchProcessing.PAUSE_LIMITS.LongestSeconds);
+
+ if (minimumDelayIsValid && maximumDelayIsValid
+ && settingsTable.TryGetValue("DataBatchProcessing.MinimumDelaySeconds", out var minimumDelayValue) && minimumDelayValue.TryRead(out var minimumDelaySeconds)
+ && settingsTable.TryGetValue("DataBatchProcessing.MaximumDelaySeconds", out var maximumDelayValue) && maximumDelayValue.TryRead(out var maximumDelaySeconds)
+ && maximumDelaySeconds < minimumDelaySeconds)
+ LOG.LogWarning("The Batch Processing maximum delay configured by plugin {ConfigPluginId} is below its minimum delay. The minimum delay of {MinimumDelaySeconds} seconds wins.", this.Id, minimumDelaySeconds);
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun);
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.PreselectedProvider, Guid.Empty, this.Id, settingsTable, dryRun);
diff --git a/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs b/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs
index b3fe7296a..0939c33c2 100644
--- a/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs
+++ b/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs
@@ -8,6 +8,7 @@ using AIStudio.Tools.Databases;
using AIStudio.Tools.Databases.IndexStore;
using AIStudio.Tools.Databases.VectorStore;
using AIStudio.Tools.Media;
+using AIStudio.Tools.Pauses;
using AIStudio.Tools.PluginSystem;
using AIStudio.Tools.Security;
using AIStudio.Tools.Services.Indexing;
@@ -768,7 +769,7 @@ public sealed partial class DataSourceEmbeddingService(SettingsManager settingsM
/// The token of the run.
private async Task WaitForPauseBetweenStepsAsync(IIndexedDataSource dataSource, DataSourceEmbeddingRefreshMode refreshMode, CancellationToken token)
{
- var range = PauseRange.FromSettings(settingsManager.ConfigurationData.App.DataSourceIndexing);
+ var range = settingsManager.ConfigurationData.App.DataSourceIndexing.EffectivePauseRange;
var pause = this.pauseBetweenSteps.GetPauseBeforeNextStep(DateTimeOffset.UtcNow, range, rng);
if (pause.Remaining <= TimeSpan.Zero)
return;
diff --git a/app/MindWork AI Studio/Tools/Services/Indexing/AGENTS.md b/app/MindWork AI Studio/Tools/Services/Indexing/AGENTS.md
index 79bcb9250..198e95173 100644
--- a/app/MindWork AI Studio/Tools/Services/Indexing/AGENTS.md
+++ b/app/MindWork AI Studio/Tools/Services/Indexing/AGENTS.md
@@ -41,9 +41,11 @@ The parts:
`MORE_TO_DO` gets its next step in the back lane of `DataSourceRunQueue`, behind every data source which begins
a pass, so a mailbox waits for one step at most.
- **`PauseBetweenSteps`** - a gap after every step which worked on documents, so that many people can share one
- embedding server. The next run, of whichever data source, waits for a random pause between the bounds of the
- settings (`PauseRange`: 0 to 300 seconds, none by default), less the time which passed since the step ended.
- Not to be confused with the pause of the indexing as a whole (`IndexingPauses`), which a backup takes.
+ embedding server. The next run, of whichever data source, waits for a random pause between the bounds which
+ apply (`DataDataSourceIndexing.EffectivePauseRange` within `PAUSE_LIMITS`: 0 to 300 seconds, none by default),
+ less the time which passed since the step ended. The pause lives in `Tools/Pauses/` and is shared with other
+ features, so keep everything about the indexing out of it. Not to be confused with the pause of the indexing
+ as a whole (`IndexingPauses`), which a backup takes.
- **`IndexingPass`** - the steps of one data source, from its first step until one of them is done. It remembers
which documents failed during an earlier step, so the next steps do not read them again, and which failures
were reported to the user already.
diff --git a/app/MindWork AI Studio/Tools/Services/Indexing/PauseRange.cs b/app/MindWork AI Studio/Tools/Services/Indexing/PauseRange.cs
deleted file mode 100644
index 7b1adb856..000000000
--- a/app/MindWork AI Studio/Tools/Services/Indexing/PauseRange.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using AIStudio.Settings;
-using AIStudio.Settings.DataModel;
-
-namespace AIStudio.Tools.Services.Indexing;
-
-///
-/// The bounds of the random pause between two indexing steps, cf. PauseBetweenSteps.
-///
-/// The shortest pause. Between zero and MaximumSeconds.
-/// The longest pause, which may be drawn as well. At most DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS.
-internal sealed record PauseRange(int MinimumSeconds, int MaximumSeconds)
-{
- ///
- /// No pause at all, which is the default.
- ///
- public static readonly PauseRange NONE = new(0, 0);
-
- ///
- /// Whether the next step starts right away.
- ///
- public bool IsNone => this.MaximumSeconds is 0;
-
- ///
- /// The bounds which apply now, as the user set them and as configuration plugins lock them.
- ///
- /// The settings of the indexing.
- /// The bounds which apply.
- public static PauseRange FromSettings(DataDataSourceIndexing settings)
- {
- var minimumSeconds = settings.MinimumPauseBetweenStepsSeconds;
- var maximumSeconds = settings.MaximumPauseBetweenStepsSeconds;
-
- //
- // Which bound a configuration plugin locks matters only while the bounds are the wrong way
- // round. Asking reads the managed state of the whole app, which bounds in order do without:
- //
- if (minimumSeconds <= maximumSeconds)
- return GetEffective(minimumSeconds, false, maximumSeconds, false);
-
- var isMinimumLocked = ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MinimumPauseBetweenStepsSeconds, out var minimumMeta) && minimumMeta.IsLocked;
- var isMaximumLocked = ManagedConfiguration.TryGet(x => x.App.DataSourceIndexing, x => x.MaximumPauseBetweenStepsSeconds, out var maximumMeta) && maximumMeta.IsLocked;
- return GetEffective(minimumSeconds, isMinimumLocked, maximumSeconds, isMaximumLocked);
- }
-
- ///
- /// Works out the bounds which apply, so that the lower one never exceeds the upper one.
- ///
- ///
- /// A bound which a configuration plugin locks wins, and the other one adjusts to it. A bound the
- /// plugin only presets counts like one the user set. Otherwise, the lower bound wins, i.e., the
- /// longer pause: it spares the embedding server, which is what the pause is for. That holds as
- /// well when a plugin locks both bounds the wrong way round.
- ///
- /// The lower bound as set.
- /// Whether a configuration plugin locks the lower bound.
- /// The upper bound as set.
- /// Whether a configuration plugin locks the upper bound.
- /// The bounds which apply.
- public static PauseRange GetEffective(int minimumSeconds, bool isMinimumLocked, int maximumSeconds, bool isMaximumLocked)
- {
- var minimum = Math.Clamp(minimumSeconds, 0, DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
- var maximum = Math.Clamp(maximumSeconds, 0, DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS);
- if (isMaximumLocked && !isMinimumLocked)
- return new(Math.Min(minimum, maximum), maximum);
-
- return new(minimum, Math.Max(minimum, maximum));
- }
-}
\ No newline at end of file
diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md
index d5427e249..091cfad17 100644
--- a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md
+++ b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md
@@ -10,6 +10,7 @@
- Added the minimum confidence of the provider for each AI task, such as the data source selection or the security audit of assistant plugins, to configuration plugins, so that organizations can preset or lock it.
- Added the settings of the text content cleaner to configuration plugins, so that organizations can preset or lock which model cleans web content.
- Added the password encoding to the mail servers which organizations offer through configuration plugins. Depending on its configuration, a mail server may expect usernames and passwords with characters beyond ASCII in another encoding than UTF-8. With this setting, every mailbox on such a server signs in with the encoding your organization names.
+- Added the maximum pause between files of the Batch Processing Assistant to configuration plugins, so that organizations can preset or lock it, like the minimum pause.
- Improved how well the AI remembers what it looked up in a chat: for its earlier answers, it now knows which web pages it read, which searches it ran, and which sources it used. When you ask a follow-up question, it can read the page again instead of claiming that it never read it.
- Improved follow-up questions about web pages which a tool found, such as the results of a web search: the Read Web Page tool may read these pages again later in the same chat, also after you restart AI Studio and also when it may otherwise read only addresses which stand in the chat.
- Improved the texts of AI Studio: we corrected grammar mistakes, missing words, and punctuation in many English texts and improved the wording of some German ones. A few texts which every language showed in English are now translated as well.
@@ -35,6 +36,7 @@
- Improved the messages about failed requests to ERI servers, which no longer repeat the values sent along with a request.
- Improved the Flatpak version of AI Studio for Linux: it now runs on the GNOME 51 runtime, ships the same up-to-date version of .NET, and is built with the same up-to-date version of Rust as all other versions of AI Studio.
- Improved the Mathematics prototype: it takes more limits correctly, answers more equations within its time limit, and finds all solutions of equations with infinitely many, such as sin(x) = 1/2. The AI still gets a single value as well, such as the years in which a sum doubles.
+- Improved the pauses between indexing steps of local data sources and between files of the Batch Processing Assistant: a single slider with two handles now sets the shortest and the longest pause, in steps of 5 seconds. In the Batch Processing Assistant, a pause which your organization locks now shows a lock, like all other settings your organization manages, and a pause which your organization only presets is yours to change.
- Changed the icons of AI Studio to Lucide, an open-source icon set. All icons now share one style, and each feature shows the same icon wherever you meet it.
- Changed the names of the settings of the AI tasks in configuration plugins, which no longer speak of agents: `DataAgentDataSourceSelection` is now `DataDataSourceSelection`, `DataAgentRetrievalContextValidation` is now `DataRetrievalContextValidation`, `PreselectAgentOptions` is now `PreselectOptions`, and `PreselectedAgentProvider` is now `PreselectedProvider`. AI Studio still reads the names of v26.11.1 at least until May 2027 and names the new one in its log. Until every computer in your organization runs this version, set both names, since older versions know only the former ones.
- Changed how requests to self-hosted servers name the AI tasks, when your organization lets these requests name the feature which sent them: the User-Agent now says `Component/AI_TASK_…` instead of `Component/AGENT_…`, e.g., `Component/AI_TASK_DATA_SOURCE_SELECTION`. If you filter the logs of your servers by these names, adjust your filters.
diff --git a/app/Tests/Settings/BatchProcessingPauseTests.cs b/app/Tests/Settings/BatchProcessingPauseTests.cs
new file mode 100644
index 000000000..bd5be1692
--- /dev/null
+++ b/app/Tests/Settings/BatchProcessingPauseTests.cs
@@ -0,0 +1,124 @@
+using System.Linq.Expressions;
+
+using AIStudio.Settings;
+using AIStudio.Settings.DataModel;
+
+using Lua;
+using Lua.Standard;
+
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging.Abstractions;
+
+namespace AIStudio.Tests.Settings;
+
+///
+/// Checks how a configuration plugin sets the bounds of the pause between two files of the Batch
+/// Processing Assistant.
+///
+///
+/// The settings are reached through Program.SERVICE_PROVIDER, as in the app, because a managed setting
+/// writes its value and its lock there. The plugin passes the check of PluginConfiguration.
+///
+[TestFixture]
+public sealed class BatchProcessingPauseTests
+{
+ private static readonly Guid PLUGIN_ID = Guid.Parse("5c1e8f27-94ad-4b36-a0f2-7d3b6e91c4a8");
+
+ private SettingsManager settingsManager = null!;
+ private ServiceProvider serviceProvider = null!;
+ private IServiceProvider previousServiceProvider = null!;
+
+ [SetUp]
+ public void CreateSettings()
+ {
+ // Creating the settings data registers every managed setting:
+ this.settingsManager = new SettingsManager(NullLogger.Instance, null!);
+
+ this.previousServiceProvider = Program.SERVICE_PROVIDER;
+ this.serviceProvider = new ServiceCollection().AddSingleton(this.settingsManager).BuildServiceProvider();
+ Program.SERVICE_PROVIDER = this.serviceProvider;
+ }
+
+ [TearDown]
+ public void RestoreApplicationState()
+ {
+ // The managed state of a setting outlives this fixture, so we release what the plugin took over:
+ ManagedConfiguration.CleanupLeftOverManagedConfigurations([], new HashSet());
+
+ Program.SERVICE_PROVIDER = this.previousServiceProvider;
+ this.serviceProvider.Dispose();
+ }
+
+ [Test]
+ public async Task APluginLocksTheUpperBound()
+ {
+ var processed = await ProcessAsync(x => x.MaximumDelaySeconds, """SETTINGS["DataBatchProcessing.MaximumDelaySeconds"] = 30""");
+
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(processed, Is.True);
+ Assert.That(this.settingsManager.ConfigurationData.BatchProcessing.MaximumDelaySeconds, Is.EqualTo(30));
+ Assert.That(DataBatchProcessing.IsMaximumPauseLocked, Is.True);
+ Assert.That(DataBatchProcessing.IsMinimumPauseLocked, Is.False);
+ }
+ }
+
+ [TestCase(5, TestName = "An upper bound below 6 seconds is rejected")]
+ [TestCase(301, TestName = "An upper bound above 300 seconds is rejected")]
+ public async Task AnUpperBoundOutsideTheLimitsIsRejected(int configuredSeconds)
+ {
+ this.settingsManager.ConfigurationData.BatchProcessing.MaximumDelaySeconds = 20;
+ var processed = await ProcessAsync(x => x.MaximumDelaySeconds, $"""SETTINGS["DataBatchProcessing.MaximumDelaySeconds"] = {configuredSeconds}""");
+
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(processed, Is.False);
+ Assert.That(this.settingsManager.ConfigurationData.BatchProcessing.MaximumDelaySeconds, Is.EqualTo(20), "A rejected value leaves the choice of the user untouched.");
+ Assert.That(DataBatchProcessing.IsMaximumPauseLocked, Is.False, "A rejected value locks nothing.");
+ }
+ }
+
+ [Test]
+ public async Task ABoundWhichUsersMayChangeIsNoLock()
+ {
+ const string SETTINGS = """
+ SETTINGS["DataBatchProcessing.MinimumDelaySeconds"] = 12
+ SETTINGS["DataBatchProcessing.MinimumDelaySeconds.AllowUserOverride"] = true
+ SETTINGS["DataBatchProcessing.MaximumDelaySeconds"] = 30
+ SETTINGS["DataBatchProcessing.MaximumDelaySeconds.AllowUserOverride"] = true
+ """;
+
+ var minimumProcessed = await ProcessAsync(x => x.MinimumDelaySeconds, SETTINGS);
+ var maximumProcessed = await ProcessAsync(x => x.MaximumDelaySeconds, SETTINGS);
+
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(minimumProcessed, Is.True);
+ Assert.That(maximumProcessed, Is.True);
+ Assert.That(DataBatchProcessing.IsMinimumPauseLocked, Is.False, "Users may change a lower bound which the organization only presets.");
+ Assert.That(DataBatchProcessing.IsMaximumPauseLocked, Is.False, "Users may change an upper bound which the organization only presets.");
+ }
+ }
+
+ ///
+ /// Lets a configuration plugin set a bound of the pause.
+ ///
+ /// The bound to process.
+ /// The Lua lines which fill the table SETTINGS of the plugin.
+ /// Whether the plugin's value was taken.
+ private static async Task ProcessAsync(Expression> bound, string settings)
+ {
+ var state = LuaState.Create();
+ state.OpenBasicLibrary();
+
+ await state.DoStringAsync($"""
+ SETTINGS = {"{}"}
+ {settings}
+ """);
+
+ if (!state.Environment["SETTINGS"].TryRead(out var settingsTable))
+ throw new InvalidOperationException("The settings of this test are not a Lua table.");
+
+ return ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, bound, PLUGIN_ID, settingsTable, false, validator: DataBatchProcessing.PAUSE_LIMITS.Allows);
+ }
+}
\ No newline at end of file
diff --git a/app/Tests/Tools/PauseRangeTests.cs b/app/Tests/Tools/PauseRangeTests.cs
deleted file mode 100644
index 2f1779542..000000000
--- a/app/Tests/Tools/PauseRangeTests.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using AIStudio.Settings.DataModel;
-using AIStudio.Tools.Services.Indexing;
-
-namespace AIStudio.Tests.Tools;
-
-///
-/// Checks which bounds of the pause between two indexing steps apply, as the user set them and as configuration plugins lock them.
-///
-[TestFixture]
-public sealed class PauseRangeTests
-{
- [Test]
- public void BoundsInOrderStayAsTheyAre()
- {
- Assert.That(PauseRange.GetEffective(10, false, 20, false), Is.EqualTo(new PauseRange(10, 20)));
- }
-
- [Test]
- public void AnUpperBoundBelowTheLowerOneIsRaisedToIt()
- {
- Assert.That(PauseRange.GetEffective(60, false, 20, false), Is.EqualTo(new PauseRange(60, 60)));
- }
-
- [Test]
- public void ALockedLowerBoundRaisesTheUpperOne()
- {
- Assert.That(PauseRange.GetEffective(60, true, 20, false), Is.EqualTo(new PauseRange(60, 60)));
- }
-
- [Test]
- public void ALockedUpperBoundLowersTheLowerOne()
- {
- Assert.That(PauseRange.GetEffective(60, false, 20, true), Is.EqualTo(new PauseRange(20, 20)));
- }
-
- [Test]
- public void BothBoundsLockedTheWrongWayRoundLetTheLongerPauseWin()
- {
- Assert.That(PauseRange.GetEffective(60, true, 20, true), Is.EqualTo(new PauseRange(60, 60)));
- }
-
- [Test]
- public void BoundsOutsideTheAllowedRangeAreClamped()
- {
- Assert.That(PauseRange.GetEffective(-5, false, 1_000, false), Is.EqualTo(new PauseRange(0, DataDataSourceIndexing.MAX_PAUSE_BETWEEN_STEPS_SECONDS)));
- }
-
- [Test]
- public void BoundsInOrderComeFromTheSettingsWithoutAskingForLocks()
- {
- var settings = new DataDataSourceIndexing
- {
- MinimumPauseBetweenStepsSeconds = 10,
- MaximumPauseBetweenStepsSeconds = 20
- };
-
- Assert.That(PauseRange.FromSettings(settings), Is.EqualTo(new PauseRange(10, 20)));
- }
-
- [Test]
- public void OnlyZeroForBothBoundsMeansNoPause()
- {
- using (Assert.EnterMultipleScope())
- {
- Assert.That(PauseRange.GetEffective(0, false, 0, false).IsNone, Is.True);
- Assert.That(PauseRange.GetEffective(0, false, 5, false).IsNone, Is.False);
- Assert.That(PauseRange.GetEffective(30, false, 0, false), Is.EqualTo(new PauseRange(30, 30)));
- Assert.That(new DataDataSourceIndexing().MinimumPauseBetweenStepsSeconds, Is.Zero);
- Assert.That(new DataDataSourceIndexing().MaximumPauseBetweenStepsSeconds, Is.Zero);
- }
- }
-}
\ No newline at end of file
diff --git a/app/Tests/Tools/PauseBetweenStepsTests.cs b/app/Tests/Tools/Pauses/PauseBetweenStepsTests.cs
similarity index 98%
rename from app/Tests/Tools/PauseBetweenStepsTests.cs
rename to app/Tests/Tools/Pauses/PauseBetweenStepsTests.cs
index 6d0179b15..808e2d048 100644
--- a/app/Tests/Tools/PauseBetweenStepsTests.cs
+++ b/app/Tests/Tools/Pauses/PauseBetweenStepsTests.cs
@@ -1,6 +1,6 @@
-using AIStudio.Tools.Services.Indexing;
+using AIStudio.Tools.Pauses;
-namespace AIStudio.Tests.Tools;
+namespace AIStudio.Tests.Tools.Pauses;
///
/// Checks the pause between two indexing steps, which spares an embedding server that many people share.
diff --git a/app/Tests/Tools/Pauses/PauseRangeTests.cs b/app/Tests/Tools/Pauses/PauseRangeTests.cs
new file mode 100644
index 000000000..60bc62074
--- /dev/null
+++ b/app/Tests/Tools/Pauses/PauseRangeTests.cs
@@ -0,0 +1,147 @@
+using AIStudio.Settings.DataModel;
+using AIStudio.Tools.Pauses;
+
+namespace AIStudio.Tests.Tools.Pauses;
+
+///
+/// Checks which bounds of a random pause apply, as the user set them, as configuration plugins lock them, and within the limits of each feature.
+///
+[TestFixture]
+public sealed class PauseRangeTests
+{
+ private static readonly Func LOCKED = () => true;
+
+ private static readonly Func UNLOCKED = () => false;
+
+ private static readonly PauseLimits INDEXING = DataDataSourceIndexing.PAUSE_LIMITS;
+
+ private static readonly PauseLimits BATCH_PROCESSING = DataBatchProcessing.PAUSE_LIMITS;
+
+ [Test]
+ public void BoundsInOrderStayAsTheyAre()
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 10, UNLOCKED, 20, UNLOCKED), Is.EqualTo(new PauseRange(10, 20)));
+ }
+
+ [Test]
+ public void AnUpperBoundBelowTheLowerOneIsRaisedToIt()
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 60, UNLOCKED, 20, UNLOCKED), Is.EqualTo(new PauseRange(60, 60)));
+ }
+
+ [Test]
+ public void ALockedLowerBoundRaisesTheUpperOne()
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 60, LOCKED, 20, UNLOCKED), Is.EqualTo(new PauseRange(60, 60)));
+ }
+
+ [Test]
+ public void ALockedUpperBoundLowersTheLowerOne()
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 60, UNLOCKED, 20, LOCKED), Is.EqualTo(new PauseRange(20, 20)));
+ }
+
+ [Test]
+ public void BothBoundsLockedTheWrongWayRoundLetTheLongerPauseWin()
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 60, LOCKED, 20, LOCKED), Is.EqualTo(new PauseRange(60, 60)));
+ }
+
+ [Test]
+ public void BoundsOutsideTheLimitsAreClamped()
+ {
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, -5, UNLOCKED, 1_000, UNLOCKED), Is.EqualTo(new PauseRange(0, 300)));
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, -5, UNLOCKED, 1_000, UNLOCKED), Is.EqualTo(new PauseRange(6, 300)));
+ }
+ }
+
+ [Test]
+ public void BoundsBelowTheShortestPauseOfAFeatureAreRaisedToIt()
+ {
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, 0, UNLOCKED, 3, UNLOCKED), Is.EqualTo(new PauseRange(6, 6)));
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, 2, UNLOCKED, 20, UNLOCKED), Is.EqualTo(new PauseRange(6, 20)));
+ }
+ }
+
+ [Test]
+ public void ALockedUpperBoundLowersTheLowerOneOnlyToTheShortestPauseOfAFeature()
+ {
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, 60, UNLOCKED, 2, LOCKED), Is.EqualTo(new PauseRange(6, 6)));
+ }
+
+ [Test]
+ public void TheLocksAreAskedOnlyWhileTheBoundsAreTheWrongWayRound()
+ {
+ var asked = 0;
+ var countingLock = () =>
+ {
+ asked++;
+ return false;
+ };
+
+ PauseRange.GetEffective(INDEXING, 10, countingLock, 10, countingLock);
+ PauseRange.GetEffective(INDEXING, 10, countingLock, 20, countingLock);
+ PauseRange.GetEffective(BATCH_PROCESSING, 0, countingLock, 3, countingLock);
+ Assert.That(asked, Is.Zero);
+
+ PauseRange.GetEffective(INDEXING, 20, countingLock, 10, countingLock);
+ Assert.That(asked, Is.Positive);
+ }
+
+ [Test]
+ public void TheIndexingTakesItsBoundsFromItsSettings()
+ {
+ var settings = new DataDataSourceIndexing
+ {
+ MinimumPauseBetweenStepsSeconds = 10,
+ MaximumPauseBetweenStepsSeconds = 20
+ };
+
+ Assert.That(settings.EffectivePauseRange, Is.EqualTo(new PauseRange(10, 20)));
+ }
+
+ [Test]
+ public void TheBatchProcessingPausesSixToTenSecondsByDefault()
+ {
+ var settings = new DataBatchProcessing();
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, settings.MinimumDelaySeconds, UNLOCKED, settings.MaximumDelaySeconds, UNLOCKED), Is.EqualTo(new PauseRange(6, 10)));
+ }
+
+ [Test]
+ public void OnlyZeroForBothBoundsMeansNoPause()
+ {
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(PauseRange.GetEffective(INDEXING, 0, UNLOCKED, 0, UNLOCKED).IsNone, Is.True);
+ Assert.That(PauseRange.GetEffective(INDEXING, 0, UNLOCKED, 5, UNLOCKED).IsNone, Is.False);
+ Assert.That(PauseRange.GetEffective(INDEXING, 30, UNLOCKED, 0, UNLOCKED), Is.EqualTo(new PauseRange(30, 30)));
+ Assert.That(new DataDataSourceIndexing().EffectivePauseRange.IsNone, Is.True);
+ }
+ }
+
+ [Test]
+ public void TheBatchProcessingAlwaysPauses()
+ {
+ Assert.That(PauseRange.GetEffective(BATCH_PROCESSING, 0, UNLOCKED, 0, UNLOCKED).IsNone, Is.False);
+ }
+
+ [Test]
+ public void TheLimitsAllowTheirShortestAndLongestPause()
+ {
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(INDEXING.Allows(0), Is.True);
+ Assert.That(INDEXING.Allows(-1), Is.False);
+ Assert.That(INDEXING.Allows(300), Is.True);
+ Assert.That(INDEXING.Allows(301), Is.False);
+ Assert.That(BATCH_PROCESSING.Allows(5), Is.False);
+ Assert.That(BATCH_PROCESSING.Allows(6), Is.True);
+ Assert.That(BATCH_PROCESSING.Allows(300), Is.True);
+ Assert.That(BATCH_PROCESSING.Allows(301), Is.False);
+ }
+ }
+}
\ No newline at end of file