feat(ui): add review hub methods and worker client wrappers
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -361,6 +361,30 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
if (!result.Ok) throw new HubException(result.Reason ?? "set status failed");
|
||||
}
|
||||
|
||||
public async Task ApproveReview(string taskId)
|
||||
{
|
||||
var result = await _state.ApproveReviewAsync(taskId, Context.ConnectionAborted);
|
||||
if (!result.Ok) throw new HubException(result.Reason ?? "approve failed");
|
||||
}
|
||||
|
||||
public async Task RejectReviewToQueue(string taskId, string feedback)
|
||||
{
|
||||
var result = await _state.RejectToQueueAsync(taskId, feedback, Context.ConnectionAborted);
|
||||
if (!result.Ok) throw new HubException(result.Reason ?? "reject failed");
|
||||
}
|
||||
|
||||
public async Task RejectReviewToIdle(string taskId)
|
||||
{
|
||||
var result = await _state.RejectToIdleAsync(taskId, Context.ConnectionAborted);
|
||||
if (!result.Ok) throw new HubException(result.Reason ?? "park failed");
|
||||
}
|
||||
|
||||
public async Task CancelReview(string taskId)
|
||||
{
|
||||
var result = await _state.CancelAsync(taskId, DateTime.UtcNow, Context.ConnectionAborted);
|
||||
if (!result.Ok) throw new HubException(result.Reason ?? "cancel failed");
|
||||
}
|
||||
|
||||
public async Task UpdateTaskAgentSettings(UpdateTaskAgentSettingsDto dto)
|
||||
{
|
||||
using var ctx = _dbFactory.CreateDbContext();
|
||||
|
||||
Reference in New Issue
Block a user