feat(daily-prep): add RunDailyPrepNow hub method and expose DailyPrepMaxTasks

This commit is contained in:
mika kuns
2026-06-03 16:30:23 +02:00
parent 20b3a29d08
commit 2d00160283
8 changed files with 32 additions and 6 deletions

View File

@@ -22,6 +22,8 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
[ObservableProperty] private bool _isBusy;
[ObservableProperty] private string _statusMessage = "";
private int _loadedDailyPrepMaxTasks = 5;
public Action? CloseAction { get; set; }
public SettingsModalViewModel(WorkerClient worker, PrimeClaudeTabViewModel prime,
@@ -60,6 +62,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
: string.Join(Environment.NewLine,
System.Text.Json.JsonSerializer.Deserialize<List<string>>(dto.ReportExcludedPaths) ?? new());
General.StandupWeekday = dto.StandupWeekday is >= 0 and <= 6 ? dto.StandupWeekday : (int)DayOfWeek.Wednesday;
_loadedDailyPrepMaxTasks = dto.DailyPrepMaxTasks < 1 ? 5 : dto.DailyPrepMaxTasks;
}
else StatusMessage = Loc.T("vm.settingsModal.workerOffline");
@@ -91,7 +94,8 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
System.Text.Json.JsonSerializer.Serialize(
General.ReportExcludedPaths
.Split('\n').Select(l => l.Trim().TrimEnd('\r')).Where(l => l.Length > 0).ToList()),
General.StandupWeekday);
General.StandupWeekday,
_loadedDailyPrepMaxTasks);
await _worker.UpdateAppSettingsAsync(dto);
await Prime.SaveAsync();
CloseAction?.Invoke();