feat(claude-do): UI: Gate-Schwellen im Settings-Modal (General)
Macht die zwei Schwellen einstellbar. Setzt den Data-Subtask (Felder in `app_settings`) und den Hub-Subtask voraus. **Zu bauen** 1. `AppSettingsDto` durchziehen: `WorkerHub` (`GetAppSettings` / `UpdateAppSettings`) und der UI-seitige Record in `WorkerClient.cs` bekommen `UsageGateFiveHourPct` und `UsageGateSevenDayPct`. 2. `GeneralSettingsTabViewModel`: zwei `[ObservableProperty]`-Felder, Validie ClaudeDo-Task: 06068810-5b5c-4635-80dd-62eeba89fb8c
This commit is contained in:
@@ -18,6 +18,9 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
|
||||
[ObservableProperty] private int _defaultMaxTurns = 100;
|
||||
[ObservableProperty] private string _defaultPermissionMode = PermissionModeRegistry.DefaultMode;
|
||||
[ObservableProperty] private int _maxParallelExecutions = 1;
|
||||
// Percentage of the 5h/7d Claude usage window at which the autonomous queue pauses. 0 = gate off.
|
||||
[ObservableProperty] private int _usageGateFiveHourPct = 80;
|
||||
[ObservableProperty] private int _usageGateSevenDayPct = 90;
|
||||
// Newline-separated path prefixes excluded from the weekly report.
|
||||
[ObservableProperty] private string _reportExcludedPaths = @"C:\Private";
|
||||
// 0=Sunday..6=Saturday (System.DayOfWeek); default Wednesday.
|
||||
@@ -91,6 +94,10 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
|
||||
{
|
||||
if (MaxParallelExecutions < 1 || MaxParallelExecutions > 20)
|
||||
return "Max parallel executions must be between 1 and 20.";
|
||||
if (UsageGateFiveHourPct < 0 || UsageGateFiveHourPct > 100)
|
||||
return "Usage gate (5h) must be between 0 and 100.";
|
||||
if (UsageGateSevenDayPct < 0 || UsageGateSevenDayPct > 100)
|
||||
return "Usage gate (7d) must be between 0 and 100.";
|
||||
foreach (var row in ModelPresets)
|
||||
if (row.MaxTurns is < 1 or > 200)
|
||||
return $"Max turns for {row.Model} must be between 1 and 200.";
|
||||
|
||||
Reference in New Issue
Block a user