feat(daily-prep): expose prep stream events and ClearMyDay on the UI worker client

This commit is contained in:
mika kuns
2026-06-04 08:09:41 +02:00
parent fa83d7f441
commit 7676ecf0d4
4 changed files with 30 additions and 0 deletions

View File

@@ -22,6 +22,9 @@ public abstract class StubWorkerClient : IWorkerClient
public event Action<string>? WorktreeUpdatedEvent;
public event Action<string>? ListUpdatedEvent;
public event Action<string, string>? TaskMessageEvent;
public event Action? PrepStartedEvent;
public event Action<string>? PrepLineEvent;
public event Action<bool>? PrepFinishedEvent;
public event Action<string, string>? PlanningMergeStartedEvent;
public event Action<string, string>? PlanningSubtaskMergedEvent;
public event Action<string, string, IReadOnlyList<string>>? PlanningMergeConflictEvent;
@@ -29,6 +32,12 @@ public abstract class StubWorkerClient : IWorkerClient
public event Action<string>? PlanningCompletedEvent;
#pragma warning restore CS0067
public int ClearMyDayCalls { get; private set; }
public void RaisePrepStarted() => PrepStartedEvent?.Invoke();
public void RaisePrepLine(string line) => PrepLineEvent?.Invoke(line);
public void RaisePrepFinished(bool ok) => PrepFinishedEvent?.Invoke(ok);
public virtual bool IsConnected => false;
public virtual Task WakeQueueAsync() => Task.CompletedTask;
@@ -63,6 +72,7 @@ public abstract class StubWorkerClient : IWorkerClient
public virtual Task<string?> GetWeekReportAsync(DateOnly start, DateOnly end) => Task.FromResult<string?>(null);
public virtual Task<string> GenerateWeekReportAsync(DateOnly start, DateOnly end) => Task.FromResult("");
public virtual Task<bool> RunDailyPrepNowAsync() => Task.FromResult(false);
public virtual Task ClearMyDayAsync() { ClearMyDayCalls++; return Task.CompletedTask; }
public virtual Task<AppSettingsDto?> GetAppSettingsAsync() => Task.FromResult<AppSettingsDto?>(null);
public virtual Task<List<DailyNoteDto>> GetDailyNotesAsync(DateOnly day) => Task.FromResult(new List<DailyNoteDto>());
public virtual Task<DailyNoteDto?> AddDailyNoteAsync(DateOnly day, string text) => Task.FromResult<DailyNoteDto?>(null);