fix(worker): register TaskRepository in DI and guard null WorkingDir
This commit is contained in:
@@ -72,7 +72,7 @@ public sealed class PlanningSessionManager
|
||||
|
||||
var list = await lists.GetByIdAsync(task.ListId, ct)
|
||||
?? throw new InvalidOperationException($"List {task.ListId} not found.");
|
||||
return new PlanningSessionStartContext(taskId, list.WorkingDir, files);
|
||||
return new PlanningSessionStartContext(taskId, list.WorkingDir ?? throw new InvalidOperationException($"List {task.ListId} has no working directory configured."), files);
|
||||
}
|
||||
|
||||
public async Task<int> FinalizeAsync(string taskId, bool queueAgentTasks, CancellationToken ct)
|
||||
@@ -125,7 +125,7 @@ public sealed class PlanningSessionManager
|
||||
|
||||
var list = await lists.GetByIdAsync(task.ListId, ct)
|
||||
?? throw new InvalidOperationException($"List {task.ListId} not found.");
|
||||
return new PlanningSessionResumeContext(taskId, list.WorkingDir, task.PlanningSessionId, mcpConfigPath);
|
||||
return new PlanningSessionResumeContext(taskId, list.WorkingDir ?? throw new InvalidOperationException($"List {task.ListId} has no working directory configured."), task.PlanningSessionId, mcpConfigPath);
|
||||
}
|
||||
|
||||
private static string GenerateToken()
|
||||
|
||||
Reference in New Issue
Block a user