feat(worker): MCP tools update_planning_task and finalize
This commit is contained in:
@@ -267,6 +267,23 @@ public sealed class TaskRepository
|
||||
return child;
|
||||
}
|
||||
|
||||
public async Task UpdatePlanningTaskAsync(
|
||||
string taskId,
|
||||
string? title,
|
||||
string? description,
|
||||
CancellationToken ct = default)
|
||||
{
|
||||
var entity = await _context.Tasks.AsNoTracking().FirstOrDefaultAsync(t => t.Id == taskId, ct)
|
||||
?? throw new InvalidOperationException("Planning task not found.");
|
||||
if (title is not null) entity.Title = title;
|
||||
if (description is not null) entity.Description = description;
|
||||
await _context.Tasks
|
||||
.Where(t => t.Id == taskId)
|
||||
.ExecuteUpdateAsync(s => s
|
||||
.SetProperty(t => t.Title, entity.Title)
|
||||
.SetProperty(t => t.Description, entity.Description), ct);
|
||||
}
|
||||
|
||||
public async Task<TaskEntity?> SetPlanningStartedAsync(
|
||||
string taskId,
|
||||
string sessionToken,
|
||||
|
||||
Reference in New Issue
Block a user