feat(ui): add MergeTaskAsync and GetMergeTargetsAsync to WorkerClient
This commit is contained in:
@@ -179,6 +179,24 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable
|
|||||||
await _hub.InvokeAsync("ResetTask", taskId);
|
await _hub.InvokeAsync("ResetTask", taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<MergeResultDto> MergeTaskAsync(string taskId, string targetBranch, bool removeWorktree, string commitMessage)
|
||||||
|
{
|
||||||
|
return await _hub.InvokeAsync<MergeResultDto>(
|
||||||
|
"MergeTask", taskId, targetBranch, removeWorktree, commitMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<MergeTargetsDto?> GetMergeTargetsAsync(string taskId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return await _hub.InvokeAsync<MergeTargetsDto>("GetMergeTargets", taskId);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task CancelTaskAsync(string taskId)
|
public async Task CancelTaskAsync(string taskId)
|
||||||
{
|
{
|
||||||
await _hub.InvokeAsync("CancelTask", taskId);
|
await _hub.InvokeAsync("CancelTask", taskId);
|
||||||
@@ -298,3 +316,5 @@ public sealed record AppSettingsDto(
|
|||||||
|
|
||||||
public sealed record WorktreeCleanupDto(int Removed);
|
public sealed record WorktreeCleanupDto(int Removed);
|
||||||
public sealed record WorktreeResetDto(int Removed, int TasksAffected, bool Blocked, int RunningTasks);
|
public sealed record WorktreeResetDto(int Removed, int TasksAffected, bool Blocked, int RunningTasks);
|
||||||
|
public record MergeResultDto(string Status, IReadOnlyList<string> ConflictFiles, string? ErrorMessage);
|
||||||
|
public record MergeTargetsDto(string DefaultBranch, IReadOnlyList<string> LocalBranches);
|
||||||
|
|||||||
Reference in New Issue
Block a user